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 30 matching lines...) Expand all Loading... |
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_LOAD_IC || kind() == Code::KEYED_STORE_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 and 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 __ JumpIfNotUniqueName(this->name(), &miss); | 51 Register tmp = scratch1(); |
| 52 __ JumpIfSmi(this->name(), &miss); |
| 53 __ mov(tmp, FieldOperand(this->name(), HeapObject::kMapOffset)); |
| 54 __ movzx_b(tmp, FieldOperand(tmp, Map::kInstanceTypeOffset)); |
| 55 __ JumpIfNotUniqueNameInstanceType(tmp, &miss); |
52 } else { | 56 } else { |
53 __ cmp(this->name(), Immediate(name)); | 57 __ cmp(this->name(), Immediate(name)); |
54 __ j(not_equal, &miss); | 58 __ j(not_equal, &miss); |
55 } | 59 } |
56 } | 60 } |
57 | 61 |
58 Label number_case; | 62 Label number_case; |
59 Label* smi_target = IncludesNumberType(types) ? &number_case : &miss; | 63 Label* smi_target = IncludesNumberType(types) ? &number_case : &miss; |
60 __ JumpIfSmi(receiver(), smi_target); | 64 __ JumpIfSmi(receiver(), smi_target); |
61 | 65 |
(...skipping 53 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
115 // Return the generated code. | 119 // Return the generated code. |
116 return GetCode(kind(), Code::NORMAL, factory()->empty_string(), POLYMORPHIC); | 120 return GetCode(kind(), Code::NORMAL, factory()->empty_string(), POLYMORPHIC); |
117 } | 121 } |
118 | 122 |
119 | 123 |
120 #undef __ | 124 #undef __ |
121 } | 125 } |
122 } // namespace v8::internal | 126 } // namespace v8::internal |
123 | 127 |
124 #endif // V8_TARGET_ARCH_X87 | 128 #endif // V8_TARGET_ARCH_X87 |
OLD | NEW |