Index: src/runtime/runtime-function.cc |
diff --git a/src/runtime/runtime-function.cc b/src/runtime/runtime-function.cc |
index 80896e935b3773a9eb508749f07ea69f7b614c1b..7d7b81109284cc88a597d2f05214076fe26aca17 100644 |
--- a/src/runtime/runtime-function.cc |
+++ b/src/runtime/runtime-function.cc |
@@ -11,6 +11,7 @@ |
#include "src/isolate-inl.h" |
#include "src/messages.h" |
#include "src/profiler/cpu-profiler.h" |
+#include "src/wasm/wasm-module.h" |
namespace v8 { |
namespace internal { |
@@ -302,5 +303,15 @@ RUNTIME_FUNCTION(Runtime_FunctionToString) { |
: *JSFunction::ToString(Handle<JSFunction>::cast(function)); |
} |
+RUNTIME_FUNCTION(Runtime_WasmGetFunctionName) { |
+ HandleScope scope(isolate); |
+ DCHECK_EQ(2, args.length()); |
+ |
+ CONVERT_ARG_HANDLE_CHECKED(JSObject, wasm, 0); |
+ CONVERT_SMI_ARG_CHECKED(func_index, 1); |
+ |
+ return *wasm::GetWasmFunctionName(wasm, func_index); |
+} |
+ |
} // namespace internal |
} // namespace v8 |