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

Unified Diff: test/mjsunit/wasm/direct-import-call.js

Issue 2433273002: [wasm] Avoid double-serializing the wire bytes (Closed)
Patch Set: externalize/internalize buffer 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 side-by-side diff with in-line comments
Download patch
Index: test/mjsunit/wasm/direct-import-call.js
diff --git a/test/mjsunit/wasm/direct-import-call.js b/test/mjsunit/wasm/direct-import-call.js
new file mode 100644
index 0000000000000000000000000000000000000000..9026009a2025dd9918212c9a9d6c6c91ec42152a
--- /dev/null
+++ b/test/mjsunit/wasm/direct-import-call.js
@@ -0,0 +1,24 @@
+// Copyright 2015 the V8 project authors. All rights reserved.
+// Use of this source code is governed by a BSD-style license that can be
+// found in the LICENSE file.
+
+// Flags: --expose-wasm
+
+load("test/mjsunit/wasm/wasm-constants.js");
+load("test/mjsunit/wasm/wasm-module-builder.js");
+
+(function testCallImport() {
+ var builder = new WasmModuleBuilder();
+
+ var sig_index = builder.addType(kSig_d_dd);
+ builder.addImport("func", sig_index);
+ builder.addFunction("main", sig_index)
+ .addBody([
+ kExprGetLocal, 0, // --
+ kExprGetLocal, 1, // --
+ kExprCallFunction, 0]) // --
+ .exportAs("main");
+
+ var main = builder.instantiate({func: experimentalDoubleAdder}).exports.main;
+ assertEquals(3.8, main(1.5, 2.3));
+})();
« src/runtime/runtime-test.cc ('K') | « test/mjsunit/wasm/compiled-module-serialization.js ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698