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

Side by Side Diff: src/ic/x87/ic-x87.cc

Issue 1212653011: X87: Vector ICs: Like megamorphic keyed koads, use a dummy vector for stores. (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Created 5 years, 5 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 | « no previous file | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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 #if V8_TARGET_ARCH_X87 7 #if V8_TARGET_ARCH_X87
8 8
9 #include "src/codegen.h" 9 #include "src/codegen.h"
10 #include "src/ic/ic.h" 10 #include "src/ic/ic.h"
(...skipping 535 matching lines...) Expand 10 before | Expand all | Expand 10 after
546 546
547 // Slow case: call runtime. 547 // Slow case: call runtime.
548 __ bind(&slow); 548 __ bind(&slow);
549 PropertyICCompiler::GenerateRuntimeSetProperty(masm, language_mode); 549 PropertyICCompiler::GenerateRuntimeSetProperty(masm, language_mode);
550 // Never returns to here. 550 // Never returns to here.
551 551
552 __ bind(&maybe_name_key); 552 __ bind(&maybe_name_key);
553 __ mov(ebx, FieldOperand(key, HeapObject::kMapOffset)); 553 __ mov(ebx, FieldOperand(key, HeapObject::kMapOffset));
554 __ movzx_b(ebx, FieldOperand(ebx, Map::kInstanceTypeOffset)); 554 __ movzx_b(ebx, FieldOperand(ebx, Map::kInstanceTypeOffset));
555 __ JumpIfNotUniqueNameInstanceType(ebx, &slow); 555 __ JumpIfNotUniqueNameInstanceType(ebx, &slow);
556
557
558 if (FLAG_vector_stores) {
559 // The handlers in the stub cache expect a vector and slot. Since we won't
560 // change the IC from any downstream misses, a dummy vector can be used.
561 Handle<TypeFeedbackVector> dummy_vector = Handle<TypeFeedbackVector>::cast(
562 masm->isolate()->factory()->keyed_store_dummy_vector());
563 int slot = dummy_vector->GetIndex(FeedbackVectorICSlot(0));
564 __ push(Immediate(Smi::FromInt(slot)));
565 __ push(Immediate(dummy_vector));
566 }
567
556 Code::Flags flags = Code::RemoveTypeAndHolderFromFlags( 568 Code::Flags flags = Code::RemoveTypeAndHolderFromFlags(
557 Code::ComputeHandlerFlags(Code::STORE_IC)); 569 Code::ComputeHandlerFlags(Code::STORE_IC));
558 masm->isolate()->stub_cache()->GenerateProbe( 570 masm->isolate()->stub_cache()->GenerateProbe(
559 masm, Code::STORE_IC, flags, false, receiver, key, ebx, no_reg); 571 masm, Code::STORE_IC, flags, false, receiver, key, ebx, no_reg);
572
573 if (FLAG_vector_stores) {
574 __ pop(VectorStoreICDescriptor::VectorRegister());
575 __ pop(VectorStoreICDescriptor::SlotRegister());
576 }
577
560 // Cache miss. 578 // Cache miss.
561 __ jmp(&miss); 579 __ jmp(&miss);
562 580
563 // Extra capacity case: Check if there is extra capacity to 581 // Extra capacity case: Check if there is extra capacity to
564 // perform the store and update the length. Used for adding one 582 // perform the store and update the length. Used for adding one
565 // element to the array by writing to array[array.length]. 583 // element to the array by writing to array[array.length].
566 __ bind(&extra); 584 __ bind(&extra);
567 // receiver is a JSArray. 585 // receiver is a JSArray.
568 // key is a smi. 586 // key is a smi.
569 // ebx: receiver->elements, a FixedArray 587 // ebx: receiver->elements, a FixedArray
(...skipping 278 matching lines...) Expand 10 before | Expand all | Expand 10 after
848 Condition cc = 866 Condition cc =
849 (check == ENABLE_INLINED_SMI_CHECK) 867 (check == ENABLE_INLINED_SMI_CHECK)
850 ? (*jmp_address == Assembler::kJncShortOpcode ? not_zero : zero) 868 ? (*jmp_address == Assembler::kJncShortOpcode ? not_zero : zero)
851 : (*jmp_address == Assembler::kJnzShortOpcode ? not_carry : carry); 869 : (*jmp_address == Assembler::kJnzShortOpcode ? not_carry : carry);
852 *jmp_address = static_cast<byte>(Assembler::kJccShortPrefix | cc); 870 *jmp_address = static_cast<byte>(Assembler::kJccShortPrefix | cc);
853 } 871 }
854 } // namespace internal 872 } // namespace internal
855 } // namespace v8 873 } // namespace v8
856 874
857 #endif // V8_TARGET_ARCH_X87 875 #endif // V8_TARGET_ARCH_X87
OLDNEW
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698