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

Side by Side Diff: src/x64/stub-cache-x64.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/stub-cache.cc ('k') | 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 1577 matching lines...) Expand 10 before | Expand all | Expand 10 after
1588 ? CALL_AS_FUNCTION 1588 ? CALL_AS_FUNCTION
1589 : CALL_AS_METHOD; 1589 : CALL_AS_METHOD;
1590 __ InvokeFunction(rdi, arguments(), JUMP_FUNCTION, 1590 __ InvokeFunction(rdi, arguments(), JUMP_FUNCTION,
1591 NullCallWrapper(), call_kind); 1591 NullCallWrapper(), call_kind);
1592 1592
1593 // Handle call cache miss. 1593 // Handle call cache miss.
1594 __ bind(&miss); 1594 __ bind(&miss);
1595 GenerateMissBranch(); 1595 GenerateMissBranch();
1596 1596
1597 // Return the generated code. 1597 // Return the generated code.
1598 return GetCode(Code::FIELD, name); 1598 return GetCode(Code::FAST, name);
1599 } 1599 }
1600 1600
1601 1601
1602 Handle<Code> CallStubCompiler::CompileArrayCodeCall( 1602 Handle<Code> CallStubCompiler::CompileArrayCodeCall(
1603 Handle<Object> object, 1603 Handle<Object> object,
1604 Handle<JSObject> holder, 1604 Handle<JSObject> holder,
1605 Handle<Cell> cell, 1605 Handle<Cell> cell,
1606 Handle<JSFunction> function, 1606 Handle<JSFunction> function,
1607 Handle<String> name, 1607 Handle<String> name,
1608 Code::StubType type) { 1608 Code::StubType type) {
(...skipping 1036 matching lines...) Expand 10 before | Expand all | Expand 10 after
2645 Handle<Code> CallStubCompiler::CompileCallConstant( 2645 Handle<Code> CallStubCompiler::CompileCallConstant(
2646 Handle<Object> object, 2646 Handle<Object> object,
2647 Handle<JSObject> holder, 2647 Handle<JSObject> holder,
2648 Handle<Name> name, 2648 Handle<Name> name,
2649 CheckType check, 2649 CheckType check,
2650 Handle<JSFunction> function) { 2650 Handle<JSFunction> function) {
2651 if (HasCustomCallGenerator(function)) { 2651 if (HasCustomCallGenerator(function)) {
2652 Handle<Code> code = CompileCustomCall(object, holder, 2652 Handle<Code> code = CompileCustomCall(object, holder,
2653 Handle<PropertyCell>::null(), 2653 Handle<PropertyCell>::null(),
2654 function, Handle<String>::cast(name), 2654 function, Handle<String>::cast(name),
2655 Code::CONSTANT); 2655 Code::FAST);
2656 // A null handle means bail out to the regular compiler code below. 2656 // A null handle means bail out to the regular compiler code below.
2657 if (!code.is_null()) return code; 2657 if (!code.is_null()) return code;
2658 } 2658 }
2659 2659
2660 CompileHandlerFrontend(object, holder, name, check); 2660 CompileHandlerFrontend(object, holder, name, check);
2661 CompileHandlerBackend(function); 2661 CompileHandlerBackend(function);
2662 2662
2663 // Return the generated code. 2663 // Return the generated code.
2664 return GetCode(function); 2664 return GetCode(function);
2665 } 2665 }
(...skipping 47 matching lines...) Expand 10 before | Expand all | Expand 10 after
2713 ? CALL_AS_FUNCTION 2713 ? CALL_AS_FUNCTION
2714 : CALL_AS_METHOD; 2714 : CALL_AS_METHOD;
2715 __ InvokeFunction(rdi, arguments(), JUMP_FUNCTION, 2715 __ InvokeFunction(rdi, arguments(), JUMP_FUNCTION,
2716 NullCallWrapper(), call_kind); 2716 NullCallWrapper(), call_kind);
2717 2717
2718 // Handle load cache miss. 2718 // Handle load cache miss.
2719 __ bind(&miss); 2719 __ bind(&miss);
2720 GenerateMissBranch(); 2720 GenerateMissBranch();
2721 2721
2722 // Return the generated code. 2722 // Return the generated code.
2723 return GetCode(Code::INTERCEPTOR, name); 2723 return GetCode(Code::FAST, name);
2724 } 2724 }
2725 2725
2726 2726
2727 Handle<Code> CallStubCompiler::CompileCallGlobal( 2727 Handle<Code> CallStubCompiler::CompileCallGlobal(
2728 Handle<JSObject> object, 2728 Handle<JSObject> object,
2729 Handle<GlobalObject> holder, 2729 Handle<GlobalObject> holder,
2730 Handle<PropertyCell> cell, 2730 Handle<PropertyCell> cell,
2731 Handle<JSFunction> function, 2731 Handle<JSFunction> function,
2732 Handle<Name> name) { 2732 Handle<Name> name) {
2733 // ----------- S t a t e ------------- 2733 // ----------- S t a t e -------------
(...skipping 67 matching lines...) Expand 10 before | Expand all | Expand 10 after
2801 __ Push(name); 2801 __ Push(name);
2802 __ push(value()); 2802 __ push(value());
2803 __ PushReturnAddressFrom(scratch1()); 2803 __ PushReturnAddressFrom(scratch1());
2804 2804
2805 // Do tail-call to the runtime system. 2805 // Do tail-call to the runtime system.
2806 ExternalReference store_callback_property = 2806 ExternalReference store_callback_property =
2807 ExternalReference(IC_Utility(IC::kStoreCallbackProperty), isolate()); 2807 ExternalReference(IC_Utility(IC::kStoreCallbackProperty), isolate());
2808 __ TailCallExternalReference(store_callback_property, 4, 1); 2808 __ TailCallExternalReference(store_callback_property, 4, 1);
2809 2809
2810 // Return the generated code. 2810 // Return the generated code.
2811 return GetCode(kind(), Code::CALLBACKS, name); 2811 return GetCode(kind(), Code::FAST, name);
2812 } 2812 }
2813 2813
2814 2814
2815 Handle<Code> StoreStubCompiler::CompileStoreCallback( 2815 Handle<Code> StoreStubCompiler::CompileStoreCallback(
2816 Handle<JSObject> object, 2816 Handle<JSObject> object,
2817 Handle<JSObject> holder, 2817 Handle<JSObject> holder,
2818 Handle<Name> name, 2818 Handle<Name> name,
2819 const CallOptimization& call_optimization) { 2819 const CallOptimization& call_optimization) {
2820 HandlerFrontend(object, receiver(), holder, name); 2820 HandlerFrontend(object, receiver(), holder, name);
2821 2821
2822 Register values[] = { value() }; 2822 Register values[] = { value() };
2823 GenerateFastApiCall( 2823 GenerateFastApiCall(
2824 masm(), call_optimization, receiver(), scratch3(), 1, values); 2824 masm(), call_optimization, receiver(), scratch3(), 1, values);
2825 2825
2826 // Return the generated code. 2826 // Return the generated code.
2827 return GetCode(kind(), Code::CALLBACKS, name); 2827 return GetCode(kind(), Code::FAST, name);
2828 } 2828 }
2829 2829
2830 2830
2831 #undef __ 2831 #undef __
2832 #define __ ACCESS_MASM(masm) 2832 #define __ ACCESS_MASM(masm)
2833 2833
2834 2834
2835 void StoreStubCompiler::GenerateStoreViaSetter( 2835 void StoreStubCompiler::GenerateStoreViaSetter(
2836 MacroAssembler* masm, 2836 MacroAssembler* masm,
2837 Handle<JSFunction> setter) { 2837 Handle<JSFunction> setter) {
(...skipping 46 matching lines...) Expand 10 before | Expand all | Expand 10 after
2884 __ push(value()); 2884 __ push(value());
2885 __ Push(Smi::FromInt(strict_mode())); 2885 __ Push(Smi::FromInt(strict_mode()));
2886 __ PushReturnAddressFrom(scratch1()); 2886 __ PushReturnAddressFrom(scratch1());
2887 2887
2888 // Do tail-call to the runtime system. 2888 // Do tail-call to the runtime system.
2889 ExternalReference store_ic_property = 2889 ExternalReference store_ic_property =
2890 ExternalReference(IC_Utility(IC::kStoreInterceptorProperty), isolate()); 2890 ExternalReference(IC_Utility(IC::kStoreInterceptorProperty), isolate());
2891 __ TailCallExternalReference(store_ic_property, 4, 1); 2891 __ TailCallExternalReference(store_ic_property, 4, 1);
2892 2892
2893 // Return the generated code. 2893 // Return the generated code.
2894 return GetCode(kind(), Code::INTERCEPTOR, name); 2894 return GetCode(kind(), Code::FAST, name);
2895 } 2895 }
2896 2896
2897 2897
2898 Handle<Code> KeyedStoreStubCompiler::CompileStorePolymorphic( 2898 Handle<Code> KeyedStoreStubCompiler::CompileStorePolymorphic(
2899 MapHandleList* receiver_maps, 2899 MapHandleList* receiver_maps,
2900 CodeHandleList* handler_stubs, 2900 CodeHandleList* handler_stubs,
2901 MapHandleList* transitioned_maps) { 2901 MapHandleList* transitioned_maps) {
2902 Label miss; 2902 Label miss;
2903 __ JumpIfSmi(receiver(), &miss, Label::kNear); 2903 __ JumpIfSmi(receiver(), &miss, Label::kNear);
2904 2904
(...skipping 31 matching lines...) Expand 10 before | Expand all | Expand 10 after
2936 Handle<Name> name, 2936 Handle<Name> name,
2937 Handle<JSGlobalObject> global) { 2937 Handle<JSGlobalObject> global) {
2938 NonexistentHandlerFrontend(object, last, name, global); 2938 NonexistentHandlerFrontend(object, last, name, global);
2939 2939
2940 // Return undefined if maps of the full prototype chain are still the 2940 // Return undefined if maps of the full prototype chain are still the
2941 // same and no global property with this name contains a value. 2941 // same and no global property with this name contains a value.
2942 __ LoadRoot(rax, Heap::kUndefinedValueRootIndex); 2942 __ LoadRoot(rax, Heap::kUndefinedValueRootIndex);
2943 __ ret(0); 2943 __ ret(0);
2944 2944
2945 // Return the generated code. 2945 // Return the generated code.
2946 return GetCode(kind(), Code::NONEXISTENT, name); 2946 return GetCode(kind(), Code::FAST, name);
2947 } 2947 }
2948 2948
2949 2949
2950 Register* LoadStubCompiler::registers() { 2950 Register* LoadStubCompiler::registers() {
2951 // receiver, name, scratch1, scratch2, scratch3, scratch4. 2951 // receiver, name, scratch1, scratch2, scratch3, scratch4.
2952 static Register registers[] = { rax, rcx, rdx, rbx, rdi, r8 }; 2952 static Register registers[] = { rax, rcx, rdx, rbx, rdi, r8 };
2953 return registers; 2953 return registers;
2954 } 2954 }
2955 2955
2956 2956
(...skipping 200 matching lines...) Expand 10 before | Expand all | Expand 10 after
3157 // ----------------------------------- 3157 // -----------------------------------
3158 TailCallBuiltin(masm, Builtins::kKeyedLoadIC_Miss); 3158 TailCallBuiltin(masm, Builtins::kKeyedLoadIC_Miss);
3159 } 3159 }
3160 3160
3161 3161
3162 #undef __ 3162 #undef __
3163 3163
3164 } } // namespace v8::internal 3164 } } // namespace v8::internal
3165 3165
3166 #endif // V8_TARGET_ARCH_X64 3166 #endif // V8_TARGET_ARCH_X64
OLDNEW
« no previous file with comments | « src/stub-cache.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698