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

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

Issue 1431873006: Use a single Token::INIT for all variable initialization (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Fix arm, simplify fvar code Created 5 years, 1 month 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
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.h" 7 #include "src/ast.h"
8 #include "src/ast-numbering.h" 8 #include "src/ast-numbering.h"
9 #include "src/code-factory.h" 9 #include "src/code-factory.h"
10 #include "src/codegen.h" 10 #include "src/codegen.h"
(...skipping 1325 matching lines...) Expand 10 before | Expand all | Expand 10 after
1336 1336
1337 __ Push(Smi::FromInt(lit->start_position())); 1337 __ Push(Smi::FromInt(lit->start_position()));
1338 __ Push(Smi::FromInt(lit->end_position())); 1338 __ Push(Smi::FromInt(lit->end_position()));
1339 1339
1340 __ CallRuntime(Runtime::kDefineClass, 5); 1340 __ CallRuntime(Runtime::kDefineClass, 5);
1341 PrepareForBailoutForId(lit->CreateLiteralId(), TOS_REG); 1341 PrepareForBailoutForId(lit->CreateLiteralId(), TOS_REG);
1342 1342
1343 EmitClassDefineProperties(lit); 1343 EmitClassDefineProperties(lit);
1344 1344
1345 if (lit->class_variable_proxy() != nullptr) { 1345 if (lit->class_variable_proxy() != nullptr) {
1346 EmitVariableAssignment(lit->class_variable_proxy()->var(), 1346 EmitVariableAssignment(lit->class_variable_proxy()->var(), Token::INIT,
1347 Token::INIT_CONST, lit->ProxySlot()); 1347 lit->ProxySlot());
1348 } 1348 }
1349 } 1349 }
1350 1350
1351 context()->Plug(result_register()); 1351 context()->Plug(result_register());
1352 } 1352 }
1353 1353
1354 1354
1355 void FullCodeGenerator::VisitNativeFunctionLiteral( 1355 void FullCodeGenerator::VisitNativeFunctionLiteral(
1356 NativeFunctionLiteral* expr) { 1356 NativeFunctionLiteral* expr) {
1357 Comment cmnt(masm_, "[ NativeFunctionLiteral"); 1357 Comment cmnt(masm_, "[ NativeFunctionLiteral");
(...skipping 378 matching lines...) Expand 10 before | Expand all | Expand 10 after
1736 return var->mode() == CONST_LEGACY || var->scope()->is_nonlinear() || 1736 return var->mode() == CONST_LEGACY || var->scope()->is_nonlinear() ||
1737 var->initializer_position() >= proxy->position(); 1737 var->initializer_position() >= proxy->position();
1738 } 1738 }
1739 1739
1740 1740
1741 #undef __ 1741 #undef __
1742 1742
1743 1743
1744 } // namespace internal 1744 } // namespace internal
1745 } // namespace v8 1745 } // namespace v8
OLDNEW
« no previous file with comments | « src/full-codegen/arm64/full-codegen-arm64.cc ('k') | src/full-codegen/ia32/full-codegen-ia32.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698