| 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-generator.h" | 5 #include "src/interpreter/bytecode-generator.h" |
| 6 | 6 |
| 7 #include <stack> | 7 #include <stack> |
| 8 | 8 |
| 9 #include "src/compiler.h" | 9 #include "src/compiler.h" |
| 10 #include "src/full-codegen/full-codegen.h" | 10 #include "src/full-codegen/full-codegen.h" |
| (...skipping 694 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 705 index = temporary_register_scope.NewRegister(); | 705 index = temporary_register_scope.NewRegister(); |
| 706 literal = temporary_register_scope.NewRegister(); | 706 literal = temporary_register_scope.NewRegister(); |
| 707 builder()->StoreAccumulatorInRegister(literal); | 707 builder()->StoreAccumulatorInRegister(literal); |
| 708 literal_in_accumulator = false; | 708 literal_in_accumulator = false; |
| 709 } | 709 } |
| 710 | 710 |
| 711 builder() | 711 builder() |
| 712 ->LoadLiteral(Smi::FromInt(array_index)) | 712 ->LoadLiteral(Smi::FromInt(array_index)) |
| 713 .StoreAccumulatorInRegister(index); | 713 .StoreAccumulatorInRegister(index); |
| 714 Visit(subexpr); | 714 Visit(subexpr); |
| 715 builder()->GenericStoreKeyedProperty(literal, index); | 715 FeedbackVectorSlot slot = expr->LiteralFeedbackSlot(); |
| 716 builder()->StoreKeyedProperty(literal, index, feedback_index(slot), |
| 717 language_mode()); |
| 716 } | 718 } |
| 717 | 719 |
| 718 if (!literal_in_accumulator) { | 720 if (!literal_in_accumulator) { |
| 719 // Restore literal array into accumulator. | 721 // Restore literal array into accumulator. |
| 720 builder()->LoadAccumulatorWithRegister(literal); | 722 builder()->LoadAccumulatorWithRegister(literal); |
| 721 } | 723 } |
| 722 } | 724 } |
| 723 | 725 |
| 724 | 726 |
| 725 void BytecodeGenerator::VisitVariableProxy(VariableProxy* proxy) { | 727 void BytecodeGenerator::VisitVariableProxy(VariableProxy* proxy) { |
| (...skipping 476 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1202 } | 1204 } |
| 1203 | 1205 |
| 1204 | 1206 |
| 1205 int BytecodeGenerator::feedback_index(FeedbackVectorSlot slot) const { | 1207 int BytecodeGenerator::feedback_index(FeedbackVectorSlot slot) const { |
| 1206 return info()->feedback_vector()->GetIndex(slot); | 1208 return info()->feedback_vector()->GetIndex(slot); |
| 1207 } | 1209 } |
| 1208 | 1210 |
| 1209 } // namespace interpreter | 1211 } // namespace interpreter |
| 1210 } // namespace internal | 1212 } // namespace internal |
| 1211 } // namespace v8 | 1213 } // namespace v8 |
| OLD | NEW |