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
cloogle.org
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
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
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Cloogle
cloogle.org
Commits
8a7b07d8
Verified
Commit
8a7b07d8
authored
Dec 12, 2018
by
Camil Staps
🚀
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Add titles to ABC documentation
parent
8cfecd0b
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
21 additions
and
19 deletions
+21
-19
backend/Builtin/ABC.dcl
backend/Builtin/ABC.dcl
+2
-1
backend/Builtin/ABC.icl
backend/Builtin/ABC.icl
+18
-17
backend/builddb.icl
backend/builddb.icl
+1
-1
No files found.
backend/Builtin/ABC.dcl
View file @
8a7b07d8
definition
module
Builtin
.
ABC
from
Data
.
Either
import
::
Either
from
Cloogle
.
DB
import
::
ABCInstructionEntry
builtin_abc_instructions
::
[
ABCInstructionEntry
]
builtin_abc_instructions
::
[
Either
String
ABCInstructionEntry
]
backend/Builtin/ABC.icl
View file @
8a7b07d8
...
...
@@ -4,21 +4,22 @@ import _SystemArray
import
StdList
import
StdMisc
import
Data
.
Either
import
Text
import
Cloogle
.
API
import
Cloogle
.
DB
builtin_abc_instructions
::
[
ABCInstructionEntry
]
builtin_abc_instructions
::
[
Either
String
ABCInstructionEntry
]
builtin_abc_instructions
=
[
i_create
:
arith_instruc
tions
++
stack_operation
s
++
branche
s
++
miscellaneou
s
++
directives
++
[{
zero
&
aie_instruction
=
i
}
\\
i
<-
other_instructions
]
]
withTitle
"Arithmetic"
arith_instructions
++
withTitle
"Stack manipulation"
stack_opera
tions
++
withTitle
"Branching"
branche
s
++
withTitle
"Miscellaneous"
miscellaneou
s
++
withTitle
"Directives"
directive
s
++
withTitle
"Undocumented instructions"
[{
zero
&
aie_instruction
=
i
}
\\
i
<-
other_instructions
]
where
withTitle
title
instrs
=
[
Left
title
:
map
Right
instrs
]
instance
zero
ABCInstructionEntry
where
...
...
@@ -45,13 +46,6 @@ INT_ :== ABCArgument ABCTypeInt True
REAL
:==
ABCArgument
ABCTypeReal
False
REAL_
:==
ABCArgument
ABCTypeReal
True
i_create
::
ABCInstructionEntry
i_create
=
{
zero
&
aie_instruction
=
"create"
,
aie_description
=
"Creates a new empty node and pushes its address to the A-stack."
}
arith_instructions
::
[
ABCInstructionEntry
]
arith_instructions
=
[
arith1
"absR"
"Real"
"absolute value"
...
...
@@ -190,6 +184,7 @@ stack_operations =
,
i_build_r
,
i_build_u
,
i_buildAC
,
i_create
,
i_create_array
,
i_create_array_
,
fill
"Bool"
BOOL
...
...
@@ -278,6 +273,12 @@ where
,
aie_description
=
"Pushes the argument string to the A-stack."
}
i_create
=
{
zero
&
aie_instruction
=
"create"
,
aie_description
=
"Creates a new empty node and pushes its address to the A-stack."
}
i_create_array
=
{
zero
&
aie_instruction
=
"create_array"
...
...
@@ -508,7 +509,7 @@ where
,
aie_arguments
=
[
INT
]
,
aie_description
=
join
"
\n\n
"
[
"Take the top of the B-stack as a pointer and read a 16-bit signed integer from that pointer with the argument as offset."
,
"See also {{`load_i}}, {{`load_si32`}}, {{`load_ui8`}}."
,
"See also {{`load_i
`
}}, {{`load_si32`}}, {{`load_ui8`}}."
]
}
i_load_si32
=
...
...
backend/builddb.icl
View file @
8a7b07d8
...
...
@@ -135,7 +135,7 @@ where
map
FunctionEntry
(
concatMap
constructor_functions
builtin_types
)
++
map
FunctionEntry
(
concatMap
record_functions
builtin_types
)
++
map
SyntaxEntry
builtin_syntax
++
map
ABCInstructionEntry
builtin_abc_instructions
map
ABCInstructionEntry
[
i
\\
Right
i
<-
builtin_abc_instructions
]
printStats
::
!*
CloogleDB
!*
File
->
*(*
CloogleDB
,
*
File
)
printStats
db
f
...
...
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