| 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 1290 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1301 Label success; | 1301 Label success; |
| 1302 __ b(&success); | 1302 __ b(&success); |
| 1303 GenerateRestoreName(masm(), miss, name); | 1303 GenerateRestoreName(masm(), miss, name); |
| 1304 TailCallBuiltin(masm(), MissBuiltin(kind())); | 1304 TailCallBuiltin(masm(), MissBuiltin(kind())); |
| 1305 __ bind(&success); | 1305 __ bind(&success); |
| 1306 } | 1306 } |
| 1307 } | 1307 } |
| 1308 | 1308 |
| 1309 | 1309 |
| 1310 Register LoadStubCompiler::CallbackHandlerFrontend( | 1310 Register LoadStubCompiler::CallbackHandlerFrontend( |
| 1311 Handle<Object> object, | 1311 Handle<Type> type, |
| 1312 Register object_reg, | 1312 Register object_reg, |
| 1313 Handle<JSObject> holder, | 1313 Handle<JSObject> holder, |
| 1314 Handle<Name> name, | 1314 Handle<Name> name, |
| 1315 Handle<Object> callback) { | 1315 Handle<Object> callback) { |
| 1316 Label miss; | 1316 Label miss; |
| 1317 | 1317 |
| 1318 Register reg = HandlerFrontendHeader(object, object_reg, holder, name, &miss); | 1318 Register reg = HandlerFrontendHeader(type, object_reg, holder, name, &miss); |
| 1319 | 1319 |
| 1320 if (!holder->HasFastProperties() && !holder->IsJSGlobalObject()) { | 1320 if (!holder->HasFastProperties() && !holder->IsJSGlobalObject()) { |
| 1321 ASSERT(!reg.is(scratch2())); | 1321 ASSERT(!reg.is(scratch2())); |
| 1322 ASSERT(!reg.is(scratch3())); | 1322 ASSERT(!reg.is(scratch3())); |
| 1323 ASSERT(!reg.is(scratch4())); | 1323 ASSERT(!reg.is(scratch4())); |
| 1324 | 1324 |
| 1325 // Load the properties dictionary. | 1325 // Load the properties dictionary. |
| 1326 Register dictionary = scratch4(); | 1326 Register dictionary = scratch4(); |
| 1327 __ ldr(dictionary, FieldMemOperand(reg, JSObject::kPropertiesOffset)); | 1327 __ ldr(dictionary, FieldMemOperand(reg, JSObject::kPropertiesOffset)); |
| 1328 | 1328 |
| (...skipping 1464 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2793 // Return the generated code. | 2793 // Return the generated code. |
| 2794 return GetCode(Code::NORMAL, name); | 2794 return GetCode(Code::NORMAL, name); |
| 2795 } | 2795 } |
| 2796 | 2796 |
| 2797 | 2797 |
| 2798 Handle<Code> StoreStubCompiler::CompileStoreCallback( | 2798 Handle<Code> StoreStubCompiler::CompileStoreCallback( |
| 2799 Handle<JSObject> object, | 2799 Handle<JSObject> object, |
| 2800 Handle<JSObject> holder, | 2800 Handle<JSObject> holder, |
| 2801 Handle<Name> name, | 2801 Handle<Name> name, |
| 2802 Handle<ExecutableAccessorInfo> callback) { | 2802 Handle<ExecutableAccessorInfo> callback) { |
| 2803 HandlerFrontend(object, receiver(), holder, name); | 2803 HandlerFrontend(IC::CurrentTypeOf(object, isolate()), |
| 2804 receiver(), holder, name); |
| 2804 | 2805 |
| 2805 // Stub never generated for non-global objects that require access checks. | 2806 // Stub never generated for non-global objects that require access checks. |
| 2806 ASSERT(holder->IsJSGlobalProxy() || !holder->IsAccessCheckNeeded()); | 2807 ASSERT(holder->IsJSGlobalProxy() || !holder->IsAccessCheckNeeded()); |
| 2807 | 2808 |
| 2808 __ push(receiver()); // receiver | 2809 __ push(receiver()); // receiver |
| 2809 __ mov(ip, Operand(callback)); // callback info | 2810 __ mov(ip, Operand(callback)); // callback info |
| 2810 __ push(ip); | 2811 __ push(ip); |
| 2811 __ mov(ip, Operand(name)); | 2812 __ mov(ip, Operand(name)); |
| 2812 __ Push(ip, value()); | 2813 __ Push(ip, value()); |
| 2813 | 2814 |
| 2814 // Do tail-call to the runtime system. | 2815 // Do tail-call to the runtime system. |
| 2815 ExternalReference store_callback_property = | 2816 ExternalReference store_callback_property = |
| 2816 ExternalReference(IC_Utility(IC::kStoreCallbackProperty), isolate()); | 2817 ExternalReference(IC_Utility(IC::kStoreCallbackProperty), isolate()); |
| 2817 __ TailCallExternalReference(store_callback_property, 4, 1); | 2818 __ TailCallExternalReference(store_callback_property, 4, 1); |
| 2818 | 2819 |
| 2819 // Return the generated code. | 2820 // Return the generated code. |
| 2820 return GetCode(kind(), Code::FAST, name); | 2821 return GetCode(kind(), Code::FAST, name); |
| 2821 } | 2822 } |
| 2822 | 2823 |
| 2823 | 2824 |
| 2824 Handle<Code> StoreStubCompiler::CompileStoreCallback( | 2825 Handle<Code> StoreStubCompiler::CompileStoreCallback( |
| 2825 Handle<JSObject> object, | 2826 Handle<JSObject> object, |
| 2826 Handle<JSObject> holder, | 2827 Handle<JSObject> holder, |
| 2827 Handle<Name> name, | 2828 Handle<Name> name, |
| 2828 const CallOptimization& call_optimization) { | 2829 const CallOptimization& call_optimization) { |
| 2829 HandlerFrontend(object, receiver(), holder, name); | 2830 HandlerFrontend(IC::CurrentTypeOf(object, isolate()), |
| 2831 receiver(), holder, name); |
| 2830 | 2832 |
| 2831 Register values[] = { value() }; | 2833 Register values[] = { value() }; |
| 2832 GenerateFastApiCall( | 2834 GenerateFastApiCall( |
| 2833 masm(), call_optimization, receiver(), scratch3(), 1, values); | 2835 masm(), call_optimization, receiver(), scratch3(), 1, values); |
| 2834 | 2836 |
| 2835 // Return the generated code. | 2837 // Return the generated code. |
| 2836 return GetCode(kind(), Code::FAST, name); | 2838 return GetCode(kind(), Code::FAST, name); |
| 2837 } | 2839 } |
| 2838 | 2840 |
| 2839 | 2841 |
| (...skipping 73 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2913 | 2915 |
| 2914 // Handle store cache miss. | 2916 // Handle store cache miss. |
| 2915 __ bind(&miss); | 2917 __ bind(&miss); |
| 2916 TailCallBuiltin(masm(), MissBuiltin(kind())); | 2918 TailCallBuiltin(masm(), MissBuiltin(kind())); |
| 2917 | 2919 |
| 2918 // Return the generated code. | 2920 // Return the generated code. |
| 2919 return GetCode(kind(), Code::FAST, name); | 2921 return GetCode(kind(), Code::FAST, name); |
| 2920 } | 2922 } |
| 2921 | 2923 |
| 2922 | 2924 |
| 2923 Handle<Code> LoadStubCompiler::CompileLoadNonexistent( | 2925 Handle<Code> LoadStubCompiler::CompileLoadNonexistent(Handle<Type> type, |
| 2924 Handle<Object> object, | 2926 Handle<JSObject> last, |
| 2925 Handle<JSObject> last, | 2927 Handle<Name> name) { |
| 2926 Handle<Name> name, | 2928 NonexistentHandlerFrontend(type, last, name); |
| 2927 Handle<JSGlobalObject> global) { | |
| 2928 NonexistentHandlerFrontend(object, last, name, global); | |
| 2929 | 2929 |
| 2930 // Return undefined if maps of the full prototype chain are still the | 2930 // Return undefined if maps of the full prototype chain are still the |
| 2931 // same and no global property with this name contains a value. | 2931 // same and no global property with this name contains a value. |
| 2932 __ LoadRoot(r0, Heap::kUndefinedValueRootIndex); | 2932 __ LoadRoot(r0, Heap::kUndefinedValueRootIndex); |
| 2933 __ Ret(); | 2933 __ Ret(); |
| 2934 | 2934 |
| 2935 // Return the generated code. | 2935 // Return the generated code. |
| 2936 return GetCode(kind(), Code::FAST, name); | 2936 return GetCode(kind(), Code::FAST, name); |
| 2937 } | 2937 } |
| 2938 | 2938 |
| (...skipping 75 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 3014 } | 3014 } |
| 3015 __ Ret(); | 3015 __ Ret(); |
| 3016 } | 3016 } |
| 3017 | 3017 |
| 3018 | 3018 |
| 3019 #undef __ | 3019 #undef __ |
| 3020 #define __ ACCESS_MASM(masm()) | 3020 #define __ ACCESS_MASM(masm()) |
| 3021 | 3021 |
| 3022 | 3022 |
| 3023 Handle<Code> LoadStubCompiler::CompileLoadGlobal( | 3023 Handle<Code> LoadStubCompiler::CompileLoadGlobal( |
| 3024 Handle<Object> object, | 3024 Handle<Type> type, |
| 3025 Handle<GlobalObject> global, | 3025 Handle<GlobalObject> global, |
| 3026 Handle<PropertyCell> cell, | 3026 Handle<PropertyCell> cell, |
| 3027 Handle<Name> name, | 3027 Handle<Name> name, |
| 3028 bool is_dont_delete) { | 3028 bool is_dont_delete) { |
| 3029 Label miss; | 3029 Label miss; |
| 3030 | 3030 |
| 3031 HandlerFrontendHeader(object, receiver(), global, name, &miss); | 3031 HandlerFrontendHeader(type, receiver(), global, name, &miss); |
| 3032 | 3032 |
| 3033 // Get the value from the cell. | 3033 // Get the value from the cell. |
| 3034 __ mov(r3, Operand(cell)); | 3034 __ mov(r3, Operand(cell)); |
| 3035 __ ldr(r4, FieldMemOperand(r3, Cell::kValueOffset)); | 3035 __ ldr(r4, FieldMemOperand(r3, Cell::kValueOffset)); |
| 3036 | 3036 |
| 3037 // Check for deleted property if property can actually be deleted. | 3037 // Check for deleted property if property can actually be deleted. |
| 3038 if (!is_dont_delete) { | 3038 if (!is_dont_delete) { |
| 3039 __ LoadRoot(ip, Heap::kTheHoleValueRootIndex); | 3039 __ LoadRoot(ip, Heap::kTheHoleValueRootIndex); |
| 3040 __ cmp(r4, ip); | 3040 __ cmp(r4, ip); |
| 3041 __ b(eq, &miss); | 3041 __ b(eq, &miss); |
| (...skipping 133 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 3175 // ----------------------------------- | 3175 // ----------------------------------- |
| 3176 TailCallBuiltin(masm, Builtins::kKeyedLoadIC_Miss); | 3176 TailCallBuiltin(masm, Builtins::kKeyedLoadIC_Miss); |
| 3177 } | 3177 } |
| 3178 | 3178 |
| 3179 | 3179 |
| 3180 #undef __ | 3180 #undef __ |
| 3181 | 3181 |
| 3182 } } // namespace v8::internal | 3182 } } // namespace v8::internal |
| 3183 | 3183 |
| 3184 #endif // V8_TARGET_ARCH_ARM | 3184 #endif // V8_TARGET_ARCH_ARM |
| OLD | NEW |