| 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/arguments.h" | 7 #include "src/arguments.h" |
| 8 #include "src/debug/debug-evaluate.h" | 8 #include "src/debug/debug-evaluate.h" |
| 9 #include "src/debug/debug-frames.h" | 9 #include "src/debug/debug-frames.h" |
| 10 #include "src/debug/debug-scopes.h" | 10 #include "src/debug/debug-scopes.h" |
| (...skipping 1436 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1447 return isolate->heap()->empty_string(); | 1447 return isolate->heap()->empty_string(); |
| 1448 } | 1448 } |
| 1449 | 1449 |
| 1450 | 1450 |
| 1451 RUNTIME_FUNCTION(Runtime_FunctionGetDebugName) { | 1451 RUNTIME_FUNCTION(Runtime_FunctionGetDebugName) { |
| 1452 HandleScope scope(isolate); | 1452 HandleScope scope(isolate); |
| 1453 DCHECK_EQ(1, args.length()); | 1453 DCHECK_EQ(1, args.length()); |
| 1454 | 1454 |
| 1455 CONVERT_ARG_HANDLE_CHECKED(JSReceiver, function, 0); | 1455 CONVERT_ARG_HANDLE_CHECKED(JSReceiver, function, 0); |
| 1456 | 1456 |
| 1457 Handle<Object> name; |
| 1457 if (function->IsJSBoundFunction()) { | 1458 if (function->IsJSBoundFunction()) { |
| 1458 return Handle<JSBoundFunction>::cast(function)->name(); | 1459 ASSIGN_RETURN_FAILURE_ON_EXCEPTION( |
| 1460 isolate, name, JSBoundFunction::GetName( |
| 1461 isolate, Handle<JSBoundFunction>::cast(function))); |
| 1462 } else { |
| 1463 name = JSFunction::GetDebugName(Handle<JSFunction>::cast(function)); |
| 1459 } | 1464 } |
| 1460 Handle<Object> name = | |
| 1461 JSFunction::GetDebugName(Handle<JSFunction>::cast(function)); | |
| 1462 return *name; | 1465 return *name; |
| 1463 } | 1466 } |
| 1464 | 1467 |
| 1465 | 1468 |
| 1466 // A testing entry. Returns statement position which is the closest to | 1469 // A testing entry. Returns statement position which is the closest to |
| 1467 // source_position. | 1470 // source_position. |
| 1468 RUNTIME_FUNCTION(Runtime_GetFunctionCodePositionFromSource) { | 1471 RUNTIME_FUNCTION(Runtime_GetFunctionCodePositionFromSource) { |
| 1469 HandleScope scope(isolate); | 1472 HandleScope scope(isolate); |
| 1470 CHECK(isolate->debug()->live_edit_enabled()); | 1473 CHECK(isolate->debug()->live_edit_enabled()); |
| 1471 DCHECK(args.length() == 2); | 1474 DCHECK(args.length() == 2); |
| (...skipping 168 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1640 return Smi::FromInt(isolate->debug()->is_active()); | 1643 return Smi::FromInt(isolate->debug()->is_active()); |
| 1641 } | 1644 } |
| 1642 | 1645 |
| 1643 | 1646 |
| 1644 RUNTIME_FUNCTION(Runtime_DebugBreakInOptimizedCode) { | 1647 RUNTIME_FUNCTION(Runtime_DebugBreakInOptimizedCode) { |
| 1645 UNIMPLEMENTED(); | 1648 UNIMPLEMENTED(); |
| 1646 return NULL; | 1649 return NULL; |
| 1647 } | 1650 } |
| 1648 } // namespace internal | 1651 } // namespace internal |
| 1649 } // namespace v8 | 1652 } // namespace v8 |
| OLD | NEW |