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

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

Issue 1335633002: Do not look for the slot in the ScopeInfo's global range when it's not necessary. (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Cleanup Created 5 years, 3 months 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/objects.h ('k') | src/scopeinfo.h » ('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 550 matching lines...) Expand 10 before | Expand all | Expand 10 after
561 local++; 561 local++;
562 } 562 }
563 if (local < local_count) { 563 if (local < local_count) {
564 // Get the context containing declarations. 564 // Get the context containing declarations.
565 Handle<Context> context( 565 Handle<Context> context(
566 Context::cast(frame_inspector.GetContext())->declaration_context()); 566 Context::cast(frame_inspector.GetContext())->declaration_context());
567 for (; i < scope_info->LocalCount(); ++i) { 567 for (; i < scope_info->LocalCount(); ++i) {
568 if (scope_info->LocalIsSynthetic(i)) continue; 568 if (scope_info->LocalIsSynthetic(i)) continue;
569 Handle<String> name(scope_info->LocalName(i)); 569 Handle<String> name(scope_info->LocalName(i));
570 VariableMode mode; 570 VariableMode mode;
571 VariableLocation location;
572 InitializationFlag init_flag; 571 InitializationFlag init_flag;
573 MaybeAssignedFlag maybe_assigned_flag; 572 MaybeAssignedFlag maybe_assigned_flag;
574 locals->set(local * 2, *name); 573 locals->set(local * 2, *name);
575 int context_slot_index = ScopeInfo::ContextSlotIndex( 574 int context_slot_index = ScopeInfo::ContextSlotIndex(
576 scope_info, name, &mode, &location, &init_flag, &maybe_assigned_flag); 575 scope_info, name, &mode, &init_flag, &maybe_assigned_flag);
577 DCHECK(VariableLocation::CONTEXT == location);
578 Object* value = context->get(context_slot_index); 576 Object* value = context->get(context_slot_index);
579 locals->set(local * 2 + 1, value); 577 locals->set(local * 2 + 1, value);
580 local++; 578 local++;
581 } 579 }
582 } 580 }
583 581
584 // Check whether this frame is positioned at return. If not top 582 // Check whether this frame is positioned at return. If not top
585 // frame or if the frame is optimized it cannot be at a return. 583 // frame or if the frame is optimized it cannot be at a return.
586 bool at_return = false; 584 bool at_return = false;
587 if (!is_optimized && index == 0) { 585 if (!is_optimized && index == 0) {
(...skipping 1133 matching lines...) Expand 10 before | Expand all | Expand 10 after
1721 return *isolate->factory()->undefined_value(); 1719 return *isolate->factory()->undefined_value();
1722 } 1720 }
1723 1721
1724 1722
1725 RUNTIME_FUNCTION(Runtime_DebugBreakInOptimizedCode) { 1723 RUNTIME_FUNCTION(Runtime_DebugBreakInOptimizedCode) {
1726 UNIMPLEMENTED(); 1724 UNIMPLEMENTED();
1727 return NULL; 1725 return NULL;
1728 } 1726 }
1729 } // namespace internal 1727 } // namespace internal
1730 } // namespace v8 1728 } // namespace v8
OLDNEW
« no previous file with comments | « src/objects.h ('k') | src/scopeinfo.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698