| 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 1312 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1323 VisitForStackValue(lit->constructor()); | 1323 VisitForStackValue(lit->constructor()); |
| 1324 | 1324 |
| 1325 __ Push(Smi::FromInt(lit->start_position())); | 1325 __ Push(Smi::FromInt(lit->start_position())); |
| 1326 __ Push(Smi::FromInt(lit->end_position())); | 1326 __ Push(Smi::FromInt(lit->end_position())); |
| 1327 | 1327 |
| 1328 __ CallRuntime(Runtime::kDefineClass, 5); | 1328 __ CallRuntime(Runtime::kDefineClass, 5); |
| 1329 PrepareForBailoutForId(lit->CreateLiteralId(), TOS_REG); | 1329 PrepareForBailoutForId(lit->CreateLiteralId(), TOS_REG); |
| 1330 | 1330 |
| 1331 EmitClassDefineProperties(lit); | 1331 EmitClassDefineProperties(lit); |
| 1332 | 1332 |
| 1333 if (lit->scope() != NULL) { | 1333 if (lit->class_variable_proxy() != nullptr) { |
| 1334 DCHECK_NOT_NULL(lit->class_variable_proxy()); | |
| 1335 EmitVariableAssignment(lit->class_variable_proxy()->var(), | 1334 EmitVariableAssignment(lit->class_variable_proxy()->var(), |
| 1336 Token::INIT_CONST, lit->ProxySlot()); | 1335 Token::INIT_CONST, lit->ProxySlot()); |
| 1337 } | 1336 } |
| 1338 } | 1337 } |
| 1339 | 1338 |
| 1340 context()->Plug(result_register()); | 1339 context()->Plug(result_register()); |
| 1341 } | 1340 } |
| 1342 | 1341 |
| 1343 | 1342 |
| 1344 void FullCodeGenerator::VisitNativeFunctionLiteral( | 1343 void FullCodeGenerator::VisitNativeFunctionLiteral( |
| (...skipping 320 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1665 return var->mode() == CONST_LEGACY || var->scope()->is_nonlinear() || | 1664 return var->mode() == CONST_LEGACY || var->scope()->is_nonlinear() || |
| 1666 var->initializer_position() >= proxy->position(); | 1665 var->initializer_position() >= proxy->position(); |
| 1667 } | 1666 } |
| 1668 | 1667 |
| 1669 | 1668 |
| 1670 #undef __ | 1669 #undef __ |
| 1671 | 1670 |
| 1672 | 1671 |
| 1673 } // namespace internal | 1672 } // namespace internal |
| 1674 } // namespace v8 | 1673 } // namespace v8 |
| OLD | NEW |