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_MIPS | 7 #if V8_TARGET_ARCH_MIPS |
8 | 8 |
9 #include "src/ic/ic.h" | 9 #include "src/ic/ic.h" |
10 #include "src/ic/ic-compiler.h" | 10 #include "src/ic/ic-compiler.h" |
11 | 11 |
12 namespace v8 { | 12 namespace v8 { |
13 namespace internal { | 13 namespace internal { |
14 | 14 |
15 #define __ ACCESS_MASM(masm()) | 15 #define __ ACCESS_MASM(masm()) |
16 | 16 |
17 | 17 |
18 Handle<Code> PropertyICCompiler::CompilePolymorphic(TypeHandleList* types, | 18 Handle<Code> PropertyICCompiler::CompilePolymorphic(TypeHandleList* types, |
19 CodeHandleList* handlers, | 19 CodeHandleList* handlers, |
20 Handle<Name> name, | 20 Handle<Name> name, |
21 Code::StubType type, | 21 Code::StubType type, |
22 IcCheckType check) { | 22 IcCheckType check) { |
23 Label miss; | 23 Label miss; |
24 | 24 |
25 if (check == PROPERTY && | 25 if (check == PROPERTY && |
26 (kind() == Code::KEYED_LOAD_IC || kind() == Code::KEYED_STORE_IC)) { | 26 (kind() == Code::KEYED_LOAD_IC || kind() == Code::KEYED_STORE_IC)) { |
27 // In case we are compiling an IC for dictionary loads and stores, just | 27 // In case we are compiling an IC for dictionary loads or stores, just |
28 // check whether the name is unique. | 28 // check whether the name is unique. |
29 if (name.is_identical_to(isolate()->factory()->normal_ic_symbol())) { | 29 if (name.is_identical_to(isolate()->factory()->normal_ic_symbol())) { |
| 30 // Keyed loads with dictionaries shouldn't be here, they go generic. |
| 31 // The DCHECK is to protect assumptions when --vector-ics is on. |
| 32 DCHECK(kind() != Code::KEYED_LOAD_IC); |
30 Register tmp = scratch1(); | 33 Register tmp = scratch1(); |
31 __ JumpIfSmi(this->name(), &miss); | 34 __ JumpIfSmi(this->name(), &miss); |
32 __ lw(tmp, FieldMemOperand(this->name(), HeapObject::kMapOffset)); | 35 __ lw(tmp, FieldMemOperand(this->name(), HeapObject::kMapOffset)); |
33 __ lbu(tmp, FieldMemOperand(tmp, Map::kInstanceTypeOffset)); | 36 __ lbu(tmp, FieldMemOperand(tmp, Map::kInstanceTypeOffset)); |
34 __ JumpIfNotUniqueNameInstanceType(tmp, &miss); | 37 __ JumpIfNotUniqueNameInstanceType(tmp, &miss); |
35 } else { | 38 } else { |
36 __ Branch(&miss, ne, this->name(), Operand(name)); | 39 __ Branch(&miss, ne, this->name(), Operand(name)); |
37 } | 40 } |
38 } | 41 } |
39 | 42 |
(...skipping 88 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
128 // Do tail-call to runtime routine. | 131 // Do tail-call to runtime routine. |
129 __ TailCallRuntime(Runtime::kSetProperty, 4, 1); | 132 __ TailCallRuntime(Runtime::kSetProperty, 4, 1); |
130 } | 133 } |
131 | 134 |
132 | 135 |
133 #undef __ | 136 #undef __ |
134 } | 137 } |
135 } // namespace v8::internal | 138 } // namespace v8::internal |
136 | 139 |
137 #endif // V8_TARGET_ARCH_MIPS | 140 #endif // V8_TARGET_ARCH_MIPS |
OLD | NEW |