[wasm] Fix exception section code for spec compliance.

R=clemensh@chromium.org
BUG=v8:8091

Change-Id: Ib0e0b50d1fe24b0e528a3dd9849829799b33f1bc
Reviewed-on: https://chromium-review.googlesource.com/c/1355139
Reviewed-by: Clemens Hammacher <clemensh@chromium.org>
Commit-Queue: Michael Starzinger <mstarzinger@chromium.org>
Cr-Commit-Position: refs/heads/master@{#57945}
This commit is contained in:
Michael Starzinger 2018-11-29 16:38:58 +01:00 committed by Commit Bot
parent fd7d6b8be0
commit 69ab6954b1
3 changed files with 6 additions and 8 deletions

View File

@ -31,8 +31,6 @@ namespace {
constexpr char kNameString[] = "name";
constexpr char kSourceMappingURLString[] = "sourceMappingURL";
constexpr char kExceptionString[] = "exception";
constexpr char kUnknownString[] = "<unknown>";
template <size_t N>
constexpr size_t num_chars(const char (&)[N]) {
@ -83,14 +81,14 @@ const char* SectionName(SectionCode code) {
return "Element";
case kDataSectionCode:
return "Data";
case kExceptionSectionCode:
return "Exception";
case kNameSectionCode:
return kNameString;
case kSourceMappingURLSectionCode:
return kSourceMappingURLString;
case kExceptionSectionCode:
return kExceptionString;
default:
return kUnknownString;
return "<unknown>";
}
}

View File

@ -71,8 +71,8 @@ enum SectionCode : int8_t {
kElementSectionCode = 9, // Elements section
kCodeSectionCode = 10, // Function code
kDataSectionCode = 11, // Data segments
kNameSectionCode = 12, // Name section (encoded as a string)
kExceptionSectionCode = 13, // Exception section
kExceptionSectionCode = 12, // Exception (aka. event) section
kNameSectionCode = 13, // Name section (encoded as a string)
kSourceMappingURLSectionCode = 14, // Source Map URL section
// Helper values

View File

@ -64,7 +64,7 @@ let kStartSectionCode = 8; // Start function declaration
let kElementSectionCode = 9; // Elements section
let kCodeSectionCode = 10; // Function code
let kDataSectionCode = 11; // Data segments
let kExceptionSectionCode = 13; // Exception section (must appear before code section)
let kExceptionSectionCode = 12; // Exception section (must appear before code section)
// Name section types
let kModuleNameCode = 0;