diff options
57 files changed, 95 insertions, 80 deletions
diff --git a/src/wasm-s-parser.h b/src/wasm-s-parser.h index 55b4a20aa..4817fdf48 100644 --- a/src/wasm-s-parser.h +++ b/src/wasm-s-parser.h @@ -187,34 +187,16 @@ private: } char *start = input; if (input[0] == '"') { - // parse escaping \", and \a7 into 0xa7 the character code + // parse escaping \", but leave code escaped - we'll handle escaping in memory segments specifically input++; std::string str; while (1) { if (input[0] == '"') break; if (input[0] == '\\') { - if (input[1] == '"') { - str += '"'; - input += 2; - continue; - } else if (input[1] == '\'') { - str += '\''; - input += 2; - continue; - } else if (input[1] == '\\') { - str += '\\'; - input += 2; - } else if (input[1] == 'n') { - str += '\n'; - input += 2; - } else if (input[1] == 't') { - str += '\t'; - input += 2; - } else { - str += (char)(unhex(input[1])*16 + unhex(input[2])); - input += 3; - continue; - } + str += input[0]; + str += input[1]; + input += 2; + continue; } str += input[0]; input++; @@ -965,8 +947,39 @@ private: while (i < s.size()) { Element& curr = *s[i]; assert(curr[0]->str() == SEGMENT); - char *data = strdup(curr[2]->c_str()); // TODO: handle non-null-terminated? - wasm.memory.segments.emplace_back(atoi(curr[1]->c_str()), data, strlen(data)); + const char *input = curr[2]->c_str(); + char *data = (char*)malloc(strlen(input)); // over-allocated, since escaping collapses, but whatever + char *write = data; + while (1) { + if (input[0] == 0) break; + if (input[0] == '\\') { + if (input[1] == '"') { + *write++ = '"'; + input += 2; + continue; + } else if (input[1] == '\'') { + *write++ = '\''; + input += 2; + continue; + } else if (input[1] == '\\') { + *write++ = '\\'; + input += 2; + } else if (input[1] == 'n') { + *write++ = '\n'; + input += 2; + } else if (input[1] == 't') { + *write++ = '\t'; + input += 2; + } else { + *write++ = (char)(unhex(input[1])*16 + unhex(input[2])); + input += 3; + continue; + } + } + *write++ = input[0]; + input++; + } + wasm.memory.segments.emplace_back(atoi(curr[1]->c_str()), data, write - data); i++; } } diff --git a/test/dot_s/alternate-lcomm.wast b/test/dot_s/alternate-lcomm.wast index 0d3c48333..955ce11ea 100644 --- a/test/dot_s/alternate-lcomm.wast +++ b/test/dot_s/alternate-lcomm.wast @@ -1,4 +1,4 @@ (module (memory 0 4294967295) ) -;; METADATA: { "asmConsts": {} } +;; METADATA: { "asmConsts": {},"staticBump": 0 } diff --git a/test/dot_s/asm_const.wast b/test/dot_s/asm_const.wast index e800f8893..99fe21995 100644 --- a/test/dot_s/asm_const.wast +++ b/test/dot_s/asm_const.wast @@ -15,4 +15,4 @@ ) ) ) -;; METADATA: { "asmConsts": {"0": ["{ Module.print(\"hello, world!\"); }", ["vi"]]} } +;; METADATA: { "asmConsts": {"0": ["{ Module.print(\"hello, world!\"); }", ["vi"]]},"staticBump": 50 } diff --git a/test/dot_s/basics.wast b/test/dot_s/basics.wast index 7ac7ecc6e..fa658c8b8 100644 --- a/test/dot_s/basics.wast +++ b/test/dot_s/basics.wast @@ -92,4 +92,4 @@ ) ) ) -;; METADATA: { "asmConsts": {} } +;; METADATA: { "asmConsts": {},"staticBump": 30 } diff --git a/test/dot_s/call.wast b/test/dot_s/call.wast index e7fa949cc..40ab83553 100644 --- a/test/dot_s/call.wast +++ b/test/dot_s/call.wast @@ -134,4 +134,4 @@ ) ) ) -;; METADATA: { "asmConsts": {} } +;; METADATA: { "asmConsts": {},"staticBump": 0 } diff --git a/test/dot_s/cfg-stackify.wast b/test/dot_s/cfg-stackify.wast index 639c20d29..82fe8789b 100644 --- a/test/dot_s/cfg-stackify.wast +++ b/test/dot_s/cfg-stackify.wast @@ -1150,4 +1150,4 @@ ) ) ) -;; METADATA: { "asmConsts": {} } +;; METADATA: { "asmConsts": {},"staticBump": 0 } diff --git a/test/dot_s/comparisons_f32.wast b/test/dot_s/comparisons_f32.wast index 83574f9b4..6a050b39f 100644 --- a/test/dot_s/comparisons_f32.wast +++ b/test/dot_s/comparisons_f32.wast @@ -267,4 +267,4 @@ ) ) ) -;; METADATA: { "asmConsts": {} } +;; METADATA: { "asmConsts": {},"staticBump": 0 } diff --git a/test/dot_s/comparisons_f64.wast b/test/dot_s/comparisons_f64.wast index ea85676da..29fb60481 100644 --- a/test/dot_s/comparisons_f64.wast +++ b/test/dot_s/comparisons_f64.wast @@ -267,4 +267,4 @@ ) ) ) -;; METADATA: { "asmConsts": {} } +;; METADATA: { "asmConsts": {},"staticBump": 0 } diff --git a/test/dot_s/comparisons_i32.wast b/test/dot_s/comparisons_i32.wast index c821cfad7..65fc3bad2 100644 --- a/test/dot_s/comparisons_i32.wast +++ b/test/dot_s/comparisons_i32.wast @@ -131,4 +131,4 @@ ) ) ) -;; METADATA: { "asmConsts": {} } +;; METADATA: { "asmConsts": {},"staticBump": 0 } diff --git a/test/dot_s/comparisons_i64.wast b/test/dot_s/comparisons_i64.wast index 16da05ef5..63166a543 100644 --- a/test/dot_s/comparisons_i64.wast +++ b/test/dot_s/comparisons_i64.wast @@ -131,4 +131,4 @@ ) ) ) -;; METADATA: { "asmConsts": {} } +;; METADATA: { "asmConsts": {},"staticBump": 0 } diff --git a/test/dot_s/conv.wast b/test/dot_s/conv.wast index d5933fd7e..0fe9776ff 100644 --- a/test/dot_s/conv.wast +++ b/test/dot_s/conv.wast @@ -316,4 +316,4 @@ ) ) ) -;; METADATA: { "asmConsts": {} } +;; METADATA: { "asmConsts": {},"staticBump": 0 } diff --git a/test/dot_s/copysign-casts.wast b/test/dot_s/copysign-casts.wast index 31f6145b4..0bee77732 100644 --- a/test/dot_s/copysign-casts.wast +++ b/test/dot_s/copysign-casts.wast @@ -31,4 +31,4 @@ ) ) ) -;; METADATA: { "asmConsts": {} } +;; METADATA: { "asmConsts": {},"staticBump": 0 } diff --git a/test/dot_s/cpus.wast b/test/dot_s/cpus.wast index aed7f5870..736a887bd 100644 --- a/test/dot_s/cpus.wast +++ b/test/dot_s/cpus.wast @@ -11,4 +11,4 @@ ) ) ) -;; METADATA: { "asmConsts": {} } +;; METADATA: { "asmConsts": {},"staticBump": 0 } diff --git a/test/dot_s/data-offset-folding.wast b/test/dot_s/data-offset-folding.wast index f0f2ab09e..059d0e41c 100644 --- a/test/dot_s/data-offset-folding.wast +++ b/test/dot_s/data-offset-folding.wast @@ -1,4 +1,4 @@ (module (memory 0 4294967295 (segment 4 "\00\00\00\00") (segment 416 "`\00\00\00")) ) -;; METADATA: { "asmConsts": {} } +;; METADATA: { "asmConsts": {},"staticBump": 419 } diff --git a/test/dot_s/dead-vreg.wast b/test/dot_s/dead-vreg.wast index ced7413ab..ad270b31a 100644 --- a/test/dot_s/dead-vreg.wast +++ b/test/dot_s/dead-vreg.wast @@ -111,4 +111,4 @@ ) ) ) -;; METADATA: { "asmConsts": {} } +;; METADATA: { "asmConsts": {},"staticBump": 0 } diff --git a/test/dot_s/exit.wast b/test/dot_s/exit.wast index c0af5a734..6b7d22bf3 100644 --- a/test/dot_s/exit.wast +++ b/test/dot_s/exit.wast @@ -11,4 +11,4 @@ ) ) ) -;; METADATA: { "asmConsts": {} } +;; METADATA: { "asmConsts": {},"staticBump": 0 } diff --git a/test/dot_s/f32.wast b/test/dot_s/f32.wast index e9e9a649e..aa0ec5920 100644 --- a/test/dot_s/f32.wast +++ b/test/dot_s/f32.wast @@ -203,4 +203,4 @@ ) ) ) -;; METADATA: { "asmConsts": {} } +;; METADATA: { "asmConsts": {},"staticBump": 0 } diff --git a/test/dot_s/f64.wast b/test/dot_s/f64.wast index 6541b20b8..5b8de4546 100644 --- a/test/dot_s/f64.wast +++ b/test/dot_s/f64.wast @@ -203,4 +203,4 @@ ) ) ) -;; METADATA: { "asmConsts": {} } +;; METADATA: { "asmConsts": {},"staticBump": 0 } diff --git a/test/dot_s/fast-isel.wast b/test/dot_s/fast-isel.wast index 0981fbe79..a172ea5e2 100644 --- a/test/dot_s/fast-isel.wast +++ b/test/dot_s/fast-isel.wast @@ -21,4 +21,4 @@ ) ) ) -;; METADATA: { "asmConsts": {} } +;; METADATA: { "asmConsts": {},"staticBump": 0 } diff --git a/test/dot_s/frem.wast b/test/dot_s/frem.wast index 6592622d0..8ba5ad97d 100644 --- a/test/dot_s/frem.wast +++ b/test/dot_s/frem.wast @@ -29,4 +29,4 @@ ) ) ) -;; METADATA: { "asmConsts": {} } +;; METADATA: { "asmConsts": {},"staticBump": 0 } diff --git a/test/dot_s/func.wast b/test/dot_s/func.wast index 0090df642..18402d018 100644 --- a/test/dot_s/func.wast +++ b/test/dot_s/func.wast @@ -72,4 +72,4 @@ ) ) ) -;; METADATA: { "asmConsts": {} } +;; METADATA: { "asmConsts": {},"staticBump": 0 } diff --git a/test/dot_s/global.wast b/test/dot_s/global.wast index 7e64c7b42..63cec281a 100644 --- a/test/dot_s/global.wast +++ b/test/dot_s/global.wast @@ -29,4 +29,4 @@ ) ) ) -;; METADATA: { "asmConsts": {} } +;; METADATA: { "asmConsts": {},"staticBump": 11 } diff --git a/test/dot_s/globl.wast b/test/dot_s/globl.wast index 874d99a2b..b36657b8f 100644 --- a/test/dot_s/globl.wast +++ b/test/dot_s/globl.wast @@ -9,4 +9,4 @@ ) ) ) -;; METADATA: { "asmConsts": {} } +;; METADATA: { "asmConsts": {},"staticBump": 0 } diff --git a/test/dot_s/i32.wast b/test/dot_s/i32.wast index 6025fedd7..7466c5b6c 100644 --- a/test/dot_s/i32.wast +++ b/test/dot_s/i32.wast @@ -230,4 +230,4 @@ ) ) ) -;; METADATA: { "asmConsts": {} } +;; METADATA: { "asmConsts": {},"staticBump": 0 } diff --git a/test/dot_s/i64.wast b/test/dot_s/i64.wast index ace3135f3..d193b2cb5 100644 --- a/test/dot_s/i64.wast +++ b/test/dot_s/i64.wast @@ -230,4 +230,4 @@ ) ) ) -;; METADATA: { "asmConsts": {} } +;; METADATA: { "asmConsts": {},"staticBump": 0 } diff --git a/test/dot_s/ident.wast b/test/dot_s/ident.wast index 0d3c48333..955ce11ea 100644 --- a/test/dot_s/ident.wast +++ b/test/dot_s/ident.wast @@ -1,4 +1,4 @@ (module (memory 0 4294967295) ) -;; METADATA: { "asmConsts": {} } +;; METADATA: { "asmConsts": {},"staticBump": 0 } diff --git a/test/dot_s/immediates.wast b/test/dot_s/immediates.wast index ce9b8520f..257421fd9 100644 --- a/test/dot_s/immediates.wast +++ b/test/dot_s/immediates.wast @@ -241,4 +241,4 @@ ) ) ) -;; METADATA: { "asmConsts": {} } +;; METADATA: { "asmConsts": {},"staticBump": 0 } diff --git a/test/dot_s/lcomm-in-text-segment.wast b/test/dot_s/lcomm-in-text-segment.wast index 0d3c48333..955ce11ea 100644 --- a/test/dot_s/lcomm-in-text-segment.wast +++ b/test/dot_s/lcomm-in-text-segment.wast @@ -1,4 +1,4 @@ (module (memory 0 4294967295) ) -;; METADATA: { "asmConsts": {} } +;; METADATA: { "asmConsts": {},"staticBump": 0 } diff --git a/test/dot_s/legalize.wast b/test/dot_s/legalize.wast index 2fcc9aeac..72230965a 100644 --- a/test/dot_s/legalize.wast +++ b/test/dot_s/legalize.wast @@ -3972,4 +3972,4 @@ ) ) ) -;; METADATA: { "asmConsts": {} } +;; METADATA: { "asmConsts": {},"staticBump": 0 } diff --git a/test/dot_s/load-ext.wast b/test/dot_s/load-ext.wast index f3ae52530..422828010 100644 --- a/test/dot_s/load-ext.wast +++ b/test/dot_s/load-ext.wast @@ -121,4 +121,4 @@ ) ) ) -;; METADATA: { "asmConsts": {} } +;; METADATA: { "asmConsts": {},"staticBump": 0 } diff --git a/test/dot_s/load-store-i1.wast b/test/dot_s/load-store-i1.wast index 3f184bb0f..d9b67382b 100644 --- a/test/dot_s/load-store-i1.wast +++ b/test/dot_s/load-store-i1.wast @@ -99,4 +99,4 @@ ) ) ) -;; METADATA: { "asmConsts": {} } +;; METADATA: { "asmConsts": {},"staticBump": 0 } diff --git a/test/dot_s/load.wast b/test/dot_s/load.wast index 4d2071d41..ac52dcda0 100644 --- a/test/dot_s/load.wast +++ b/test/dot_s/load.wast @@ -49,4 +49,4 @@ ) ) ) -;; METADATA: { "asmConsts": {} } +;; METADATA: { "asmConsts": {},"staticBump": 0 } diff --git a/test/dot_s/memops.wast b/test/dot_s/memops.wast index 48afae938..6f0c884f4 100644 --- a/test/dot_s/memops.wast +++ b/test/dot_s/memops.wast @@ -219,4 +219,4 @@ ) ) ) -;; METADATA: { "asmConsts": {"0": ["{ Module.print(\"hello, world! \" + HEAP32[8>>2]); }", ["vi"]]} } +;; METADATA: { "asmConsts": {"0": ["{ Module.print(\"hello, world! \" + HEAP32[8>>2]); }", ["vi"]]},"staticBump": 66 } diff --git a/test/dot_s/memory-addr32.wast b/test/dot_s/memory-addr32.wast index bd182046b..c056c10d9 100644 --- a/test/dot_s/memory-addr32.wast +++ b/test/dot_s/memory-addr32.wast @@ -20,4 +20,4 @@ ) ) ) -;; METADATA: { "asmConsts": {} } +;; METADATA: { "asmConsts": {},"staticBump": 0 } diff --git a/test/dot_s/memory-addr64.wast b/test/dot_s/memory-addr64.wast index 03a27c8ed..49c56ea9b 100644 --- a/test/dot_s/memory-addr64.wast +++ b/test/dot_s/memory-addr64.wast @@ -20,4 +20,4 @@ ) ) ) -;; METADATA: { "asmConsts": {} } +;; METADATA: { "asmConsts": {},"staticBump": 0 } diff --git a/test/dot_s/minimal.wast b/test/dot_s/minimal.wast index ef408ea14..67e714d3f 100644 --- a/test/dot_s/minimal.wast +++ b/test/dot_s/minimal.wast @@ -11,4 +11,4 @@ ) ) ) -;; METADATA: { "asmConsts": {} } +;; METADATA: { "asmConsts": {},"staticBump": 0 } diff --git a/test/dot_s/offset.wast b/test/dot_s/offset.wast index 481cb3cc5..432216519 100644 --- a/test/dot_s/offset.wast +++ b/test/dot_s/offset.wast @@ -201,4 +201,4 @@ ) ) ) -;; METADATA: { "asmConsts": {} } +;; METADATA: { "asmConsts": {},"staticBump": 7 } diff --git a/test/dot_s/permute.wast b/test/dot_s/permute.wast index eb659e5f3..2af67ec99 100644 --- a/test/dot_s/permute.wast +++ b/test/dot_s/permute.wast @@ -1,4 +1,4 @@ (module (memory 0 4294967295 (segment 16 "hE?\8ds\0e7\db[g\8f\955it\c4k\0b\e2\ef\bcld\e0\fd\8c\9e\86&~\d8\94\89+\c8\a4\c2\f2\fb\12\1cej\d99\b7\b3W\c6w\af\ae\caM>\92ub\96\84\b6\b0N\ec;q\11\f7\bf\e31\e6\a7\90\fc\03\e4\aa\d7\cc- \15\83DH\80r\fa\01X\eb:_\00A\cd\e9o`n\ac(\ad\ba0\dcyS#\f4$\"\82\7f}\8e\f6\93L\'\bb\bdZ\ed4\18\f3\c0\cf\ff\a3\f8\07\05\9c\d3\0f\a0\06m%\\\f9^B<\e7\b1\17\98]\0c\dd\c5\f5p\e5\fezJ\ab,F\a5@\08R\85!\b8\1a\ce\d5\04\nI\a6\d1\9f\8a\c9\a9|\97\9aG\be8Y\8b\c1\1b\d4\ea\b9\19\14\9b\9163\d0\1d\d2\df=C\1f\0dc\e1\c7QUv\02\b5aK\b4\tV\c3x\e8\a1\1e\81\de/{\da\d6Pf\10T\f0)\88\16\ee\a8\9d\f1\cbO*\b2\99\132\87.\a2")) ) -;; METADATA: { "asmConsts": {} } +;; METADATA: { "asmConsts": {},"staticBump": 271 } diff --git a/test/dot_s/phi.wast b/test/dot_s/phi.wast index e5690e69d..9d61cfa77 100644 --- a/test/dot_s/phi.wast +++ b/test/dot_s/phi.wast @@ -79,4 +79,4 @@ ) ) ) -;; METADATA: { "asmConsts": {} } +;; METADATA: { "asmConsts": {},"staticBump": 0 } diff --git a/test/dot_s/reg-stackify.wast b/test/dot_s/reg-stackify.wast index 8306dfc8f..434e704b2 100644 --- a/test/dot_s/reg-stackify.wast +++ b/test/dot_s/reg-stackify.wast @@ -118,4 +118,4 @@ ) ) ) -;; METADATA: { "asmConsts": {} } +;; METADATA: { "asmConsts": {},"staticBump": 0 } diff --git a/test/dot_s/relocation.wast b/test/dot_s/relocation.wast index 6a2c1dd13..3f667f823 100644 --- a/test/dot_s/relocation.wast +++ b/test/dot_s/relocation.wast @@ -14,4 +14,4 @@ ) ) ) -;; METADATA: { "asmConsts": {} } +;; METADATA: { "asmConsts": {},"staticBump": 11 } diff --git a/test/dot_s/return-int32.wast b/test/dot_s/return-int32.wast index e9e4e8250..57bf9538b 100644 --- a/test/dot_s/return-int32.wast +++ b/test/dot_s/return-int32.wast @@ -11,4 +11,4 @@ ) ) ) -;; METADATA: { "asmConsts": {} } +;; METADATA: { "asmConsts": {},"staticBump": 0 } diff --git a/test/dot_s/return-void.wast b/test/dot_s/return-void.wast index 0f0c72a49..8cfa247b0 100644 --- a/test/dot_s/return-void.wast +++ b/test/dot_s/return-void.wast @@ -9,4 +9,4 @@ ) ) ) -;; METADATA: { "asmConsts": {} } +;; METADATA: { "asmConsts": {},"staticBump": 0 } diff --git a/test/dot_s/returned.wast b/test/dot_s/returned.wast index 0d73621e3..e63c40964 100644 --- a/test/dot_s/returned.wast +++ b/test/dot_s/returned.wast @@ -32,4 +32,4 @@ ) ) ) -;; METADATA: { "asmConsts": {} } +;; METADATA: { "asmConsts": {},"staticBump": 0 } diff --git a/test/dot_s/select.wast b/test/dot_s/select.wast index 4877c7057..bb5a4e575 100644 --- a/test/dot_s/select.wast +++ b/test/dot_s/select.wast @@ -169,4 +169,4 @@ ) ) ) -;; METADATA: { "asmConsts": {} } +;; METADATA: { "asmConsts": {},"staticBump": 0 } diff --git a/test/dot_s/signext-zeroext.wast b/test/dot_s/signext-zeroext.wast index f4c6ba47f..480223851 100644 --- a/test/dot_s/signext-zeroext.wast +++ b/test/dot_s/signext-zeroext.wast @@ -77,4 +77,4 @@ ) ) ) -;; METADATA: { "asmConsts": {} } +;; METADATA: { "asmConsts": {},"staticBump": 0 } diff --git a/test/dot_s/store-results.wast b/test/dot_s/store-results.wast index 75ba772e1..7001cd0e7 100644 --- a/test/dot_s/store-results.wast +++ b/test/dot_s/store-results.wast @@ -88,4 +88,4 @@ ) ) ) -;; METADATA: { "asmConsts": {} } +;; METADATA: { "asmConsts": {},"staticBump": 15 } diff --git a/test/dot_s/store-trunc.wast b/test/dot_s/store-trunc.wast index 07807cd19..44b400534 100644 --- a/test/dot_s/store-trunc.wast +++ b/test/dot_s/store-trunc.wast @@ -61,4 +61,4 @@ ) ) ) -;; METADATA: { "asmConsts": {} } +;; METADATA: { "asmConsts": {},"staticBump": 0 } diff --git a/test/dot_s/store.wast b/test/dot_s/store.wast index 256b86fd1..d3a89a131 100644 --- a/test/dot_s/store.wast +++ b/test/dot_s/store.wast @@ -49,4 +49,4 @@ ) ) ) -;; METADATA: { "asmConsts": {} } +;; METADATA: { "asmConsts": {},"staticBump": 0 } diff --git a/test/dot_s/switch.wast b/test/dot_s/switch.wast index ba55e42f3..7be3d417e 100644 --- a/test/dot_s/switch.wast +++ b/test/dot_s/switch.wast @@ -97,4 +97,4 @@ ) ) ) -;; METADATA: { "asmConsts": {} } +;; METADATA: { "asmConsts": {},"staticBump": 0 } diff --git a/test/dot_s/symbolic-offset.wast b/test/dot_s/symbolic-offset.wast index 95df82365..4dc52e77f 100644 --- a/test/dot_s/symbolic-offset.wast +++ b/test/dot_s/symbolic-offset.wast @@ -13,4 +13,4 @@ ) ) ) -;; METADATA: { "asmConsts": {} } +;; METADATA: { "asmConsts": {},"staticBump": 15 } diff --git a/test/dot_s/unreachable.wast b/test/dot_s/unreachable.wast index ec31d0395..d760ef119 100644 --- a/test/dot_s/unreachable.wast +++ b/test/dot_s/unreachable.wast @@ -27,4 +27,4 @@ ) ) ) -;; METADATA: { "asmConsts": {} } +;; METADATA: { "asmConsts": {},"staticBump": 0 } diff --git a/test/dot_s/unused-argument.wast b/test/dot_s/unused-argument.wast index 3d18cee7d..29ebad529 100644 --- a/test/dot_s/unused-argument.wast +++ b/test/dot_s/unused-argument.wast @@ -31,4 +31,4 @@ ) ) ) -;; METADATA: { "asmConsts": {} } +;; METADATA: { "asmConsts": {},"staticBump": 0 } diff --git a/test/dot_s/varargs.wast b/test/dot_s/varargs.wast index f502d0d91..7f5e0cb7e 100644 --- a/test/dot_s/varargs.wast +++ b/test/dot_s/varargs.wast @@ -157,4 +157,4 @@ ) ) ) -;; METADATA: { "asmConsts": {} } +;; METADATA: { "asmConsts": {},"staticBump": 0 } diff --git a/test/dot_s/vtable.wast b/test/dot_s/vtable.wast index 2080f0e51..bf4a08a54 100644 --- a/test/dot_s/vtable.wast +++ b/test/dot_s/vtable.wast @@ -104,4 +104,4 @@ ) ) ) -;; METADATA: { "asmConsts": {} } +;; METADATA: { "asmConsts": {},"staticBump": 207 } diff --git a/test/unit.2asm.js b/test/unit.2asm.js index 72eb53461..953437f63 100644 --- a/test/unit.2asm.js +++ b/test/unit.2asm.js @@ -12,6 +12,7 @@ function asmFunc(global, env, buffer) { var Math_fround = global.Math.fround; var Math_abs = global.Math.abs; var Math_clz32 = global.Math.clz32; + var _emscripten_asm_const_vi = env._emscripten_asm_const_vi; var f64_to_int = env.f64_to_int; var f64_rem = env.f64_rem; function big_negative() { diff --git a/test/unit.wast b/test/unit.wast index 488e1de99..4311a2a33 100644 --- a/test/unit.wast +++ b/test/unit.wast @@ -1,6 +1,7 @@ (module - (memory 16777216 16777216) + (memory 4096 4096 (segment 1026 "\14\00")) (type $FUNCSIG$vf (func (param f32))) + (import $_emscripten_asm_const_vi "env" "_emscripten_asm_const_vi") (import $f64-to-int "asm2wasm" "f64-to-int" (param f64) (result i32)) (import $f64-rem "asm2wasm" "f64-rem" (param f64 f64) (result f64)) (export "big_negative" $big_negative) |