| Index: src/wasm/wasm-module.h
|
| diff --git a/src/wasm/wasm-module.h b/src/wasm/wasm-module.h
|
| index 78b780ace04bb5b87898cf301f771a8f6aaa29ac..c97a182e6c1284a1d579010a05e2fd26e160b0e7 100644
|
| --- a/src/wasm/wasm-module.h
|
| +++ b/src/wasm/wasm-module.h
|
| @@ -196,6 +196,11 @@ struct WasmModule {
|
| return {reinterpret_cast<const char*>(module_start + offset), length};
|
| }
|
|
|
| + // Get a string stored in the module bytes representing a function name.
|
| + WasmName GetName(WasmFunction* function) const {
|
| + return GetName(function->name_offset, function->name_length);
|
| + }
|
| +
|
| // Get a string stored in the module bytes representing a name.
|
| WasmName GetNameOrNull(uint32_t offset, uint32_t length) const {
|
| if (length == 0) return {NULL, 0}; // no name.
|
| @@ -203,6 +208,11 @@ struct WasmModule {
|
| return {reinterpret_cast<const char*>(module_start + offset), length};
|
| }
|
|
|
| + // Get a string stored in the module bytes representing a function name.
|
| + WasmName GetNameOrNull(WasmFunction* function) const {
|
| + return GetNameOrNull(function->name_offset, function->name_length);
|
| + }
|
| +
|
| // Checks the given offset range is contained within the module bytes.
|
| bool BoundsCheck(uint32_t start, uint32_t end) const {
|
| size_t size = module_end - module_start;
|
| @@ -320,6 +330,9 @@ int32_t CompileAndRunWasmModule(Isolate* isolate, const byte* module_start,
|
| // given decoded module.
|
| int32_t CompileAndRunWasmModule(Isolate* isolate, WasmModule* module);
|
|
|
| +// Extract the function name for the given func_index from the wasm module.
|
| +Handle<Object> GetWasmFunctionName(Handle<JSObject> wasm, uint32_t func_index);
|
| +
|
| } // namespace wasm
|
| } // namespace internal
|
| } // namespace v8
|
|
|