OLD | NEW |
1 // Copyright 2011 the V8 project authors. All rights reserved. | 1 // Copyright 2011 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 2825 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2836 GenerateStoreField(masm(), object, index, transition, r1, r2, r3, &miss); | 2836 GenerateStoreField(masm(), object, index, transition, r1, r2, r3, &miss); |
2837 __ bind(&miss); | 2837 __ bind(&miss); |
2838 Handle<Code> ic = masm()->isolate()->builtins()->StoreIC_Miss(); | 2838 Handle<Code> ic = masm()->isolate()->builtins()->StoreIC_Miss(); |
2839 __ Jump(ic, RelocInfo::CODE_TARGET); | 2839 __ Jump(ic, RelocInfo::CODE_TARGET); |
2840 | 2840 |
2841 // Return the generated code. | 2841 // Return the generated code. |
2842 return GetCode(transition.is_null() ? FIELD : MAP_TRANSITION, name); | 2842 return GetCode(transition.is_null() ? FIELD : MAP_TRANSITION, name); |
2843 } | 2843 } |
2844 | 2844 |
2845 | 2845 |
2846 MaybeObject* StoreStubCompiler::CompileStoreCallback(JSObject* object, | 2846 Handle<Code> StoreStubCompiler::CompileStoreCallback( |
2847 AccessorInfo* callback, | 2847 Handle<JSObject> object, |
2848 String* name) { | 2848 Handle<AccessorInfo> callback, |
| 2849 Handle<String> name) { |
2849 // ----------- S t a t e ------------- | 2850 // ----------- S t a t e ------------- |
2850 // -- r0 : value | 2851 // -- r0 : value |
2851 // -- r1 : receiver | 2852 // -- r1 : receiver |
2852 // -- r2 : name | 2853 // -- r2 : name |
2853 // -- lr : return address | 2854 // -- lr : return address |
2854 // ----------------------------------- | 2855 // ----------------------------------- |
2855 Label miss; | 2856 Label miss; |
2856 | 2857 |
2857 // Check that the object isn't a smi. | 2858 // Check that the object isn't a smi. |
2858 __ JumpIfSmi(r1, &miss); | 2859 __ JumpIfSmi(r1, &miss); |
2859 | 2860 |
2860 // Check that the map of the object hasn't changed. | 2861 // Check that the map of the object hasn't changed. |
2861 __ ldr(r3, FieldMemOperand(r1, HeapObject::kMapOffset)); | 2862 __ ldr(r3, FieldMemOperand(r1, HeapObject::kMapOffset)); |
2862 __ cmp(r3, Operand(Handle<Map>(object->map()))); | 2863 __ cmp(r3, Operand(Handle<Map>(object->map()))); |
2863 __ b(ne, &miss); | 2864 __ b(ne, &miss); |
2864 | 2865 |
2865 // Perform global security token check if needed. | 2866 // Perform global security token check if needed. |
2866 if (object->IsJSGlobalProxy()) { | 2867 if (object->IsJSGlobalProxy()) { |
2867 __ CheckAccessGlobalProxy(r1, r3, &miss); | 2868 __ CheckAccessGlobalProxy(r1, r3, &miss); |
2868 } | 2869 } |
2869 | 2870 |
2870 // Stub never generated for non-global objects that require access | 2871 // Stub never generated for non-global objects that require access |
2871 // checks. | 2872 // checks. |
2872 ASSERT(object->IsJSGlobalProxy() || !object->IsAccessCheckNeeded()); | 2873 ASSERT(object->IsJSGlobalProxy() || !object->IsAccessCheckNeeded()); |
2873 | 2874 |
2874 __ push(r1); // receiver | 2875 __ push(r1); // receiver |
2875 __ mov(ip, Operand(Handle<AccessorInfo>(callback))); // callback info | 2876 __ mov(ip, Operand(callback)); // callback info |
2876 __ Push(ip, r2, r0); | 2877 __ Push(ip, r2, r0); |
2877 | 2878 |
2878 // Do tail-call to the runtime system. | 2879 // Do tail-call to the runtime system. |
2879 ExternalReference store_callback_property = | 2880 ExternalReference store_callback_property = |
2880 ExternalReference(IC_Utility(IC::kStoreCallbackProperty), | 2881 ExternalReference(IC_Utility(IC::kStoreCallbackProperty), |
2881 masm()->isolate()); | 2882 masm()->isolate()); |
2882 __ TailCallExternalReference(store_callback_property, 4, 1); | 2883 __ TailCallExternalReference(store_callback_property, 4, 1); |
2883 | 2884 |
2884 // Handle store cache miss. | 2885 // Handle store cache miss. |
2885 __ bind(&miss); | 2886 __ bind(&miss); |
2886 Handle<Code> ic = masm()->isolate()->builtins()->StoreIC_Miss(); | 2887 Handle<Code> ic = masm()->isolate()->builtins()->StoreIC_Miss(); |
2887 __ Jump(ic, RelocInfo::CODE_TARGET); | 2888 __ Jump(ic, RelocInfo::CODE_TARGET); |
2888 | 2889 |
2889 // Return the generated code. | 2890 // Return the generated code. |
2890 return TryGetCode(CALLBACKS, name); | 2891 return GetCode(CALLBACKS, name); |
2891 } | 2892 } |
2892 | 2893 |
2893 | 2894 |
2894 MaybeObject* StoreStubCompiler::CompileStoreInterceptor(JSObject* receiver, | 2895 Handle<Code> StoreStubCompiler::CompileStoreInterceptor( |
2895 String* name) { | 2896 Handle<JSObject> receiver, |
| 2897 Handle<String> name) { |
2896 // ----------- S t a t e ------------- | 2898 // ----------- S t a t e ------------- |
2897 // -- r0 : value | 2899 // -- r0 : value |
2898 // -- r1 : receiver | 2900 // -- r1 : receiver |
2899 // -- r2 : name | 2901 // -- r2 : name |
2900 // -- lr : return address | 2902 // -- lr : return address |
2901 // ----------------------------------- | 2903 // ----------------------------------- |
2902 Label miss; | 2904 Label miss; |
2903 | 2905 |
2904 // Check that the object isn't a smi. | 2906 // Check that the object isn't a smi. |
2905 __ JumpIfSmi(r1, &miss); | 2907 __ JumpIfSmi(r1, &miss); |
(...skipping 22 matching lines...) Expand all Loading... |
2928 ExternalReference(IC_Utility(IC::kStoreInterceptorProperty), | 2930 ExternalReference(IC_Utility(IC::kStoreInterceptorProperty), |
2929 masm()->isolate()); | 2931 masm()->isolate()); |
2930 __ TailCallExternalReference(store_ic_property, 4, 1); | 2932 __ TailCallExternalReference(store_ic_property, 4, 1); |
2931 | 2933 |
2932 // Handle store cache miss. | 2934 // Handle store cache miss. |
2933 __ bind(&miss); | 2935 __ bind(&miss); |
2934 Handle<Code> ic = masm()->isolate()->builtins()->StoreIC_Miss(); | 2936 Handle<Code> ic = masm()->isolate()->builtins()->StoreIC_Miss(); |
2935 __ Jump(ic, RelocInfo::CODE_TARGET); | 2937 __ Jump(ic, RelocInfo::CODE_TARGET); |
2936 | 2938 |
2937 // Return the generated code. | 2939 // Return the generated code. |
2938 return TryGetCode(INTERCEPTOR, name); | 2940 return GetCode(INTERCEPTOR, name); |
2939 } | 2941 } |
2940 | 2942 |
2941 | 2943 |
2942 Handle<Code> StoreStubCompiler::CompileStoreGlobal( | 2944 Handle<Code> StoreStubCompiler::CompileStoreGlobal( |
2943 Handle<GlobalObject> object, | 2945 Handle<GlobalObject> object, |
2944 Handle<JSGlobalPropertyCell> cell, | 2946 Handle<JSGlobalPropertyCell> cell, |
2945 Handle<String> name) { | 2947 Handle<String> name) { |
2946 // ----------- S t a t e ------------- | 2948 // ----------- S t a t e ------------- |
2947 // -- r0 : value | 2949 // -- r0 : value |
2948 // -- r1 : receiver | 2950 // -- r1 : receiver |
(...skipping 1695 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
4644 Handle<Code> ic_miss = masm->isolate()->builtins()->KeyedStoreIC_Miss(); | 4646 Handle<Code> ic_miss = masm->isolate()->builtins()->KeyedStoreIC_Miss(); |
4645 __ Jump(ic_miss, RelocInfo::CODE_TARGET); | 4647 __ Jump(ic_miss, RelocInfo::CODE_TARGET); |
4646 } | 4648 } |
4647 | 4649 |
4648 | 4650 |
4649 #undef __ | 4651 #undef __ |
4650 | 4652 |
4651 } } // namespace v8::internal | 4653 } } // namespace v8::internal |
4652 | 4654 |
4653 #endif // V8_TARGET_ARCH_ARM | 4655 #endif // V8_TARGET_ARCH_ARM |
OLD | NEW |