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

Side by Side Diff: src/ic/x64/ic-compiler-x64.cc

Issue 527093002: Make concrete classes for individual call descriptors. (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: REBASE. Created 6 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 | Annotate | Revision Log
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 #include "src/v8.h" 5 #include "src/v8.h"
6 6
7 #if V8_TARGET_ARCH_X64 7 #if V8_TARGET_ARCH_X64
8 8
9 #include "src/ic/ic-compiler.h" 9 #include "src/ic/ic-compiler.h"
10 10
11 namespace v8 { 11 namespace v8 {
12 namespace internal { 12 namespace internal {
13 13
14 #define __ ACCESS_MASM(masm) 14 #define __ ACCESS_MASM(masm)
15 15
16 16
17 void PropertyICCompiler::GenerateRuntimeSetProperty(MacroAssembler* masm, 17 void PropertyICCompiler::GenerateRuntimeSetProperty(MacroAssembler* masm,
18 StrictMode strict_mode) { 18 StrictMode strict_mode) {
19 // Return address is on the stack. 19 // Return address is on the stack.
20 DCHECK(!rbx.is(StoreConvention::ReceiverRegister()) && 20 DCHECK(!rbx.is(StoreDescriptor::ReceiverRegister()) &&
21 !rbx.is(StoreConvention::NameRegister()) && 21 !rbx.is(StoreDescriptor::NameRegister()) &&
22 !rbx.is(StoreConvention::ValueRegister())); 22 !rbx.is(StoreDescriptor::ValueRegister()));
23 23
24 __ PopReturnAddressTo(rbx); 24 __ PopReturnAddressTo(rbx);
25 __ Push(StoreConvention::ReceiverRegister()); 25 __ Push(StoreDescriptor::ReceiverRegister());
26 __ Push(StoreConvention::NameRegister()); 26 __ Push(StoreDescriptor::NameRegister());
27 __ Push(StoreConvention::ValueRegister()); 27 __ Push(StoreDescriptor::ValueRegister());
28 __ Push(Smi::FromInt(strict_mode)); 28 __ Push(Smi::FromInt(strict_mode));
29 __ PushReturnAddressFrom(rbx); 29 __ PushReturnAddressFrom(rbx);
30 30
31 // Do tail-call to runtime routine. 31 // Do tail-call to runtime routine.
32 __ TailCallRuntime(Runtime::kSetProperty, 4, 1); 32 __ TailCallRuntime(Runtime::kSetProperty, 4, 1);
33 } 33 }
34 34
35 35
36 #undef __ 36 #undef __
37 #define __ ACCESS_MASM(masm()) 37 #define __ ACCESS_MASM(masm())
(...skipping 50 matching lines...) Expand 10 before | Expand all | Expand 10 after
88 } 88 }
89 } 89 }
90 90
91 Label number_case; 91 Label number_case;
92 Label* smi_target = IncludesNumberType(types) ? &number_case : &miss; 92 Label* smi_target = IncludesNumberType(types) ? &number_case : &miss;
93 __ JumpIfSmi(receiver(), smi_target); 93 __ JumpIfSmi(receiver(), smi_target);
94 94
95 // Polymorphic keyed stores may use the map register 95 // Polymorphic keyed stores may use the map register
96 Register map_reg = scratch1(); 96 Register map_reg = scratch1();
97 DCHECK(kind() != Code::KEYED_STORE_IC || 97 DCHECK(kind() != Code::KEYED_STORE_IC ||
98 map_reg.is(StoreConvention::MapRegister())); 98 map_reg.is(ElementTransitionAndStoreDescriptor::MapRegister()));
99 __ movp(map_reg, FieldOperand(receiver(), HeapObject::kMapOffset)); 99 __ movp(map_reg, FieldOperand(receiver(), HeapObject::kMapOffset));
100 int receiver_count = types->length(); 100 int receiver_count = types->length();
101 int number_of_handled_maps = 0; 101 int number_of_handled_maps = 0;
102 for (int current = 0; current < receiver_count; ++current) { 102 for (int current = 0; current < receiver_count; ++current) {
103 Handle<HeapType> type = types->at(current); 103 Handle<HeapType> type = types->at(current);
104 Handle<Map> map = IC::TypeToMap(*type, isolate()); 104 Handle<Map> map = IC::TypeToMap(*type, isolate());
105 if (!map->is_deprecated()) { 105 if (!map->is_deprecated()) {
106 number_of_handled_maps++; 106 number_of_handled_maps++;
107 // Check map and tail call if there's a match 107 // Check map and tail call if there's a match
108 __ Cmp(map_reg, map); 108 __ Cmp(map_reg, map);
(...skipping 14 matching lines...) Expand all
123 number_of_handled_maps > 1 ? POLYMORPHIC : MONOMORPHIC; 123 number_of_handled_maps > 1 ? POLYMORPHIC : MONOMORPHIC;
124 return GetCode(kind(), type, name, state); 124 return GetCode(kind(), type, name, state);
125 } 125 }
126 126
127 127
128 #undef __ 128 #undef __
129 } 129 }
130 } // namespace v8::internal 130 } // namespace v8::internal
131 131
132 #endif // V8_TARGET_ARCH_X64 132 #endif // V8_TARGET_ARCH_X64
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698