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

Side by Side Diff: src/full-codegen/full-codegen.cc

Issue 1952633002: [full-codegen] Introduce NestedStatement subclass for class literals. (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: More tests Created 4 years, 7 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/full-codegen/full-codegen.h ('k') | test/mjsunit/es6/classes.js » ('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/full-codegen/full-codegen.h" 5 #include "src/full-codegen/full-codegen.h"
6 6
7 #include "src/ast/ast-numbering.h" 7 #include "src/ast/ast-numbering.h"
8 #include "src/ast/ast.h" 8 #include "src/ast/ast.h"
9 #include "src/ast/prettyprinter.h" 9 #include "src/ast/prettyprinter.h"
10 #include "src/ast/scopeinfo.h" 10 #include "src/ast/scopeinfo.h"
(...skipping 1451 matching lines...) Expand 10 before | Expand all | Expand 10 after
1462 return; 1462 return;
1463 } 1463 }
1464 EmitNewClosure(function_info, expr->pretenure()); 1464 EmitNewClosure(function_info, expr->pretenure());
1465 } 1465 }
1466 1466
1467 1467
1468 void FullCodeGenerator::VisitClassLiteral(ClassLiteral* lit) { 1468 void FullCodeGenerator::VisitClassLiteral(ClassLiteral* lit) {
1469 Comment cmnt(masm_, "[ ClassLiteral"); 1469 Comment cmnt(masm_, "[ ClassLiteral");
1470 1470
1471 { 1471 {
1472 NestedClassLiteral nested_class_literal(this, lit);
1472 EnterBlockScopeIfNeeded block_scope_state( 1473 EnterBlockScopeIfNeeded block_scope_state(
1473 this, lit->scope(), lit->EntryId(), lit->DeclsId(), lit->ExitId()); 1474 this, lit->scope(), lit->EntryId(), lit->DeclsId(), lit->ExitId());
1474 1475
1475 if (lit->extends() != NULL) { 1476 if (lit->extends() != NULL) {
1476 VisitForStackValue(lit->extends()); 1477 VisitForStackValue(lit->extends());
1477 } else { 1478 } else {
1478 PushOperand(isolate()->factory()->the_hole_value()); 1479 PushOperand(isolate()->factory()->the_hole_value());
1479 } 1480 }
1480 1481
1481 VisitForStackValue(lit->constructor()); 1482 VisitForStackValue(lit->constructor());
(...skipping 460 matching lines...) Expand 10 before | Expand all | Expand 10 after
1942 return var->scope()->is_nonlinear() || 1943 return var->scope()->is_nonlinear() ||
1943 var->initializer_position() >= proxy->position(); 1944 var->initializer_position() >= proxy->position();
1944 } 1945 }
1945 1946
1946 1947
1947 #undef __ 1948 #undef __
1948 1949
1949 1950
1950 } // namespace internal 1951 } // namespace internal
1951 } // namespace v8 1952 } // namespace v8
OLDNEW
« no previous file with comments | « src/full-codegen/full-codegen.h ('k') | test/mjsunit/es6/classes.js » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698