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

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

Issue 2299973002: Remove unused VariableLocation::GLOBAL. (Closed)
Patch Set: Created 4 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/ast/prettyprinter.cc ('k') | src/compiler/ast-graph-builder.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 2012 the V8 project authors. All rights reserved. 1 // Copyright 2012 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/scopes.h" 5 #include "src/ast/scopes.h"
6 6
7 #include <set> 7 #include <set>
8 8
9 #include "src/accessors.h" 9 #include "src/accessors.h"
10 #include "src/bootstrapper.h" 10 #include "src/bootstrapper.h"
(...skipping 1087 matching lines...) Expand 10 before | Expand all | Expand 10 after
1098 break; 1098 break;
1099 case VariableLocation::PARAMETER: 1099 case VariableLocation::PARAMETER:
1100 PrintF("parameter[%d]", var->index()); 1100 PrintF("parameter[%d]", var->index());
1101 break; 1101 break;
1102 case VariableLocation::LOCAL: 1102 case VariableLocation::LOCAL:
1103 PrintF("local[%d]", var->index()); 1103 PrintF("local[%d]", var->index());
1104 break; 1104 break;
1105 case VariableLocation::CONTEXT: 1105 case VariableLocation::CONTEXT:
1106 PrintF("context[%d]", var->index()); 1106 PrintF("context[%d]", var->index());
1107 break; 1107 break;
1108 case VariableLocation::GLOBAL:
1109 PrintF("global[%d]", var->index());
1110 break;
1111 case VariableLocation::LOOKUP: 1108 case VariableLocation::LOOKUP:
1112 PrintF("lookup"); 1109 PrintF("lookup");
1113 break; 1110 break;
1114 case VariableLocation::MODULE: 1111 case VariableLocation::MODULE:
1115 PrintF("module"); 1112 PrintF("module");
1116 break; 1113 break;
1117 } 1114 }
1118 } 1115 }
1119 1116
1120 1117
(...skipping 569 matching lines...) Expand 10 before | Expand all | Expand 10 after
1690 Variable* function = 1687 Variable* function =
1691 is_function_scope() ? AsDeclarationScope()->function_var() : nullptr; 1688 is_function_scope() ? AsDeclarationScope()->function_var() : nullptr;
1692 bool is_function_var_in_context = 1689 bool is_function_var_in_context =
1693 function != nullptr && function->IsContextSlot(); 1690 function != nullptr && function->IsContextSlot();
1694 return num_heap_slots() - Context::MIN_CONTEXT_SLOTS - 1691 return num_heap_slots() - Context::MIN_CONTEXT_SLOTS -
1695 (is_function_var_in_context ? 1 : 0); 1692 (is_function_var_in_context ? 1 : 0);
1696 } 1693 }
1697 1694
1698 } // namespace internal 1695 } // namespace internal
1699 } // namespace v8 1696 } // namespace v8
OLDNEW
« no previous file with comments | « src/ast/prettyprinter.cc ('k') | src/compiler/ast-graph-builder.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698