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 3193 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
3204 #define __ ACCESS_MASM(masm) | 3204 #define __ ACCESS_MASM(masm) |
3205 | 3205 |
3206 | 3206 |
3207 void KeyedLoadStubCompiler::GenerateLoadDictionaryElement( | 3207 void KeyedLoadStubCompiler::GenerateLoadDictionaryElement( |
3208 MacroAssembler* masm) { | 3208 MacroAssembler* masm) { |
3209 // ----------- S t a t e ------------- | 3209 // ----------- S t a t e ------------- |
3210 // -- ecx : key | 3210 // -- ecx : key |
3211 // -- edx : receiver | 3211 // -- edx : receiver |
3212 // -- esp[0] : return address | 3212 // -- esp[0] : return address |
3213 // ----------------------------------- | 3213 // ----------------------------------- |
3214 Label slow, miss_force_generic; | 3214 Label slow, miss; |
3215 | 3215 |
3216 // This stub is meant to be tail-jumped to, the receiver must already | 3216 // This stub is meant to be tail-jumped to, the receiver must already |
3217 // have been verified by the caller to not be a smi. | 3217 // have been verified by the caller to not be a smi. |
3218 __ JumpIfNotSmi(ecx, &miss_force_generic); | 3218 __ JumpIfNotSmi(ecx, &miss); |
3219 __ mov(ebx, ecx); | 3219 __ mov(ebx, ecx); |
3220 __ SmiUntag(ebx); | 3220 __ SmiUntag(ebx); |
3221 __ mov(eax, FieldOperand(edx, JSObject::kElementsOffset)); | 3221 __ mov(eax, FieldOperand(edx, JSObject::kElementsOffset)); |
3222 | 3222 |
3223 // Push receiver on the stack to free up a register for the dictionary | 3223 // Push receiver on the stack to free up a register for the dictionary |
3224 // probing. | 3224 // probing. |
3225 __ push(edx); | 3225 __ push(edx); |
3226 __ LoadFromNumberDictionary(&slow, eax, ecx, ebx, edx, edi, eax); | 3226 __ LoadFromNumberDictionary(&slow, eax, ecx, ebx, edx, edi, eax); |
3227 // Pop receiver before returning. | 3227 // Pop receiver before returning. |
3228 __ pop(edx); | 3228 __ pop(edx); |
3229 __ ret(0); | 3229 __ ret(0); |
3230 | 3230 |
3231 __ bind(&slow); | 3231 __ bind(&slow); |
3232 __ pop(edx); | 3232 __ pop(edx); |
3233 | 3233 |
3234 // ----------- S t a t e ------------- | 3234 // ----------- S t a t e ------------- |
3235 // -- ecx : key | 3235 // -- ecx : key |
3236 // -- edx : receiver | 3236 // -- edx : receiver |
3237 // -- esp[0] : return address | 3237 // -- esp[0] : return address |
3238 // ----------------------------------- | 3238 // ----------------------------------- |
3239 TailCallBuiltin(masm, Builtins::kKeyedLoadIC_Slow); | 3239 TailCallBuiltin(masm, Builtins::kKeyedLoadIC_Slow); |
3240 | 3240 |
3241 __ bind(&miss_force_generic); | 3241 __ bind(&miss); |
3242 // ----------- S t a t e ------------- | 3242 // ----------- S t a t e ------------- |
3243 // -- ecx : key | 3243 // -- ecx : key |
3244 // -- edx : receiver | 3244 // -- edx : receiver |
3245 // -- esp[0] : return address | 3245 // -- esp[0] : return address |
3246 // ----------------------------------- | 3246 // ----------------------------------- |
3247 TailCallBuiltin(masm, Builtins::kKeyedLoadIC_MissForceGeneric); | 3247 TailCallBuiltin(masm, Builtins::kKeyedLoadIC_Miss); |
3248 } | 3248 } |
3249 | 3249 |
3250 | 3250 |
3251 #undef __ | 3251 #undef __ |
3252 | 3252 |
3253 } } // namespace v8::internal | 3253 } } // namespace v8::internal |
3254 | 3254 |
3255 #endif // V8_TARGET_ARCH_IA32 | 3255 #endif // V8_TARGET_ARCH_IA32 |
OLD | NEW |