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

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

Issue 1846963002: Use a dictionary-mode code cache on the map rather than a dual system. (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Addressed comment Created 4 years, 8 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/handler-compiler-ia32.cc ('k') | src/ic/ia32/stub-cache-ia32.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 #if V8_TARGET_ARCH_IA32 5 #if V8_TARGET_ARCH_IA32
6 6
7 #include "src/codegen.h" 7 #include "src/codegen.h"
8 #include "src/ic/ic.h" 8 #include "src/ic/ic.h"
9 #include "src/ic/ic-compiler.h" 9 #include "src/ic/ic-compiler.h"
10 #include "src/ic/stub-cache.h" 10 #include "src/ic/stub-cache.h"
(...skipping 318 matching lines...) Expand 10 before | Expand all | Expand 10 after
329 329
330 // The handlers in the stub cache expect a vector and slot. Since we won't 330 // The handlers in the stub cache expect a vector and slot. Since we won't
331 // change the IC from any downstream misses, a dummy vector can be used. 331 // change the IC from any downstream misses, a dummy vector can be used.
332 Handle<TypeFeedbackVector> dummy_vector = 332 Handle<TypeFeedbackVector> dummy_vector =
333 TypeFeedbackVector::DummyVector(isolate); 333 TypeFeedbackVector::DummyVector(isolate);
334 int slot = dummy_vector->GetIndex( 334 int slot = dummy_vector->GetIndex(
335 FeedbackVectorSlot(TypeFeedbackVector::kDummyKeyedLoadICSlot)); 335 FeedbackVectorSlot(TypeFeedbackVector::kDummyKeyedLoadICSlot));
336 __ push(Immediate(Smi::FromInt(slot))); 336 __ push(Immediate(Smi::FromInt(slot)));
337 __ push(Immediate(dummy_vector)); 337 __ push(Immediate(dummy_vector));
338 338
339 Code::Flags flags = Code::RemoveTypeAndHolderFromFlags( 339 Code::Flags flags =
340 Code::ComputeHandlerFlags(Code::LOAD_IC)); 340 Code::RemoveHolderFromFlags(Code::ComputeHandlerFlags(Code::LOAD_IC));
341 masm->isolate()->stub_cache()->GenerateProbe(masm, Code::KEYED_LOAD_IC, flags, 341 masm->isolate()->stub_cache()->GenerateProbe(masm, Code::KEYED_LOAD_IC, flags,
342 receiver, key, ebx, edi); 342 receiver, key, ebx, edi);
343 343
344 __ pop(LoadWithVectorDescriptor::VectorRegister()); 344 __ pop(LoadWithVectorDescriptor::VectorRegister());
345 __ pop(LoadDescriptor::SlotRegister()); 345 __ pop(LoadDescriptor::SlotRegister());
346 346
347 // Cache miss. 347 // Cache miss.
348 GenerateMiss(masm); 348 GenerateMiss(masm);
349 349
350 // Do a quick inline probe of the receiver's dictionary, if it 350 // Do a quick inline probe of the receiver's dictionary, if it
(...skipping 205 matching lines...) Expand 10 before | Expand all | Expand 10 after
556 556
557 // The handlers in the stub cache expect a vector and slot. Since we won't 557 // The handlers in the stub cache expect a vector and slot. Since we won't
558 // change the IC from any downstream misses, a dummy vector can be used. 558 // change the IC from any downstream misses, a dummy vector can be used.
559 Handle<TypeFeedbackVector> dummy_vector = 559 Handle<TypeFeedbackVector> dummy_vector =
560 TypeFeedbackVector::DummyVector(masm->isolate()); 560 TypeFeedbackVector::DummyVector(masm->isolate());
561 int slot = dummy_vector->GetIndex( 561 int slot = dummy_vector->GetIndex(
562 FeedbackVectorSlot(TypeFeedbackVector::kDummyKeyedStoreICSlot)); 562 FeedbackVectorSlot(TypeFeedbackVector::kDummyKeyedStoreICSlot));
563 __ push(Immediate(Smi::FromInt(slot))); 563 __ push(Immediate(Smi::FromInt(slot)));
564 __ push(Immediate(dummy_vector)); 564 __ push(Immediate(dummy_vector));
565 565
566 Code::Flags flags = Code::RemoveTypeAndHolderFromFlags( 566 Code::Flags flags =
567 Code::ComputeHandlerFlags(Code::STORE_IC)); 567 Code::RemoveHolderFromFlags(Code::ComputeHandlerFlags(Code::STORE_IC));
568 masm->isolate()->stub_cache()->GenerateProbe(masm, Code::STORE_IC, flags, 568 masm->isolate()->stub_cache()->GenerateProbe(masm, Code::STORE_IC, flags,
569 receiver, key, edi, no_reg); 569 receiver, key, edi, no_reg);
570 570
571 __ pop(VectorStoreICDescriptor::VectorRegister()); 571 __ pop(VectorStoreICDescriptor::VectorRegister());
572 __ pop(VectorStoreICDescriptor::SlotRegister()); 572 __ pop(VectorStoreICDescriptor::SlotRegister());
573 573
574 // Cache miss. 574 // Cache miss.
575 __ jmp(&miss); 575 __ jmp(&miss);
576 576
577 // Extra capacity case: Check if there is extra capacity to 577 // Extra capacity case: Check if there is extra capacity to
(...skipping 274 matching lines...) Expand 10 before | Expand all | Expand 10 after
852 Condition cc = 852 Condition cc =
853 (check == ENABLE_INLINED_SMI_CHECK) 853 (check == ENABLE_INLINED_SMI_CHECK)
854 ? (*jmp_address == Assembler::kJncShortOpcode ? not_zero : zero) 854 ? (*jmp_address == Assembler::kJncShortOpcode ? not_zero : zero)
855 : (*jmp_address == Assembler::kJnzShortOpcode ? not_carry : carry); 855 : (*jmp_address == Assembler::kJnzShortOpcode ? not_carry : carry);
856 *jmp_address = static_cast<byte>(Assembler::kJccShortPrefix | cc); 856 *jmp_address = static_cast<byte>(Assembler::kJccShortPrefix | cc);
857 } 857 }
858 } // namespace internal 858 } // namespace internal
859 } // namespace v8 859 } // namespace v8
860 860
861 #endif // V8_TARGET_ARCH_IA32 861 #endif // V8_TARGET_ARCH_IA32
OLDNEW
« no previous file with comments | « src/ic/ia32/handler-compiler-ia32.cc ('k') | src/ic/ia32/stub-cache-ia32.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698