OLD | NEW |
1 // Copyright 2014 the V8 project authors. All rights reserved. | 1 // Copyright 2014 the V8 project authors. All rights reserved. |
2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
4 | 4 |
5 #include "src/runtime/runtime-utils.h" | 5 #include "src/runtime/runtime-utils.h" |
6 | 6 |
7 #include "src/accessors.h" | 7 #include "src/accessors.h" |
8 #include "src/arguments.h" | 8 #include "src/arguments.h" |
9 #include "src/compiler.h" | 9 #include "src/compiler.h" |
10 #include "src/frames-inl.h" | 10 #include "src/frames-inl.h" |
(...skipping 293 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
304 RUNTIME_FUNCTION(Runtime_FunctionToString) { | 304 RUNTIME_FUNCTION(Runtime_FunctionToString) { |
305 HandleScope scope(isolate); | 305 HandleScope scope(isolate); |
306 DCHECK_EQ(1, args.length()); | 306 DCHECK_EQ(1, args.length()); |
307 CONVERT_ARG_HANDLE_CHECKED(JSReceiver, function, 0); | 307 CONVERT_ARG_HANDLE_CHECKED(JSReceiver, function, 0); |
308 return function->IsJSBoundFunction() | 308 return function->IsJSBoundFunction() |
309 ? *JSBoundFunction::ToString( | 309 ? *JSBoundFunction::ToString( |
310 Handle<JSBoundFunction>::cast(function)) | 310 Handle<JSBoundFunction>::cast(function)) |
311 : *JSFunction::ToString(Handle<JSFunction>::cast(function)); | 311 : *JSFunction::ToString(Handle<JSFunction>::cast(function)); |
312 } | 312 } |
313 | 313 |
314 RUNTIME_FUNCTION(Runtime_WasmGetFunctionName) { | |
315 HandleScope scope(isolate); | |
316 DCHECK_EQ(2, args.length()); | |
317 | |
318 CONVERT_ARG_HANDLE_CHECKED(JSObject, wasm, 0); | |
319 CONVERT_SMI_ARG_CHECKED(func_index, 1); | |
320 | |
321 return *wasm::GetWasmFunctionName(wasm, func_index); | |
322 } | |
323 | |
324 } // namespace internal | 314 } // namespace internal |
325 } // namespace v8 | 315 } // namespace v8 |
OLD | NEW |