Commit 953531ae authored by John van Groningen's avatar John van Groningen
Browse files

use GeneralSt from PmCallBack instead of PSt

parent fd54245f
...@@ -2,11 +2,12 @@ definition module PmCleanSystem ...@@ -2,11 +2,12 @@ definition module PmCleanSystem
// Interface module for calling the CLEAN compiler, code generator and linker // Interface module for calling the CLEAN compiler, code generator and linker
import StdFile, StdPSt, StdMaybe import StdFile, StdMaybe
import StdPathname import StdPathname
import UtilStrictLists import UtilStrictLists
import PmCompilerOptions import PmCompilerOptions
import PmTypes import PmTypes
import PmCallBack
standardStaticLibraries :: !Processor !LinkMethod -> List String standardStaticLibraries :: !Processor !LinkMethod -> List String
standardObjectFiles :: !Bool !Bool !Processor !Bool -> List String standardObjectFiles :: !Bool !Bool !Processor !Bool -> List String
...@@ -71,7 +72,7 @@ CodeGen :: // Generates code for the given file: ...@@ -71,7 +72,7 @@ CodeGen :: // Generates code for the given file:
// !! should be full path so that cg generates diagnostics in logical place... // !! should be full path so that cg generates diagnostics in logical place...
// should be quoted if required // should be quoted if required
!Bool !Bool
!(WindowFun *(PSt .l)) // error display fun !(WindowFun *GeneralSt) // error display fun
!CodeGenerateAsmOrCode // generate assembly only? !CodeGenerateAsmOrCode // generate assembly only?
!Pathname // full .abc pathname of module to be compiled !Pathname // full .abc pathname of module to be compiled
!Bool // time profiling... !Bool // time profiling...
...@@ -80,7 +81,7 @@ CodeGen :: // Generates code for the given file: ...@@ -80,7 +81,7 @@ CodeGen :: // Generates code for the given file:
!ApplicationOptions // application options !ApplicationOptions // application options
!Pathname // startup directory !Pathname // startup directory
!CompilerProcessIds !CompilerProcessIds
!*(PSt .l) // state !*GeneralSt // 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 // Note: on the macintosh the .o file is generated in the standard Clean System
...@@ -88,14 +89,14 @@ CodeGen :: // Generates code for the given file: ...@@ -88,14 +89,14 @@ CodeGen :: // Generates code for the given file:
// settings. // settings.
, !Bool // success status , !Bool // success status
, !CompilerProcessIds , !CompilerProcessIds
, !*(PSt .l) // state , !*GeneralSt // state
) )
Link :: // Links the given file: Link :: // Links the given file:
!String // linker exe name !String // linker exe name
// !! should be full path so that linker generates diagnostics in logical place... // !! should be full path so that linker generates diagnostics in logical place...
// this is quoted by the Link function because it first needs to decompose it... // this is quoted by the Link function because it first needs to decompose it...
!(WindowFun *(PSt .l)) // error display fun !(WindowFun *GeneralSt) // error display fun
!Pathname // full pathname of the executable !Pathname // full pathname of the executable
!ApplicationOptions // application options !ApplicationOptions // application options
!Pathname // options pathname !Pathname // options pathname
...@@ -113,13 +114,13 @@ Link :: // Links the given file: ...@@ -113,13 +114,13 @@ Link :: // Links the given file:
!String // path to dynamic linker !String // path to dynamic linker
!Processor // target processor !Processor // target processor
!Bool // 64 bit target processor !Bool // 64 bit target processor
!*(PSt .l) // state !*GeneralSt // state
-> ->
( !*(PSt .l) // state ( !*GeneralSt // state
, !Bool // success status , !Bool // success status
) )
/* /*
DynLink :: !String !String !String !*(PSt .l) -> (Bool,*PSt .l) DynLink :: !String !String !String !*GeneralSt -> (Bool,*GeneralSt)
*/ */
/* /*
Execute :: // Executes the given application Execute :: // Executes the given application
...@@ -188,7 +189,7 @@ CompilePersistent :: ...@@ -188,7 +189,7 @@ CompilePersistent ::
-> (!*CompilingInfo,!(!*env, !Pathname, !CompilerMsg)) -> (!*CompilingInfo,!(!*env, !Pathname, !CompilerMsg))
| FileEnv env | FileEnv env
StartCodeGenerator :: !String !(WindowFun *(PSt .l)) !CodeGenerateAsmOrCode !Pathname !Int !Bool !CodeGenOptions !Processor !ApplicationOptions !Pathname !CompilerProcessIds !*(PSt .l) -> (!Bool,!Pathname,!CompilerProcessIds,!*(PSt .l)) StartCodeGenerator :: !String !(WindowFun *GeneralSt) !CodeGenerateAsmOrCode !Pathname !Int !Bool !CodeGenOptions !Processor !ApplicationOptions !Pathname !CompilerProcessIds !*GeneralSt -> (!Bool,!Pathname,!CompilerProcessIds,!*GeneralSt)
SendRepeatResult :: !Int !.a -> (!Int,!.a) SendRepeatResult :: !Int !.a -> (!Int,!.a)
DelayEventLoop :: !.ps -> .ps DelayEventLoop :: !.ps -> .ps
...@@ -8,6 +8,8 @@ import Directory ...@@ -8,6 +8,8 @@ import Directory
import PmCompilerOptions, UtilStrictLists import PmCompilerOptions, UtilStrictLists
import PmPath import PmPath
import PmCallBack
import UtilNewlinesFile import UtilNewlinesFile
import WriteOptionsFile import WriteOptionsFile
...@@ -109,7 +111,7 @@ ExitCleanCompiler prog ...@@ -109,7 +111,7 @@ ExitCleanCompiler prog
instance == CodeGenerateAsmOrCode instance == CodeGenerateAsmOrCode
where where
(==) :: CodeGenerateAsmOrCode CodeGenerateAsmOrCode -> Bool // (==) :: !CodeGenerateAsmOrCode !CodeGenerateAsmOrCode -> Bool
(==) AsmGeneration AsmGeneration (==) AsmGeneration AsmGeneration
= True = True
(==) CodeGeneration CodeGeneration (==) CodeGeneration CodeGeneration
...@@ -121,7 +123,7 @@ where ...@@ -121,7 +123,7 @@ where
instance == CompileOrCheckSyntax instance == CompileOrCheckSyntax
where where
(==) :: CompileOrCheckSyntax CompileOrCheckSyntax -> Bool // (==) :: !CompileOrCheckSyntax !CompileOrCheckSyntax -> Bool
(==) SyntaxCheck SyntaxCheck (==) SyntaxCheck SyntaxCheck
= True = True
(==) Compilation Compilation (==) Compilation Compilation
...@@ -551,9 +553,9 @@ where ...@@ -551,9 +553,9 @@ where
= escape_specials (i+2) (string % (0,i-1)+++"\\"+++string % (i,dec (size string))) = escape_specials (i+2) (string % (0,i-1)+++"\\"+++string % (i,dec (size string)))
= escape_specials (inc i) string = escape_specials (inc i) string
CodeGen :: !String !Bool !(WindowFun *(PSt .l)) !CodeGenerateAsmOrCode !Pathname !Bool CodeGen :: !String !Bool !(WindowFun *GeneralSt) !CodeGenerateAsmOrCode !Pathname !Bool
!CodeGenOptions !Processor !ApplicationOptions !Pathname !CompilerProcessIds !*(PSt .l) !CodeGenOptions !Processor !ApplicationOptions !Pathname !CompilerProcessIds !*GeneralSt
-> (!Pathname,!Bool,!CompilerProcessIds,!*(PSt .l)) -> (!Pathname,!Bool,!CompilerProcessIds,!*GeneralSt)
CodeGen cgen` used_compiler_process_ids wf genAsmOrCode path timeprofile cgo tp ao startupdir compiler_process_ids ps CodeGen cgen` used_compiler_process_ids wf genAsmOrCode path timeprofile cgo tp ao startupdir compiler_process_ids ps
# (cgen_ok,cgen,cgendir) = mangleGenerator cgen` startupdir # (cgen_ok,cgen,cgendir) = mangleGenerator cgen` startupdir
| not cgen_ok | not cgen_ok
...@@ -606,10 +608,10 @@ where ...@@ -606,10 +608,10 @@ where
/* Links the given file: /* Links the given file:
*/ */
Link :: !String !(WindowFun *(PSt .l)) !Pathname !ApplicationOptions Link :: !String !(WindowFun *GeneralSt) !Pathname !ApplicationOptions
!Pathname !(List Pathname) !(List Pathname) !(List Pathname) !Bool !Bool !Bool !Bool !String !Pathname !(List Pathname) !(List Pathname) !(List Pathname) !Bool !Bool !Bool !Bool !String
!Bool !String !Pathname !String !Processor !Bool !*(PSt .l) !Bool !String !Pathname !String !Processor !Bool !*GeneralSt
-> (!*(PSt .l),!Bool) -> (!*GeneralSt,!Bool)
Link linker` winfun path Link linker` winfun path
applicationOptions=:{ss,hs,initial_heap_size,profiling,heap_size_multiple,o,memoryProfilingMinimumHeapSize=minheap} applicationOptions=:{ss,hs,initial_heap_size,profiling,heap_size_multiple,o,memoryProfilingMinimumHeapSize=minheap}
optionspathname library_file_names object_file_names static_libraries static gen_relocs gen_linkmap optionspathname library_file_names object_file_names static_libraries static gen_relocs gen_linkmap
...@@ -720,7 +722,7 @@ where ...@@ -720,7 +722,7 @@ where
= FindChar c line linelen (inc pos); = FindChar c line linelen (inc pos);
*/ */
DynLink :: !String !String !String !*(PSt .l) -> (Bool,*PSt .l) DynLink :: !String !String !String !*GeneralSt -> (Bool,*GeneralSt)
DynLink linker prj_path startupdir ps DynLink linker prj_path startupdir ps
# os = 42 # os = 42
# app = quoted_string linker +++ " /s " +++ quoted_string(prj_path) # app = quoted_string linker +++ " /s " +++ quoted_string(prj_path)
...@@ -868,7 +870,7 @@ compile_with_cache2 path directory arguments compiler_thread_id compiler_thread_ ...@@ -868,7 +870,7 @@ compile_with_cache2 path directory arguments compiler_thread_id compiler_thread_
= trace_n ("E") (False,s) = trace_n ("E") (False,s)
= (True,s) = (True,s)
StartCodeGenerator :: !String !(WindowFun *(PSt .l)) !CodeGenerateAsmOrCode !Pathname !Int !Bool !CodeGenOptions !Processor !ApplicationOptions !Pathname !CompilerProcessIds !*(PSt .l) -> (!Bool,!Pathname,!CompilerProcessIds,!*(PSt .l)) StartCodeGenerator :: !String !(WindowFun *GeneralSt) !CodeGenerateAsmOrCode !Pathname !Int !Bool !CodeGenOptions !Processor !ApplicationOptions !Pathname !CompilerProcessIds !*GeneralSt -> (!Bool,!Pathname,!CompilerProcessIds,!*GeneralSt)
StartCodeGenerator _ _ _ _ _ _ _ _ _ _ _ _ = undef StartCodeGenerator _ _ _ _ _ _ _ _ _ _ _ _ = undef
SendRepeatResult :: !Int !.a -> (!Int,!.a) SendRepeatResult :: !Int !.a -> (!Int,!.a)
......
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