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

Side by Side Diff: src/scopes.cc

Issue 919643008: Remove --experimental-classes flag and related dead code. (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Created 5 years, 10 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/runtime/runtime-classes.cc ('k') | src/x64/full-codegen-x64.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/v8.h" 5 #include "src/v8.h"
6 6
7 #include "src/scopes.h" 7 #include "src/scopes.h"
8 8
9 #include "src/accessors.h" 9 #include "src/accessors.h"
10 #include "src/bootstrapper.h" 10 #include "src/bootstrapper.h"
(...skipping 291 matching lines...) Expand 10 before | Expand all | Expand 10 after
302 // Declare convenience variables. 302 // Declare convenience variables.
303 // Declare and allocate receiver (even for the script scope, and even 303 // Declare and allocate receiver (even for the script scope, and even
304 // if naccesses_ == 0). 304 // if naccesses_ == 0).
305 // NOTE: When loading parameters in the script scope, we must take 305 // NOTE: When loading parameters in the script scope, we must take
306 // care not to access them as properties of the global object, but 306 // care not to access them as properties of the global object, but
307 // instead load them directly from the stack. Currently, the only 307 // instead load them directly from the stack. Currently, the only
308 // such parameter is 'this' which is passed on the stack when 308 // such parameter is 'this' which is passed on the stack when
309 // invoking scripts 309 // invoking scripts
310 if (is_declaration_scope()) { 310 if (is_declaration_scope()) {
311 DCHECK(!subclass_constructor || is_function_scope()); 311 DCHECK(!subclass_constructor || is_function_scope());
312 DCHECK(FLAG_experimental_classes || !subclass_constructor);
313 Variable* var = variables_.Declare( 312 Variable* var = variables_.Declare(
314 this, ast_value_factory_->this_string(), 313 this, ast_value_factory_->this_string(),
315 subclass_constructor ? CONST : VAR, false, Variable::THIS, 314 subclass_constructor ? CONST : VAR, false, Variable::THIS,
316 subclass_constructor ? kNeedsInitialization : kCreatedInitialized); 315 subclass_constructor ? kNeedsInitialization : kCreatedInitialized);
317 var->AllocateTo(Variable::PARAMETER, -1); 316 var->AllocateTo(Variable::PARAMETER, -1);
318 receiver_ = var; 317 receiver_ = var;
319 318
320 if (subclass_constructor) { 319 if (subclass_constructor) {
321 new_target_ = variables_.Declare( 320 new_target_ = variables_.Declare(
322 this, ast_value_factory_->new_target_string(), CONST, false, 321 this, ast_value_factory_->new_target_string(), CONST, false,
(...skipping 1116 matching lines...) Expand 10 before | Expand all | Expand 10 after
1439 } 1438 }
1440 1439
1441 1440
1442 int Scope::ContextLocalCount() const { 1441 int Scope::ContextLocalCount() const {
1443 if (num_heap_slots() == 0) return 0; 1442 if (num_heap_slots() == 0) return 0;
1444 return num_heap_slots() - Context::MIN_CONTEXT_SLOTS - 1443 return num_heap_slots() - Context::MIN_CONTEXT_SLOTS -
1445 (function_ != NULL && function_->proxy()->var()->IsContextSlot() ? 1 : 0); 1444 (function_ != NULL && function_->proxy()->var()->IsContextSlot() ? 1 : 0);
1446 } 1445 }
1447 1446
1448 } } // namespace v8::internal 1447 } } // namespace v8::internal
OLDNEW
« no previous file with comments | « src/runtime/runtime-classes.cc ('k') | src/x64/full-codegen-x64.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698