Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(5)

Side by Side Diff: test/mjsunit/wasm/wasm-constants.js

Issue 2209433002: [wasm] Make LoadGlobal/StoreGlobal opcodes match what is coming in binary 0xC. (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Created 4 years, 4 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
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 131 matching lines...) Expand 10 before | Expand all | Expand 10 after
142 var kExprI32Const = 0x10; 142 var kExprI32Const = 0x10;
143 var kExprI64Const = 0x11; 143 var kExprI64Const = 0x11;
144 var kExprF64Const = 0x12; 144 var kExprF64Const = 0x12;
145 var kExprF32Const = 0x13; 145 var kExprF32Const = 0x13;
146 var kExprGetLocal = 0x14; 146 var kExprGetLocal = 0x14;
147 var kExprSetLocal = 0x15; 147 var kExprSetLocal = 0x15;
148 var kExprCallFunction = 0x16; 148 var kExprCallFunction = 0x16;
149 var kExprCallIndirect = 0x17; 149 var kExprCallIndirect = 0x17;
150 var kExprCallImport = 0x18; 150 var kExprCallImport = 0x18;
151 var kExprI8Const = 0xcb; 151 var kExprI8Const = 0xcb;
152 var kExprLoadGlobal = 0xcc; 152 var kExprGetGlobal = 0xbb;
153 var kExprStoreGlobal = 0xcd; 153 var kExprSetGlobal = 0xbc;
154 154
155 var kExprI32LoadMem8S = 0x20; 155 var kExprI32LoadMem8S = 0x20;
156 var kExprI32LoadMem8U = 0x21; 156 var kExprI32LoadMem8U = 0x21;
157 var kExprI32LoadMem16S = 0x22; 157 var kExprI32LoadMem16S = 0x22;
158 var kExprI32LoadMem16U = 0x23; 158 var kExprI32LoadMem16U = 0x23;
159 var kExprI64LoadMem8S = 0x24; 159 var kExprI64LoadMem8S = 0x24;
160 var kExprI64LoadMem8U = 0x25; 160 var kExprI64LoadMem8U = 0x25;
161 var kExprI64LoadMem16S = 0x26; 161 var kExprI64LoadMem16S = 0x26;
162 var kExprI64LoadMem16U = 0x27; 162 var kExprI64LoadMem16U = 0x27;
163 var kExprI64LoadMem32S = 0x28; 163 var kExprI64LoadMem32S = 0x28;
(...skipping 178 matching lines...) Expand 10 before | Expand all | Expand 10 after
342 } 342 }
343 threwException = false; 343 threwException = false;
344 } catch (e) { 344 } catch (e) {
345 assertEquals("object", typeof e); 345 assertEquals("object", typeof e);
346 assertEquals(kTrapMsgs[trap], e.message); 346 assertEquals(kTrapMsgs[trap], e.message);
347 // Success. 347 // Success.
348 return; 348 return;
349 } 349 }
350 throw new MjsUnitAssertionError("Did not trap, expected: " + kTrapMsgs[trap] ); 350 throw new MjsUnitAssertionError("Did not trap, expected: " + kTrapMsgs[trap] );
351 } 351 }
OLDNEW
« no previous file with comments | « test/cctest/wasm/test-run-wasm-relocation.cc ('k') | test/unittests/wasm/ast-decoder-unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698