Changeset 8902 for src/Pugs/Embed

Show
Ignore:
Timestamp:
02/01/06 14:58:31 (3 years ago)
Author:
audreyt
Message:

* add a parrot_init() call.
* switch to -f (fast core) for portability.

Files:
1 modified

Legend:

Unmodified
Added
Removed
  • src/Pugs/Embed/Parrot.hsc

    r8900 r8902  
    5555    args <- getEnv "PUGS_PARROT_OPTS" 
    5656    let args' | isJust args && fromJust args /= "" = fromJust args 
    57               | otherwise                          = "-C" 
     57              | otherwise                          = "-f" 
    5858    rawSystem cmd [args', file] 
    5959    return () 
     
    145145import Foreign.C.String 
    146146import Foreign.Storable 
     147-- import Foreign.StablePtr 
    147148import System.IO.Unsafe 
    148149import System.Directory 
     
    173174    interp <- parrot_new nullPtr 
    174175    writeIORef _ParrotInterp interp 
    175 #ifdef XXX_ENABLE_PARROT_RUNCORES 
    176 #if PARROT_JIT_CAPABLE && defined(PARROT_JIT_CORE) 
     176#if XXX_ENABLE_PARROT_JIT && PARROT_JIT_CAPABLE && defined(PARROT_JIT_CORE) 
    177177    parrot_set_run_core interp PARROT_JIT_CORE 
     178#elsif defined(PARROT_FAST_CORE) 
     179    parrot_set_run_core interp PARROT_FAST_CORE 
     180#elsif defined(PARROT_CGP_CORE) 
     181    parrot_set_run_core interp PARROT_CGP_CORE 
    178182#elsif defined(PARROT_CGOTO_CORE) 
    179183    parrot_set_run_core interp PARROT_CGOTO_CORE 
    180 #elsif defined(PARROT_CGP_CORE) 
    181     parrot_set_run_core interp PARROT_CGP_CORE 
    182 #endif 
    183184#endif 
    184185    -- parrot_set_debug interp 0x20 
     186    -- ptr <- newStablePtr _ParrotInterp 
     187    -- parrot_init_stacktop interp (castStablePtrToPtr ptr) 
     188    parrot_init interp 
    185189    parrot_imcc_init interp 
    186190 
     
    266270    parrot_init :: ParrotInterp -> IO () 
    267271 
     272foreign import ccall "Parrot_init_stacktop" 
     273    parrot_init_stacktop :: ParrotInterp -> Ptr () -> IO () 
     274 
    268275foreign import ccall "Parrot_readbc" 
    269276    parrot_readbc :: ParrotInterp -> CString -> IO ParrotPackFile