File tree Expand file tree Collapse file tree 10 files changed +2685
-2538
lines changed Expand file tree Collapse file tree 10 files changed +2685
-2538
lines changed Original file line number Diff line number Diff line change @@ -23,3 +23,4 @@ project/.bloop/bloop.settings.json
2323conc_gen /*
2424ccbse_gen /*
2525headers /gensym /external.hpp
26+ grammar /.antlr /
Original file line number Diff line number Diff line change 1+ (module
2+ (type (;0;) (func (param i32 )))
3+ (import " console" " log" (func (type 0 )))
4+ (func (param i32 i32 ) (result i32 )
5+ local.get 0
6+ i32.eqz
7+ if (result i32 )
8+ local.get 1
9+ else
10+ local.get 0
11+ i32.const 1
12+ i32.sub
13+ local.get 1
14+ local.get 0
15+ i32.add
16+ (return_call 1 )
17+ end
18+ )
19+ (func (result i32 )
20+ i32.const 10
21+ i32.const 0
22+ (return_call 1 ))
23+ (export " sum10" (func 2 ))
24+ )
Original file line number Diff line number Diff line change @@ -68,6 +68,8 @@ ELSE: 'else' ;
6868SELECT : ' .select' ;
6969CALL : ' call' ;
7070CALL_INDIRECT : ' call_indirect' ;
71+ RETURN_CALL : ' return_call' ;
72+ RETURN_CALL_INDIRECT : ' return_call_indirect' ;
7173
7274LOCAL_GET : ' local.get' ;
7375LOCAL_SET : ' local.set' ;
Original file line number Diff line number Diff line change @@ -133,6 +133,7 @@ plainInstr
133133 | BR_TABLE idx+
134134 | RETURN
135135 | CALL idx
136+ | RETURN_CALL idx
136137 | LOCAL_GET idx
137138 | LOCAL_SET idx
138139 | LOCAL_TEE idx
@@ -177,6 +178,7 @@ selectInstr
177178callIndirectInstr
178179 /* : CALL_INDIRECT typeUse? callInstrParams */
179180 : CALL_INDIRECT idx? typeUse
181+ | RETURN_CALL_INDIRECT idx? typeUse
180182 ;
181183
182184callInstrParams
@@ -220,6 +222,7 @@ foldedInstr
220222expr
221223 : plainInstr expr*
222224 | CALL_INDIRECT callExprType
225+ | RETURN_CALL_INDIRECT callExprType
223226 | BLOCK bindVar? block
224227 | LOOP bindVar? block
225228 // | IF bindVar? ifBlock
Load Diff Large diffs are not rendered by default.
You can’t perform that action at this time.
0 commit comments