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

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

Issue 75973005: Remove unused StubType's, freeing 2 bits in Code objects. (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
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 | Annotate | Revision Log
« no previous file with comments | « src/code-stubs.h ('k') | src/objects.h » ('j') | 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 1653 matching lines...) Expand 10 before | Expand all | Expand 10 after
1664 ? CALL_AS_FUNCTION 1664 ? CALL_AS_FUNCTION
1665 : CALL_AS_METHOD; 1665 : CALL_AS_METHOD;
1666 __ InvokeFunction(edi, arguments(), JUMP_FUNCTION, 1666 __ InvokeFunction(edi, arguments(), JUMP_FUNCTION,
1667 NullCallWrapper(), call_kind); 1667 NullCallWrapper(), call_kind);
1668 1668
1669 // Handle call cache miss. 1669 // Handle call cache miss.
1670 __ bind(&miss); 1670 __ bind(&miss);
1671 GenerateMissBranch(); 1671 GenerateMissBranch();
1672 1672
1673 // Return the generated code. 1673 // Return the generated code.
1674 return GetCode(Code::FIELD, name); 1674 return GetCode(Code::FAST, name);
1675 } 1675 }
1676 1676
1677 1677
1678 Handle<Code> CallStubCompiler::CompileArrayCodeCall( 1678 Handle<Code> CallStubCompiler::CompileArrayCodeCall(
1679 Handle<Object> object, 1679 Handle<Object> object,
1680 Handle<JSObject> holder, 1680 Handle<JSObject> holder,
1681 Handle<Cell> cell, 1681 Handle<Cell> cell,
1682 Handle<JSFunction> function, 1682 Handle<JSFunction> function,
1683 Handle<String> name, 1683 Handle<String> name,
1684 Code::StubType type) { 1684 Code::StubType type) {
(...skipping 1060 matching lines...) Expand 10 before | Expand all | Expand 10 after
2745 Handle<Object> object, 2745 Handle<Object> object,
2746 Handle<JSObject> holder, 2746 Handle<JSObject> holder,
2747 Handle<Name> name, 2747 Handle<Name> name,
2748 CheckType check, 2748 CheckType check,
2749 Handle<JSFunction> function) { 2749 Handle<JSFunction> function) {
2750 2750
2751 if (HasCustomCallGenerator(function)) { 2751 if (HasCustomCallGenerator(function)) {
2752 Handle<Code> code = CompileCustomCall(object, holder, 2752 Handle<Code> code = CompileCustomCall(object, holder,
2753 Handle<Cell>::null(), 2753 Handle<Cell>::null(),
2754 function, Handle<String>::cast(name), 2754 function, Handle<String>::cast(name),
2755 Code::CONSTANT); 2755 Code::FAST);
2756 // A null handle means bail out to the regular compiler code below. 2756 // A null handle means bail out to the regular compiler code below.
2757 if (!code.is_null()) return code; 2757 if (!code.is_null()) return code;
2758 } 2758 }
2759 2759
2760 CompileHandlerFrontend(object, holder, name, check); 2760 CompileHandlerFrontend(object, holder, name, check);
2761 CompileHandlerBackend(function); 2761 CompileHandlerBackend(function);
2762 2762
2763 // Return the generated code. 2763 // Return the generated code.
2764 return GetCode(function); 2764 return GetCode(function);
2765 } 2765 }
(...skipping 47 matching lines...) Expand 10 before | Expand all | Expand 10 after
2813 ? CALL_AS_FUNCTION 2813 ? CALL_AS_FUNCTION
2814 : CALL_AS_METHOD; 2814 : CALL_AS_METHOD;
2815 __ InvokeFunction(edi, arguments(), JUMP_FUNCTION, 2815 __ InvokeFunction(edi, arguments(), JUMP_FUNCTION,
2816 NullCallWrapper(), call_kind); 2816 NullCallWrapper(), call_kind);
2817 2817
2818 // Handle load cache miss. 2818 // Handle load cache miss.
2819 __ bind(&miss); 2819 __ bind(&miss);
2820 GenerateMissBranch(); 2820 GenerateMissBranch();
2821 2821
2822 // Return the generated code. 2822 // Return the generated code.
2823 return GetCode(Code::INTERCEPTOR, name); 2823 return GetCode(Code::FAST, name);
2824 } 2824 }
2825 2825
2826 2826
2827 Handle<Code> CallStubCompiler::CompileCallGlobal( 2827 Handle<Code> CallStubCompiler::CompileCallGlobal(
2828 Handle<JSObject> object, 2828 Handle<JSObject> object,
2829 Handle<GlobalObject> holder, 2829 Handle<GlobalObject> holder,
2830 Handle<PropertyCell> cell, 2830 Handle<PropertyCell> cell,
2831 Handle<JSFunction> function, 2831 Handle<JSFunction> function,
2832 Handle<Name> name) { 2832 Handle<Name> name) {
2833 // ----------- S t a t e ------------- 2833 // ----------- S t a t e -------------
(...skipping 66 matching lines...) Expand 10 before | Expand all | Expand 10 after
2900 __ Push(name); 2900 __ Push(name);
2901 __ push(value()); 2901 __ push(value());
2902 __ push(scratch1()); // restore return address 2902 __ push(scratch1()); // restore return address
2903 2903
2904 // Do tail-call to the runtime system. 2904 // Do tail-call to the runtime system.
2905 ExternalReference store_callback_property = 2905 ExternalReference store_callback_property =
2906 ExternalReference(IC_Utility(IC::kStoreCallbackProperty), isolate()); 2906 ExternalReference(IC_Utility(IC::kStoreCallbackProperty), isolate());
2907 __ TailCallExternalReference(store_callback_property, 4, 1); 2907 __ TailCallExternalReference(store_callback_property, 4, 1);
2908 2908
2909 // Return the generated code. 2909 // Return the generated code.
2910 return GetCode(kind(), Code::CALLBACKS, name); 2910 return GetCode(kind(), Code::FAST, name);
2911 } 2911 }
2912 2912
2913 2913
2914 Handle<Code> StoreStubCompiler::CompileStoreCallback( 2914 Handle<Code> StoreStubCompiler::CompileStoreCallback(
2915 Handle<JSObject> object, 2915 Handle<JSObject> object,
2916 Handle<JSObject> holder, 2916 Handle<JSObject> holder,
2917 Handle<Name> name, 2917 Handle<Name> name,
2918 const CallOptimization& call_optimization) { 2918 const CallOptimization& call_optimization) {
2919 HandlerFrontend(object, receiver(), holder, name); 2919 HandlerFrontend(object, receiver(), holder, name);
2920 2920
2921 Register values[] = { value() }; 2921 Register values[] = { value() };
2922 GenerateFastApiCall( 2922 GenerateFastApiCall(
2923 masm(), call_optimization, receiver(), scratch1(), 1, values); 2923 masm(), call_optimization, receiver(), scratch1(), 1, values);
2924 2924
2925 // Return the generated code. 2925 // Return the generated code.
2926 return GetCode(kind(), Code::CALLBACKS, name); 2926 return GetCode(kind(), Code::FAST, name);
2927 } 2927 }
2928 2928
2929 2929
2930 #undef __ 2930 #undef __
2931 #define __ ACCESS_MASM(masm) 2931 #define __ ACCESS_MASM(masm)
2932 2932
2933 2933
2934 void StoreStubCompiler::GenerateStoreViaSetter( 2934 void StoreStubCompiler::GenerateStoreViaSetter(
2935 MacroAssembler* masm, 2935 MacroAssembler* masm,
2936 Handle<JSFunction> setter) { 2936 Handle<JSFunction> setter) {
(...skipping 46 matching lines...) Expand 10 before | Expand all | Expand 10 after
2983 __ push(value()); 2983 __ push(value());
2984 __ push(Immediate(Smi::FromInt(strict_mode()))); 2984 __ push(Immediate(Smi::FromInt(strict_mode())));
2985 __ push(scratch1()); // restore return address 2985 __ push(scratch1()); // restore return address
2986 2986
2987 // Do tail-call to the runtime system. 2987 // Do tail-call to the runtime system.
2988 ExternalReference store_ic_property = 2988 ExternalReference store_ic_property =
2989 ExternalReference(IC_Utility(IC::kStoreInterceptorProperty), isolate()); 2989 ExternalReference(IC_Utility(IC::kStoreInterceptorProperty), isolate());
2990 __ TailCallExternalReference(store_ic_property, 4, 1); 2990 __ TailCallExternalReference(store_ic_property, 4, 1);
2991 2991
2992 // Return the generated code. 2992 // Return the generated code.
2993 return GetCode(kind(), Code::INTERCEPTOR, name); 2993 return GetCode(kind(), Code::FAST, name);
2994 } 2994 }
2995 2995
2996 2996
2997 Handle<Code> KeyedStoreStubCompiler::CompileStorePolymorphic( 2997 Handle<Code> KeyedStoreStubCompiler::CompileStorePolymorphic(
2998 MapHandleList* receiver_maps, 2998 MapHandleList* receiver_maps,
2999 CodeHandleList* handler_stubs, 2999 CodeHandleList* handler_stubs,
3000 MapHandleList* transitioned_maps) { 3000 MapHandleList* transitioned_maps) {
3001 Label miss; 3001 Label miss;
3002 __ JumpIfSmi(receiver(), &miss, Label::kNear); 3002 __ JumpIfSmi(receiver(), &miss, Label::kNear);
3003 __ mov(scratch1(), FieldOperand(receiver(), HeapObject::kMapOffset)); 3003 __ mov(scratch1(), FieldOperand(receiver(), HeapObject::kMapOffset));
(...skipping 24 matching lines...) Expand all
3028 Handle<Name> name, 3028 Handle<Name> name,
3029 Handle<JSGlobalObject> global) { 3029 Handle<JSGlobalObject> global) {
3030 NonexistentHandlerFrontend(object, last, name, global); 3030 NonexistentHandlerFrontend(object, last, name, global);
3031 3031
3032 // Return undefined if maps of the full prototype chain are still the 3032 // Return undefined if maps of the full prototype chain are still the
3033 // same and no global property with this name contains a value. 3033 // same and no global property with this name contains a value.
3034 __ mov(eax, isolate()->factory()->undefined_value()); 3034 __ mov(eax, isolate()->factory()->undefined_value());
3035 __ ret(0); 3035 __ ret(0);
3036 3036
3037 // Return the generated code. 3037 // Return the generated code.
3038 return GetCode(kind(), Code::NONEXISTENT, name); 3038 return GetCode(kind(), Code::FAST, name);
3039 } 3039 }
3040 3040
3041 3041
3042 Register* LoadStubCompiler::registers() { 3042 Register* LoadStubCompiler::registers() {
3043 // receiver, name, scratch1, scratch2, scratch3, scratch4. 3043 // receiver, name, scratch1, scratch2, scratch3, scratch4.
3044 static Register registers[] = { edx, ecx, ebx, eax, edi, no_reg }; 3044 static Register registers[] = { edx, ecx, ebx, eax, edi, no_reg };
3045 return registers; 3045 return registers;
3046 } 3046 }
3047 3047
3048 3048
(...skipping 197 matching lines...) Expand 10 before | Expand all | Expand 10 after
3246 // ----------------------------------- 3246 // -----------------------------------
3247 TailCallBuiltin(masm, Builtins::kKeyedLoadIC_Miss); 3247 TailCallBuiltin(masm, Builtins::kKeyedLoadIC_Miss);
3248 } 3248 }
3249 3249
3250 3250
3251 #undef __ 3251 #undef __
3252 3252
3253 } } // namespace v8::internal 3253 } } // namespace v8::internal
3254 3254
3255 #endif // V8_TARGET_ARCH_IA32 3255 #endif // V8_TARGET_ARCH_IA32
OLDNEW
« no previous file with comments | « src/code-stubs.h ('k') | src/objects.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698