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

Side by Side Diff: src/ic/ia32/ic-compiler-ia32.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_IA32 7 #if V8_TARGET_ARCH_IA32
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(!ebx.is(StoreConvention::ReceiverRegister()) && 20 DCHECK(!ebx.is(StoreDescriptor::ReceiverRegister()) &&
21 !ebx.is(StoreConvention::NameRegister()) && 21 !ebx.is(StoreDescriptor::NameRegister()) &&
22 !ebx.is(StoreConvention::ValueRegister())); 22 !ebx.is(StoreDescriptor::ValueRegister()));
23 __ pop(ebx); 23 __ pop(ebx);
24 __ push(StoreConvention::ReceiverRegister()); 24 __ push(StoreDescriptor::ReceiverRegister());
25 __ push(StoreConvention::NameRegister()); 25 __ push(StoreDescriptor::NameRegister());
26 __ push(StoreConvention::ValueRegister()); 26 __ push(StoreDescriptor::ValueRegister());
27 __ push(Immediate(Smi::FromInt(strict_mode))); 27 __ push(Immediate(Smi::FromInt(strict_mode)));
28 __ push(ebx); // return address 28 __ push(ebx); // return address
29 29
30 // Do tail-call to runtime routine. 30 // Do tail-call to runtime routine.
31 __ TailCallRuntime(Runtime::kSetProperty, 4, 1); 31 __ TailCallRuntime(Runtime::kSetProperty, 4, 1);
32 } 32 }
33 33
34 34
35 #undef __ 35 #undef __
36 #define __ ACCESS_MASM(masm()) 36 #define __ ACCESS_MASM(masm())
(...skipping 17 matching lines...) Expand all
54 } 54 }
55 } 55 }
56 56
57 Label number_case; 57 Label number_case;
58 Label* smi_target = IncludesNumberType(types) ? &number_case : &miss; 58 Label* smi_target = IncludesNumberType(types) ? &number_case : &miss;
59 __ JumpIfSmi(receiver(), smi_target); 59 __ JumpIfSmi(receiver(), smi_target);
60 60
61 // Polymorphic keyed stores may use the map register 61 // Polymorphic keyed stores may use the map register
62 Register map_reg = scratch1(); 62 Register map_reg = scratch1();
63 DCHECK(kind() != Code::KEYED_STORE_IC || 63 DCHECK(kind() != Code::KEYED_STORE_IC ||
64 map_reg.is(StoreConvention::MapRegister())); 64 map_reg.is(ElementTransitionAndStoreDescriptor::MapRegister()));
65 __ mov(map_reg, FieldOperand(receiver(), HeapObject::kMapOffset)); 65 __ mov(map_reg, FieldOperand(receiver(), HeapObject::kMapOffset));
66 int receiver_count = types->length(); 66 int receiver_count = types->length();
67 int number_of_handled_maps = 0; 67 int number_of_handled_maps = 0;
68 for (int current = 0; current < receiver_count; ++current) { 68 for (int current = 0; current < receiver_count; ++current) {
69 Handle<HeapType> type = types->at(current); 69 Handle<HeapType> type = types->at(current);
70 Handle<Map> map = IC::TypeToMap(*type, isolate()); 70 Handle<Map> map = IC::TypeToMap(*type, isolate());
71 if (!map->is_deprecated()) { 71 if (!map->is_deprecated()) {
72 number_of_handled_maps++; 72 number_of_handled_maps++;
73 __ cmp(map_reg, map); 73 __ cmp(map_reg, map);
74 if (type->Is(HeapType::Number())) { 74 if (type->Is(HeapType::Number())) {
(...skipping 39 matching lines...) Expand 10 before | Expand all | Expand 10 after
114 // Return the generated code. 114 // Return the generated code.
115 return GetCode(kind(), Code::NORMAL, factory()->empty_string(), POLYMORPHIC); 115 return GetCode(kind(), Code::NORMAL, factory()->empty_string(), POLYMORPHIC);
116 } 116 }
117 117
118 118
119 #undef __ 119 #undef __
120 } 120 }
121 } // namespace v8::internal 121 } // namespace v8::internal
122 122
123 #endif // V8_TARGET_ARCH_IA32 123 #endif // V8_TARGET_ARCH_IA32
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698