Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(262)

Side by Side Diff: src/interpreter/bytecode-generator.cc

Issue 1400353002: [Interpreter]: Use vector store for array literal computed stores. (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Created 5 years, 2 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « src/interpreter/bytecode-array-builder.cc ('k') | src/interpreter/bytecodes.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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
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
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
OLDNEW
« no previous file with comments | « src/interpreter/bytecode-array-builder.cc ('k') | src/interpreter/bytecodes.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698