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

Unified Diff: test/mjsunit/wasm/wasm-constants.js

Issue 2345593003: [wasm] Master CL for Binary 0xC changes. (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Fix test failures and TSAN races. Created 4 years, 3 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 | « test/mjsunit/wasm/verify-function-simple.js ('k') | test/mjsunit/wasm/wasm-module-builder.js » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: test/mjsunit/wasm/wasm-constants.js
diff --git a/test/mjsunit/wasm/wasm-constants.js b/test/mjsunit/wasm/wasm-constants.js
index 5bcdb64a95b8295a98f4aa4adb4a0fcefdcd05e7..26969eb830ab6324a6f9af8f5c04eb0a8701b091 100644
--- a/test/mjsunit/wasm/wasm-constants.js
+++ b/test/mjsunit/wasm/wasm-constants.js
@@ -21,7 +21,7 @@ var kWasmH1 = 0x61;
var kWasmH2 = 0x73;
var kWasmH3 = 0x6d;
-var kWasmV0 = 11;
+var kWasmV0 = 0xC;
var kWasmV1 = 0;
var kWasmV2 = 0;
var kWasmV3 = 0;
@@ -51,30 +51,24 @@ function bytesWithHeader() {
var kDeclNoLocals = 0;
// Section declaration constants
-var kDeclMemory = 0x00;
-var kDeclTypes = 0x01;
-var kDeclFunctions = 0x02;
-var kDeclGlobals = 0x03;
-var kDeclData = 0x04;
-var kDeclTable = 0x05;
-var kDeclEnd = 0x06;
-var kDeclStart = 0x07;
-var kDeclImports = 0x08;
-var kDeclExports = 0x09;
-var kDeclFunctions = 0x0a;
-var kDeclCode = 0x0b;
-var kDeclNames = 0x0c;
+var kUnknownSectionCode = 0;
+var kTypeSectionCode = 1; // Function signature declarations
+var kImportSectionCode = 2; // Import declarations
+var kFunctionSectionCode = 3; // Function declarations
+var kTableSectionCode = 4; // Indirect function table and other tables
+var kMemorySectionCode = 5; // Memory attributes
+var kGlobalSectionCode = 6; // Global declarations
+var kExportSectionCode = 7; // Exports
+var kStartSectionCode = 8; // Start function declaration
+var kElementSectionCode = 9; // Elements section
+var kCodeSectionCode = 10; // Function code
+var kDataSectionCode = 11; // Data segments
+var kNameSectionCode = 12; // Name section (encoded as string)
-var kArity0 = 0;
-var kArity1 = 1;
-var kArity2 = 2;
-var kArity3 = 3;
var kWasmFunctionTypeForm = 0x40;
+var kWasmAnyFunctionTypeForm = 0x20;
-var section_names = [
- "memory", "type", "old_function", "global", "data",
- "table", "end", "start", "import", "export",
- "function", "code", "name"];
+var kResizableMaximumFlag = 1;
// Function declaration flags
var kDeclFunctionName = 0x01;
@@ -89,6 +83,11 @@ var kAstI64 = 2;
var kAstF32 = 3;
var kAstF64 = 4;
+var kExternalFunction = 0;
+var kExternalTable = 1;
+var kExternalMemory = 2;
+var kExternalGlobal = 3;
+
// Useful signatures
var kSig_i = makeSig([], [kAstI32]);
var kSig_d = makeSig([], [kAstF64]);
@@ -133,7 +132,8 @@ function makeSig_r_xx(r, x) {
}
// Opcodes
-var kExprNop = 0x00;
+var kExprUnreachable = 0x00;
+var kExprNop = 0x0a;
var kExprBlock = 0x01;
var kExprLoop = 0x02;
var kExprIf = 0x03;
@@ -143,9 +143,10 @@ var kExprBr = 0x06;
var kExprBrIf = 0x07;
var kExprBrTable = 0x08;
var kExprReturn = 0x09;
-var kExprUnreachable = 0x0a;
var kExprThrow = 0xfa;
var kExprEnd = 0x0f;
+var kExprTeeLocal = 0x19;
+var kExprDrop = 0x0b;
var kExprI32Const = 0x10;
var kExprI64Const = 0x11;
@@ -155,7 +156,6 @@ var kExprGetLocal = 0x14;
var kExprSetLocal = 0x15;
var kExprCallFunction = 0x16;
var kExprCallIndirect = 0x17;
-var kExprCallImport = 0x18;
var kExprI8Const = 0xcb;
var kExprGetGlobal = 0xbb;
var kExprSetGlobal = 0xbc;
« no previous file with comments | « test/mjsunit/wasm/verify-function-simple.js ('k') | test/mjsunit/wasm/wasm-module-builder.js » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698