| OLD | NEW |
| 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 Loading... |
| 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 Loading... |
| 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 |
| OLD | NEW |