Commit 69ab6954 authored by Michael Starzinger's avatar Michael Starzinger Committed by Commit Bot

[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/1355139Reviewed-by: 's avatarClemens Hammacher <clemensh@chromium.org>
Commit-Queue: Michael Starzinger <mstarzinger@chromium.org>
Cr-Commit-Position: refs/heads/master@{#57945}
parent fd7d6b8b
......@@ -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>";
}
}
......
......@@ -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
......
......@@ -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;
......
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