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

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

Issue 1647213002: Remove unnecessary ClassLiteral name member and simplify Function.name handling (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Slightly shorter Created 4 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/compiler/ast-graph-builder.cc ('k') | src/parsing/parser.h » ('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.h" 7 #include "src/ast/ast.h"
8 #include "src/ast/ast-numbering.h" 8 #include "src/ast/ast-numbering.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 1293 matching lines...) Expand 10 before | Expand all | Expand 10 after
1304 } 1304 }
1305 1305
1306 1306
1307 void FullCodeGenerator::VisitClassLiteral(ClassLiteral* lit) { 1307 void FullCodeGenerator::VisitClassLiteral(ClassLiteral* lit) {
1308 Comment cmnt(masm_, "[ ClassLiteral"); 1308 Comment cmnt(masm_, "[ ClassLiteral");
1309 1309
1310 { 1310 {
1311 EnterBlockScopeIfNeeded block_scope_state( 1311 EnterBlockScopeIfNeeded block_scope_state(
1312 this, lit->scope(), lit->EntryId(), lit->DeclsId(), lit->ExitId()); 1312 this, lit->scope(), lit->EntryId(), lit->DeclsId(), lit->ExitId());
1313 1313
1314 if (lit->raw_name() != NULL) {
1315 __ Push(lit->name());
1316 } else {
1317 __ Push(isolate()->factory()->undefined_value());
1318 }
1319
1320 if (lit->extends() != NULL) { 1314 if (lit->extends() != NULL) {
1321 VisitForStackValue(lit->extends()); 1315 VisitForStackValue(lit->extends());
1322 } else { 1316 } else {
1323 __ Push(isolate()->factory()->the_hole_value()); 1317 __ Push(isolate()->factory()->the_hole_value());
1324 } 1318 }
1325 1319
1326 VisitForStackValue(lit->constructor()); 1320 VisitForStackValue(lit->constructor());
1327 1321
1328 __ Push(Smi::FromInt(lit->start_position())); 1322 __ Push(Smi::FromInt(lit->start_position()));
1329 __ Push(Smi::FromInt(lit->end_position())); 1323 __ Push(Smi::FromInt(lit->end_position()));
(...skipping 378 matching lines...) Expand 10 before | Expand all | Expand 10 after
1708 return var->mode() == CONST_LEGACY || var->scope()->is_nonlinear() || 1702 return var->mode() == CONST_LEGACY || var->scope()->is_nonlinear() ||
1709 var->initializer_position() >= proxy->position(); 1703 var->initializer_position() >= proxy->position();
1710 } 1704 }
1711 1705
1712 1706
1713 #undef __ 1707 #undef __
1714 1708
1715 1709
1716 } // namespace internal 1710 } // namespace internal
1717 } // namespace v8 1711 } // namespace v8
OLDNEW
« no previous file with comments | « src/compiler/ast-graph-builder.cc ('k') | src/parsing/parser.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698