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

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

Issue 892173002: Megamorphic KeyedLoadIC needs special handling for vector ics. (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Created 5 years, 10 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/ic/ia32/ic-ia32.cc ('k') | src/ic/x64/ic-x64.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 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 5
6 #include "src/v8.h" 6 #include "src/v8.h"
7 7
8 #if V8_TARGET_ARCH_MIPS 8 #if V8_TARGET_ARCH_MIPS
9 9
10 #include "src/codegen.h" 10 #include "src/codegen.h"
(...skipping 518 matching lines...) Expand 10 before | Expand all | Expand 10 after
529 Map::kHasNamedInterceptor, &slow); 529 Map::kHasNamedInterceptor, &slow);
530 530
531 531
532 // If the receiver is a fast-case object, check the stub cache. Otherwise 532 // If the receiver is a fast-case object, check the stub cache. Otherwise
533 // probe the dictionary. 533 // probe the dictionary.
534 __ lw(a3, FieldMemOperand(receiver, JSObject::kPropertiesOffset)); 534 __ lw(a3, FieldMemOperand(receiver, JSObject::kPropertiesOffset));
535 __ lw(t0, FieldMemOperand(a3, HeapObject::kMapOffset)); 535 __ lw(t0, FieldMemOperand(a3, HeapObject::kMapOffset));
536 __ LoadRoot(at, Heap::kHashTableMapRootIndex); 536 __ LoadRoot(at, Heap::kHashTableMapRootIndex);
537 __ Branch(&probe_dictionary, eq, t0, Operand(at)); 537 __ Branch(&probe_dictionary, eq, t0, Operand(at));
538 538
539 if (FLAG_vector_ics) {
540 // When vector ics are in use, the handlers in the stub cache expect a
541 // vector and slot. Since we won't change the IC from any downstream
542 // misses, a dummy vector can be used.
543 Register vector = VectorLoadICDescriptor::VectorRegister();
544 Register slot = VectorLoadICDescriptor::SlotRegister();
545 DCHECK(!AreAliased(vector, slot, t0, t1, t2, t5));
546 Handle<TypeFeedbackVector> dummy_vector = Handle<TypeFeedbackVector>::cast(
547 masm->isolate()->factory()->keyed_load_dummy_vector());
548 int int_slot = dummy_vector->GetIndex(FeedbackVectorICSlot(0));
549 __ LoadRoot(vector, Heap::kKeyedLoadDummyVectorRootIndex);
550 __ li(slot, Operand(Smi::FromInt(int_slot)));
551 }
552
539 Code::Flags flags = Code::RemoveTypeAndHolderFromFlags( 553 Code::Flags flags = Code::RemoveTypeAndHolderFromFlags(
540 Code::ComputeHandlerFlags(Code::LOAD_IC)); 554 Code::ComputeHandlerFlags(Code::LOAD_IC));
541 masm->isolate()->stub_cache()->GenerateProbe( 555 masm->isolate()->stub_cache()->GenerateProbe(
542 masm, Code::LOAD_IC, flags, false, receiver, key, a3, t0, t1, t2); 556 masm, Code::LOAD_IC, flags, false, receiver, key, t0, t1, t2, t5);
543 // Cache miss. 557 // Cache miss.
544 GenerateMiss(masm); 558 GenerateMiss(masm);
545 559
546 // Do a quick inline probe of the receiver's dictionary, if it 560 // Do a quick inline probe of the receiver's dictionary, if it
547 // exists. 561 // exists.
548 __ bind(&probe_dictionary); 562 __ bind(&probe_dictionary);
549 // a3: elements 563 // a3: elements
550 __ lw(a0, FieldMemOperand(receiver, HeapObject::kMapOffset)); 564 __ lw(a0, FieldMemOperand(receiver, HeapObject::kMapOffset));
551 __ lbu(a0, FieldMemOperand(a0, Map::kInstanceTypeOffset)); 565 __ lbu(a0, FieldMemOperand(a0, Map::kInstanceTypeOffset));
552 GenerateGlobalInstanceTypeCheck(masm, a0, &slow); 566 GenerateGlobalInstanceTypeCheck(masm, a0, &slow);
(...skipping 420 matching lines...) Expand 10 before | Expand all | Expand 10 after
973 patcher.ChangeBranchCondition(ne); 987 patcher.ChangeBranchCondition(ne);
974 } else { 988 } else {
975 DCHECK(Assembler::IsBne(branch_instr)); 989 DCHECK(Assembler::IsBne(branch_instr));
976 patcher.ChangeBranchCondition(eq); 990 patcher.ChangeBranchCondition(eq);
977 } 991 }
978 } 992 }
979 } 993 }
980 } // namespace v8::internal 994 } // namespace v8::internal
981 995
982 #endif // V8_TARGET_ARCH_MIPS 996 #endif // V8_TARGET_ARCH_MIPS
OLDNEW
« no previous file with comments | « src/ic/ia32/ic-ia32.cc ('k') | src/ic/x64/ic-x64.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698