OLD | NEW |
1 // Copyright 2015 the V8 project authors. All rights reserved. | 1 // Copyright 2015 the V8 project authors. All rights reserved. |
2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
4 | 4 |
5 // Flags: --expose-wasm | 5 // Flags: --expose-wasm |
6 | 6 |
7 function bytes() { | 7 function bytes() { |
8 var buffer = new ArrayBuffer(arguments.length); | 8 var buffer = new ArrayBuffer(arguments.length); |
9 var view = new Uint8Array(buffer); | 9 var view = new Uint8Array(buffer); |
10 for (var i = 0; i < arguments.length; i++) { | 10 for (var i = 0; i < arguments.length; i++) { |
(...skipping 102 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
113 var kExprI32LeS = 0x50; | 113 var kExprI32LeS = 0x50; |
114 var kExprI32LtU = 0x51; | 114 var kExprI32LtU = 0x51; |
115 var kExprI32LeU = 0x52; | 115 var kExprI32LeU = 0x52; |
116 var kExprI32GtS = 0x53; | 116 var kExprI32GtS = 0x53; |
117 var kExprI32GeS = 0x54; | 117 var kExprI32GeS = 0x54; |
118 var kExprI32GtU = 0x55; | 118 var kExprI32GtU = 0x55; |
119 var kExprI32GeU = 0x56; | 119 var kExprI32GeU = 0x56; |
120 var kExprI32Clz = 0x57; | 120 var kExprI32Clz = 0x57; |
121 var kExprI32Ctz = 0x58; | 121 var kExprI32Ctz = 0x58; |
122 var kExprI32Popcnt = 0x59; | 122 var kExprI32Popcnt = 0x59; |
123 var kExprBoolNot = 0x5a; | 123 var kExprI32Eqz = 0x5a; |
124 var kExprI64Add = 0x5b; | 124 var kExprI64Add = 0x5b; |
125 var kExprI64Sub = 0x5c; | 125 var kExprI64Sub = 0x5c; |
126 var kExprI64Mul = 0x5d; | 126 var kExprI64Mul = 0x5d; |
127 var kExprI64DivS = 0x5e; | 127 var kExprI64DivS = 0x5e; |
128 var kExprI64DivU = 0x5f; | 128 var kExprI64DivU = 0x5f; |
129 var kExprI64RemS = 0x60; | 129 var kExprI64RemS = 0x60; |
130 var kExprI64RemU = 0x61; | 130 var kExprI64RemU = 0x61; |
131 var kExprI64And = 0x62; | 131 var kExprI64And = 0x62; |
132 var kExprI64Ior = 0x63; | 132 var kExprI64Ior = 0x63; |
133 var kExprI64Xor = 0x64; | 133 var kExprI64Xor = 0x64; |
(...skipping 109 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
243 } | 243 } |
244 threwException = false; | 244 threwException = false; |
245 } catch (e) { | 245 } catch (e) { |
246 assertEquals("string", typeof e); | 246 assertEquals("string", typeof e); |
247 assertEquals(kTrapMsgs[trap], e); | 247 assertEquals(kTrapMsgs[trap], e); |
248 // Success. | 248 // Success. |
249 return; | 249 return; |
250 } | 250 } |
251 throw new MjsUnitAssertionError("Did not trap, expected: " + kTrapMsgs[trap]
); | 251 throw new MjsUnitAssertionError("Did not trap, expected: " + kTrapMsgs[trap]
); |
252 } | 252 } |
OLD | NEW |