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
20c39070
Commit
20c39070
authored
Mar 14, 2018
by
John van Groningen
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
add setting the stack and heap size in the project for the generated executable,
(written by Mart Lubbers)
parent
1dc036d5
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
33 additions
and
0 deletions
+33
-0
cpm/AbsSyn.dcl
cpm/AbsSyn.dcl
+2
-0
cpm/CpmLogic.icl
cpm/CpmLogic.icl
+4
-0
cpm/Parser.icl
cpm/Parser.icl
+27
-0
No files found.
cpm/AbsSyn.dcl
View file @
20c39070
...
...
@@ -43,6 +43,8 @@ from System.FilePath import :: FilePath
|
GenericFusionOff
|
DescExLOn
|
DescExLOff
|
HeapSize
!
Int
|
StackSize
!
Int
::
ModuleAction
=
CreateModule
ModuleType
...
...
cpm/CpmLogic.icl
View file @
20c39070
...
...
@@ -159,6 +159,10 @@ where
=
PR_SetApplicationOptions
{
PR_GetApplicationOptions
project
&
desc_exl
=
True
}
project
set_project_option
DescExLOff
project
=
PR_SetApplicationOptions
{
PR_GetApplicationOptions
project
&
desc_exl
=
False
}
project
set_project_option
(
HeapSize
hs
)
project
=
PR_SetApplicationOptions
{
PR_GetApplicationOptions
project
&
hs
=
hs
}
project
set_project_option
(
StackSize
ss
)
project
=
PR_SetApplicationOptions
{
PR_GetApplicationOptions
project
&
hs
=
ss
}
project
doProjectAction
_
_
_
_
world
=
help
"cpm project <projectfile> <action>"
...
...
cpm/Parser.icl
View file @
20c39070
...
...
@@ -91,11 +91,38 @@ parse_Project_options ["-descexl":project_option_args]
parse_Project_options
[
"-ndescexl"
:
project_option_args
]
#
(
ok
,
project_options
)
=
parse_Project_options
project_option_args
;
=
(
ok
,[
DescExLOff
:
project_options
]);
parse_Project_options
[
"-h"
,
heap_size
:
project_option_args
]
#
(
ok
,
project_options
)
=
parse_Project_options
project_option_args
;
#
heap_size
=
parseByteSuffix
heap_size
;
|
heap_size
>
0
=
(
ok
,[
HeapSize
heap_size
:
project_options
]);
parse_Project_options
[
"-s"
,
stack_size
:
project_option_args
]
#
(
ok
,
project_options
)
=
parse_Project_options
project_option_args
;
#
stack_size
=
parseByteSuffix
stack_size
;
|
stack_size
>
0
=
(
ok
,[
StackSize
stack_size
:
project_options
]);
parse_Project_options
[]
=
(
True
,[]);
parse_Project_options
_
=
(
False
,[]);
parseByteSuffix
::
!
String
->
Int
;
parseByteSuffix
s
|
size
s
==
0
=
0
;
#
suffix
=
s
.[
dec
(
size
s
)];
|
suffix
==
'k'
||
suffix
==
'K'
=
1024
*
safeToInt
(
s
%
(
0
,
size
s
-
2
));
|
suffix
==
'm'
||
suffix
==
'M'
=
1024
*
1024
*
safeToInt
(
s
%
(
0
,
size
s
-
2
));
=
safeToInt
s
;
safeToInt
::
!
String
->
Int
;
safeToInt
s
|
only_digits_in_string
0
s
=
toInt
s
;
=
0
;
parse_Module
::
![
String
]
!
String
->
CpmAction
;
parse_Module
[
"create"
]
module_name
=
Module
module_name
(
CreateModule
LibraryModule
);
parse_Module
[
"create"
,
"application"
]
module_name
=
Module
module_name
(
CreateModule
ApplicationModule
);
...
...
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