Commit 66d09823 authored by John van Groningen's avatar John van Groningen

implement Async make with a MachO compiler on MacOS X

parent a45c9e27
......@@ -15,9 +15,13 @@ standardStaticLibraries :: !Processor !LinkMethod -> List String
standardObjectFiles :: !Bool !Bool !Processor -> List String
getLibs :: ![String] !*Files -> (!(![String],![String]),!*Files)
:: CompilerProcessIds
NoCompilerProcessIds :: CompilerProcessIds
ClearCompilerCache :: !String !String !.a -> (!Int,!.a)
ClearCompilerCaches :: !Int !.a -> (!Int,!.a)
QuitCleanCompiler :: !*(IOSt .l) -> *(IOSt .l)
ClearCompilerCaches :: !CompilerProcessIds !.a -> (!Int,!.a)
QuitCleanCompiler :: !Bool !CompilerProcessIds !*(IOSt .l) -> *(IOSt .l)
:: CompileClearCache = ClearCache | Don`tClearCache
instance == CompileClearCache
......@@ -40,6 +44,7 @@ Compile :: // Compiles the given file:
!String // compiler exe name and options
// !! should be full path so that cocl generates diagnostics in logical place...
// should be quoted if required
!Bool // use_compiler_process_psn
!Bool // send -wmt flag to compiler (write_module_times)
!(WindowFun *env) // error display fun
!(WindowFun *env) // types display fun
......@@ -51,20 +56,23 @@ Compile :: // Compiles the given file:
!Bool // project eager or dynamic linking?
!CompilerOptions // compiler options
!Pathname // startup directory
!CompilerProcessIds
!*env // state
->
(!*env, // state
!Pathname // .abc pathname of generated code
(!Pathname // .abc pathname of generated code
// Note: on the macintosh the .abc file is generated in the standard Clean System
// Files Folder. On Unix, however, the location of the .abc depends on the user
// settings.
,!CompilerMsg // indication whether compilation was successfull
,!CompilerProcessIds
,!*env // state
) | FileEnv env
CodeGen :: // Generates code for the given file:
!String // generator exe name and options
// !! should be full path so that cg generates diagnostics in logical place...
// should be quoted if required
!Bool // use_compiler_process_psn
!(WindowFun *(PSt .l)) // error display fun
!CodeGenerateAsmOrCode // generate assembly only?
!Pathname // full .abc pathname of module to be compiled
......@@ -73,33 +81,21 @@ CodeGen :: // Generates code for the given file:
!Processor // target processor
!ApplicationOptions // application options
!Pathname // startup directory
!CompilerProcessIds
!*(PSt .l) // state
->
( !*(PSt .l) // state
, !Pathname // full pathname of generated object file
(!Pathname // full pathname of generated object file
// Note: on the macintosh the .o file is generated in the standard Clean System
// Files Folder. On Unix, however, the location of the .o depends on the user
// settings.
, !Bool // success status
,!Bool // success status
,!CompilerProcessIds
,!*(PSt .l) // state
)
StartCodeGenerator ::
!String
!(WindowFun *(PSt .l))
!CodeGenerateAsmOrCode
!Pathname
!Int
!Bool
!CodeGenOptions
!Processor
!ApplicationOptions
!Pathname
!*(PSt .l)
->
( !Bool
, !Pathname
, !*(PSt .l)
)
StartCodeGenerator :: !String !(WindowFun *(PSt .l)) !CodeGenerateAsmOrCode !Pathname !Int !Bool !CodeGenOptions !Processor !ApplicationOptions !Pathname
!CompilerProcessIds !*(PSt .l)
-> (!Bool,!Pathname,!CompilerProcessIds,!*(PSt .l))
Link :: // Links the given file:
!String // linker exe name
......@@ -135,51 +131,30 @@ Execute :: // Executes the given application
!(WindowFun *env) // error display fun
!Pathname // full pathname of the application
!ApplicationOptions // application options (only need the console flag)
*env // state
!*env // state
->
( *env // state
( !*env // state
, !Bool // success status
)
Launch :: !{#Char} !.a -> (!Int, !.a)
Execute` :: !String !*env -> (!Bool,!Int,!*env)
// RWS ...
import StdMaybe
:: ThreadId
:== Int
CompileStartCommand ::
!String
!Bool // send -wmt flag to compiler (write_module_times)
!(WindowFun *env)
!CompileOrCheckSyntax
!Pathname
!(List Pathname)
!Int
!Bool
!Bool
!Bool
!CompilerOptions
!Pathname
!*env
-> (!Bool, !*env) | FileEnv env
CompileStartCommand :: !String !Bool !(WindowFun *env) !CompileOrCheckSyntax !Pathname !(List Pathname) !Int !Bool !Bool !Bool
!CompilerOptions !Pathname !CompilerProcessIds !*env
-> (!Bool, !CompilerProcessIds,!*env) | FileEnv env
CompileHandleExitCode :: !Int !String !String !Int !(WindowFun *env) !(WindowFun *env) !Pathname
!ListTypes !*env -> (!*env,!Pathname,!CompilerMsg) | FileEnv env
!ListTypes !*env -> (!Pathname,!CompilerMsg,!*env) | FileEnv env
/* old
CompilePollCompleted :: !*env -> (Maybe !(!Int,!Int), !*env) | FileEnv env
*/
:: CompilePollCompletedResult = NoFinishedCompiler | UnknownFinishedCompiler | FinishedCompiler !Int !Int
CompilePollCompleted :: !*env -> (!CompilePollCompletedResult, !*env) | FileEnv env
// ... RWS
// JVG ...
:: CompilingInfo
InitCompilingInfo :: *CompilingInfo
......@@ -206,4 +181,4 @@ CompilePersistent ::
SendRepeatResult :: !Int !.a -> (!Int,!.a)
// ... JVG
DelayEventLoop :: !.ps -> .ps;
This diff is collapsed.
This diff is collapsed.
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment