Skip to content
GitLab
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
clean-and-itasks
clean-ide
Commits
953531ae
Commit
953531ae
authored
Jan 21, 2009
by
John van Groningen
Browse files
use GeneralSt from PmCallBack instead of PSt
parent
fd54245f
Changes
2
Hide whitespace changes
Inline
Side-by-side
Win/PmCleanSystem.dcl
View file @
953531ae
...
...
@@ -2,11 +2,12 @@ definition module PmCleanSystem
// Interface module for calling the CLEAN compiler, code generator and linker
import
StdFile
,
StdPSt
,
StdMaybe
import
StdFile
,
StdMaybe
import
StdPathname
import
UtilStrictLists
import
PmCompilerOptions
import
PmTypes
import
PmCallBack
standardStaticLibraries
::
!
Processor
!
LinkMethod
->
List
String
standardObjectFiles
::
!
Bool
!
Bool
!
Processor
!
Bool
->
List
String
...
...
@@ -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 quoted if required
!
Bool
!(
WindowFun
*
(
PSt
.
l
)
)
// error display fun
!(
WindowFun
*
GeneralSt
)
// error display fun
!
CodeGenerateAsmOrCode
// generate assembly only?
!
Pathname
// full .abc pathname of module to be compiled
!
Bool
// time profiling...
...
...
@@ -80,7 +81,7 @@ CodeGen :: // Generates code for the given file:
!
ApplicationOptions
// application options
!
Pathname
// startup directory
!
CompilerProcessIds
!*
(
PSt
.
l
)
// state
!*
GeneralSt
// state
->
(
!
Pathname
// full pathname of generated object file
// 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:
// settings.
,
!
Bool
// success status
,
!
CompilerProcessIds
,
!*
(
PSt
.
l
)
// state
,
!*
GeneralSt
// state
)
Link
::
// Links the given file:
!
String
// linker exe name
// !! 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...
!(
WindowFun
*
(
PSt
.
l
)
)
// error display fun
!(
WindowFun
*
GeneralSt
)
// error display fun
!
Pathname
// full pathname of the executable
!
ApplicationOptions
// application options
!
Pathname
// options pathname
...
...
@@ -113,13 +114,13 @@ Link :: // Links the given file:
!
String
// path to dynamic linker
!
Processor
// target processor
!
Bool
// 64 bit target processor
!*
(
PSt
.
l
)
// state
!*
GeneralSt
// state
->
(
!*
(
PSt
.
l
)
// state
(
!*
GeneralSt
// state
,
!
Bool
// success status
)
/*
DynLink :: !String !String !String !*
(PSt .l)
-> (Bool,*
PSt .l
)
DynLink :: !String !String !String !*
GeneralSt
-> (Bool,*
GeneralSt
)
*/
/*
Execute :: // Executes the given application
...
...
@@ -188,7 +189,7 @@ CompilePersistent ::
->
(!*
CompilingInfo
,!(!*
env
,
!
Pathname
,
!
CompilerMsg
))
|
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
)
DelayEventLoop
::
!.
ps
->
.
ps
Win/PmCleanSystem.icl
View file @
953531ae
...
...
@@ -8,6 +8,8 @@ import Directory
import
PmCompilerOptions
,
UtilStrictLists
import
PmPath
import
PmCallBack
import
UtilNewlinesFile
import
WriteOptionsFile
...
...
@@ -109,7 +111,7 @@ ExitCleanCompiler prog
instance
==
CodeGenerateAsmOrCode
where
(==)
::
CodeGenerateAsmOrCode
CodeGenerateAsmOrCode
->
Bool
//
(==) ::
!
CodeGenerateAsmOrCode
!
CodeGenerateAsmOrCode -> Bool
(==)
AsmGeneration
AsmGeneration
=
True
(==)
CodeGeneration
CodeGeneration
...
...
@@ -121,7 +123,7 @@ where
instance
==
CompileOrCheckSyntax
where
(==)
::
CompileOrCheckSyntax
CompileOrCheckSyntax
->
Bool
//
(==) ::
!
CompileOrCheckSyntax
!
CompileOrCheckSyntax -> Bool
(==)
SyntaxCheck
SyntaxCheck
=
True
(==)
Compilation
Compilation
...
...
@@ -551,9 +553,9 @@ where
=
escape_specials
(
i
+2
)
(
string
%
(
0
,
i
-1
)+++
"
\\
"
+++
string
%
(
i
,
dec
(
size
string
)))
=
escape_specials
(
inc
i
)
string
CodeGen
::
!
String
!
Bool
!(
WindowFun
*
(
PSt
.
l
)
)
!
CodeGenerateAsmOrCode
!
Pathname
!
Bool
!
CodeGenOptions
!
Processor
!
ApplicationOptions
!
Pathname
!
CompilerProcessIds
!*
(
PSt
.
l
)
->
(!
Pathname
,!
Bool
,!
CompilerProcessIds
,!*
(
PSt
.
l
)
)
CodeGen
::
!
String
!
Bool
!(
WindowFun
*
GeneralSt
)
!
CodeGenerateAsmOrCode
!
Pathname
!
Bool
!
CodeGenOptions
!
Processor
!
ApplicationOptions
!
Pathname
!
CompilerProcessIds
!*
GeneralSt
->
(!
Pathname
,!
Bool
,!
CompilerProcessIds
,!*
GeneralSt
)
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
|
not
cgen_ok
...
...
@@ -606,10 +608,10 @@ where
/* 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
!
Bool
!
String
!
Pathname
!
String
!
Processor
!
Bool
!*
(
PSt
.
l
)
->
(!*
(
PSt
.
l
)
,!
Bool
)
!
Bool
!
String
!
Pathname
!
String
!
Processor
!
Bool
!*
GeneralSt
->
(!*
GeneralSt
,!
Bool
)
Link
linker`
winfun
path
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
...
...
@@ -720,7 +722,7 @@ where
= 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
#
os
=
42
#
app
=
quoted_string
linker
+++
" /s "
+++
quoted_string
(
prj_path
)
...
...
@@ -868,7 +870,7 @@ compile_with_cache2 path directory arguments compiler_thread_id compiler_thread_
=
trace_n
(
"E"
)
(
False
,
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
SendRepeatResult
::
!
Int
!.
a
->
(!
Int
,!.
a
)
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment