Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(4)

Side by Side Diff: src/runtime/runtime-debug.cc

Issue 1449473005: [V8] Unify get function name for debugging purpose (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Created 5 years, 1 month ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « src/runtime/runtime.h ('k') | test/cctest/test-api.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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.h" 8 #include "src/debug/debug.h"
9 #include "src/debug/debug-evaluate.h" 9 #include "src/debug/debug-evaluate.h"
10 #include "src/debug/debug-frames.h" 10 #include "src/debug/debug-frames.h"
(...skipping 1468 matching lines...) Expand 10 before | Expand all | Expand 10 after
1479 1479
1480 RUNTIME_FUNCTION(Runtime_FunctionGetInferredName) { 1480 RUNTIME_FUNCTION(Runtime_FunctionGetInferredName) {
1481 SealHandleScope shs(isolate); 1481 SealHandleScope shs(isolate);
1482 DCHECK(args.length() == 1); 1482 DCHECK(args.length() == 1);
1483 1483
1484 CONVERT_ARG_CHECKED(JSFunction, f, 0); 1484 CONVERT_ARG_CHECKED(JSFunction, f, 0);
1485 return f->shared()->inferred_name(); 1485 return f->shared()->inferred_name();
1486 } 1486 }
1487 1487
1488 1488
1489 RUNTIME_FUNCTION(Runtime_FunctionGetDebugName) {
1490 HandleScope scope(isolate);
1491 DCHECK(args.length() == 1);
1492
1493 CONVERT_ARG_HANDLE_CHECKED(JSFunction, f, 0);
1494 Handle<Object> name = JSFunction::GetDebugName(f);
1495 return *name;
1496 }
1497
1498
1489 // A testing entry. Returns statement position which is the closest to 1499 // A testing entry. Returns statement position which is the closest to
1490 // source_position. 1500 // source_position.
1491 RUNTIME_FUNCTION(Runtime_GetFunctionCodePositionFromSource) { 1501 RUNTIME_FUNCTION(Runtime_GetFunctionCodePositionFromSource) {
1492 HandleScope scope(isolate); 1502 HandleScope scope(isolate);
1493 CHECK(isolate->debug()->live_edit_enabled()); 1503 CHECK(isolate->debug()->live_edit_enabled());
1494 DCHECK(args.length() == 2); 1504 DCHECK(args.length() == 2);
1495 RUNTIME_ASSERT(isolate->debug()->is_active()); 1505 RUNTIME_ASSERT(isolate->debug()->is_active());
1496 CONVERT_ARG_HANDLE_CHECKED(JSFunction, function, 0); 1506 CONVERT_ARG_HANDLE_CHECKED(JSFunction, function, 0);
1497 CONVERT_NUMBER_CHECKED(int32_t, source_position, Int32, args[1]); 1507 CONVERT_NUMBER_CHECKED(int32_t, source_position, Int32, args[1]);
1498 1508
(...skipping 242 matching lines...) Expand 10 before | Expand all | Expand 10 after
1741 return *isolate->factory()->undefined_value(); 1751 return *isolate->factory()->undefined_value();
1742 } 1752 }
1743 1753
1744 1754
1745 RUNTIME_FUNCTION(Runtime_DebugBreakInOptimizedCode) { 1755 RUNTIME_FUNCTION(Runtime_DebugBreakInOptimizedCode) {
1746 UNIMPLEMENTED(); 1756 UNIMPLEMENTED();
1747 return NULL; 1757 return NULL;
1748 } 1758 }
1749 } // namespace internal 1759 } // namespace internal
1750 } // namespace v8 1760 } // namespace v8
OLDNEW
« no previous file with comments | « src/runtime/runtime.h ('k') | test/cctest/test-api.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698