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

Side by Side Diff: test/mjsunit/wasm/ffi-error.js

Issue 1597163002: wasm: change the module memory size to be multiples of the page size, 64k. (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Rebase Created 4 years, 9 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 | « test/mjsunit/wasm/calls.js ('k') | test/mjsunit/wasm/instantiate-module-basic.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 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 load("test/mjsunit/wasm/wasm-constants.js"); 7 load("test/mjsunit/wasm/wasm-constants.js");
8 8
9 function testCallFFI(ffi) { 9 function testCallFFI(ffi) {
10 var kBodySize = 6; 10 var kBodySize = 6;
11 var kNameAddOffset = kHeaderSize + 28 + kBodySize + 1; 11 var kNameAddOffset = kHeaderSize + 28 + kBodySize + 1;
12 var kNameMainOffset = kNameAddOffset + 4; 12 var kNameMainOffset = kNameAddOffset + 4;
13 13
14 var data = bytesWithHeader( 14 var data = bytesWithHeader(
15 kDeclMemory, 15 kDeclMemory,
16 12, 12, 1, // memory 16 1, 1, 1, // memory
17 // -- signatures 17 // -- signatures
18 kDeclSignatures, 1, 18 kDeclSignatures, 1,
19 2, kAstI32, kAstF64, kAstF64, // (f64,f64)->int 19 2, kAstI32, kAstF64, kAstF64, // (f64,f64)->int
20 // -- foreign function 20 // -- foreign function
21 kDeclFunctions, 2, 21 kDeclFunctions, 2,
22 kDeclFunctionName | kDeclFunctionImport, 22 kDeclFunctionName | kDeclFunctionImport,
23 0, 0, // signature index 23 0, 0, // signature index
24 kNameAddOffset, 0, 0, 0, // name offset 24 kNameAddOffset, 0, 0, 0, // name offset
25 // -- main function 25 // -- main function
26 kDeclFunctionName | kDeclFunctionExport, 26 kDeclFunctionName | kDeclFunctionExport,
(...skipping 43 matching lines...) Expand 10 before | Expand all | Expand 10 after
70 testCallFFI(ffi); 70 testCallFFI(ffi);
71 }); 71 });
72 72
73 73
74 // "fun" should be a JS function. 74 // "fun" should be a JS function.
75 assertThrows(function() { 75 assertThrows(function() {
76 var ffi = new Object(); 76 var ffi = new Object();
77 ffi.fun = 0; 77 ffi.fun = 0;
78 testCallFFI(ffi); 78 testCallFFI(ffi);
79 }); 79 });
OLDNEW
« no previous file with comments | « test/mjsunit/wasm/calls.js ('k') | test/mjsunit/wasm/instantiate-module-basic.js » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698