diff options
Diffstat (limited to 'test/passes/print-call-graph.wast')
-rw-r--r-- | test/passes/print-call-graph.wast | 878 |
1 files changed, 481 insertions, 397 deletions
diff --git a/test/passes/print-call-graph.wast b/test/passes/print-call-graph.wast index b1bb60011..9d6371b4b 100644 --- a/test/passes/print-call-graph.wast +++ b/test/passes/print-call-graph.wast @@ -110,12 +110,14 @@ (i32.eqz (global.get $__THREW__) ) - (block - (global.set $__THREW__ - (local.get $0) - ) - (global.set $threwValue - (local.get $1) + (then + (block + (global.set $__THREW__ + (local.get $0) + ) + (global.set $threwValue + (local.get $1) + ) ) ) ) @@ -289,57 +291,61 @@ (i32.load (i32.const 1140) ) - (block (result i32) - (call $_pthread_cleanup_push - (i32.const 1) - (local.get $0) - ) - (i32.store - (local.get $9) - (i32.load - (local.get $13) + (then + (block (result i32) + (call $_pthread_cleanup_push + (i32.const 1) + (local.get $0) ) - ) - (i32.store offset=4 - (local.get $9) - (local.get $1) - ) - (i32.store offset=8 - (local.get $9) - (local.get $5) - ) - (local.set $3 - (call $___syscall_ret - (call $___syscall146 - (i32.const 146) - (local.get $9) + (i32.store + (local.get $9) + (i32.load + (local.get $13) ) ) + (i32.store offset=4 + (local.get $9) + (local.get $1) + ) + (i32.store offset=8 + (local.get $9) + (local.get $5) + ) + (local.set $3 + (call $___syscall_ret + (call $___syscall146 + (i32.const 146) + (local.get $9) + ) + ) + ) + (call $_pthread_cleanup_pop + (i32.const 0) + ) + (local.get $3) ) - (call $_pthread_cleanup_pop - (i32.const 0) - ) - (local.get $3) ) - (block (result i32) - (i32.store - (local.get $8) - (i32.load - (local.get $13) + (else + (block (result i32) + (i32.store + (local.get $8) + (i32.load + (local.get $13) + ) ) - ) - (i32.store offset=4 - (local.get $8) - (local.get $1) - ) - (i32.store offset=8 - (local.get $8) - (local.get $5) - ) - (call $___syscall_ret - (call $___syscall146 - (i32.const 146) + (i32.store offset=4 + (local.get $8) + (local.get $1) + ) + (i32.store offset=8 (local.get $8) + (local.get $5) + ) + (call $___syscall_ret + (call $___syscall146 + (i32.const 146) + (local.get $8) + ) ) ) ) @@ -369,69 +375,77 @@ ) ) ) - (block (result i32) - (i32.store - (local.get $6) - (local.tee $3 - (i32.load - (local.get $14) - ) - ) - ) - (i32.store - (local.get $10) - (local.get $3) - ) - (local.set $4 - (i32.sub - (local.get $4) - (local.get $12) - ) - ) - (local.set $3 - (i32.add - (local.get $1) - (i32.const 8) - ) - ) - (local.set $5 - (i32.add - (local.get $5) - (i32.const -1) - ) - ) - (i32.load offset=12 - (local.get $1) - ) - ) - (if (result i32) - (i32.eq - (local.get $5) - (i32.const 2) - ) + (then (block (result i32) (i32.store (local.get $6) - (i32.add + (local.tee $3 (i32.load - (local.get $6) + (local.get $14) ) + ) + ) + (i32.store + (local.get $10) + (local.get $3) + ) + (local.set $4 + (i32.sub (local.get $4) + (local.get $12) ) ) (local.set $3 - (local.get $1) + (i32.add + (local.get $1) + (i32.const 8) + ) ) (local.set $5 - (i32.const 2) + (i32.add + (local.get $5) + (i32.const -1) + ) ) - (local.get $12) - ) - (block (result i32) - (local.set $3 + (i32.load offset=12 (local.get $1) ) - (local.get $12) + ) + ) + (else + (if (result i32) + (i32.eq + (local.get $5) + (i32.const 2) + ) + (then + (block (result i32) + (i32.store + (local.get $6) + (i32.add + (i32.load + (local.get $6) + ) + (local.get $4) + ) + ) + (local.set $3 + (local.get $1) + ) + (local.set $5 + (i32.const 2) + ) + (local.get $12) + ) + ) + (else + (block (result i32) + (local.set $3 + (local.get $1) + ) + (local.get $12) + ) + ) ) ) ) @@ -578,15 +592,19 @@ ) (i32.const 0) ) - (block (result i32) - (i32.store - (local.get $0) + (then + (block (result i32) + (i32.store + (local.get $0) + (i32.const -1) + ) (i32.const -1) ) - (i32.const -1) ) - (i32.load - (local.get $0) + (else + (i32.load + (local.get $0) + ) ) ) ) @@ -601,17 +619,21 @@ (local.get $0) (i32.const -4096) ) - (block (result i32) - (i32.store - (call $___errno_location) - (i32.sub - (i32.const 0) - (local.get $0) + (then + (block (result i32) + (i32.store + (call $___errno_location) + (i32.sub + (i32.const 0) + (local.get $0) + ) ) + (i32.const -1) ) - (i32.const -1) ) - (local.get $0) + (else + (local.get $0) + ) ) ) (func $___errno_location (result i32) @@ -619,10 +641,14 @@ (i32.load (i32.const 1140) ) - (i32.load offset=64 - (call $_pthread_self) + (then + (i32.load offset=64 + (call $_pthread_self) + ) + ) + (else + (i32.const 1184) ) - (i32.const 1184) ) ) (func $_cleanup_387 (param $0 i32) @@ -632,8 +658,10 @@ (local.get $0) ) ) - (call $_free - (local.get $0) + (then + (call $_free + (local.get $0) + ) ) ) ) @@ -672,29 +700,33 @@ (i32.const 64) ) ) - (block - (i32.store - (local.get $3) - (i32.load offset=60 - (local.get $0) + (then + (block + (i32.store + (local.get $3) + (i32.load offset=60 + (local.get $0) + ) ) - ) - (i32.store offset=4 - (local.get $3) - (i32.const 21505) - ) - (i32.store offset=8 - (local.get $3) - (local.get $5) - ) - (if - (call $___syscall54 - (i32.const 54) + (i32.store offset=4 (local.get $3) + (i32.const 21505) ) - (i32.store8 offset=75 - (local.get $0) - (i32.const -1) + (i32.store offset=8 + (local.get $3) + (local.get $5) + ) + (if + (call $___syscall54 + (i32.const 54) + (local.get $3) + ) + (then + (i32.store8 offset=75 + (local.get $0) + (i32.const -1) + ) + ) ) ) ) @@ -717,119 +749,145 @@ (block $do-once (result i32) (if (result i32) (local.get $0) - (block (result i32) - (if - (i32.le_s - (i32.load offset=76 - (local.get $0) + (then + (block (result i32) + (if + (i32.le_s + (i32.load offset=76 + (local.get $0) + ) + (i32.const -1) ) - (i32.const -1) - ) - (br $do-once - (call $___fflush_unlocked - (local.get $0) + (then + (br $do-once + (call $___fflush_unlocked + (local.get $0) + ) + ) ) ) - ) - (local.set $2 - (i32.eqz - (call $_malloc - (local.get $0) + (local.set $2 + (i32.eqz + (call $_malloc + (local.get $0) + ) ) ) - ) - (local.set $1 - (call $___fflush_unlocked - (local.get $0) - ) - ) - (if (result i32) - (local.get $2) - (local.get $1) - (block (result i32) - (call $_free + (local.set $1 + (call $___fflush_unlocked (local.get $0) ) - (local.get $1) ) - ) - ) - (block (result i32) - (local.set $0 (if (result i32) - (i32.load - (i32.const 1136) + (local.get $2) + (then + (local.get $1) ) - (call $_fflush - (i32.load - (i32.const 1136) + (else + (block (result i32) + (call $_free + (local.get $0) + ) + (local.get $1) ) ) - (i32.const 0) ) ) - (call $___lock - (i32.const 1168) - ) - (if - (local.tee $1 - (i32.load - (i32.const 1164) - ) - ) - (loop $while-in - (local.set $2 - (if (result i32) - (i32.gt_s - (i32.load offset=76 - (local.get $1) + ) + (else + (block (result i32) + (local.set $0 + (if (result i32) + (i32.load + (i32.const 1136) + ) + (then + (call $_fflush + (i32.load + (i32.const 1136) ) - (i32.const -1) - ) - (call $_malloc - (local.get $1) ) + ) + (else (i32.const 0) ) ) - (local.set $0 - (if (result i32) - (i32.gt_u - (i32.load offset=20 - (local.get $1) + ) + (call $___lock + (i32.const 1168) + ) + (if + (local.tee $1 + (i32.load + (i32.const 1164) + ) + ) + (then + (loop $while-in + (local.set $2 + (if (result i32) + (i32.gt_s + (i32.load offset=76 + (local.get $1) + ) + (i32.const -1) + ) + (then + (call $_malloc + (local.get $1) + ) + ) + (else + (i32.const 0) + ) ) - (i32.load offset=28 - (local.get $1) + ) + (local.set $0 + (if (result i32) + (i32.gt_u + (i32.load offset=20 + (local.get $1) + ) + (i32.load offset=28 + (local.get $1) + ) + ) + (then + (i32.or + (call $___fflush_unlocked + (local.get $1) + ) + (local.get $0) + ) + ) + (else + (local.get $0) + ) ) ) - (i32.or - (call $___fflush_unlocked - (local.get $1) + (if + (local.get $2) + (then + (call $_free + (local.get $1) + ) ) - (local.get $0) ) - (local.get $0) - ) - ) - (if - (local.get $2) - (call $_free - (local.get $1) - ) - ) - (br_if $while-in - (local.tee $1 - (i32.load offset=56 - (local.get $1) + (br_if $while-in + (local.tee $1 + (i32.load offset=56 + (local.get $1) + ) + ) ) ) ) ) + (call $___unlock + (i32.const 1168) + ) + (local.get $0) ) - (call $___unlock - (i32.const 1168) - ) - (local.get $0) ) ) ) @@ -911,22 +969,24 @@ ) ) ) - (drop - (call_indirect (type $FUNCSIG$iiii) - (local.get $0) - (i32.sub - (local.get $4) - (local.get $6) - ) - (i32.const 1) - (i32.add - (i32.and - (i32.load offset=40 - (local.get $0) + (then + (drop + (call_indirect (type $FUNCSIG$iiii) + (local.get $0) + (i32.sub + (local.get $4) + (local.get $6) + ) + (i32.const 1) + (i32.add + (i32.and + (i32.load offset=40 + (local.get $0) + ) + (i32.const 3) ) - (i32.const 3) + (i32.const 2) ) - (i32.const 2) ) ) ) @@ -976,20 +1036,24 @@ (local.tee $0 (call $__ZSt15get_new_handlerv) ) - (block - (call_indirect (type $FUNCSIG$v) - (i32.add - (i32.and - (local.get $0) - (i32.const 0) + (then + (block + (call_indirect (type $FUNCSIG$v) + (i32.add + (i32.and + (local.get $0) + (i32.const 0) + ) + (i32.const 8) ) - (i32.const 8) ) + (br $while-in) ) - (br $while-in) ) - (local.set $0 - (i32.const 0) + (else + (local.set $0 + (i32.const 0) + ) ) ) ) @@ -1030,97 +1094,105 @@ (local.get $2) (i32.const 20) ) - (block - (local.set $5 - (i32.or + (then + (block + (local.set $5 (i32.or (i32.or - (local.tee $1 - (i32.and + (i32.or + (local.tee $1 + (i32.and + (local.get $1) + (i32.const 255) + ) + ) + (i32.shl (local.get $1) - (i32.const 255) + (i32.const 8) ) ) (i32.shl (local.get $1) - (i32.const 8) + (i32.const 16) ) ) (i32.shl (local.get $1) - (i32.const 16) + (i32.const 24) ) ) - (i32.shl - (local.get $1) - (i32.const 24) - ) ) - ) - (local.set $6 - (i32.and - (local.get $4) - (i32.const -4) - ) - ) - (if - (local.tee $3 + (local.set $6 (i32.and - (local.get $0) - (i32.const 3) + (local.get $4) + (i32.const -4) ) ) - (block - (local.set $3 - (i32.sub - (i32.add - (local.get $0) - (i32.const 4) - ) - (local.get $3) + (if + (local.tee $3 + (i32.and + (local.get $0) + (i32.const 3) ) ) - (loop $while-in - (if - (i32.lt_s - (local.get $0) - (local.get $3) - ) - (block - (i32.store8 - (local.get $0) - (local.get $1) - ) - (local.set $0 + (then + (block + (local.set $3 + (i32.sub (i32.add (local.get $0) - (i32.const 1) + (i32.const 4) + ) + (local.get $3) + ) + ) + (loop $while-in + (if + (i32.lt_s + (local.get $0) + (local.get $3) + ) + (then + (block + (i32.store8 + (local.get $0) + (local.get $1) + ) + (local.set $0 + (i32.add + (local.get $0) + (i32.const 1) + ) + ) + (br $while-in) + ) ) ) - (br $while-in) ) ) ) ) - ) - (loop $while-in1 - (if - (i32.lt_s - (local.get $0) - (local.get $6) - ) - (block - (i32.store + (loop $while-in1 + (if + (i32.lt_s (local.get $0) - (local.get $5) + (local.get $6) ) - (local.set $0 - (i32.add - (local.get $0) - (i32.const 4) + (then + (block + (i32.store + (local.get $0) + (local.get $5) + ) + (local.set $0 + (i32.add + (local.get $0) + (i32.const 4) + ) + ) + (br $while-in1) ) ) - (br $while-in1) ) ) ) @@ -1132,18 +1204,20 @@ (local.get $0) (local.get $4) ) - (block - (i32.store8 - (local.get $0) - (local.get $1) - ) - (local.set $0 - (i32.add + (then + (block + (i32.store8 (local.get $0) - (i32.const 1) + (local.get $1) ) + (local.set $0 + (i32.add + (local.get $0) + (i32.const 1) + ) + ) + (br $while-in3) ) - (br $while-in3) ) ) ) @@ -1159,11 +1233,13 @@ (local.get $2) (i32.const 4096) ) - (return - (call $_emscripten_memcpy_big - (local.get $0) - (local.get $1) - (local.get $2) + (then + (return + (call $_emscripten_memcpy_big + (local.get $0) + (local.get $1) + (local.get $2) + ) ) ) ) @@ -1181,84 +1257,90 @@ (i32.const 3) ) ) - (block - (loop $while-in - (block $while-out - (br_if $while-out - (i32.eqz - (i32.and - (local.get $0) - (i32.const 3) + (then + (block + (loop $while-in + (block $while-out + (br_if $while-out + (i32.eqz + (i32.and + (local.get $0) + (i32.const 3) + ) ) ) - ) - (if - (i32.eqz - (local.get $2) - ) - (return - (local.get $3) - ) - ) - (i32.store8 - (local.get $0) - (i32.load8_s - (local.get $1) - ) - ) - (local.set $0 - (i32.add - (local.get $0) - (i32.const 1) - ) - ) - (local.set $1 - (i32.add - (local.get $1) - (i32.const 1) - ) - ) - (local.set $2 - (i32.sub - (local.get $2) - (i32.const 1) + (if + (i32.eqz + (local.get $2) + ) + (then + (return + (local.get $3) + ) + ) ) - ) - (br $while-in) - ) - ) - (loop $while-in1 - (if - (i32.ge_s - (local.get $2) - (i32.const 4) - ) - (block - (i32.store + (i32.store8 (local.get $0) - (i32.load + (i32.load8_s (local.get $1) ) ) (local.set $0 (i32.add (local.get $0) - (i32.const 4) + (i32.const 1) ) ) (local.set $1 (i32.add (local.get $1) - (i32.const 4) + (i32.const 1) ) ) (local.set $2 (i32.sub (local.get $2) - (i32.const 4) + (i32.const 1) + ) + ) + (br $while-in) + ) + ) + (loop $while-in1 + (if + (i32.ge_s + (local.get $2) + (i32.const 4) + ) + (then + (block + (i32.store + (local.get $0) + (i32.load + (local.get $1) + ) + ) + (local.set $0 + (i32.add + (local.get $0) + (i32.const 4) + ) + ) + (local.set $1 + (i32.add + (local.get $1) + (i32.const 4) + ) + ) + (local.set $2 + (i32.sub + (local.get $2) + (i32.const 4) + ) + ) + (br $while-in1) ) ) - (br $while-in1) ) ) ) @@ -1270,32 +1352,34 @@ (local.get $2) (i32.const 0) ) - (block - (i32.store8 - (local.get $0) - (i32.load8_s - (local.get $1) - ) - ) - (local.set $0 - (i32.add + (then + (block + (i32.store8 (local.get $0) - (i32.const 1) + (i32.load8_s + (local.get $1) + ) ) - ) - (local.set $1 - (i32.add - (local.get $1) - (i32.const 1) + (local.set $0 + (i32.add + (local.get $0) + (i32.const 1) + ) ) - ) - (local.set $2 - (i32.sub - (local.get $2) - (i32.const 1) + (local.set $1 + (i32.add + (local.get $1) + (i32.const 1) + ) + ) + (local.set $2 + (i32.sub + (local.get $2) + (i32.const 1) + ) ) + (br $while-in3) ) - (br $while-in3) ) ) ) |