Commit f94cd449 authored by Michael Starzinger's avatar Michael Starzinger Committed by Commit Bot

[wasm] Flip section code for exception and data-count.

This flips the section codes for the exception section (part of the
exception handling proposal) and the data-count section (part of the
bulk memory proposal).

Also see the following discussions for the underlying motivation:
https://github.com/WebAssembly/bulk-memory-operations/pull/42
https://github.com/WebAssembly/exception-handling/issues/70

R=binji@chromium.org
BUG=v8:8868

Change-Id: I9f5f524e7aec067720346a5bb8d45c7c80a4c7a2
Reviewed-on: https://chromium-review.googlesource.com/c/1478207Reviewed-by: 's avatarBen Smith <binji@chromium.org>
Reviewed-by: 's avatarClemens Hammacher <clemensh@chromium.org>
Commit-Queue: Michael Starzinger <mstarzinger@chromium.org>
Cr-Commit-Position: refs/heads/master@{#59856}
parent 5ac4f474
......@@ -71,8 +71,8 @@ enum SectionCode : int8_t {
kElementSectionCode = 9, // Elements section
kCodeSectionCode = 10, // Function code
kDataSectionCode = 11, // Data segments
kExceptionSectionCode = 12, // Exception section
kDataCountSectionCode = 13, // Number of data segments
kDataCountSectionCode = 12, // Number of data segments
kExceptionSectionCode = 13, // Exception section
// The following sections are custom sections, and are identified using a
// string rather than an integer. Their enumeration values are not guaranteed
......@@ -83,7 +83,7 @@ enum SectionCode : int8_t {
// Helper values
kFirstSectionInModule = kTypeSectionCode,
kLastKnownModuleSection = kSourceMappingURLSectionCode,
kFirstUnorderedSection = kExceptionSectionCode,
kFirstUnorderedSection = kDataCountSectionCode,
};
// Binary encoding of name section kinds.
......
......@@ -70,8 +70,8 @@ let kStartSectionCode = 8; // Start function declaration
let kElementSectionCode = 9; // Elements section
let kCodeSectionCode = 10; // Function code
let kDataSectionCode = 11; // Data segments
let kExceptionSectionCode = 12; // Exception section (between Global & Export)
let kDataCountSectionCode = 13; // Data segments
let kDataCountSectionCode = 12; // Data segment count (between Element & Code)
let kExceptionSectionCode = 13; // Exception section (between Global & Export)
// Name section types
let kModuleNameCode = 0;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment