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 3106 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
3117 #define __ ACCESS_MASM(masm) | 3117 #define __ ACCESS_MASM(masm) |
3118 | 3118 |
3119 | 3119 |
3120 void KeyedLoadStubCompiler::GenerateLoadDictionaryElement( | 3120 void KeyedLoadStubCompiler::GenerateLoadDictionaryElement( |
3121 MacroAssembler* masm) { | 3121 MacroAssembler* masm) { |
3122 // ----------- S t a t e ------------- | 3122 // ----------- S t a t e ------------- |
3123 // -- rax : key | 3123 // -- rax : key |
3124 // -- rdx : receiver | 3124 // -- rdx : receiver |
3125 // -- rsp[0] : return address | 3125 // -- rsp[0] : return address |
3126 // ----------------------------------- | 3126 // ----------------------------------- |
3127 Label slow, miss_force_generic; | 3127 Label slow, miss; |
3128 | 3128 |
3129 // This stub is meant to be tail-jumped to, the receiver must already | 3129 // This stub is meant to be tail-jumped to, the receiver must already |
3130 // have been verified by the caller to not be a smi. | 3130 // have been verified by the caller to not be a smi. |
3131 | 3131 |
3132 __ JumpIfNotSmi(rax, &miss_force_generic); | 3132 __ JumpIfNotSmi(rax, &miss); |
3133 __ SmiToInteger32(rbx, rax); | 3133 __ SmiToInteger32(rbx, rax); |
3134 __ movq(rcx, FieldOperand(rdx, JSObject::kElementsOffset)); | 3134 __ movq(rcx, FieldOperand(rdx, JSObject::kElementsOffset)); |
3135 | 3135 |
3136 // Check whether the elements is a number dictionary. | 3136 // Check whether the elements is a number dictionary. |
3137 // rdx: receiver | 3137 // rdx: receiver |
3138 // rax: key | 3138 // rax: key |
3139 // rbx: key as untagged int32 | 3139 // rbx: key as untagged int32 |
3140 // rcx: elements | 3140 // rcx: elements |
3141 __ LoadFromNumberDictionary(&slow, rcx, rax, rbx, r9, rdi, rax); | 3141 __ LoadFromNumberDictionary(&slow, rcx, rax, rbx, r9, rdi, rax); |
3142 __ ret(0); | 3142 __ ret(0); |
3143 | 3143 |
3144 __ bind(&slow); | 3144 __ bind(&slow); |
3145 // ----------- S t a t e ------------- | 3145 // ----------- S t a t e ------------- |
3146 // -- rax : key | 3146 // -- rax : key |
3147 // -- rdx : receiver | 3147 // -- rdx : receiver |
3148 // -- rsp[0] : return address | 3148 // -- rsp[0] : return address |
3149 // ----------------------------------- | 3149 // ----------------------------------- |
3150 TailCallBuiltin(masm, Builtins::kKeyedLoadIC_Slow); | 3150 TailCallBuiltin(masm, Builtins::kKeyedLoadIC_Slow); |
3151 | 3151 |
3152 __ bind(&miss_force_generic); | 3152 __ bind(&miss); |
3153 // ----------- S t a t e ------------- | 3153 // ----------- S t a t e ------------- |
3154 // -- rax : key | 3154 // -- rax : key |
3155 // -- rdx : receiver | 3155 // -- rdx : receiver |
3156 // -- rsp[0] : return address | 3156 // -- rsp[0] : return address |
3157 // ----------------------------------- | 3157 // ----------------------------------- |
3158 TailCallBuiltin(masm, Builtins::kKeyedLoadIC_MissForceGeneric); | 3158 TailCallBuiltin(masm, Builtins::kKeyedLoadIC_Miss); |
3159 } | 3159 } |
3160 | 3160 |
3161 | 3161 |
3162 #undef __ | 3162 #undef __ |
3163 | 3163 |
3164 } } // namespace v8::internal | 3164 } } // namespace v8::internal |
3165 | 3165 |
3166 #endif // V8_TARGET_ARCH_X64 | 3166 #endif // V8_TARGET_ARCH_X64 |
OLD | NEW |