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

Unified 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « src/x64/builtins-x64.cc ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: test/mjsunit/wasm/gc-frame.js
diff --git a/test/mjsunit/wasm/gc-frame.js b/test/mjsunit/wasm/gc-frame.js
index 5fa9b05eec7f0c9c33430ae36ba1c28a514e6b33..016d1c6b8eeeef4d6cb2eb9f1a7f3fbdc74ff03e 100644
--- a/test/mjsunit/wasm/gc-frame.js
+++ b/test/mjsunit/wasm/gc-frame.js
@@ -66,9 +66,32 @@ function print10(a, b, c, d, e, f, g, h, i) {
}
})();
-(function I32Test() {
+(function F64Test() {
var main = makeFFI(print10, kAstF64);
for (var i = 1; i < 2e+80; i *= -1137) {
main(i - 1, i, i + 2, i + 3, i + 4, i + 5, i + 6, i + 7, i + 8);
}
})();
+
+(function GCInJSToWasmTest() {
+ var builder = new WasmModuleBuilder();
+
+ var sig_index = builder.addSignature([1, kAstI32, 1, kAstI32]);
+ builder.addFunction("main", sig_index)
+ .addBody([
+ kExprGetLocal, 0, // --
+ ]) // --
+ .exportFunc();
+
+ var main = builder.instantiate({}).exports.main;
+
+ var gc_object = {
+ valueOf: function() {
+ // Call the GC in valueOf, which is called within the JSToWasm wrapper.
+ gc();
+ return {};
+ }
+ };
+
+ main(gc_object);
+})();
« 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