| 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/v8.h" | 5 #include "src/v8.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 1166 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1177 } else { | 1177 } else { |
| 1178 __ Push(isolate()->factory()->the_hole_value()); | 1178 __ Push(isolate()->factory()->the_hole_value()); |
| 1179 } | 1179 } |
| 1180 | 1180 |
| 1181 VisitForStackValue(lit->constructor()); | 1181 VisitForStackValue(lit->constructor()); |
| 1182 | 1182 |
| 1183 __ Push(script()); | 1183 __ Push(script()); |
| 1184 __ Push(Smi::FromInt(lit->start_position())); | 1184 __ Push(Smi::FromInt(lit->start_position())); |
| 1185 __ Push(Smi::FromInt(lit->end_position())); | 1185 __ Push(Smi::FromInt(lit->end_position())); |
| 1186 | 1186 |
| 1187 __ CallRuntime(Runtime::kDefineClass, 6); | 1187 __ CallRuntime(is_strong(language_mode()) ? Runtime::kDefineClassStrong |
| 1188 : Runtime::kDefineClass, |
| 1189 6); |
| 1188 PrepareForBailoutForId(lit->CreateLiteralId(), TOS_REG); | 1190 PrepareForBailoutForId(lit->CreateLiteralId(), TOS_REG); |
| 1189 | 1191 |
| 1190 int store_slot_index = 0; | 1192 int store_slot_index = 0; |
| 1191 EmitClassDefineProperties(lit, &store_slot_index); | 1193 EmitClassDefineProperties(lit, &store_slot_index); |
| 1192 | 1194 |
| 1193 if (lit->scope() != NULL) { | 1195 if (lit->scope() != NULL) { |
| 1194 DCHECK_NOT_NULL(lit->class_variable_proxy()); | 1196 DCHECK_NOT_NULL(lit->class_variable_proxy()); |
| 1195 FeedbackVectorICSlot slot = FLAG_vector_stores | 1197 FeedbackVectorICSlot slot = FLAG_vector_stores |
| 1196 ? lit->GetNthSlot(store_slot_index++) | 1198 ? lit->GetNthSlot(store_slot_index++) |
| 1197 : FeedbackVectorICSlot::Invalid(); | 1199 : FeedbackVectorICSlot::Invalid(); |
| (...skipping 270 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1468 codegen_->PrepareForBailoutForId(exit_id_, NO_REGISTERS); | 1470 codegen_->PrepareForBailoutForId(exit_id_, NO_REGISTERS); |
| 1469 codegen_->scope_ = saved_scope_; | 1471 codegen_->scope_ = saved_scope_; |
| 1470 } | 1472 } |
| 1471 | 1473 |
| 1472 | 1474 |
| 1473 #undef __ | 1475 #undef __ |
| 1474 | 1476 |
| 1475 | 1477 |
| 1476 } // namespace internal | 1478 } // namespace internal |
| 1477 } // namespace v8 | 1479 } // namespace v8 |
| OLD | NEW |