| 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 1279 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1290 VisitForStackValue(lit->extends()); | 1290 VisitForStackValue(lit->extends()); |
| 1291 } else { | 1291 } else { |
| 1292 __ Push(isolate()->factory()->the_hole_value()); | 1292 __ Push(isolate()->factory()->the_hole_value()); |
| 1293 } | 1293 } |
| 1294 | 1294 |
| 1295 VisitForStackValue(lit->constructor()); | 1295 VisitForStackValue(lit->constructor()); |
| 1296 | 1296 |
| 1297 __ Push(Smi::FromInt(lit->start_position())); | 1297 __ Push(Smi::FromInt(lit->start_position())); |
| 1298 __ Push(Smi::FromInt(lit->end_position())); | 1298 __ Push(Smi::FromInt(lit->end_position())); |
| 1299 | 1299 |
| 1300 __ CallRuntime(is_strong(language_mode()) ? Runtime::kDefineClassStrong | 1300 __ CallRuntime(Runtime::kDefineClass, 5); |
| 1301 : Runtime::kDefineClass, | |
| 1302 5); | |
| 1303 PrepareForBailoutForId(lit->CreateLiteralId(), TOS_REG); | 1301 PrepareForBailoutForId(lit->CreateLiteralId(), TOS_REG); |
| 1304 | 1302 |
| 1305 int store_slot_index = 0; | 1303 int store_slot_index = 0; |
| 1306 EmitClassDefineProperties(lit, &store_slot_index); | 1304 EmitClassDefineProperties(lit, &store_slot_index); |
| 1307 | 1305 |
| 1308 if (lit->scope() != NULL) { | 1306 if (lit->scope() != NULL) { |
| 1309 DCHECK_NOT_NULL(lit->class_variable_proxy()); | 1307 DCHECK_NOT_NULL(lit->class_variable_proxy()); |
| 1310 FeedbackVectorICSlot slot = | 1308 FeedbackVectorICSlot slot = |
| 1311 FLAG_vector_stores && | 1309 FLAG_vector_stores && |
| 1312 lit->class_variable_proxy()->var()->IsUnallocated() | 1310 lit->class_variable_proxy()->var()->IsUnallocated() |
| (...skipping 336 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1649 return var->mode() == CONST_LEGACY || var->scope()->is_nonlinear() || | 1647 return var->mode() == CONST_LEGACY || var->scope()->is_nonlinear() || |
| 1650 var->initializer_position() >= proxy->position(); | 1648 var->initializer_position() >= proxy->position(); |
| 1651 } | 1649 } |
| 1652 | 1650 |
| 1653 | 1651 |
| 1654 #undef __ | 1652 #undef __ |
| 1655 | 1653 |
| 1656 | 1654 |
| 1657 } // namespace internal | 1655 } // namespace internal |
| 1658 } // namespace v8 | 1656 } // namespace v8 |
| OLD | NEW |