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 3131 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
3142 #define __ ACCESS_MASM(masm) | 3142 #define __ ACCESS_MASM(masm) |
3143 | 3143 |
3144 | 3144 |
3145 void KeyedLoadStubCompiler::GenerateLoadDictionaryElement( | 3145 void KeyedLoadStubCompiler::GenerateLoadDictionaryElement( |
3146 MacroAssembler* masm) { | 3146 MacroAssembler* masm) { |
3147 // ---------- S t a t e -------------- | 3147 // ---------- S t a t e -------------- |
3148 // -- ra : return address | 3148 // -- ra : return address |
3149 // -- a0 : key | 3149 // -- a0 : key |
3150 // -- a1 : receiver | 3150 // -- a1 : receiver |
3151 // ----------------------------------- | 3151 // ----------------------------------- |
3152 Label slow, miss_force_generic; | 3152 Label slow, miss; |
3153 | 3153 |
3154 Register key = a0; | 3154 Register key = a0; |
3155 Register receiver = a1; | 3155 Register receiver = a1; |
3156 | 3156 |
3157 __ JumpIfNotSmi(key, &miss_force_generic); | 3157 __ JumpIfNotSmi(key, &miss); |
3158 __ lw(t0, FieldMemOperand(receiver, JSObject::kElementsOffset)); | 3158 __ lw(t0, FieldMemOperand(receiver, JSObject::kElementsOffset)); |
3159 __ sra(a2, a0, kSmiTagSize); | 3159 __ sra(a2, a0, kSmiTagSize); |
3160 __ LoadFromNumberDictionary(&slow, t0, a0, v0, a2, a3, t1); | 3160 __ LoadFromNumberDictionary(&slow, t0, a0, v0, a2, a3, t1); |
3161 __ Ret(); | 3161 __ Ret(); |
3162 | 3162 |
3163 // Slow case, key and receiver still in a0 and a1. | 3163 // Slow case, key and receiver still in a0 and a1. |
3164 __ bind(&slow); | 3164 __ bind(&slow); |
3165 __ IncrementCounter( | 3165 __ IncrementCounter( |
3166 masm->isolate()->counters()->keyed_load_external_array_slow(), | 3166 masm->isolate()->counters()->keyed_load_external_array_slow(), |
3167 1, a2, a3); | 3167 1, a2, a3); |
3168 // Entry registers are intact. | 3168 // Entry registers are intact. |
3169 // ---------- S t a t e -------------- | 3169 // ---------- S t a t e -------------- |
3170 // -- ra : return address | 3170 // -- ra : return address |
3171 // -- a0 : key | 3171 // -- a0 : key |
3172 // -- a1 : receiver | 3172 // -- a1 : receiver |
3173 // ----------------------------------- | 3173 // ----------------------------------- |
3174 TailCallBuiltin(masm, Builtins::kKeyedLoadIC_Slow); | 3174 TailCallBuiltin(masm, Builtins::kKeyedLoadIC_Slow); |
3175 | 3175 |
3176 // Miss case, call the runtime. | 3176 // Miss case, call the runtime. |
3177 __ bind(&miss_force_generic); | 3177 __ bind(&miss); |
3178 | 3178 |
3179 // ---------- S t a t e -------------- | 3179 // ---------- S t a t e -------------- |
3180 // -- ra : return address | 3180 // -- ra : return address |
3181 // -- a0 : key | 3181 // -- a0 : key |
3182 // -- a1 : receiver | 3182 // -- a1 : receiver |
3183 // ----------------------------------- | 3183 // ----------------------------------- |
3184 TailCallBuiltin(masm, Builtins::kKeyedLoadIC_MissForceGeneric); | 3184 TailCallBuiltin(masm, Builtins::kKeyedLoadIC_Miss); |
3185 } | 3185 } |
3186 | 3186 |
3187 | 3187 |
3188 #undef __ | 3188 #undef __ |
3189 | 3189 |
3190 } } // namespace v8::internal | 3190 } } // namespace v8::internal |
3191 | 3191 |
3192 #endif // V8_TARGET_ARCH_MIPS | 3192 #endif // V8_TARGET_ARCH_MIPS |
OLD | NEW |