Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
C
clean-ide
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
6
Issues
6
List
Boards
Labels
Service Desk
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Operations
Operations
Incidents
Environments
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
clean-and-itasks
clean-ide
Commits
bc1ed4c9
Commit
bc1ed4c9
authored
May 16, 2019
by
Mart Lubbers
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
cpm, make bytecode accept default option
parent
b1ddd765
Pipeline
#23192
passed with stage
in 57 seconds
Changes
3
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
11 additions
and
9 deletions
+11
-9
cpm/AbsSyn.dcl
cpm/AbsSyn.dcl
+1
-1
cpm/CpmLogic.icl
cpm/CpmLogic.icl
+8
-5
cpm/Parser.icl
cpm/Parser.icl
+2
-3
No files found.
cpm/AbsSyn.dcl
View file @
bc1ed4c9
...
...
@@ -23,6 +23,7 @@ from StdMaybe import :: Maybe
|
SetRelativeRoot
String
|
SetTarget
String
|
SetExec
String
|
SetBytecode
(
Maybe
String
)
|
SetProjectOptions
[
ProjectOption
]
|
ProjectHelp
...
...
@@ -59,7 +60,6 @@ from StdMaybe import :: Maybe
|
Output
!
Output
|
LinkerGenerateSymbolsOn
|
LinkerGenerateSymbolsOff
|
ByteCodePath
!
FilePath
|
PO_OptimiseABC
!
Bool
|
PO_GenerateByteCode
!
Bool
|
PO_StripByteCode
!
Bool
...
...
cpm/CpmLogic.icl
View file @
bc1ed4c9
...
...
@@ -153,6 +153,11 @@ doProjectAction cleanhome pwd pn (SetTarget target) world
doProjectAction
cleanhome
pwd
pn
(
SetExec
exec
)
world
=
withProject
pwd
pn
cleanhome
(
PR_SetExecPath
exec
)
world
doProjectAction
cleanhome
pwd
pn
(
SetBytecode
Nothing
)
world
=
withProject
pwd
pn
cleanhome
(\
p
->
PR_SetByteCodePath
(
PR_GetExecPath
p
+++
".bc"
)
p
)
world
doProjectAction
cleanhome
pwd
pn
(
SetBytecode
(
Just
bcfile
))
world
=
withProject
pwd
pn
cleanhome
(
PR_SetByteCodePath
bcfile
)
world
doProjectAction
cleanhome
pwd
pn
(
SetProjectOptions
project_options
)
world
=
withProject
pwd
pn
cleanhome
(
set_project_options
project_options
)
world
where
...
...
@@ -200,8 +205,6 @@ where
=
PR_SetLinkOptions
project
{
PR_GetLinkOptions
project
&
generate_symbol_table
=
True
}
set_project_option
LinkerGenerateSymbolsOff
project
=
PR_SetLinkOptions
project
{
PR_GetLinkOptions
project
&
generate_symbol_table
=
False
}
set_project_option
(
ByteCodePath
path
)
project
=
PR_SetByteCodePath
path
project
set_project_option
(
PO_OptimiseABC
val
)
project
=
PR_SetCodeGenOptions
{
PR_GetCodeGenOptions
project
&
optimise_abc
=
val
}
project
set_project_option
(
PO_GenerateByteCode
val
)
project
...
...
@@ -226,6 +229,7 @@ doProjectAction _ _ _ _ world =
,
" : . is the same dir, .. the parent, ... the grandparent, etc."
,
" target <env> : set target environment to <env>"
,
" exec <execname> : set executable name to <execname>"
,
" bytecode [bc] : set bytecode file to <bcfile> or <execname>.bc if no file given"
,
" set <option> [<option>] : Set one or more of the following options:"
,
" : -h SIZE"
,
" : Change the heapsize (e.g. 2M)"
...
...
@@ -250,8 +254,6 @@ doProjectAction _ _ _ _ world =
,
" : Note that these are mutually exclusive and if you select multiple, the last one will take effect"
,
" : -mp, -nmp"
,
" : Enable or disable memory profiling"
,
" : -bytecode FILE"
,
" : Set the bytecode file target, usually mainmodule.bc"
,
" : -optimiseabc, -noptimiseabc"
,
" : Enable or disable ABC optimization for bytecode targets"
,
" : -genbytecode, -ngenbytecode"
...
...
@@ -266,8 +268,9 @@ doProjectAction _ _ _ _ world =
,
"Examples: "
,
" - To create an iTasks project for module test, run:"
,
" cpm project test create"
,
" cpm project test bytecode"
,
" cpm project test.prj target iTasks"
,
" cpm project test.prj set -dynamics -h 200m -s 2m -descexl -
bytecode -
optimiseabc -genbytecode -stripbytecode -keepbytecodesymbols -prelinkbytecode"
,
" cpm project test.prj set -dynamics -h 200m -s 2m -descexl -optimiseabc -genbytecode -stripbytecode -keepbytecodesymbols -prelinkbytecode"
,
" cpm project test.prj build"
]
world
...
...
cpm/Parser.icl
View file @
bc1ed4c9
...
...
@@ -31,6 +31,8 @@ parse_Project ["root",s] project_name
=
Project
project_name
(
SetRelativeRoot
s
);
parse_Project
[
"target"
,
s
]
project_name
=
Project
project_name
(
SetTarget
s
);
parse_Project
[
"exec"
,
s
]
project_name
=
Project
project_name
(
SetExec
s
);
parse_Project
[
"bytecode"
,
s
]
project_name
=
Project
project_name
(
SetBytecode
(
Just
s
));
parse_Project
[
"bytecode"
]
project_name
=
Project
project_name
(
SetBytecode
Nothing
);
parse_Project
[
"set"
:
project_option_args
]
project_name
#
(
ok
,
project_options
)
=
parse_Project_options
project_option_args
;
|
ok
...
...
@@ -149,9 +151,6 @@ parse_Project_options ["-mp":project_option_args]
parse_Project_options
[
"-nmp"
:
project_option_args
]
#
(
ok
,
project_options
)
=
parse_Project_options
project_option_args
;
=
(
ok
,
[
MemoryProfileOff
:
project_options
]);
parse_Project_options
[
"-bytecode"
:
path
:
project_option_args
]
#
(
ok
,
project_options
)
=
parse_Project_options
project_option_args
;
=
(
ok
,
[
ByteCodePath
path
:
project_options
]);
parse_Project_options
[
"-optimiseabc"
:
project_option_args
]
#
(
ok
,
project_options
)
=
parse_Project_options
project_option_args
;
=
(
ok
,
[
PO_OptimiseABC
True
:
project_options
]);
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a 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