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

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

Issue 2378773013: [WASM] Implements catch for the wasm low level exception mechanism. (Closed)
Patch Set: updates effect dependencies. Created 4 years, 2 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 126 matching lines...) Expand 10 before | Expand all | Expand 10 after
137 var kExprBlock = 0x01; 137 var kExprBlock = 0x01;
138 var kExprLoop = 0x02; 138 var kExprLoop = 0x02;
139 var kExprIf = 0x03; 139 var kExprIf = 0x03;
140 var kExprElse = 0x04; 140 var kExprElse = 0x04;
141 var kExprSelect = 0x05; 141 var kExprSelect = 0x05;
142 var kExprBr = 0x06; 142 var kExprBr = 0x06;
143 var kExprBrIf = 0x07; 143 var kExprBrIf = 0x07;
144 var kExprBrTable = 0x08; 144 var kExprBrTable = 0x08;
145 var kExprReturn = 0x09; 145 var kExprReturn = 0x09;
146 var kExprThrow = 0xfa; 146 var kExprThrow = 0xfa;
147 var kExprTry = 0xfb;
148 var kExprCatch = 0xfe;
147 var kExprEnd = 0x0f; 149 var kExprEnd = 0x0f;
148 var kExprTeeLocal = 0x19; 150 var kExprTeeLocal = 0x19;
149 var kExprDrop = 0x0b; 151 var kExprDrop = 0x0b;
150 152
151 var kExprI32Const = 0x10; 153 var kExprI32Const = 0x10;
152 var kExprI64Const = 0x11; 154 var kExprI64Const = 0x11;
153 var kExprF64Const = 0x12; 155 var kExprF64Const = 0x12;
154 var kExprF32Const = 0x13; 156 var kExprF32Const = 0x13;
155 var kExprGetLocal = 0x14; 157 var kExprGetLocal = 0x14;
156 var kExprSetLocal = 0x15; 158 var kExprSetLocal = 0x15;
(...skipping 203 matching lines...) Expand 10 before | Expand all | Expand 10 after
360 eval(code); 362 eval(code);
361 } 363 }
362 } catch (e) { 364 } catch (e) {
363 assertEquals("number", typeof e); 365 assertEquals("number", typeof e);
364 assertEquals(value, e); 366 assertEquals(value, e);
365 // Success. 367 // Success.
366 return; 368 return;
367 } 369 }
368 throw new MjsUnitAssertionError("Did not throw at all, expected: " + value); 370 throw new MjsUnitAssertionError("Did not throw at all, expected: " + value);
369 } 371 }
OLDNEW
« test/mjsunit/wasm/exceptions.js ('K') | « test/mjsunit/wasm/exceptions.js ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698