OLD | NEW |
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_MIPS64 | 7 #if V8_TARGET_ARCH_MIPS64 |
8 | 8 |
9 #include "src/ic/ic-compiler.h" | 9 #include "src/ic/ic-compiler.h" |
10 | 10 |
(...skipping 22 matching lines...) Expand all Loading... |
33 } | 33 } |
34 | 34 |
35 Label number_case; | 35 Label number_case; |
36 Register match = scratch2(); | 36 Register match = scratch2(); |
37 Label* smi_target = IncludesNumberType(types) ? &number_case : &miss; | 37 Label* smi_target = IncludesNumberType(types) ? &number_case : &miss; |
38 __ JumpIfSmi(receiver(), smi_target, match); // Reg match is 0 if Smi. | 38 __ JumpIfSmi(receiver(), smi_target, match); // Reg match is 0 if Smi. |
39 | 39 |
40 // Polymorphic keyed stores may use the map register | 40 // Polymorphic keyed stores may use the map register |
41 Register map_reg = scratch1(); | 41 Register map_reg = scratch1(); |
42 DCHECK(kind() != Code::KEYED_STORE_IC || | 42 DCHECK(kind() != Code::KEYED_STORE_IC || |
43 map_reg.is(KeyedStoreIC::MapRegister())); | 43 map_reg.is(StoreConvention::MapRegister())); |
44 | 44 |
45 int receiver_count = types->length(); | 45 int receiver_count = types->length(); |
46 int number_of_handled_maps = 0; | 46 int number_of_handled_maps = 0; |
47 __ ld(map_reg, FieldMemOperand(receiver(), HeapObject::kMapOffset)); | 47 __ ld(map_reg, FieldMemOperand(receiver(), HeapObject::kMapOffset)); |
48 for (int current = 0; current < receiver_count; ++current) { | 48 for (int current = 0; current < receiver_count; ++current) { |
49 Handle<HeapType> type = types->at(current); | 49 Handle<HeapType> type = types->at(current); |
50 Handle<Map> map = IC::TypeToMap(*type, isolate()); | 50 Handle<Map> map = IC::TypeToMap(*type, isolate()); |
51 if (!map->is_deprecated()) { | 51 if (!map->is_deprecated()) { |
52 number_of_handled_maps++; | 52 number_of_handled_maps++; |
53 // Check map and tail call if there's a match. | 53 // Check map and tail call if there's a match. |
(...skipping 47 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
101 return GetCode(kind(), Code::NORMAL, factory()->empty_string(), POLYMORPHIC); | 101 return GetCode(kind(), Code::NORMAL, factory()->empty_string(), POLYMORPHIC); |
102 } | 102 } |
103 | 103 |
104 | 104 |
105 #undef __ | 105 #undef __ |
106 #define __ ACCESS_MASM(masm) | 106 #define __ ACCESS_MASM(masm) |
107 | 107 |
108 | 108 |
109 void PropertyICCompiler::GenerateRuntimeSetProperty(MacroAssembler* masm, | 109 void PropertyICCompiler::GenerateRuntimeSetProperty(MacroAssembler* masm, |
110 StrictMode strict_mode) { | 110 StrictMode strict_mode) { |
111 __ Push(StoreIC::ReceiverRegister(), StoreIC::NameRegister(), | 111 __ Push(StoreConvention::ReceiverRegister(), StoreConvention::NameRegister(), |
112 StoreIC::ValueRegister()); | 112 StoreConvention::ValueRegister()); |
113 | 113 |
114 __ li(a0, Operand(Smi::FromInt(strict_mode))); | 114 __ li(a0, Operand(Smi::FromInt(strict_mode))); |
115 __ Push(a0); | 115 __ Push(a0); |
116 | 116 |
117 // Do tail-call to runtime routine. | 117 // Do tail-call to runtime routine. |
118 __ TailCallRuntime(Runtime::kSetProperty, 4, 1); | 118 __ TailCallRuntime(Runtime::kSetProperty, 4, 1); |
119 } | 119 } |
120 | 120 |
121 | 121 |
122 #undef __ | 122 #undef __ |
123 } | 123 } |
124 } // namespace v8::internal | 124 } // namespace v8::internal |
125 | 125 |
126 #endif // V8_TARGET_ARCH_MIPS64 | 126 #endif // V8_TARGET_ARCH_MIPS64 |
OLD | NEW |