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

Side by Side Diff: test/mjsunit/wasm/gc-frame.js

Issue 2079393003: [builtins] NonNumberToNumber and StringToNumber now use CallRuntime instead of TailCallRuntime (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Address comments Created 4 years, 6 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
« no previous file with comments | « src/x64/builtins-x64.cc ('k') | no next file » | 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 --expose-gc 5 // Flags: --expose-wasm --expose-gc
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 function makeFFI(func, t) { 10 function makeFFI(func, t) {
(...skipping 48 matching lines...) Expand 10 before | Expand all | Expand 10 after
59 } 59 }
60 })(); 60 })();
61 61
62 (function F32Test() { 62 (function F32Test() {
63 var main = makeFFI(print10, kAstF32); 63 var main = makeFFI(print10, kAstF32);
64 for (var i = 1; i < 2e+30; i *= -157) { 64 for (var i = 1; i < 2e+30; i *= -157) {
65 main(i - 1, i, i + 2, i + 3, i + 4, i + 5, i + 6, i + 7, i + 8); 65 main(i - 1, i, i + 2, i + 3, i + 4, i + 5, i + 6, i + 7, i + 8);
66 } 66 }
67 })(); 67 })();
68 68
69 (function I32Test() { 69 (function F64Test() {
70 var main = makeFFI(print10, kAstF64); 70 var main = makeFFI(print10, kAstF64);
71 for (var i = 1; i < 2e+80; i *= -1137) { 71 for (var i = 1; i < 2e+80; i *= -1137) {
72 main(i - 1, i, i + 2, i + 3, i + 4, i + 5, i + 6, i + 7, i + 8); 72 main(i - 1, i, i + 2, i + 3, i + 4, i + 5, i + 6, i + 7, i + 8);
73 } 73 }
74 })(); 74 })();
75
76 (function GCInJSToWasmTest() {
77 var builder = new WasmModuleBuilder();
78
79 var sig_index = builder.addSignature([1, kAstI32, 1, kAstI32]);
80 builder.addFunction("main", sig_index)
81 .addBody([
82 kExprGetLocal, 0, // --
83 ]) // --
84 .exportFunc();
85
86 var main = builder.instantiate({}).exports.main;
87
88 var gc_object = {
89 valueOf: function() {
90 // Call the GC in valueOf, which is called within the JSToWasm wrapper.
91 gc();
92 return {};
93 }
94 };
95
96 main(gc_object);
97 })();
OLDNEW
« no previous file with comments | « src/x64/builtins-x64.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698