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 3051 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
3062 CodeHandleList* handlers, | 3062 CodeHandleList* handlers, |
3063 Handle<Name> name, | 3063 Handle<Name> name, |
3064 Code::StubType type, | 3064 Code::StubType type, |
3065 IcCheckType check) { | 3065 IcCheckType check) { |
3066 Label miss; | 3066 Label miss; |
3067 | 3067 |
3068 if (check == PROPERTY) { | 3068 if (check == PROPERTY) { |
3069 GenerateNameCheck(name, this->name(), &miss); | 3069 GenerateNameCheck(name, this->name(), &miss); |
3070 } | 3070 } |
3071 | 3071 |
3072 __ JumpIfSmi(receiver(), &miss); | 3072 Label number_case; |
| 3073 Label* smi_target = HasHeapNumberMap(receiver_maps) ? &number_case : &miss; |
| 3074 __ JumpIfSmi(receiver(), smi_target); |
| 3075 |
3073 Register map_reg = scratch1(); | 3076 Register map_reg = scratch1(); |
3074 | 3077 |
3075 int receiver_count = receiver_maps->length(); | 3078 int receiver_count = receiver_maps->length(); |
3076 int number_of_handled_maps = 0; | 3079 int number_of_handled_maps = 0; |
3077 __ lw(map_reg, FieldMemOperand(receiver(), HeapObject::kMapOffset)); | 3080 __ lw(map_reg, FieldMemOperand(receiver(), HeapObject::kMapOffset)); |
| 3081 Handle<Map> heap_number_map = isolate()->factory()->heap_number_map(); |
3078 for (int current = 0; current < receiver_count; ++current) { | 3082 for (int current = 0; current < receiver_count; ++current) { |
3079 Handle<Map> map = receiver_maps->at(current); | 3083 Handle<Map> map = receiver_maps->at(current); |
3080 if (!map->is_deprecated()) { | 3084 if (!map->is_deprecated()) { |
3081 number_of_handled_maps++; | 3085 number_of_handled_maps++; |
| 3086 if (map.is_identical_to(heap_number_map)) { |
| 3087 ASSERT(!number_case.is_unused()); |
| 3088 __ bind(&number_case); |
| 3089 } |
3082 __ Jump(handlers->at(current), RelocInfo::CODE_TARGET, | 3090 __ Jump(handlers->at(current), RelocInfo::CODE_TARGET, |
3083 eq, map_reg, Operand(receiver_maps->at(current))); | 3091 eq, map_reg, Operand(receiver_maps->at(current))); |
3084 } | 3092 } |
3085 } | 3093 } |
3086 ASSERT(number_of_handled_maps != 0); | 3094 ASSERT(number_of_handled_maps != 0); |
3087 | 3095 |
3088 __ bind(&miss); | 3096 __ bind(&miss); |
3089 TailCallBuiltin(masm(), MissBuiltin(kind())); | 3097 TailCallBuiltin(masm(), MissBuiltin(kind())); |
3090 | 3098 |
3091 // Return the generated code. | 3099 // Return the generated code. |
(...skipping 79 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
3171 // ----------------------------------- | 3179 // ----------------------------------- |
3172 TailCallBuiltin(masm, Builtins::kKeyedLoadIC_MissForceGeneric); | 3180 TailCallBuiltin(masm, Builtins::kKeyedLoadIC_MissForceGeneric); |
3173 } | 3181 } |
3174 | 3182 |
3175 | 3183 |
3176 #undef __ | 3184 #undef __ |
3177 | 3185 |
3178 } } // namespace v8::internal | 3186 } } // namespace v8::internal |
3179 | 3187 |
3180 #endif // V8_TARGET_ARCH_MIPS | 3188 #endif // V8_TARGET_ARCH_MIPS |
OLD | NEW |