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

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

Issue 2265903003: Move has_arguments_parameter_ to DeclarationScope (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: readd comment Created 4 years, 4 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/scopes.h ('k') | no next file » | 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 160 matching lines...) Expand 10 before | Expand all | Expand 10 after
171 variables_.Declare(zone, this, catch_variable_name, VAR, Variable::NORMAL, 171 variables_.Declare(zone, this, catch_variable_name, VAR, Variable::NORMAL,
172 kCreatedInitialized); 172 kCreatedInitialized);
173 AllocateHeapSlot(variable); 173 AllocateHeapSlot(variable);
174 } 174 }
175 175
176 void DeclarationScope::SetDefaults() { 176 void DeclarationScope::SetDefaults() {
177 is_declaration_scope_ = true; 177 is_declaration_scope_ = true;
178 has_simple_parameters_ = true; 178 has_simple_parameters_ = true;
179 asm_module_ = false; 179 asm_module_ = false;
180 asm_function_ = false; 180 asm_function_ = false;
181 has_arguments_parameter_ = false;
181 receiver_ = nullptr; 182 receiver_ = nullptr;
182 new_target_ = nullptr; 183 new_target_ = nullptr;
183 function_ = nullptr; 184 function_ = nullptr;
184 arguments_ = nullptr; 185 arguments_ = nullptr;
185 this_function_ = nullptr; 186 this_function_ = nullptr;
186 arity_ = 0; 187 arity_ = 0;
187 rest_parameter_ = nullptr; 188 rest_parameter_ = nullptr;
188 rest_index_ = -1; 189 rest_index_ = -1;
189 } 190 }
190 191
(...skipping 11 matching lines...) Expand all
202 end_position_ = kNoSourcePosition; 203 end_position_ = kNoSourcePosition;
203 204
204 num_stack_slots_ = 0; 205 num_stack_slots_ = 0;
205 num_heap_slots_ = Context::MIN_CONTEXT_SLOTS; 206 num_heap_slots_ = Context::MIN_CONTEXT_SLOTS;
206 num_global_slots_ = 0; 207 num_global_slots_ = 0;
207 208
208 set_language_mode(SLOPPY); 209 set_language_mode(SLOPPY);
209 210
210 scope_calls_eval_ = false; 211 scope_calls_eval_ = false;
211 scope_uses_super_property_ = false; 212 scope_uses_super_property_ = false;
212 has_arguments_parameter_ = false;
213 scope_nonlinear_ = false; 213 scope_nonlinear_ = false;
214 is_hidden_ = false; 214 is_hidden_ = false;
215 is_debug_evaluate_scope_ = false; 215 is_debug_evaluate_scope_ = false;
216 216
217 inner_scope_calls_eval_ = false; 217 inner_scope_calls_eval_ = false;
218 force_eager_compilation_ = false; 218 force_eager_compilation_ = false;
219 force_context_allocation_ = false; 219 force_context_allocation_ = false;
220 220
221 is_declaration_scope_ = false; 221 is_declaration_scope_ = false;
222 } 222 }
(...skipping 1538 matching lines...) Expand 10 before | Expand all | Expand 10 after
1761 function != nullptr && function->IsContextSlot(); 1761 function != nullptr && function->IsContextSlot();
1762 return num_heap_slots() - Context::MIN_CONTEXT_SLOTS - num_global_slots() - 1762 return num_heap_slots() - Context::MIN_CONTEXT_SLOTS - num_global_slots() -
1763 (is_function_var_in_context ? 1 : 0); 1763 (is_function_var_in_context ? 1 : 0);
1764 } 1764 }
1765 1765
1766 1766
1767 int Scope::ContextGlobalCount() const { return num_global_slots(); } 1767 int Scope::ContextGlobalCount() const { return num_global_slots(); }
1768 1768
1769 } // namespace internal 1769 } // namespace internal
1770 } // namespace v8 1770 } // namespace v8
OLDNEW
« no previous file with comments | « src/ast/scopes.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698