Skip to content

Commit

Permalink
wast: Temporarily add back struct.new
Browse files Browse the repository at this point in the history
I accidentally removed the old 'struct.new' instruction when updating the GC
proposal implementation too early, as SpiderMonkey still relies on it. The
struct.narrow instruction is in the same situation.
  • Loading branch information
eqrion committed Aug 17, 2020
1 parent cbfac82 commit 5f9edd6
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 1 deletion.
3 changes: 3 additions & 0 deletions crates/wast/src/ast/expr.rs
Original file line number Diff line number Diff line change
Expand Up @@ -521,6 +521,9 @@ instructions! {
// gc proposal: eqref
RefEq : [0xd5] : "ref.eq",

// gc proposal (moz specific, will be removed)
StructNew(ast::Index<'a>) : [0xfb, 0x0] : "struct.new",

// gc proposal: struct
StructNewWithRtt(ast::Index<'a>) : [0xfb, 0x01] : "struct.new_with_rtt",
StructNewDefaultWithRtt(ast::Index<'a>) : [0xfb, 0x02] : "struct.new_default_with_rtt",
Expand Down
3 changes: 2 additions & 1 deletion crates/wast/src/resolve/names.rs
Original file line number Diff line number Diff line change
Expand Up @@ -1943,7 +1943,8 @@ impl<'a, 'b> ExprResolver<'a, 'b> {
}
}

StructNewWithRtt(i)
StructNew(i)
| StructNewWithRtt(i)
| StructNewDefaultWithRtt(i)
| ArrayNewWithRtt(i)
| ArrayNewDefaultWithRtt(i)
Expand Down

0 comments on commit 5f9edd6

Please sign in to comment.