OLD | NEW |
1 // Copyright 2012 the V8 project authors. All rights reserved. | 1 // Copyright 2012 the V8 project authors. All rights reserved. |
2 // Redistribution and use in source and binary forms, with or without | 2 // Redistribution and use in source and binary forms, with or without |
3 // modification, are permitted provided that the following conditions are | 3 // modification, are permitted provided that the following conditions are |
4 // met: | 4 // met: |
5 // | 5 // |
6 // * Redistributions of source code must retain the above copyright | 6 // * Redistributions of source code must retain the above copyright |
7 // notice, this list of conditions and the following disclaimer. | 7 // notice, this list of conditions and the following disclaimer. |
8 // * Redistributions in binary form must reproduce the above | 8 // * Redistributions in binary form must reproduce the above |
9 // copyright notice, this list of conditions and the following | 9 // copyright notice, this list of conditions and the following |
10 // disclaimer in the documentation and/or other materials provided | 10 // disclaimer in the documentation and/or other materials provided |
(...skipping 3036 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
3047 CodeHandleList* handlers, | 3047 CodeHandleList* handlers, |
3048 Handle<Name> name, | 3048 Handle<Name> name, |
3049 Code::StubType type, | 3049 Code::StubType type, |
3050 IcCheckType check) { | 3050 IcCheckType check) { |
3051 Label miss; | 3051 Label miss; |
3052 | 3052 |
3053 if (check == PROPERTY) { | 3053 if (check == PROPERTY) { |
3054 GenerateNameCheck(name, this->name(), &miss); | 3054 GenerateNameCheck(name, this->name(), &miss); |
3055 } | 3055 } |
3056 | 3056 |
3057 __ JumpIfSmi(receiver(), &miss); | 3057 Label number_case; |
| 3058 Label* smi_target = HasHeapNumberMap(receiver_maps) ? &number_case : &miss; |
| 3059 __ JumpIfSmi(receiver(), smi_target); |
| 3060 |
3058 Register map_reg = scratch1(); | 3061 Register map_reg = scratch1(); |
3059 | 3062 |
3060 int receiver_count = receiver_maps->length(); | 3063 int receiver_count = receiver_maps->length(); |
3061 int number_of_handled_maps = 0; | 3064 int number_of_handled_maps = 0; |
3062 __ ldr(map_reg, FieldMemOperand(receiver(), HeapObject::kMapOffset)); | 3065 __ ldr(map_reg, FieldMemOperand(receiver(), HeapObject::kMapOffset)); |
| 3066 Handle<Map> heap_number_map = isolate()->factory()->heap_number_map(); |
3063 for (int current = 0; current < receiver_count; ++current) { | 3067 for (int current = 0; current < receiver_count; ++current) { |
3064 Handle<Map> map = receiver_maps->at(current); | 3068 Handle<Map> map = receiver_maps->at(current); |
3065 if (!map->is_deprecated()) { | 3069 if (!map->is_deprecated()) { |
3066 number_of_handled_maps++; | 3070 number_of_handled_maps++; |
3067 __ mov(ip, Operand(receiver_maps->at(current))); | 3071 __ mov(ip, Operand(receiver_maps->at(current))); |
3068 __ cmp(map_reg, ip); | 3072 __ cmp(map_reg, ip); |
| 3073 if (map.is_identical_to(heap_number_map)) { |
| 3074 ASSERT(!number_case.is_unused()); |
| 3075 __ bind(&number_case); |
| 3076 } |
3069 __ Jump(handlers->at(current), RelocInfo::CODE_TARGET, eq); | 3077 __ Jump(handlers->at(current), RelocInfo::CODE_TARGET, eq); |
3070 } | 3078 } |
3071 } | 3079 } |
3072 ASSERT(number_of_handled_maps != 0); | 3080 ASSERT(number_of_handled_maps != 0); |
3073 | 3081 |
3074 __ bind(&miss); | 3082 __ bind(&miss); |
3075 TailCallBuiltin(masm(), MissBuiltin(kind())); | 3083 TailCallBuiltin(masm(), MissBuiltin(kind())); |
3076 | 3084 |
3077 // Return the generated code. | 3085 // Return the generated code. |
3078 InlineCacheState state = | 3086 InlineCacheState state = |
(...skipping 77 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
3156 // ----------------------------------- | 3164 // ----------------------------------- |
3157 TailCallBuiltin(masm, Builtins::kKeyedLoadIC_MissForceGeneric); | 3165 TailCallBuiltin(masm, Builtins::kKeyedLoadIC_MissForceGeneric); |
3158 } | 3166 } |
3159 | 3167 |
3160 | 3168 |
3161 #undef __ | 3169 #undef __ |
3162 | 3170 |
3163 } } // namespace v8::internal | 3171 } } // namespace v8::internal |
3164 | 3172 |
3165 #endif // V8_TARGET_ARCH_ARM | 3173 #endif // V8_TARGET_ARCH_ARM |
OLD | NEW |