OLD | NEW |
1 // Copyright 2015 the V8 project authors. All rights reserved. | 1 // Copyright 2015 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/interpreter/bytecode-array-builder.h" | 5 #include "src/interpreter/bytecode-array-builder.h" |
6 | 6 |
7 #include "src/globals.h" | 7 #include "src/globals.h" |
8 #include "src/interpreter/bytecode-array-writer.h" | 8 #include "src/interpreter/bytecode-array-writer.h" |
9 #include "src/interpreter/bytecode-dead-code-optimizer.h" | 9 #include "src/interpreter/bytecode-dead-code-optimizer.h" |
10 #include "src/interpreter/bytecode-label.h" | 10 #include "src/interpreter/bytecode-label.h" |
(...skipping 621 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
632 return *this; | 632 return *this; |
633 } | 633 } |
634 | 634 |
635 BytecodeArrayBuilder& BytecodeArrayBuilder::StoreDataPropertyInLiteral( | 635 BytecodeArrayBuilder& BytecodeArrayBuilder::StoreDataPropertyInLiteral( |
636 Register object, Register name, DataPropertyInLiteralFlags flags, | 636 Register object, Register name, DataPropertyInLiteralFlags flags, |
637 int feedback_slot) { | 637 int feedback_slot) { |
638 OutputStaDataPropertyInLiteral(object, name, flags, feedback_slot); | 638 OutputStaDataPropertyInLiteral(object, name, flags, feedback_slot); |
639 return *this; | 639 return *this; |
640 } | 640 } |
641 | 641 |
| 642 BytecodeArrayBuilder& BytecodeArrayBuilder::CollectTypeProfile( |
| 643 Register name, int feedback_slot) { |
| 644 DCHECK(FLAG_type_profile); |
| 645 OutputCollectTypeProfile(name, feedback_slot); |
| 646 return *this; |
| 647 } |
| 648 |
642 BytecodeArrayBuilder& BytecodeArrayBuilder::StoreNamedProperty( | 649 BytecodeArrayBuilder& BytecodeArrayBuilder::StoreNamedProperty( |
643 Register object, size_t name_index, int feedback_slot, | 650 Register object, size_t name_index, int feedback_slot, |
644 LanguageMode language_mode) { | 651 LanguageMode language_mode) { |
645 // Ensure that language mode is in sync with the IC slot kind if the function | 652 // Ensure that language mode is in sync with the IC slot kind if the function |
646 // literal is available (not a unit test case). | 653 // literal is available (not a unit test case). |
647 // TODO(ishell): check only in debug mode. | 654 // TODO(ishell): check only in debug mode. |
648 if (literal_) { | 655 if (literal_) { |
649 FeedbackSlot slot = FeedbackVector::ToSlot(feedback_slot); | 656 FeedbackSlot slot = FeedbackVector::ToSlot(feedback_slot); |
650 CHECK_EQ(GetLanguageModeFromSlotKind(feedback_vector_spec()->GetKind(slot)), | 657 CHECK_EQ(GetLanguageModeFromSlotKind(feedback_vector_spec()->GetKind(slot)), |
651 language_mode); | 658 language_mode); |
(...skipping 562 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1214 RegisterList reg_list) { | 1221 RegisterList reg_list) { |
1215 DCHECK(RegisterListIsValid(reg_list)); | 1222 DCHECK(RegisterListIsValid(reg_list)); |
1216 if (register_optimizer_) | 1223 if (register_optimizer_) |
1217 register_optimizer_->PrepareOutputRegisterList(reg_list); | 1224 register_optimizer_->PrepareOutputRegisterList(reg_list); |
1218 return static_cast<uint32_t>(reg_list.first_register().ToOperand()); | 1225 return static_cast<uint32_t>(reg_list.first_register().ToOperand()); |
1219 } | 1226 } |
1220 | 1227 |
1221 } // namespace interpreter | 1228 } // namespace interpreter |
1222 } // namespace internal | 1229 } // namespace internal |
1223 } // namespace v8 | 1230 } // namespace v8 |
OLD | NEW |