Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(735)

Side by Side Diff: src/mips/stub-cache-mips.cc

Issue 60763005: MIPS: Remove unused StubType's, freeing 2 bits in Code objects. (Closed) Base URL: https://github.com/v8/v8.git@gbl
Patch Set: Created 7 years, 1 month ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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 1619 matching lines...) Expand 10 before | Expand all | Expand 10 after
1630 GenerateFastPropertyLoad(masm(), a1, reg, index.is_inobject(holder), 1630 GenerateFastPropertyLoad(masm(), a1, reg, index.is_inobject(holder),
1631 index.translate(holder), Representation::Tagged()); 1631 index.translate(holder), Representation::Tagged());
1632 1632
1633 GenerateCallFunction(masm(), object, arguments(), &miss, extra_state_); 1633 GenerateCallFunction(masm(), object, arguments(), &miss, extra_state_);
1634 1634
1635 // Handle call cache miss. 1635 // Handle call cache miss.
1636 __ bind(&miss); 1636 __ bind(&miss);
1637 GenerateMissBranch(); 1637 GenerateMissBranch();
1638 1638
1639 // Return the generated code. 1639 // Return the generated code.
1640 return GetCode(Code::FIELD, name); 1640 return GetCode(Code::FAST, name);
1641 } 1641 }
1642 1642
1643 1643
1644 Handle<Code> CallStubCompiler::CompileArrayCodeCall( 1644 Handle<Code> CallStubCompiler::CompileArrayCodeCall(
1645 Handle<Object> object, 1645 Handle<Object> object,
1646 Handle<JSObject> holder, 1646 Handle<JSObject> holder,
1647 Handle<Cell> cell, 1647 Handle<Cell> cell,
1648 Handle<JSFunction> function, 1648 Handle<JSFunction> function,
1649 Handle<String> name, 1649 Handle<String> name,
1650 Code::StubType type) { 1650 Code::StubType type) {
(...skipping 1033 matching lines...) Expand 10 before | Expand all | Expand 10 after
2684 Handle<Code> CallStubCompiler::CompileCallConstant( 2684 Handle<Code> CallStubCompiler::CompileCallConstant(
2685 Handle<Object> object, 2685 Handle<Object> object,
2686 Handle<JSObject> holder, 2686 Handle<JSObject> holder,
2687 Handle<Name> name, 2687 Handle<Name> name,
2688 CheckType check, 2688 CheckType check,
2689 Handle<JSFunction> function) { 2689 Handle<JSFunction> function) {
2690 if (HasCustomCallGenerator(function)) { 2690 if (HasCustomCallGenerator(function)) {
2691 Handle<Code> code = CompileCustomCall(object, holder, 2691 Handle<Code> code = CompileCustomCall(object, holder,
2692 Handle<Cell>::null(), 2692 Handle<Cell>::null(),
2693 function, Handle<String>::cast(name), 2693 function, Handle<String>::cast(name),
2694 Code::CONSTANT); 2694 Code::FAST);
2695 // A null handle means bail out to the regular compiler code below. 2695 // A null handle means bail out to the regular compiler code below.
2696 if (!code.is_null()) return code; 2696 if (!code.is_null()) return code;
2697 } 2697 }
2698 2698
2699 CompileHandlerFrontend(object, holder, name, check); 2699 CompileHandlerFrontend(object, holder, name, check);
2700 CompileHandlerBackend(function); 2700 CompileHandlerBackend(function);
2701 2701
2702 // Return the generated code. 2702 // Return the generated code.
2703 return GetCode(function); 2703 return GetCode(function);
2704 } 2704 }
(...skipping 28 matching lines...) Expand all
2733 // Restore receiver. 2733 // Restore receiver.
2734 __ lw(a0, MemOperand(sp, argc * kPointerSize)); 2734 __ lw(a0, MemOperand(sp, argc * kPointerSize));
2735 2735
2736 GenerateCallFunction(masm(), object, arguments(), &miss, extra_state_); 2736 GenerateCallFunction(masm(), object, arguments(), &miss, extra_state_);
2737 2737
2738 // Handle call cache miss. 2738 // Handle call cache miss.
2739 __ bind(&miss); 2739 __ bind(&miss);
2740 GenerateMissBranch(); 2740 GenerateMissBranch();
2741 2741
2742 // Return the generated code. 2742 // Return the generated code.
2743 return GetCode(Code::INTERCEPTOR, name); 2743 return GetCode(Code::FAST, name);
2744 } 2744 }
2745 2745
2746 2746
2747 Handle<Code> CallStubCompiler::CompileCallGlobal( 2747 Handle<Code> CallStubCompiler::CompileCallGlobal(
2748 Handle<JSObject> object, 2748 Handle<JSObject> object,
2749 Handle<GlobalObject> holder, 2749 Handle<GlobalObject> holder,
2750 Handle<PropertyCell> cell, 2750 Handle<PropertyCell> cell,
2751 Handle<JSFunction> function, 2751 Handle<JSFunction> function,
2752 Handle<Name> name) { 2752 Handle<Name> name) {
2753 // ----------- S t a t e ------------- 2753 // ----------- S t a t e -------------
(...skipping 67 matching lines...) Expand 10 before | Expand all | Expand 10 after
2821 __ push(at); 2821 __ push(at);
2822 __ li(at, Operand(name)); 2822 __ li(at, Operand(name));
2823 __ Push(at, value()); 2823 __ Push(at, value());
2824 2824
2825 // Do tail-call to the runtime system. 2825 // Do tail-call to the runtime system.
2826 ExternalReference store_callback_property = 2826 ExternalReference store_callback_property =
2827 ExternalReference(IC_Utility(IC::kStoreCallbackProperty), isolate()); 2827 ExternalReference(IC_Utility(IC::kStoreCallbackProperty), isolate());
2828 __ TailCallExternalReference(store_callback_property, 4, 1); 2828 __ TailCallExternalReference(store_callback_property, 4, 1);
2829 2829
2830 // Return the generated code. 2830 // Return the generated code.
2831 return GetCode(kind(), Code::CALLBACKS, name); 2831 return GetCode(kind(), Code::FAST, name);
2832 } 2832 }
2833 2833
2834 2834
2835 Handle<Code> StoreStubCompiler::CompileStoreCallback( 2835 Handle<Code> StoreStubCompiler::CompileStoreCallback(
2836 Handle<JSObject> object, 2836 Handle<JSObject> object,
2837 Handle<JSObject> holder, 2837 Handle<JSObject> holder,
2838 Handle<Name> name, 2838 Handle<Name> name,
2839 const CallOptimization& call_optimization) { 2839 const CallOptimization& call_optimization) {
2840 HandlerFrontend(object, receiver(), holder, name); 2840 HandlerFrontend(object, receiver(), holder, name);
2841 2841
2842 Register values[] = { value() }; 2842 Register values[] = { value() };
2843 GenerateFastApiCall( 2843 GenerateFastApiCall(
2844 masm(), call_optimization, receiver(), scratch3(), 1, values); 2844 masm(), call_optimization, receiver(), scratch3(), 1, values);
2845 2845
2846 // Return the generated code. 2846 // Return the generated code.
2847 return GetCode(kind(), Code::CALLBACKS, name); 2847 return GetCode(kind(), Code::FAST, name);
2848 } 2848 }
2849 2849
2850 2850
2851 #undef __ 2851 #undef __
2852 #define __ ACCESS_MASM(masm) 2852 #define __ ACCESS_MASM(masm)
2853 2853
2854 2854
2855 void StoreStubCompiler::GenerateStoreViaSetter( 2855 void StoreStubCompiler::GenerateStoreViaSetter(
2856 MacroAssembler* masm, 2856 MacroAssembler* masm,
2857 Handle<JSFunction> setter) { 2857 Handle<JSFunction> setter) {
(...skipping 63 matching lines...) Expand 10 before | Expand all | Expand 10 after
2921 // Do tail-call to the runtime system. 2921 // Do tail-call to the runtime system.
2922 ExternalReference store_ic_property = 2922 ExternalReference store_ic_property =
2923 ExternalReference(IC_Utility(IC::kStoreInterceptorProperty), isolate()); 2923 ExternalReference(IC_Utility(IC::kStoreInterceptorProperty), isolate());
2924 __ TailCallExternalReference(store_ic_property, 4, 1); 2924 __ TailCallExternalReference(store_ic_property, 4, 1);
2925 2925
2926 // Handle store cache miss. 2926 // Handle store cache miss.
2927 __ bind(&miss); 2927 __ bind(&miss);
2928 TailCallBuiltin(masm(), MissBuiltin(kind())); 2928 TailCallBuiltin(masm(), MissBuiltin(kind()));
2929 2929
2930 // Return the generated code. 2930 // Return the generated code.
2931 return GetCode(kind(), Code::INTERCEPTOR, name); 2931 return GetCode(kind(), Code::FAST, name);
2932 } 2932 }
2933 2933
2934 2934
2935 Handle<Code> LoadStubCompiler::CompileLoadNonexistent( 2935 Handle<Code> LoadStubCompiler::CompileLoadNonexistent(
2936 Handle<Object> object, 2936 Handle<Object> object,
2937 Handle<JSObject> last, 2937 Handle<JSObject> last,
2938 Handle<Name> name, 2938 Handle<Name> name,
2939 Handle<JSGlobalObject> global) { 2939 Handle<JSGlobalObject> global) {
2940 NonexistentHandlerFrontend(object, last, name, global); 2940 NonexistentHandlerFrontend(object, last, name, global);
2941 2941
2942 // Return undefined if maps of the full prototype chain is still the same. 2942 // Return undefined if maps of the full prototype chain is still the same.
2943 __ LoadRoot(v0, Heap::kUndefinedValueRootIndex); 2943 __ LoadRoot(v0, Heap::kUndefinedValueRootIndex);
2944 __ Ret(); 2944 __ Ret();
2945 2945
2946 // Return the generated code. 2946 // Return the generated code.
2947 return GetCode(kind(), Code::NONEXISTENT, name); 2947 return GetCode(kind(), Code::FAST, name);
2948 } 2948 }
2949 2949
2950 2950
2951 Register* LoadStubCompiler::registers() { 2951 Register* LoadStubCompiler::registers() {
2952 // receiver, name, scratch1, scratch2, scratch3, scratch4. 2952 // receiver, name, scratch1, scratch2, scratch3, scratch4.
2953 static Register registers[] = { a0, a2, a3, a1, t0, t1 }; 2953 static Register registers[] = { a0, a2, a3, a1, t0, t1 };
2954 return registers; 2954 return registers;
2955 } 2955 }
2956 2956
2957 2957
(...skipping 225 matching lines...) Expand 10 before | Expand all | Expand 10 after
3183 // ----------------------------------- 3183 // -----------------------------------
3184 TailCallBuiltin(masm, Builtins::kKeyedLoadIC_Miss); 3184 TailCallBuiltin(masm, Builtins::kKeyedLoadIC_Miss);
3185 } 3185 }
3186 3186
3187 3187
3188 #undef __ 3188 #undef __
3189 3189
3190 } } // namespace v8::internal 3190 } } // namespace v8::internal
3191 3191
3192 #endif // V8_TARGET_ARCH_MIPS 3192 #endif // V8_TARGET_ARCH_MIPS
OLDNEW
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698