Commit a1ee0386 authored by Guy Watson's avatar Guy Watson
Browse files

Global inital value expression must be a literal const

Section 6.4.6 in the wasm spec
parent 37d47afd
......@@ -50,13 +50,16 @@
[localcount = (random 1 10)])]
[Expr #f ()
#:prop may-be-generated #f]
[LiteralIntThirtyTwo Expr ([v = (random -1000 1000)]) ;;todo add command line feature for the whole range
[Literal Expr ([v])
#:prop choice-weight 3
#:prop may-be-generated #f]
[LiteralIntThirtyTwo Literal ([v = (random -1000 1000)]) ;;todo add command line feature for the whole range
#:prop choice-weight 3]
[LiteralIntSixtyFour Expr ([v = (random -1000 1000)])
[LiteralIntSixtyFour Literal ([v = (random -1000 1000)])
#:prop choice-weight 3]
[LiteralFloatThirtyTwo Expr ([v = (+ (random -1000 1000) (random))])
[LiteralFloatThirtyTwo Literal ([v = (+ (random -1000 1000) (random))])
#:prop choice-weight 3]
[LiteralFloatSixtyFour Expr ([v = (+ (random -1000 1000) (random))])
[LiteralFloatSixtyFour Literal ([v = (+ (random -1000 1000) (random))])
#:prop choice-weight 3]
[Noop Expr ([expr : Expr])]
[Binop Expr ([l : Expr] [r : Expr]) ;; use l and r here
......@@ -130,7 +133,7 @@
[index])]
[GlobalDeclaration #f ([name]
[type]
[initialvalue : Expr])
[initialvalue : Literal])
#:prop binder-info (name type definition)]
[GlobalGet Expr ([name])
#:prop reference-info (read name)
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment