summaryrefslogtreecommitdiff
path: root/deps/v8/src/wasm/wasm-module.cc
diff options
context:
space:
mode:
Diffstat (limited to 'deps/v8/src/wasm/wasm-module.cc')
-rw-r--r--deps/v8/src/wasm/wasm-module.cc31
1 files changed, 8 insertions, 23 deletions
diff --git a/deps/v8/src/wasm/wasm-module.cc b/deps/v8/src/wasm/wasm-module.cc
index ab603bfb3a..7e4621571a 100644
--- a/deps/v8/src/wasm/wasm-module.cc
+++ b/deps/v8/src/wasm/wasm-module.cc
@@ -27,15 +27,6 @@ namespace v8 {
namespace internal {
namespace wasm {
-// static
-const WasmExceptionSig WasmException::empty_sig_(0, 0, nullptr);
-
-// static
-constexpr const char* WasmException::kRuntimeIdStr;
-
-// static
-constexpr const char* WasmException::kRuntimeValuesStr;
-
WireBytesRef WasmModule::LookupFunctionName(const ModuleWireBytes& wire_bytes,
uint32_t function_index) const {
if (!function_names) {
@@ -57,20 +48,6 @@ void WasmModule::AddFunctionNameForTesting(int function_index,
}
// Get a string stored in the module bytes representing a name.
-WasmName ModuleWireBytes::GetName(WireBytesRef ref) const {
- if (ref.is_empty()) return {"<?>", 3}; // no name.
- CHECK(BoundsCheck(ref.offset(), ref.length()));
- return WasmName::cast(
- module_bytes_.SubVector(ref.offset(), ref.end_offset()));
-}
-
-// Get a string stored in the module bytes representing a function name.
-WasmName ModuleWireBytes::GetName(const WasmFunction* function,
- const WasmModule* module) const {
- return GetName(module->LookupFunctionName(*this, function->func_index));
-}
-
-// Get a string stored in the module bytes representing a name.
WasmName ModuleWireBytes::GetNameOrNull(WireBytesRef ref) const {
if (!ref.is_set()) return {nullptr, 0}; // no name.
CHECK(BoundsCheck(ref.offset(), ref.length()));
@@ -129,6 +106,7 @@ Handle<JSArray> GetImports(Isolate* isolate,
Handle<String> table_string = factory->InternalizeUtf8String("table");
Handle<String> memory_string = factory->InternalizeUtf8String("memory");
Handle<String> global_string = factory->InternalizeUtf8String("global");
+ Handle<String> exception_string = factory->InternalizeUtf8String("exception");
// Create the result array.
const WasmModule* module = module_object->module();
@@ -161,6 +139,9 @@ Handle<JSArray> GetImports(Isolate* isolate,
case kExternalGlobal:
import_kind = global_string;
break;
+ case kExternalException:
+ import_kind = exception_string;
+ break;
default:
UNREACHABLE();
}
@@ -196,6 +177,7 @@ Handle<JSArray> GetExports(Isolate* isolate,
Handle<String> table_string = factory->InternalizeUtf8String("table");
Handle<String> memory_string = factory->InternalizeUtf8String("memory");
Handle<String> global_string = factory->InternalizeUtf8String("global");
+ Handle<String> exception_string = factory->InternalizeUtf8String("exception");
// Create the result array.
const WasmModule* module = module_object->module();
@@ -226,6 +208,9 @@ Handle<JSArray> GetExports(Isolate* isolate,
case kExternalGlobal:
export_kind = global_string;
break;
+ case kExternalException:
+ export_kind = exception_string;
+ break;
default:
UNREACHABLE();
}