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

Side by Side Diff: src/interpreter/interpreter.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/bytecodes.h ('k') | test/cctest/interpreter/test-bytecode-generator.cc » ('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/interpreter.h" 5 #include "src/interpreter/interpreter.h"
6 6
7 #include "src/code-factory.h" 7 #include "src/code-factory.h"
8 #include "src/compiler.h" 8 #include "src/compiler.h"
9 #include "src/compiler/interpreter-assembler.h" 9 #include "src/compiler/interpreter-assembler.h"
10 #include "src/factory.h" 10 #include "src/factory.h"
(...skipping 329 matching lines...) Expand 10 before | Expand all | Expand 10 after
340 // Calls the strict mode KeyStoreIC at FeedBackVector slot <slot> for <object> 340 // Calls the strict mode KeyStoreIC at FeedBackVector slot <slot> for <object>
341 // and the key <key> with the value in the accumulator. 341 // and the key <key> with the value in the accumulator.
342 void Interpreter::DoKeyedStoreICStrict( 342 void Interpreter::DoKeyedStoreICStrict(
343 compiler::InterpreterAssembler* assembler) { 343 compiler::InterpreterAssembler* assembler) {
344 Callable ic = 344 Callable ic =
345 CodeFactory::KeyedStoreICInOptimizedCode(isolate_, STRICT, UNINITIALIZED); 345 CodeFactory::KeyedStoreICInOptimizedCode(isolate_, STRICT, UNINITIALIZED);
346 DoPropertyStoreIC(ic, assembler); 346 DoPropertyStoreIC(ic, assembler);
347 } 347 }
348 348
349 349
350 // KeyedStoreICGeneric <object> <key>
351 //
352 // Calls the generic KeyedStoreIC for <object> and the key <key> with the value
353 // in the accumulator.
354 void Interpreter::DoKeyedStoreICGeneric(
355 compiler::InterpreterAssembler* assembler) {
356 Callable ic =
357 CodeFactory::KeyedStoreICInOptimizedCode(isolate_, SLOPPY, MEGAMORPHIC);
358 Node* code_target = __ HeapConstant(ic.code());
359 Node* object_reg_index = __ BytecodeOperandReg8(0);
360 Node* object = __ LoadRegister(object_reg_index);
361 Node* name_reg_index = __ BytecodeOperandReg8(1);
362 Node* name = __ LoadRegister(name_reg_index);
363 Node* value = __ GetAccumulator();
364 Node* result = __ CallIC(ic.descriptor(), code_target, object, name, value);
365 __ SetAccumulator(result);
366 __ Dispatch();
367 }
368
369
370 // PushContext <context> 350 // PushContext <context>
371 // 351 //
372 // Pushes the accumulator as the current context, and saves it in <context> 352 // Pushes the accumulator as the current context, and saves it in <context>
373 void Interpreter::DoPushContext(compiler::InterpreterAssembler* assembler) { 353 void Interpreter::DoPushContext(compiler::InterpreterAssembler* assembler) {
374 Node* reg_index = __ BytecodeOperandReg8(0); 354 Node* reg_index = __ BytecodeOperandReg8(0);
375 Node* context = __ GetAccumulator(); 355 Node* context = __ GetAccumulator();
376 __ SetContext(context); 356 __ SetContext(context);
377 __ StoreRegister(context, reg_index); 357 __ StoreRegister(context, reg_index);
378 __ Dispatch(); 358 __ Dispatch();
379 } 359 }
(...skipping 419 matching lines...) Expand 10 before | Expand all | Expand 10 after
799 // 779 //
800 // Return the value in the accumulator. 780 // Return the value in the accumulator.
801 void Interpreter::DoReturn(compiler::InterpreterAssembler* assembler) { 781 void Interpreter::DoReturn(compiler::InterpreterAssembler* assembler) {
802 __ Return(); 782 __ Return();
803 } 783 }
804 784
805 785
806 } // namespace interpreter 786 } // namespace interpreter
807 } // namespace internal 787 } // namespace internal
808 } // namespace v8 788 } // namespace v8
OLDNEW
« no previous file with comments | « src/interpreter/bytecodes.h ('k') | test/cctest/interpreter/test-bytecode-generator.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698