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/ia32/handler-compiler-ia32.cc

Issue 2313093002: [stubs] Port StoreTransitionStub and ElementsTransitionAndStoreStub to TurboFan. (Closed)
Patch Set: Addressing comments Created 4 years, 3 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/handler-compiler.cc ('k') | src/ic/ic.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 2014 the V8 project authors. All rights reserved. 1 // Copyright 2014 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/ic/handler-compiler.h" 7 #include "src/ic/handler-compiler.h"
8 8
9 #include "src/api-arguments.h" 9 #include "src/api-arguments.h"
10 #include "src/field-type.h" 10 #include "src/field-type.h"
(...skipping 41 matching lines...) Expand 10 before | Expand all | Expand 10 after
52 // Restore context register. 52 // Restore context register.
53 __ pop(esi); 53 __ pop(esi);
54 } 54 }
55 __ ret(0); 55 __ ret(0);
56 } 56 }
57 57
58 58
59 void PropertyHandlerCompiler::PushVectorAndSlot(Register vector, 59 void PropertyHandlerCompiler::PushVectorAndSlot(Register vector,
60 Register slot) { 60 Register slot) {
61 MacroAssembler* masm = this->masm(); 61 MacroAssembler* masm = this->masm();
62 STATIC_ASSERT(LoadWithVectorDescriptor::kSlot <
63 LoadWithVectorDescriptor::kVector);
64 STATIC_ASSERT(StoreWithVectorDescriptor::kSlot <
65 StoreWithVectorDescriptor::kVector);
66 STATIC_ASSERT(StoreTransitionDescriptor::kSlot <
67 StoreTransitionDescriptor::kVector);
68 __ push(slot);
62 __ push(vector); 69 __ push(vector);
63 __ push(slot);
64 } 70 }
65 71
66 72
67 void PropertyHandlerCompiler::PopVectorAndSlot(Register vector, Register slot) { 73 void PropertyHandlerCompiler::PopVectorAndSlot(Register vector, Register slot) {
68 MacroAssembler* masm = this->masm(); 74 MacroAssembler* masm = this->masm();
75 __ pop(vector);
69 __ pop(slot); 76 __ pop(slot);
70 __ pop(vector);
71 } 77 }
72 78
73 79
74 void PropertyHandlerCompiler::DiscardVectorAndSlot() { 80 void PropertyHandlerCompiler::DiscardVectorAndSlot() {
75 MacroAssembler* masm = this->masm(); 81 MacroAssembler* masm = this->masm();
76 // Remove vector and slot. 82 // Remove vector and slot.
77 __ add(esp, Immediate(2 * kPointerSize)); 83 __ add(esp, Immediate(2 * kPointerSize));
78 } 84 }
79 85
86 void PropertyHandlerCompiler::PushReturnAddress(Register tmp) {
87 MacroAssembler* masm = this->masm();
88 __ push(tmp);
89 }
90
91 void PropertyHandlerCompiler::PopReturnAddress(Register tmp) {
92 MacroAssembler* masm = this->masm();
93 __ pop(tmp);
94 }
80 95
81 void PropertyHandlerCompiler::GenerateDictionaryNegativeLookup( 96 void PropertyHandlerCompiler::GenerateDictionaryNegativeLookup(
82 MacroAssembler* masm, Label* miss_label, Register receiver, 97 MacroAssembler* masm, Label* miss_label, Register receiver,
83 Handle<Name> name, Register scratch0, Register scratch1) { 98 Handle<Name> name, Register scratch0, Register scratch1) {
84 DCHECK(name->IsUniqueName()); 99 DCHECK(name->IsUniqueName());
85 DCHECK(!receiver.is(scratch0)); 100 DCHECK(!receiver.is(scratch0));
86 Counters* counters = masm->isolate()->counters(); 101 Counters* counters = masm->isolate()->counters();
87 __ IncrementCounter(counters->negative_lookups(), 1); 102 __ IncrementCounter(counters->negative_lookups(), 1);
88 __ IncrementCounter(counters->negative_lookups_miss(), 1); 103 __ IncrementCounter(counters->negative_lookups_miss(), 1);
89 104
(...skipping 263 matching lines...) Expand 10 before | Expand all | Expand 10 after
353 __ mov(this->name(), Immediate(name)); 368 __ mov(this->name(), Immediate(name));
354 } 369 }
355 } 370 }
356 371
357 372
358 void NamedStoreHandlerCompiler::GenerateRestoreName(Handle<Name> name) { 373 void NamedStoreHandlerCompiler::GenerateRestoreName(Handle<Name> name) {
359 __ mov(this->name(), Immediate(name)); 374 __ mov(this->name(), Immediate(name));
360 } 375 }
361 376
362 377
363 void NamedStoreHandlerCompiler::RearrangeVectorAndSlot(
364 Register current_map, Register destination_map) {
365 DCHECK(destination_map.is(StoreTransitionHelper::MapRegister()));
366 DCHECK(current_map.is(StoreTransitionHelper::VectorRegister()));
367 ExternalReference virtual_slot =
368 ExternalReference::virtual_slot_register(isolate());
369 __ mov(destination_map, current_map);
370 __ pop(current_map);
371 __ mov(Operand::StaticVariable(virtual_slot), current_map);
372 __ pop(current_map); // put vector in place.
373 }
374
375
376 void NamedStoreHandlerCompiler::GenerateRestoreMap(Handle<Map> transition, 378 void NamedStoreHandlerCompiler::GenerateRestoreMap(Handle<Map> transition,
377 Register map_reg, 379 Register map_reg,
378 Register scratch, 380 Register scratch,
379 Label* miss) { 381 Label* miss) {
380 Handle<WeakCell> cell = Map::WeakCellForMap(transition); 382 Handle<WeakCell> cell = Map::WeakCellForMap(transition);
381 DCHECK(!map_reg.is(scratch)); 383 DCHECK(!map_reg.is(scratch));
382 __ LoadWeakValue(map_reg, cell, miss); 384 __ LoadWeakValue(map_reg, cell, miss);
383 if (transition->CanBeDeprecated()) { 385 if (transition->CanBeDeprecated()) {
384 __ mov(scratch, FieldOperand(map_reg, Map::kBitField3Offset)); 386 __ mov(scratch, FieldOperand(map_reg, Map::kBitField3Offset));
385 __ and_(scratch, Immediate(Map::Deprecated::kMask)); 387 __ and_(scratch, Immediate(Map::Deprecated::kMask));
(...skipping 325 matching lines...) Expand 10 before | Expand all | Expand 10 after
711 // Return the generated code. 713 // Return the generated code.
712 return GetCode(kind(), name); 714 return GetCode(kind(), name);
713 } 715 }
714 716
715 717
716 #undef __ 718 #undef __
717 } // namespace internal 719 } // namespace internal
718 } // namespace v8 720 } // namespace v8
719 721
720 #endif // V8_TARGET_ARCH_IA32 722 #endif // V8_TARGET_ARCH_IA32
OLDNEW
« no previous file with comments | « src/ic/handler-compiler.cc ('k') | src/ic/ic.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698