Skip to content
GitLab
Menu
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
xsmith
WebAssembly Sandbox
Commits
e73dec39
Commit
e73dec39
authored
Apr 06, 2020
by
Guy Watson
Browse files
Replace uses of 'e' with 'expr' in order to be consistent
parent
1699e7a8
Changes
1
Hide whitespace changes
Inline
Side-by-side
wasmlike/wasmlike.rkt
View file @
e73dec39
...
...
@@ -51,7 +51,7 @@
#:prop
may-be-generated
#f
]
[
LiteralInt
Expr
([
v
=
(
random
10000
)])
#:prop
choice-weight
3
]
[
Noop
Expr
([
e
:
Expr
])]
[
Noop
Expr
([
e
xpr
:
Expr
])]
[
Binop
Expr
([
l
:
Expr
]
[
r
:
Expr
])
;; use l and r here
#:prop
choice-weight
30
;; default is 10
#:prop
may-be-generated
#f
]
...
...
@@ -75,7 +75,7 @@
[
And
Binop
()]
[
Or
Binop
()]
[
Xor
Binop
()]
[
Unop
Expr
([
e
:
Expr
])
[
Unop
Expr
([
e
xpr
:
Expr
])
#:prop
choice-weight
20
#:prop
may-be-generated
#f
]
[
EqualZero
Unop
()]
...
...
@@ -93,8 +93,8 @@
#:prop
choice-weight
10
]
[
If
Expr
([
cond
:
Expr
]
[
then
:
Expr
])]
[
Block
Expr
([
e
:
Expr
])]
[
Loop
Expr
([
e
:
Expr
])]
[
Block
Expr
([
e
xpr
:
Expr
])]
[
Loop
Expr
([
e
xpr
:
Expr
])]
[
Branch
Expr
([
val
:
Expr
]
[
targetnode
]
[
targetindex
])
;; a number depth
...
...
@@ -197,7 +197,7 @@
'name
loopvar-name
'expr
branch
))]
[
loop
(
make-fresh-node
'Loop
(
hash
'e
loop-body
))])
(
hash
'e
xpr
loop-body
))])
(
hash
'loopvar
loopvar
'loop
loop
))]
)
...
...
@@ -225,14 +225,14 @@
(
λ
(
n
t
)
(
hash
'root
(
fresh-type-variable
)))]]
[
LiteralInt
[
int
(
no-child-types
)]]
[
Noop
[
int
(
λ
(
n
t
)
(
hash
'e
int
))]]
[
Noop
[
int
(
λ
(
n
t
)
(
hash
'e
xpr
int
))]]
[
Binop
[(
fresh-type-variable
int
#|float|#
)
(
λ
(
n
t
)
(
hash
'l
t
'r
t
))]]
[
Unop
[(
fresh-type-variable
int
)
(
λ
(
n
t
)
(
hash
'e
t
))]]
(
hash
'e
xpr
t
))]]
[
IfElse
[
int
(
λ
(
n
t
)
(
hash
'cond
int
...
...
@@ -242,8 +242,8 @@
(
λ
(
n
t
)
(
hash
'cond
int
'then
int
))]]
[
Block
[
int
(
λ
(
n
t
)
(
hash
'e
int
))]]
[
Loop
[
int
(
λ
(
n
t
)
(
hash
'e
int
))]]
[
Block
[
int
(
λ
(
n
t
)
(
hash
'e
xpr
int
))]]
[
Loop
[
int
(
λ
(
n
t
)
(
hash
'e
xpr
int
))]]
[
ForLoop
[
int
(
λ
(
n
t
)
(
hash
'loopvar
int
'loop
int
))]]
[
Branch
[
int
(
λ
(
n
t
)
(
hash
'val
int
))]]
...
...
@@ -377,13 +377,13 @@
[
LiteralInt
(
λ
(
n
)
(
list
'i32
.
const
(
ast-child
'v
n
)))]
[
Noop
(
λ
(
n
)
(
append
'
(
nop
)
(
render-node
(
ast-child
'e
n
))))]
(
render-node
(
ast-child
'e
xpr
n
))))]
[
Binop
(
λ
(
n
)
(
append
(
render-node
(
ast-child
'l
n
))
(
render-node
(
ast-child
'r
n
))
(
list
(
att-value
'math-op
n
))))]
[
Unop
(
λ
(
n
)
(
append
(
render-node
(
ast-child
'e
n
))
(
render-node
(
ast-child
'e
xpr
n
))
(
list
(
att-value
'math-op
n
))))]
[
IfElse
(
λ
(
n
)
(
append
...
...
@@ -402,12 +402,12 @@
[
Block
(
λ
(
n
)
(
append
'
(
block
(
result
i32
))
(
render-node
(
ast-child
'e
n
))
(
render-node
(
ast-child
'e
xpr
n
))
'
(
end
)))]
[
Loop
(
λ
(
n
)
(
append
'
(
loop
(
result
i32
))
(
render-node
(
ast-child
'e
n
))
(
render-node
(
ast-child
'e
xpr
n
))
'
(
end
)))]
[
ForLoop
(
λ
(
n
)
(
append
...
...
Write
Preview
Supports
Markdown
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