| 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 1632 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1643 GenerateFastPropertyLoad(masm(), r1, reg, index.is_inobject(holder), | 1643 GenerateFastPropertyLoad(masm(), r1, reg, index.is_inobject(holder), |
| 1644 index.translate(holder), Representation::Tagged()); | 1644 index.translate(holder), Representation::Tagged()); |
| 1645 | 1645 |
| 1646 GenerateCallFunction(masm(), object, arguments(), &miss, extra_state_); | 1646 GenerateCallFunction(masm(), object, arguments(), &miss, extra_state_); |
| 1647 | 1647 |
| 1648 // Handle call cache miss. | 1648 // Handle call cache miss. |
| 1649 __ bind(&miss); | 1649 __ bind(&miss); |
| 1650 GenerateMissBranch(); | 1650 GenerateMissBranch(); |
| 1651 | 1651 |
| 1652 // Return the generated code. | 1652 // Return the generated code. |
| 1653 return GetCode(Code::FIELD, name); | 1653 return GetCode(Code::FAST, name); |
| 1654 } | 1654 } |
| 1655 | 1655 |
| 1656 | 1656 |
| 1657 Handle<Code> CallStubCompiler::CompileArrayCodeCall( | 1657 Handle<Code> CallStubCompiler::CompileArrayCodeCall( |
| 1658 Handle<Object> object, | 1658 Handle<Object> object, |
| 1659 Handle<JSObject> holder, | 1659 Handle<JSObject> holder, |
| 1660 Handle<Cell> cell, | 1660 Handle<Cell> cell, |
| 1661 Handle<JSFunction> function, | 1661 Handle<JSFunction> function, |
| 1662 Handle<String> name, | 1662 Handle<String> name, |
| 1663 Code::StubType type) { | 1663 Code::StubType type) { |
| (...skipping 1010 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2674 Handle<Code> CallStubCompiler::CompileCallConstant( | 2674 Handle<Code> CallStubCompiler::CompileCallConstant( |
| 2675 Handle<Object> object, | 2675 Handle<Object> object, |
| 2676 Handle<JSObject> holder, | 2676 Handle<JSObject> holder, |
| 2677 Handle<Name> name, | 2677 Handle<Name> name, |
| 2678 CheckType check, | 2678 CheckType check, |
| 2679 Handle<JSFunction> function) { | 2679 Handle<JSFunction> function) { |
| 2680 if (HasCustomCallGenerator(function)) { | 2680 if (HasCustomCallGenerator(function)) { |
| 2681 Handle<Code> code = CompileCustomCall(object, holder, | 2681 Handle<Code> code = CompileCustomCall(object, holder, |
| 2682 Handle<Cell>::null(), | 2682 Handle<Cell>::null(), |
| 2683 function, Handle<String>::cast(name), | 2683 function, Handle<String>::cast(name), |
| 2684 Code::CONSTANT); | 2684 Code::FAST); |
| 2685 // A null handle means bail out to the regular compiler code below. | 2685 // A null handle means bail out to the regular compiler code below. |
| 2686 if (!code.is_null()) return code; | 2686 if (!code.is_null()) return code; |
| 2687 } | 2687 } |
| 2688 | 2688 |
| 2689 CompileHandlerFrontend(object, holder, name, check); | 2689 CompileHandlerFrontend(object, holder, name, check); |
| 2690 CompileHandlerBackend(function); | 2690 CompileHandlerBackend(function); |
| 2691 | 2691 |
| 2692 // Return the generated code. | 2692 // Return the generated code. |
| 2693 return GetCode(function); | 2693 return GetCode(function); |
| 2694 } | 2694 } |
| (...skipping 26 matching lines...) Expand all Loading... |
| 2721 // Restore receiver. | 2721 // Restore receiver. |
| 2722 __ ldr(r0, MemOperand(sp, argc * kPointerSize)); | 2722 __ ldr(r0, MemOperand(sp, argc * kPointerSize)); |
| 2723 | 2723 |
| 2724 GenerateCallFunction(masm(), object, arguments(), &miss, extra_state_); | 2724 GenerateCallFunction(masm(), object, arguments(), &miss, extra_state_); |
| 2725 | 2725 |
| 2726 // Handle call cache miss. | 2726 // Handle call cache miss. |
| 2727 __ bind(&miss); | 2727 __ bind(&miss); |
| 2728 GenerateMissBranch(); | 2728 GenerateMissBranch(); |
| 2729 | 2729 |
| 2730 // Return the generated code. | 2730 // Return the generated code. |
| 2731 return GetCode(Code::INTERCEPTOR, name); | 2731 return GetCode(Code::FAST, name); |
| 2732 } | 2732 } |
| 2733 | 2733 |
| 2734 | 2734 |
| 2735 Handle<Code> CallStubCompiler::CompileCallGlobal( | 2735 Handle<Code> CallStubCompiler::CompileCallGlobal( |
| 2736 Handle<JSObject> object, | 2736 Handle<JSObject> object, |
| 2737 Handle<GlobalObject> holder, | 2737 Handle<GlobalObject> holder, |
| 2738 Handle<PropertyCell> cell, | 2738 Handle<PropertyCell> cell, |
| 2739 Handle<JSFunction> function, | 2739 Handle<JSFunction> function, |
| 2740 Handle<Name> name) { | 2740 Handle<Name> name) { |
| 2741 // ----------- S t a t e ------------- | 2741 // ----------- S t a t e ------------- |
| (...skipping 65 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2807 __ push(ip); | 2807 __ push(ip); |
| 2808 __ mov(ip, Operand(name)); | 2808 __ mov(ip, Operand(name)); |
| 2809 __ Push(ip, value()); | 2809 __ Push(ip, value()); |
| 2810 | 2810 |
| 2811 // Do tail-call to the runtime system. | 2811 // Do tail-call to the runtime system. |
| 2812 ExternalReference store_callback_property = | 2812 ExternalReference store_callback_property = |
| 2813 ExternalReference(IC_Utility(IC::kStoreCallbackProperty), isolate()); | 2813 ExternalReference(IC_Utility(IC::kStoreCallbackProperty), isolate()); |
| 2814 __ TailCallExternalReference(store_callback_property, 4, 1); | 2814 __ TailCallExternalReference(store_callback_property, 4, 1); |
| 2815 | 2815 |
| 2816 // Return the generated code. | 2816 // Return the generated code. |
| 2817 return GetCode(kind(), Code::CALLBACKS, name); | 2817 return GetCode(kind(), Code::FAST, name); |
| 2818 } | 2818 } |
| 2819 | 2819 |
| 2820 | 2820 |
| 2821 Handle<Code> StoreStubCompiler::CompileStoreCallback( | 2821 Handle<Code> StoreStubCompiler::CompileStoreCallback( |
| 2822 Handle<JSObject> object, | 2822 Handle<JSObject> object, |
| 2823 Handle<JSObject> holder, | 2823 Handle<JSObject> holder, |
| 2824 Handle<Name> name, | 2824 Handle<Name> name, |
| 2825 const CallOptimization& call_optimization) { | 2825 const CallOptimization& call_optimization) { |
| 2826 HandlerFrontend(object, receiver(), holder, name); | 2826 HandlerFrontend(object, receiver(), holder, name); |
| 2827 | 2827 |
| 2828 Register values[] = { value() }; | 2828 Register values[] = { value() }; |
| 2829 GenerateFastApiCall( | 2829 GenerateFastApiCall( |
| 2830 masm(), call_optimization, receiver(), scratch3(), 1, values); | 2830 masm(), call_optimization, receiver(), scratch3(), 1, values); |
| 2831 | 2831 |
| 2832 // Return the generated code. | 2832 // Return the generated code. |
| 2833 return GetCode(kind(), Code::CALLBACKS, name); | 2833 return GetCode(kind(), Code::FAST, name); |
| 2834 } | 2834 } |
| 2835 | 2835 |
| 2836 | 2836 |
| 2837 #undef __ | 2837 #undef __ |
| 2838 #define __ ACCESS_MASM(masm) | 2838 #define __ ACCESS_MASM(masm) |
| 2839 | 2839 |
| 2840 | 2840 |
| 2841 void StoreStubCompiler::GenerateStoreViaSetter( | 2841 void StoreStubCompiler::GenerateStoreViaSetter( |
| 2842 MacroAssembler* masm, | 2842 MacroAssembler* masm, |
| 2843 Handle<JSFunction> setter) { | 2843 Handle<JSFunction> setter) { |
| (...skipping 62 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2906 // Do tail-call to the runtime system. | 2906 // Do tail-call to the runtime system. |
| 2907 ExternalReference store_ic_property = | 2907 ExternalReference store_ic_property = |
| 2908 ExternalReference(IC_Utility(IC::kStoreInterceptorProperty), isolate()); | 2908 ExternalReference(IC_Utility(IC::kStoreInterceptorProperty), isolate()); |
| 2909 __ TailCallExternalReference(store_ic_property, 4, 1); | 2909 __ TailCallExternalReference(store_ic_property, 4, 1); |
| 2910 | 2910 |
| 2911 // Handle store cache miss. | 2911 // Handle store cache miss. |
| 2912 __ bind(&miss); | 2912 __ bind(&miss); |
| 2913 TailCallBuiltin(masm(), MissBuiltin(kind())); | 2913 TailCallBuiltin(masm(), MissBuiltin(kind())); |
| 2914 | 2914 |
| 2915 // Return the generated code. | 2915 // Return the generated code. |
| 2916 return GetCode(kind(), Code::INTERCEPTOR, name); | 2916 return GetCode(kind(), Code::FAST, name); |
| 2917 } | 2917 } |
| 2918 | 2918 |
| 2919 | 2919 |
| 2920 Handle<Code> LoadStubCompiler::CompileLoadNonexistent( | 2920 Handle<Code> LoadStubCompiler::CompileLoadNonexistent( |
| 2921 Handle<Object> object, | 2921 Handle<Object> object, |
| 2922 Handle<JSObject> last, | 2922 Handle<JSObject> last, |
| 2923 Handle<Name> name, | 2923 Handle<Name> name, |
| 2924 Handle<JSGlobalObject> global) { | 2924 Handle<JSGlobalObject> global) { |
| 2925 NonexistentHandlerFrontend(object, last, name, global); | 2925 NonexistentHandlerFrontend(object, last, name, global); |
| 2926 | 2926 |
| 2927 // Return undefined if maps of the full prototype chain are still the | 2927 // Return undefined if maps of the full prototype chain are still the |
| 2928 // same and no global property with this name contains a value. | 2928 // same and no global property with this name contains a value. |
| 2929 __ LoadRoot(r0, Heap::kUndefinedValueRootIndex); | 2929 __ LoadRoot(r0, Heap::kUndefinedValueRootIndex); |
| 2930 __ Ret(); | 2930 __ Ret(); |
| 2931 | 2931 |
| 2932 // Return the generated code. | 2932 // Return the generated code. |
| 2933 return GetCode(kind(), Code::NONEXISTENT, name); | 2933 return GetCode(kind(), Code::FAST, name); |
| 2934 } | 2934 } |
| 2935 | 2935 |
| 2936 | 2936 |
| 2937 Register* LoadStubCompiler::registers() { | 2937 Register* LoadStubCompiler::registers() { |
| 2938 // receiver, name, scratch1, scratch2, scratch3, scratch4. | 2938 // receiver, name, scratch1, scratch2, scratch3, scratch4. |
| 2939 static Register registers[] = { r0, r2, r3, r1, r4, r5 }; | 2939 static Register registers[] = { r0, r2, r3, r1, r4, r5 }; |
| 2940 return registers; | 2940 return registers; |
| 2941 } | 2941 } |
| 2942 | 2942 |
| 2943 | 2943 |
| (...skipping 228 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 3172 // ----------------------------------- | 3172 // ----------------------------------- |
| 3173 TailCallBuiltin(masm, Builtins::kKeyedLoadIC_Miss); | 3173 TailCallBuiltin(masm, Builtins::kKeyedLoadIC_Miss); |
| 3174 } | 3174 } |
| 3175 | 3175 |
| 3176 | 3176 |
| 3177 #undef __ | 3177 #undef __ |
| 3178 | 3178 |
| 3179 } } // namespace v8::internal | 3179 } } // namespace v8::internal |
| 3180 | 3180 |
| 3181 #endif // V8_TARGET_ARCH_ARM | 3181 #endif // V8_TARGET_ARCH_ARM |
| OLD | NEW |