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

Side by Side Diff: src/wasm/module-decoder.cc

Issue 2706303004: Revert of [wasm] Remove support for experimental version 0xD. (Closed)
Patch Set: Created 3 years, 10 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 | « src/wasm/module-decoder.h ('k') | test/mjsunit/wasm/jsapi-harness.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 #include "src/wasm/module-decoder.h" 5 #include "src/wasm/module-decoder.h"
6 #include "src/wasm/function-body-decoder-impl.h" 6 #include "src/wasm/function-body-decoder-impl.h"
7 7
8 #include "src/base/functional.h" 8 #include "src/base/functional.h"
9 #include "src/base/platform/platform.h" 9 #include "src/base/platform/platform.h"
10 #include "src/flags.h" 10 #include "src/flags.h"
(...skipping 254 matching lines...) Expand 10 before | Expand all | Expand 10 after
265 if (magic_word != kWasmMagic) { 265 if (magic_word != kWasmMagic) {
266 error(pos, pos, 266 error(pos, pos,
267 "expected magic word %02x %02x %02x %02x, " 267 "expected magic word %02x %02x %02x %02x, "
268 "found %02x %02x %02x %02x", 268 "found %02x %02x %02x %02x",
269 BYTES(kWasmMagic), BYTES(magic_word)); 269 BYTES(kWasmMagic), BYTES(magic_word));
270 } 270 }
271 271
272 pos = pc_; 272 pos = pc_;
273 { 273 {
274 uint32_t magic_version = consume_u32("wasm version"); 274 uint32_t magic_version = consume_u32("wasm version");
275 if (magic_version != kWasmVersion) { 275 if (magic_version != kWasmVersion &&
276 magic_version != kWasmLegacyVersion) {
276 error(pos, pos, 277 error(pos, pos,
277 "expected version %02x %02x %02x %02x, " 278 "expected version %02x %02x %02x %02x, "
278 "found %02x %02x %02x %02x", 279 "found %02x %02x %02x %02x",
279 BYTES(kWasmVersion), BYTES(magic_version)); 280 BYTES(kWasmVersion), BYTES(magic_version));
280 } 281 }
281 } 282 }
282 283
283 WasmSectionIterator section_iter(*this); 284 WasmSectionIterator section_iter(*this);
284 285
285 // ===== Type section ==================================================== 286 // ===== Type section ====================================================
(...skipping 1051 matching lines...) Expand 10 before | Expand all | Expand 10 after
1337 result.push_back({section_start, name_offset, name_length, payload_offset, 1338 result.push_back({section_start, name_offset, name_length, payload_offset,
1338 payload_length, section_length}); 1339 payload_length, section_length});
1339 } 1340 }
1340 1341
1341 return result; 1342 return result;
1342 } 1343 }
1343 1344
1344 } // namespace wasm 1345 } // namespace wasm
1345 } // namespace internal 1346 } // namespace internal
1346 } // namespace v8 1347 } // namespace v8
OLDNEW
« no previous file with comments | « src/wasm/module-decoder.h ('k') | test/mjsunit/wasm/jsapi-harness.js » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698