| OLD | NEW |
| 1 // Copyright 2012 the V8 project authors. All rights reserved. | 1 // Copyright 2012 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_X87 | 7 #if V8_TARGET_ARCH_X87 |
| 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" |
| (...skipping 26 matching lines...) Expand all Loading... |
| 37 #define __ ACCESS_MASM(masm()) | 37 #define __ ACCESS_MASM(masm()) |
| 38 | 38 |
| 39 Handle<Code> PropertyICCompiler::CompilePolymorphic(TypeHandleList* types, | 39 Handle<Code> PropertyICCompiler::CompilePolymorphic(TypeHandleList* types, |
| 40 CodeHandleList* handlers, | 40 CodeHandleList* handlers, |
| 41 Handle<Name> name, | 41 Handle<Name> name, |
| 42 Code::StubType type, | 42 Code::StubType type, |
| 43 IcCheckType check) { | 43 IcCheckType check) { |
| 44 Label miss; | 44 Label miss; |
| 45 | 45 |
| 46 if (check == PROPERTY && | 46 if (check == PROPERTY && |
| 47 (kind() == Code::KEYED_LOAD_IC || kind() == Code::KEYED_STORE_IC)) { | 47 (kind() == Code::KEYED_STORE_IC || kind() == Code::KEYED_LOAD_IC)) { |
| 48 // In case we are compiling an IC for dictionary loads and stores, just | 48 // In case we are compiling an IC for dictionary loads or stores, just |
| 49 // check whether the name is unique. | 49 // check whether the name is unique. |
| 50 if (name.is_identical_to(isolate()->factory()->normal_ic_symbol())) { | 50 if (name.is_identical_to(isolate()->factory()->normal_ic_symbol())) { |
| 51 // Keyed loads with dictionaries shouldn't be here, they go generic. |
| 52 // The DCHECK is to protect assumptions when --vector-ics is on. |
| 53 DCHECK(kind() != Code::KEYED_LOAD_IC); |
| 51 Register tmp = scratch1(); | 54 Register tmp = scratch1(); |
| 52 __ JumpIfSmi(this->name(), &miss); | 55 __ JumpIfSmi(this->name(), &miss); |
| 53 __ mov(tmp, FieldOperand(this->name(), HeapObject::kMapOffset)); | 56 __ mov(tmp, FieldOperand(this->name(), HeapObject::kMapOffset)); |
| 54 __ movzx_b(tmp, FieldOperand(tmp, Map::kInstanceTypeOffset)); | 57 __ movzx_b(tmp, FieldOperand(tmp, Map::kInstanceTypeOffset)); |
| 55 __ JumpIfNotUniqueNameInstanceType(tmp, &miss); | 58 __ JumpIfNotUniqueNameInstanceType(tmp, &miss); |
| 56 } else { | 59 } else { |
| 57 __ cmp(this->name(), Immediate(name)); | 60 __ cmp(this->name(), Immediate(name)); |
| 58 __ j(not_equal, &miss); | 61 __ j(not_equal, &miss); |
| 59 } | 62 } |
| 60 } | 63 } |
| (...skipping 62 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 123 // Return the generated code. | 126 // Return the generated code. |
| 124 return GetCode(kind(), Code::NORMAL, factory()->empty_string(), POLYMORPHIC); | 127 return GetCode(kind(), Code::NORMAL, factory()->empty_string(), POLYMORPHIC); |
| 125 } | 128 } |
| 126 | 129 |
| 127 | 130 |
| 128 #undef __ | 131 #undef __ |
| 129 } | 132 } |
| 130 } // namespace v8::internal | 133 } // namespace v8::internal |
| 131 | 134 |
| 132 #endif // V8_TARGET_ARCH_X87 | 135 #endif // V8_TARGET_ARCH_X87 |
| OLD | NEW |