| 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 1292 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1303 __ CallRuntime(is_strong(language_mode()) ? Runtime::kDefineClassStrong | 1303 __ CallRuntime(is_strong(language_mode()) ? Runtime::kDefineClassStrong |
| 1304 : Runtime::kDefineClass, | 1304 : Runtime::kDefineClass, |
| 1305 6); | 1305 6); |
| 1306 PrepareForBailoutForId(lit->CreateLiteralId(), TOS_REG); | 1306 PrepareForBailoutForId(lit->CreateLiteralId(), TOS_REG); |
| 1307 | 1307 |
| 1308 int store_slot_index = 0; | 1308 int store_slot_index = 0; |
| 1309 EmitClassDefineProperties(lit, &store_slot_index); | 1309 EmitClassDefineProperties(lit, &store_slot_index); |
| 1310 | 1310 |
| 1311 if (lit->scope() != NULL) { | 1311 if (lit->scope() != NULL) { |
| 1312 DCHECK_NOT_NULL(lit->class_variable_proxy()); | 1312 DCHECK_NOT_NULL(lit->class_variable_proxy()); |
| 1313 FeedbackVectorICSlot slot = FLAG_vector_stores | 1313 FeedbackVectorICSlot slot = |
| 1314 ? lit->GetNthSlot(store_slot_index++) | 1314 FLAG_vector_stores && |
| 1315 : FeedbackVectorICSlot::Invalid(); | 1315 lit->class_variable_proxy()->var()->IsUnallocated() |
| 1316 ? lit->GetNthSlot(store_slot_index++) |
| 1317 : FeedbackVectorICSlot::Invalid(); |
| 1316 EmitVariableAssignment(lit->class_variable_proxy()->var(), | 1318 EmitVariableAssignment(lit->class_variable_proxy()->var(), |
| 1317 Token::INIT_CONST, slot); | 1319 Token::INIT_CONST, slot); |
| 1318 } | 1320 } |
| 1319 | 1321 |
| 1320 // Verify that compilation exactly consumed the number of store ic slots | 1322 // Verify that compilation exactly consumed the number of store ic slots |
| 1321 // that the ClassLiteral node had to offer. | 1323 // that the ClassLiteral node had to offer. |
| 1322 DCHECK(!FLAG_vector_stores || store_slot_index == lit->slot_count()); | 1324 DCHECK(!FLAG_vector_stores || store_slot_index == lit->slot_count()); |
| 1323 } | 1325 } |
| 1324 | 1326 |
| 1325 context()->Plug(result_register()); | 1327 context()->Plug(result_register()); |
| (...skipping 260 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1586 codegen_->PrepareForBailoutForId(exit_id_, NO_REGISTERS); | 1588 codegen_->PrepareForBailoutForId(exit_id_, NO_REGISTERS); |
| 1587 codegen_->scope_ = saved_scope_; | 1589 codegen_->scope_ = saved_scope_; |
| 1588 } | 1590 } |
| 1589 | 1591 |
| 1590 | 1592 |
| 1591 #undef __ | 1593 #undef __ |
| 1592 | 1594 |
| 1593 | 1595 |
| 1594 } // namespace internal | 1596 } // namespace internal |
| 1595 } // namespace v8 | 1597 } // namespace v8 |
| OLD | NEW |