Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(381)

Side by Side Diff: src/mips/stub-cache-mips.cc

Issue 72603006: MIPS: Also support smi in load-ICs. (Closed) Base URL: https://github.com/v8/v8.git@gbl
Patch Set: Created 7 years, 1 month ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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
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
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
OLDNEW
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698