-
Notifications
You must be signed in to change notification settings - Fork 493
Stack test cleanup #351
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Stack test cleanup #351
Changes from all commits
d59bc2d
853f85b
ecf3d4c
2c1a615
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -14,10 +14,10 @@ | |
| (block (call $dummy) (call $dummy) (br_if 0 (get_local 0))) | ||
| ) | ||
| (func (export "as-block-first-value") (param i32) (result i32) | ||
| (block i32 (br_if 0 (i32.const 10) (get_local 0)) (return (i32.const 11))) | ||
| (block i32 (drop (br_if 0 (i32.const 10) (get_local 0))) (return (i32.const 11))) | ||
|
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I don't understand why a drop is required here, since br_if leaves its value on the stack in the false case, and then falls off the end of the block, and the block is annotated as i32. There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. The |
||
| ) | ||
| (func (export "as-block-mid-value") (param i32) (result i32) | ||
| (block i32 (call $dummy) (br_if 0 (i32.const 20) (get_local 0)) (return (i32.const 21))) | ||
| (block i32 (call $dummy) (drop (br_if 0 (i32.const 20) (get_local 0))) (return (i32.const 21))) | ||
| ) | ||
| (func (export "as-block-last-value") (param i32) (result i32) | ||
| (block i32 | ||
|
|
||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -191,14 +191,6 @@ | |
| "type mismatch" | ||
| ) | ||
|
|
||
| ;; TODO(stack): move these elsewhere | ||
| (module | ||
| (func (param i32 i32)) | ||
| (func $arity-nop-first (call 0 (nop) (i32.const 1) (i32.const 2))) | ||
| (func $arity-nop-mid (call 0 (i32.const 1) (nop) (i32.const 2))) | ||
| (func $arity-nop-last (call 0 (i32.const 1) (i32.const 2) (nop))) | ||
| ) | ||
|
|
||
| (assert_invalid | ||
|
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Equivalent tests exist in nop.wast, so you can just delete this. |
||
| (module | ||
| (func $type-first-void-vs-num (call 1 (nop) (i32.const 1))) | ||
|
|
||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -285,21 +285,6 @@ | |
| "type mismatch" | ||
| ) | ||
|
|
||
| ;; TODO(stack): move these elsewhere | ||
| (module | ||
| (type (func (param i32 i32))) | ||
| (table 0 anyfunc) | ||
| (func $arity-nop-first | ||
| (call_indirect 0 (nop) (i32.const 1) (i32.const 2) (i32.const 0)) | ||
| ) | ||
| (func $arity-nop-mid | ||
| (call_indirect 0 (i32.const 1) (nop) (i32.const 2) (i32.const 0)) | ||
| ) | ||
| (func $arity-nop-last | ||
| (call_indirect 0 (i32.const 1) (i32.const 2) (nop) (i32.const 0)) | ||
| ) | ||
| ) | ||
|
|
||
| (assert_invalid | ||
|
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Same here, this can just go away. |
||
| (module | ||
| (type (func (param i32))) | ||
|
|
||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -475,11 +475,6 @@ | |
| ) | ||
| ;) | ||
|
|
||
| ;; TODO(stack): move this elsewhere | ||
| (module (func $type-break-last-num-vs-void | ||
| (i32.const 0) (br 0) | ||
| )) | ||
|
|
||
| (assert_invalid | ||
|
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. This one is subsumed by unwind.wast (#344) as well. |
||
| (module (func $type-break-last-void-vs-num (result i32) | ||
| (br 0) | ||
|
|
||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
He he, most of these are probably also fixed in #345.