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

Side by Side Diff: src/ast/scopeinfo.cc

Issue 1500933002: [debugger] fix debug-evaluate wrt shadowed context var. (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Created 5 years 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 | « no previous file | src/debug/debug-evaluate.cc » ('j') | src/debug/debug-evaluate.cc » ('J')
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2011 the V8 project authors. All rights reserved. 1 // Copyright 2011 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/ast/scopeinfo.h" 5 #include "src/ast/scopeinfo.h"
6 6
7 #include <stdlib.h> 7 #include <stdlib.h>
8 8
9 #include "src/ast/scopes.h" 9 #include "src/ast/scopes.h"
10 #include "src/bootstrapper.h" 10 #include "src/bootstrapper.h"
(...skipping 359 matching lines...) Expand 10 before | Expand all | Expand 10 after
370 bool ScopeInfo::HasAllocatedReceiver() { 370 bool ScopeInfo::HasAllocatedReceiver() {
371 if (length() > 0) { 371 if (length() > 0) {
372 VariableAllocationInfo allocation = ReceiverVariableField::decode(Flags()); 372 VariableAllocationInfo allocation = ReceiverVariableField::decode(Flags());
373 return allocation == STACK || allocation == CONTEXT; 373 return allocation == STACK || allocation == CONTEXT;
374 } else { 374 } else {
375 return false; 375 return false;
376 } 376 }
377 } 377 }
378 378
379 379
380 bool ScopeInfo::HasContextAllocatedReceiver() {
381 if (length() > 0) {
382 VariableAllocationInfo allocation = ReceiverVariableField::decode(Flags());
383 return allocation == CONTEXT;
384 } else {
385 return false;
386 }
387 }
388
389
380 bool ScopeInfo::HasNewTarget() { return HasNewTargetField::decode(Flags()); } 390 bool ScopeInfo::HasNewTarget() { return HasNewTargetField::decode(Flags()); }
381 391
382 392
383 bool ScopeInfo::HasFunctionName() { 393 bool ScopeInfo::HasFunctionName() {
384 if (length() > 0) { 394 if (length() > 0) {
385 return NONE != FunctionVariableField::decode(Flags()); 395 return NONE != FunctionVariableField::decode(Flags());
386 } else { 396 } else {
387 return false; 397 return false;
388 } 398 }
389 } 399 }
(...skipping 459 matching lines...) Expand 10 before | Expand all | Expand 10 after
849 info->set_mode(i, var->mode()); 859 info->set_mode(i, var->mode());
850 DCHECK(var->index() >= 0); 860 DCHECK(var->index() >= 0);
851 info->set_index(i, var->index()); 861 info->set_index(i, var->index());
852 } 862 }
853 DCHECK(i == info->length()); 863 DCHECK(i == info->length());
854 return info; 864 return info;
855 } 865 }
856 866
857 } // namespace internal 867 } // namespace internal
858 } // namespace v8 868 } // namespace v8
OLDNEW
« no previous file with comments | « no previous file | src/debug/debug-evaluate.cc » ('j') | src/debug/debug-evaluate.cc » ('J')

Powered by Google App Engine
This is Rietveld 408576698