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

Side by Side Diff: test/inspector/debugger/wasm-scripts.js

Issue 2594993002: [wasm] Rename wasm::LocalType to wasm::ValueType and kAst* to kWasm* (Closed)
Patch Set: Fix inspector tests Created 4 years 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
« no previous file with comments | « test/fuzzer/wasm-call.cc ('k') | test/inspector/debugger/wasm-source.js » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2016 the V8 project authors. All rights reserved. 1 // Copyright 2016 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 load('test/mjsunit/wasm/wasm-constants.js'); 7 load('test/mjsunit/wasm/wasm-constants.js');
8 load('test/mjsunit/wasm/wasm-module-builder.js'); 8 load('test/mjsunit/wasm/wasm-module-builder.js');
9 9
10 // Add two empty functions. Both should be registered as individual scripts at 10 // Add two empty functions. Both should be registered as individual scripts at
11 // module creation time. 11 // module creation time.
12 var builder = new WasmModuleBuilder(); 12 var builder = new WasmModuleBuilder();
13 builder.addFunction('nopFunction', kSig_v_v).addBody([kExprNop]); 13 builder.addFunction('nopFunction', kSig_v_v).addBody([kExprNop]);
14 builder.addFunction('main', kSig_v_v) 14 builder.addFunction('main', kSig_v_v)
15 .addBody([kExprBlock, kAstStmt, kExprI32Const, 2, kExprDrop, kExprEnd]) 15 .addBody([kExprBlock, kWasmStmt, kExprI32Const, 2, kExprDrop, kExprEnd])
16 .exportAs('main'); 16 .exportAs('main');
17 var module_bytes = builder.toArray(); 17 var module_bytes = builder.toArray();
18 18
19 function testFunction(bytes) { 19 function testFunction(bytes) {
20 var buffer = new ArrayBuffer(bytes.length); 20 var buffer = new ArrayBuffer(bytes.length);
21 var view = new Uint8Array(buffer); 21 var view = new Uint8Array(buffer);
22 for (var i = 0; i < bytes.length; i++) { 22 for (var i = 0; i < bytes.length; i++) {
23 view[i] = bytes[i] | 0; 23 view[i] = bytes[i] | 0;
24 } 24 }
25 25
(...skipping 36 matching lines...) Expand 10 before | Expand all | Expand 10 after
62 InspectorTest.log("Source for " + url + ":"); 62 InspectorTest.log("Source for " + url + ":");
63 InspectorTest.log(message.result.scriptSource); 63 InspectorTest.log(message.result.scriptSource);
64 --missing_sources; 64 --missing_sources;
65 } 65 }
66 66
67 Protocol.Debugger.getScriptSource({scriptId: messageObject.params.scriptId}) 67 Protocol.Debugger.getScriptSource({scriptId: messageObject.params.scriptId})
68 .then(dumpScriptSource.bind(null)) 68 .then(dumpScriptSource.bind(null))
69 .then(checkFinished); 69 .then(checkFinished);
70 } 70 }
71 } 71 }
OLDNEW
« no previous file with comments | « test/fuzzer/wasm-call.cc ('k') | test/inspector/debugger/wasm-source.js » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698