Bug 1253137 - Baldr: update version uint32 to match BinaryEncoding.md (r=sunfish)
☠☠ backed out by fcae5c32f48f ☠ ☠
authorLuke Wagner <luke@mozilla.com>
Wed, 02 Mar 2016 21:48:04 -0600
changeset 322970 e68e5d3f9101b314eab0eb78fe6f2bbc56383d76
parent 322969 b9a420d13d5cc7e6c23896dd468c9f087fa16c55
child 322971 196acfbcffbb4334ef7e775a24629eb3f5a19092
push id5913
push userjlund@mozilla.com
push dateMon, 25 Apr 2016 16:57:49 +0000
treeherdermozilla-beta@dcaf0a6fa115 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewerssunfish
bugs1253137
milestone47.0a1
first release with
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
last release without
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
Bug 1253137 - Baldr: update version uint32 to match BinaryEncoding.md (r=sunfish) MozReview-Commit-ID: 7qGh9inzNmG
js/src/asmjs/WasmBinary.h
js/src/jit-test/tests/wasm/binary.js
--- a/js/src/asmjs/WasmBinary.h
+++ b/js/src/asmjs/WasmBinary.h
@@ -35,17 +35,19 @@ static const unsigned MaxSigs         = 
 static const unsigned MaxFuncs        = 512 * 1024;
 static const unsigned MaxImports      =   4 * 1024;
 static const unsigned MaxExports      =   4 * 1024;
 static const unsigned MaxTableElems   = 128 * 1024;
 static const unsigned MaxArgsPerFunc  =   4 * 1024;
 
 // Module header constants
 static const uint32_t MagicNumber     = 0x6d736100; // "\0asm"
-static const uint32_t EncodingVersion = -1;     // experimental
+static const uint32_t EncodingVersion = 0xa;        // will change while iterating toward release,
+                                                    // change to 1 at release, and hopefully never
+                                                    // change after that
 
 // Names:
 static const char SigLabel[]          = "sig";
 static const char ImportLabel[]       = "import";
 static const char DeclLabel[]         = "decl";
 static const char TableLabel[]        = "table";
 static const char MemoryLabel[]       = "memory";
 static const char ExportLabel[]       = "export";
--- a/js/src/jit-test/tests/wasm/binary.js
+++ b/js/src/jit-test/tests/wasm/binary.js
@@ -1,21 +1,21 @@
 load(libdir + "wasm.js");
 
-// MagicNumber = 0x4d534100
-const magic0 = 0;
-const magic1 = 97;  // 'a'
-const magic2 = 115; // 's'
-const magic3 = 109; // 'm'
+// MagicNumber = 0x6d736100;
+const magic0 = 0x00;  // '\0'
+const magic1 = 0x61;  // 'a'
+const magic2 = 0x73;  // 's'
+const magic3 = 0x6d;  // 'm'
 
-// EncodingVersion = -1 (to be changed to 1 at some point in the future)
-const ver0 = 0xff;
-const ver1 = 0xff;
-const ver2 = 0xff;
-const ver3 = 0xff;
+// EncodingVersion = 10 (to be changed to 1 at some point in the future)
+const ver0 = 0x0a;
+const ver1 = 0x00;
+const ver2 = 0x00;
+const ver3 = 0x00;
 
 // Section names
 const sigLabel = "sig";
 const declLabel = "decl";
 const tableLabel = "table";
 const importLabel = "import";
 const exportLabel = "export";
 const funcLabel = "func";