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

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

Issue 10656018: Separate stub types from property types. (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: Also moving all other bits to the left Created 8 years, 6 months 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/mips/ic-mips.cc ('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 1513 matching lines...) Expand 10 before | Expand all | Expand 10 after
1524 Register reg = CheckPrototypes(object, a0, holder, a1, a3, t0, name, &miss); 1524 Register reg = CheckPrototypes(object, a0, holder, a1, a3, t0, name, &miss);
1525 GenerateFastPropertyLoad(masm(), a1, reg, holder, index); 1525 GenerateFastPropertyLoad(masm(), a1, reg, holder, index);
1526 1526
1527 GenerateCallFunction(masm(), object, arguments(), &miss, extra_state_); 1527 GenerateCallFunction(masm(), object, arguments(), &miss, extra_state_);
1528 1528
1529 // Handle call cache miss. 1529 // Handle call cache miss.
1530 __ bind(&miss); 1530 __ bind(&miss);
1531 GenerateMissBranch(); 1531 GenerateMissBranch();
1532 1532
1533 // Return the generated code. 1533 // Return the generated code.
1534 return GetCode(FIELD, name); 1534 return GetCode(Code::FIELD, name);
1535 } 1535 }
1536 1536
1537 1537
1538 Handle<Code> CallStubCompiler::CompileArrayPushCall( 1538 Handle<Code> CallStubCompiler::CompileArrayPushCall(
1539 Handle<Object> object, 1539 Handle<Object> object,
1540 Handle<JSObject> holder, 1540 Handle<JSObject> holder,
1541 Handle<JSGlobalPropertyCell> cell, 1541 Handle<JSGlobalPropertyCell> cell,
1542 Handle<JSFunction> function, 1542 Handle<JSFunction> function,
1543 Handle<String> name) { 1543 Handle<String> name) {
1544 // ----------- S t a t e ------------- 1544 // ----------- S t a t e -------------
(...skipping 526 matching lines...) Expand 10 before | Expand all | Expand 10 after
2071 // because the function makes no use of it. 2071 // because the function makes no use of it.
2072 __ bind(&slow); 2072 __ bind(&slow);
2073 __ InvokeFunction( 2073 __ InvokeFunction(
2074 function, arguments(), JUMP_FUNCTION, NullCallWrapper(), CALL_AS_METHOD); 2074 function, arguments(), JUMP_FUNCTION, NullCallWrapper(), CALL_AS_METHOD);
2075 2075
2076 __ bind(&miss); 2076 __ bind(&miss);
2077 // a2: function name. 2077 // a2: function name.
2078 GenerateMissBranch(); 2078 GenerateMissBranch();
2079 2079
2080 // Return the generated code. 2080 // Return the generated code.
2081 return cell.is_null() ? GetCode(function) : GetCode(NORMAL, name); 2081 return cell.is_null() ? GetCode(function) : GetCode(Code::NORMAL, name);
2082 } 2082 }
2083 2083
2084 2084
2085 Handle<Code> CallStubCompiler::CompileMathFloorCall( 2085 Handle<Code> CallStubCompiler::CompileMathFloorCall(
2086 Handle<Object> object, 2086 Handle<Object> object,
2087 Handle<JSObject> holder, 2087 Handle<JSObject> holder,
2088 Handle<JSGlobalPropertyCell> cell, 2088 Handle<JSGlobalPropertyCell> cell,
2089 Handle<JSFunction> function, 2089 Handle<JSFunction> function,
2090 Handle<String> name) { 2090 Handle<String> name) {
2091 // ----------- S t a t e ------------- 2091 // ----------- S t a t e -------------
(...skipping 113 matching lines...) Expand 10 before | Expand all | Expand 10 after
2205 // Tail call the full function. We do not have to patch the receiver 2205 // Tail call the full function. We do not have to patch the receiver
2206 // because the function makes no use of it. 2206 // because the function makes no use of it.
2207 __ InvokeFunction( 2207 __ InvokeFunction(
2208 function, arguments(), JUMP_FUNCTION, NullCallWrapper(), CALL_AS_METHOD); 2208 function, arguments(), JUMP_FUNCTION, NullCallWrapper(), CALL_AS_METHOD);
2209 2209
2210 __ bind(&miss); 2210 __ bind(&miss);
2211 // a2: function name. 2211 // a2: function name.
2212 GenerateMissBranch(); 2212 GenerateMissBranch();
2213 2213
2214 // Return the generated code. 2214 // Return the generated code.
2215 return cell.is_null() ? GetCode(function) : GetCode(NORMAL, name); 2215 return cell.is_null() ? GetCode(function) : GetCode(Code::NORMAL, name);
2216 } 2216 }
2217 2217
2218 2218
2219 Handle<Code> CallStubCompiler::CompileMathAbsCall( 2219 Handle<Code> CallStubCompiler::CompileMathAbsCall(
2220 Handle<Object> object, 2220 Handle<Object> object,
2221 Handle<JSObject> holder, 2221 Handle<JSObject> holder,
2222 Handle<JSGlobalPropertyCell> cell, 2222 Handle<JSGlobalPropertyCell> cell,
2223 Handle<JSFunction> function, 2223 Handle<JSFunction> function,
2224 Handle<String> name) { 2224 Handle<String> name) {
2225 // ----------- S t a t e ------------- 2225 // ----------- S t a t e -------------
(...skipping 80 matching lines...) Expand 10 before | Expand all | Expand 10 after
2306 // because the function makes no use of it. 2306 // because the function makes no use of it.
2307 __ bind(&slow); 2307 __ bind(&slow);
2308 __ InvokeFunction( 2308 __ InvokeFunction(
2309 function, arguments(), JUMP_FUNCTION, NullCallWrapper(), CALL_AS_METHOD); 2309 function, arguments(), JUMP_FUNCTION, NullCallWrapper(), CALL_AS_METHOD);
2310 2310
2311 __ bind(&miss); 2311 __ bind(&miss);
2312 // a2: function name. 2312 // a2: function name.
2313 GenerateMissBranch(); 2313 GenerateMissBranch();
2314 2314
2315 // Return the generated code. 2315 // Return the generated code.
2316 return cell.is_null() ? GetCode(function) : GetCode(NORMAL, name); 2316 return cell.is_null() ? GetCode(function) : GetCode(Code::NORMAL, name);
2317 } 2317 }
2318 2318
2319 2319
2320 Handle<Code> CallStubCompiler::CompileFastApiCall( 2320 Handle<Code> CallStubCompiler::CompileFastApiCall(
2321 const CallOptimization& optimization, 2321 const CallOptimization& optimization,
2322 Handle<Object> object, 2322 Handle<Object> object,
2323 Handle<JSObject> holder, 2323 Handle<JSObject> holder,
2324 Handle<JSGlobalPropertyCell> cell, 2324 Handle<JSGlobalPropertyCell> cell,
2325 Handle<JSFunction> function, 2325 Handle<JSFunction> function,
2326 Handle<String> name) { 2326 Handle<String> name) {
(...skipping 200 matching lines...) Expand 10 before | Expand all | Expand 10 after
2527 // Restore receiver. 2527 // Restore receiver.
2528 __ lw(a0, MemOperand(sp, argc * kPointerSize)); 2528 __ lw(a0, MemOperand(sp, argc * kPointerSize));
2529 2529
2530 GenerateCallFunction(masm(), object, arguments(), &miss, extra_state_); 2530 GenerateCallFunction(masm(), object, arguments(), &miss, extra_state_);
2531 2531
2532 // Handle call cache miss. 2532 // Handle call cache miss.
2533 __ bind(&miss); 2533 __ bind(&miss);
2534 GenerateMissBranch(); 2534 GenerateMissBranch();
2535 2535
2536 // Return the generated code. 2536 // Return the generated code.
2537 return GetCode(INTERCEPTOR, name); 2537 return GetCode(Code::INTERCEPTOR, name);
2538 } 2538 }
2539 2539
2540 2540
2541 Handle<Code> CallStubCompiler::CompileCallGlobal( 2541 Handle<Code> CallStubCompiler::CompileCallGlobal(
2542 Handle<JSObject> object, 2542 Handle<JSObject> object,
2543 Handle<GlobalObject> holder, 2543 Handle<GlobalObject> holder,
2544 Handle<JSGlobalPropertyCell> cell, 2544 Handle<JSGlobalPropertyCell> cell,
2545 Handle<JSFunction> function, 2545 Handle<JSFunction> function,
2546 Handle<String> name) { 2546 Handle<String> name) {
2547 // ----------- S t a t e ------------- 2547 // ----------- S t a t e -------------
(...skipping 38 matching lines...) Expand 10 before | Expand all | Expand 10 after
2586 __ lw(a3, FieldMemOperand(a1, JSFunction::kCodeEntryOffset)); 2586 __ lw(a3, FieldMemOperand(a1, JSFunction::kCodeEntryOffset));
2587 __ InvokeCode(a3, expected, arguments(), JUMP_FUNCTION, 2587 __ InvokeCode(a3, expected, arguments(), JUMP_FUNCTION,
2588 NullCallWrapper(), call_kind); 2588 NullCallWrapper(), call_kind);
2589 2589
2590 // Handle call cache miss. 2590 // Handle call cache miss.
2591 __ bind(&miss); 2591 __ bind(&miss);
2592 __ IncrementCounter(counters->call_global_inline_miss(), 1, a1, a3); 2592 __ IncrementCounter(counters->call_global_inline_miss(), 1, a1, a3);
2593 GenerateMissBranch(); 2593 GenerateMissBranch();
2594 2594
2595 // Return the generated code. 2595 // Return the generated code.
2596 return GetCode(NORMAL, name); 2596 return GetCode(Code::NORMAL, name);
2597 } 2597 }
2598 2598
2599 2599
2600 Handle<Code> StoreStubCompiler::CompileStoreField(Handle<JSObject> object, 2600 Handle<Code> StoreStubCompiler::CompileStoreField(Handle<JSObject> object,
2601 int index, 2601 int index,
2602 Handle<Map> transition, 2602 Handle<Map> transition,
2603 Handle<String> name) { 2603 Handle<String> name) {
2604 // ----------- S t a t e ------------- 2604 // ----------- S t a t e -------------
2605 // -- a0 : value 2605 // -- a0 : value
2606 // -- a1 : receiver 2606 // -- a1 : receiver
2607 // -- a2 : name 2607 // -- a2 : name
2608 // -- ra : return address 2608 // -- ra : return address
2609 // ----------------------------------- 2609 // -----------------------------------
2610 Label miss; 2610 Label miss;
2611 2611
2612 // Name register might be clobbered. 2612 // Name register might be clobbered.
2613 GenerateStoreField(masm(), 2613 GenerateStoreField(masm(),
2614 object, 2614 object,
2615 index, 2615 index,
2616 transition, 2616 transition,
2617 name, 2617 name,
2618 a1, a2, a3, t0, 2618 a1, a2, a3, t0,
2619 &miss); 2619 &miss);
2620 __ bind(&miss); 2620 __ bind(&miss);
2621 __ li(a2, Operand(Handle<String>(name))); // Restore name. 2621 __ li(a2, Operand(Handle<String>(name))); // Restore name.
2622 Handle<Code> ic = masm()->isolate()->builtins()->Builtins::StoreIC_Miss(); 2622 Handle<Code> ic = masm()->isolate()->builtins()->Builtins::StoreIC_Miss();
2623 __ Jump(ic, RelocInfo::CODE_TARGET); 2623 __ Jump(ic, RelocInfo::CODE_TARGET);
2624 2624
2625 // Return the generated code. 2625 // Return the generated code.
2626 return GetCode(transition.is_null() ? FIELD : MAP_TRANSITION, name); 2626 return GetCode(transition.is_null()
2627 ? Code::FIELD
2628 : Code::MAP_TRANSITION, name);
2627 } 2629 }
2628 2630
2629 2631
2630 Handle<Code> StoreStubCompiler::CompileStoreCallback( 2632 Handle<Code> StoreStubCompiler::CompileStoreCallback(
2631 Handle<JSObject> object, 2633 Handle<JSObject> object,
2632 Handle<AccessorInfo> callback, 2634 Handle<AccessorInfo> callback,
2633 Handle<String> name) { 2635 Handle<String> name) {
2634 // ----------- S t a t e ------------- 2636 // ----------- S t a t e -------------
2635 // -- a0 : value 2637 // -- a0 : value
2636 // -- a1 : receiver 2638 // -- a1 : receiver
(...skipping 24 matching lines...) Expand all
2661 ExternalReference(IC_Utility(IC::kStoreCallbackProperty), 2663 ExternalReference(IC_Utility(IC::kStoreCallbackProperty),
2662 masm()->isolate()); 2664 masm()->isolate());
2663 __ TailCallExternalReference(store_callback_property, 4, 1); 2665 __ TailCallExternalReference(store_callback_property, 4, 1);
2664 2666
2665 // Handle store cache miss. 2667 // Handle store cache miss.
2666 __ bind(&miss); 2668 __ bind(&miss);
2667 Handle<Code> ic = masm()->isolate()->builtins()->StoreIC_Miss(); 2669 Handle<Code> ic = masm()->isolate()->builtins()->StoreIC_Miss();
2668 __ Jump(ic, RelocInfo::CODE_TARGET); 2670 __ Jump(ic, RelocInfo::CODE_TARGET);
2669 2671
2670 // Return the generated code. 2672 // Return the generated code.
2671 return GetCode(CALLBACKS, name); 2673 return GetCode(Code::CALLBACKS, name);
2672 } 2674 }
2673 2675
2674 2676
2675 Handle<Code> StoreStubCompiler::CompileStoreViaSetter( 2677 Handle<Code> StoreStubCompiler::CompileStoreViaSetter(
2676 Handle<JSObject> receiver, 2678 Handle<JSObject> receiver,
2677 Handle<JSFunction> setter, 2679 Handle<JSFunction> setter,
2678 Handle<String> name) { 2680 Handle<String> name) {
2679 // ----------- S t a t e ------------- 2681 // ----------- S t a t e -------------
2680 // -- a0 : value 2682 // -- a0 : value
2681 // -- a1 : receiver 2683 // -- a1 : receiver
(...skipping 25 matching lines...) Expand all
2707 // Restore context register. 2709 // Restore context register.
2708 __ lw(cp, MemOperand(fp, StandardFrameConstants::kContextOffset)); 2710 __ lw(cp, MemOperand(fp, StandardFrameConstants::kContextOffset));
2709 } 2711 }
2710 __ Ret(); 2712 __ Ret();
2711 2713
2712 __ bind(&miss); 2714 __ bind(&miss);
2713 Handle<Code> ic = masm()->isolate()->builtins()->StoreIC_Miss(); 2715 Handle<Code> ic = masm()->isolate()->builtins()->StoreIC_Miss();
2714 __ Jump(ic, RelocInfo::CODE_TARGET); 2716 __ Jump(ic, RelocInfo::CODE_TARGET);
2715 2717
2716 // Return the generated code. 2718 // Return the generated code.
2717 return GetCode(CALLBACKS, name); 2719 return GetCode(Code::CALLBACKS, name);
2718 } 2720 }
2719 2721
2720 2722
2721 Handle<Code> StoreStubCompiler::CompileStoreInterceptor( 2723 Handle<Code> StoreStubCompiler::CompileStoreInterceptor(
2722 Handle<JSObject> receiver, 2724 Handle<JSObject> receiver,
2723 Handle<String> name) { 2725 Handle<String> name) {
2724 // ----------- S t a t e ------------- 2726 // ----------- S t a t e -------------
2725 // -- a0 : value 2727 // -- a0 : value
2726 // -- a1 : receiver 2728 // -- a1 : receiver
2727 // -- a2 : name 2729 // -- a2 : name
(...skipping 24 matching lines...) Expand all
2752 ExternalReference(IC_Utility(IC::kStoreInterceptorProperty), 2754 ExternalReference(IC_Utility(IC::kStoreInterceptorProperty),
2753 masm()->isolate()); 2755 masm()->isolate());
2754 __ TailCallExternalReference(store_ic_property, 4, 1); 2756 __ TailCallExternalReference(store_ic_property, 4, 1);
2755 2757
2756 // Handle store cache miss. 2758 // Handle store cache miss.
2757 __ bind(&miss); 2759 __ bind(&miss);
2758 Handle<Code> ic = masm()->isolate()->builtins()->Builtins::StoreIC_Miss(); 2760 Handle<Code> ic = masm()->isolate()->builtins()->Builtins::StoreIC_Miss();
2759 __ Jump(ic, RelocInfo::CODE_TARGET); 2761 __ Jump(ic, RelocInfo::CODE_TARGET);
2760 2762
2761 // Return the generated code. 2763 // Return the generated code.
2762 return GetCode(INTERCEPTOR, name); 2764 return GetCode(Code::INTERCEPTOR, name);
2763 } 2765 }
2764 2766
2765 2767
2766 Handle<Code> StoreStubCompiler::CompileStoreGlobal( 2768 Handle<Code> StoreStubCompiler::CompileStoreGlobal(
2767 Handle<GlobalObject> object, 2769 Handle<GlobalObject> object,
2768 Handle<JSGlobalPropertyCell> cell, 2770 Handle<JSGlobalPropertyCell> cell,
2769 Handle<String> name) { 2771 Handle<String> name) {
2770 // ----------- S t a t e ------------- 2772 // ----------- S t a t e -------------
2771 // -- a0 : value 2773 // -- a0 : value
2772 // -- a1 : receiver 2774 // -- a1 : receiver
(...skipping 24 matching lines...) Expand all
2797 __ IncrementCounter(counters->named_store_global_inline(), 1, a1, a3); 2799 __ IncrementCounter(counters->named_store_global_inline(), 1, a1, a3);
2798 __ Ret(); 2800 __ Ret();
2799 2801
2800 // Handle store cache miss. 2802 // Handle store cache miss.
2801 __ bind(&miss); 2803 __ bind(&miss);
2802 __ IncrementCounter(counters->named_store_global_inline_miss(), 1, a1, a3); 2804 __ IncrementCounter(counters->named_store_global_inline_miss(), 1, a1, a3);
2803 Handle<Code> ic = masm()->isolate()->builtins()->StoreIC_Miss(); 2805 Handle<Code> ic = masm()->isolate()->builtins()->StoreIC_Miss();
2804 __ Jump(ic, RelocInfo::CODE_TARGET); 2806 __ Jump(ic, RelocInfo::CODE_TARGET);
2805 2807
2806 // Return the generated code. 2808 // Return the generated code.
2807 return GetCode(NORMAL, name); 2809 return GetCode(Code::NORMAL, name);
2808 } 2810 }
2809 2811
2810 2812
2811 Handle<Code> LoadStubCompiler::CompileLoadNonexistent(Handle<String> name, 2813 Handle<Code> LoadStubCompiler::CompileLoadNonexistent(Handle<String> name,
2812 Handle<JSObject> object, 2814 Handle<JSObject> object,
2813 Handle<JSObject> last) { 2815 Handle<JSObject> last) {
2814 // ----------- S t a t e ------------- 2816 // ----------- S t a t e -------------
2815 // -- a0 : receiver 2817 // -- a0 : receiver
2816 // -- ra : return address 2818 // -- ra : return address
2817 // ----------------------------------- 2819 // -----------------------------------
(...skipping 13 matching lines...) Expand all
2831 } 2833 }
2832 2834
2833 // Return undefined if maps of the full prototype chain is still the same. 2835 // Return undefined if maps of the full prototype chain is still the same.
2834 __ LoadRoot(v0, Heap::kUndefinedValueRootIndex); 2836 __ LoadRoot(v0, Heap::kUndefinedValueRootIndex);
2835 __ Ret(); 2837 __ Ret();
2836 2838
2837 __ bind(&miss); 2839 __ bind(&miss);
2838 GenerateLoadMiss(masm(), Code::LOAD_IC); 2840 GenerateLoadMiss(masm(), Code::LOAD_IC);
2839 2841
2840 // Return the generated code. 2842 // Return the generated code.
2841 return GetCode(NONEXISTENT, factory()->empty_string()); 2843 return GetCode(Code::NONEXISTENT, factory()->empty_string());
2842 } 2844 }
2843 2845
2844 2846
2845 Handle<Code> LoadStubCompiler::CompileLoadField(Handle<JSObject> object, 2847 Handle<Code> LoadStubCompiler::CompileLoadField(Handle<JSObject> object,
2846 Handle<JSObject> holder, 2848 Handle<JSObject> holder,
2847 int index, 2849 int index,
2848 Handle<String> name) { 2850 Handle<String> name) {
2849 // ----------- S t a t e ------------- 2851 // ----------- S t a t e -------------
2850 // -- a0 : receiver 2852 // -- a0 : receiver
2851 // -- a2 : name 2853 // -- a2 : name
2852 // -- ra : return address 2854 // -- ra : return address
2853 // ----------------------------------- 2855 // -----------------------------------
2854 Label miss; 2856 Label miss;
2855 2857
2856 __ mov(v0, a0); 2858 __ mov(v0, a0);
2857 2859
2858 GenerateLoadField(object, holder, v0, a3, a1, t0, index, name, &miss); 2860 GenerateLoadField(object, holder, v0, a3, a1, t0, index, name, &miss);
2859 __ bind(&miss); 2861 __ bind(&miss);
2860 GenerateLoadMiss(masm(), Code::LOAD_IC); 2862 GenerateLoadMiss(masm(), Code::LOAD_IC);
2861 2863
2862 // Return the generated code. 2864 // Return the generated code.
2863 return GetCode(FIELD, name); 2865 return GetCode(Code::FIELD, name);
2864 } 2866 }
2865 2867
2866 2868
2867 Handle<Code> LoadStubCompiler::CompileLoadCallback( 2869 Handle<Code> LoadStubCompiler::CompileLoadCallback(
2868 Handle<String> name, 2870 Handle<String> name,
2869 Handle<JSObject> object, 2871 Handle<JSObject> object,
2870 Handle<JSObject> holder, 2872 Handle<JSObject> holder,
2871 Handle<AccessorInfo> callback) { 2873 Handle<AccessorInfo> callback) {
2872 // ----------- S t a t e ------------- 2874 // ----------- S t a t e -------------
2873 // -- a0 : receiver 2875 // -- a0 : receiver
2874 // -- a2 : name 2876 // -- a2 : name
2875 // -- ra : return address 2877 // -- ra : return address
2876 // ----------------------------------- 2878 // -----------------------------------
2877 Label miss; 2879 Label miss;
2878 GenerateLoadCallback(object, holder, a0, a2, a3, a1, t0, callback, name, 2880 GenerateLoadCallback(object, holder, a0, a2, a3, a1, t0, callback, name,
2879 &miss); 2881 &miss);
2880 __ bind(&miss); 2882 __ bind(&miss);
2881 GenerateLoadMiss(masm(), Code::LOAD_IC); 2883 GenerateLoadMiss(masm(), Code::LOAD_IC);
2882 2884
2883 // Return the generated code. 2885 // Return the generated code.
2884 return GetCode(CALLBACKS, name); 2886 return GetCode(Code::CALLBACKS, name);
2885 } 2887 }
2886 2888
2887 2889
2888 Handle<Code> LoadStubCompiler::CompileLoadViaGetter( 2890 Handle<Code> LoadStubCompiler::CompileLoadViaGetter(
2889 Handle<String> name, 2891 Handle<String> name,
2890 Handle<JSObject> receiver, 2892 Handle<JSObject> receiver,
2891 Handle<JSObject> holder, 2893 Handle<JSObject> holder,
2892 Handle<JSFunction> getter) { 2894 Handle<JSFunction> getter) {
2893 // ----------- S t a t e ------------- 2895 // ----------- S t a t e -------------
2894 // -- a0 : receiver 2896 // -- a0 : receiver
(...skipping 17 matching lines...) Expand all
2912 2914
2913 // Restore context register. 2915 // Restore context register.
2914 __ lw(cp, MemOperand(fp, StandardFrameConstants::kContextOffset)); 2916 __ lw(cp, MemOperand(fp, StandardFrameConstants::kContextOffset));
2915 } 2917 }
2916 __ Ret(); 2918 __ Ret();
2917 2919
2918 __ bind(&miss); 2920 __ bind(&miss);
2919 GenerateLoadMiss(masm(), Code::LOAD_IC); 2921 GenerateLoadMiss(masm(), Code::LOAD_IC);
2920 2922
2921 // Return the generated code. 2923 // Return the generated code.
2922 return GetCode(CALLBACKS, name); 2924 return GetCode(Code::CALLBACKS, name);
2923 } 2925 }
2924 2926
2925 2927
2926 Handle<Code> LoadStubCompiler::CompileLoadConstant(Handle<JSObject> object, 2928 Handle<Code> LoadStubCompiler::CompileLoadConstant(Handle<JSObject> object,
2927 Handle<JSObject> holder, 2929 Handle<JSObject> holder,
2928 Handle<JSFunction> value, 2930 Handle<JSFunction> value,
2929 Handle<String> name) { 2931 Handle<String> name) {
2930 // ----------- S t a t e ------------- 2932 // ----------- S t a t e -------------
2931 // -- a0 : receiver 2933 // -- a0 : receiver
2932 // -- a2 : name 2934 // -- a2 : name
2933 // -- ra : return address 2935 // -- ra : return address
2934 // ----------------------------------- 2936 // -----------------------------------
2935 Label miss; 2937 Label miss;
2936 2938
2937 GenerateLoadConstant(object, holder, a0, a3, a1, t0, value, name, &miss); 2939 GenerateLoadConstant(object, holder, a0, a3, a1, t0, value, name, &miss);
2938 __ bind(&miss); 2940 __ bind(&miss);
2939 GenerateLoadMiss(masm(), Code::LOAD_IC); 2941 GenerateLoadMiss(masm(), Code::LOAD_IC);
2940 2942
2941 // Return the generated code. 2943 // Return the generated code.
2942 return GetCode(CONSTANT_FUNCTION, name); 2944 return GetCode(Code::CONSTANT_FUNCTION, name);
2943 } 2945 }
2944 2946
2945 2947
2946 Handle<Code> LoadStubCompiler::CompileLoadInterceptor(Handle<JSObject> object, 2948 Handle<Code> LoadStubCompiler::CompileLoadInterceptor(Handle<JSObject> object,
2947 Handle<JSObject> holder, 2949 Handle<JSObject> holder,
2948 Handle<String> name) { 2950 Handle<String> name) {
2949 // ----------- S t a t e ------------- 2951 // ----------- S t a t e -------------
2950 // -- a0 : receiver 2952 // -- a0 : receiver
2951 // -- a2 : name 2953 // -- a2 : name
2952 // -- ra : return address 2954 // -- ra : return address
2953 // -- [sp] : receiver 2955 // -- [sp] : receiver
2954 // ----------------------------------- 2956 // -----------------------------------
2955 Label miss; 2957 Label miss;
2956 2958
2957 LookupResult lookup(isolate()); 2959 LookupResult lookup(isolate());
2958 LookupPostInterceptor(holder, name, &lookup); 2960 LookupPostInterceptor(holder, name, &lookup);
2959 GenerateLoadInterceptor(object, holder, &lookup, a0, a2, a3, a1, t0, name, 2961 GenerateLoadInterceptor(object, holder, &lookup, a0, a2, a3, a1, t0, name,
2960 &miss); 2962 &miss);
2961 __ bind(&miss); 2963 __ bind(&miss);
2962 GenerateLoadMiss(masm(), Code::LOAD_IC); 2964 GenerateLoadMiss(masm(), Code::LOAD_IC);
2963 2965
2964 // Return the generated code. 2966 // Return the generated code.
2965 return GetCode(INTERCEPTOR, name); 2967 return GetCode(Code::INTERCEPTOR, name);
2966 } 2968 }
2967 2969
2968 2970
2969 Handle<Code> LoadStubCompiler::CompileLoadGlobal( 2971 Handle<Code> LoadStubCompiler::CompileLoadGlobal(
2970 Handle<JSObject> object, 2972 Handle<JSObject> object,
2971 Handle<GlobalObject> holder, 2973 Handle<GlobalObject> holder,
2972 Handle<JSGlobalPropertyCell> cell, 2974 Handle<JSGlobalPropertyCell> cell,
2973 Handle<String> name, 2975 Handle<String> name,
2974 bool is_dont_delete) { 2976 bool is_dont_delete) {
2975 // ----------- S t a t e ------------- 2977 // ----------- S t a t e -------------
(...skipping 20 matching lines...) Expand all
2996 __ mov(v0, t0); 2998 __ mov(v0, t0);
2997 Counters* counters = masm()->isolate()->counters(); 2999 Counters* counters = masm()->isolate()->counters();
2998 __ IncrementCounter(counters->named_load_global_stub(), 1, a1, a3); 3000 __ IncrementCounter(counters->named_load_global_stub(), 1, a1, a3);
2999 __ Ret(); 3001 __ Ret();
3000 3002
3001 __ bind(&miss); 3003 __ bind(&miss);
3002 __ IncrementCounter(counters->named_load_global_stub_miss(), 1, a1, a3); 3004 __ IncrementCounter(counters->named_load_global_stub_miss(), 1, a1, a3);
3003 GenerateLoadMiss(masm(), Code::LOAD_IC); 3005 GenerateLoadMiss(masm(), Code::LOAD_IC);
3004 3006
3005 // Return the generated code. 3007 // Return the generated code.
3006 return GetCode(NORMAL, name); 3008 return GetCode(Code::NORMAL, name);
3007 } 3009 }
3008 3010
3009 3011
3010 Handle<Code> KeyedLoadStubCompiler::CompileLoadField(Handle<String> name, 3012 Handle<Code> KeyedLoadStubCompiler::CompileLoadField(Handle<String> name,
3011 Handle<JSObject> receiver, 3013 Handle<JSObject> receiver,
3012 Handle<JSObject> holder, 3014 Handle<JSObject> holder,
3013 int index) { 3015 int index) {
3014 // ----------- S t a t e ------------- 3016 // ----------- S t a t e -------------
3015 // -- ra : return address 3017 // -- ra : return address
3016 // -- a0 : key 3018 // -- a0 : key
3017 // -- a1 : receiver 3019 // -- a1 : receiver
3018 // ----------------------------------- 3020 // -----------------------------------
3019 Label miss; 3021 Label miss;
3020 3022
3021 // Check the key is the cached one. 3023 // Check the key is the cached one.
3022 __ Branch(&miss, ne, a0, Operand(name)); 3024 __ Branch(&miss, ne, a0, Operand(name));
3023 3025
3024 GenerateLoadField(receiver, holder, a1, a2, a3, t0, index, name, &miss); 3026 GenerateLoadField(receiver, holder, a1, a2, a3, t0, index, name, &miss);
3025 __ bind(&miss); 3027 __ bind(&miss);
3026 GenerateLoadMiss(masm(), Code::KEYED_LOAD_IC); 3028 GenerateLoadMiss(masm(), Code::KEYED_LOAD_IC);
3027 3029
3028 return GetCode(FIELD, name); 3030 return GetCode(Code::FIELD, name);
3029 } 3031 }
3030 3032
3031 3033
3032 Handle<Code> KeyedLoadStubCompiler::CompileLoadCallback( 3034 Handle<Code> KeyedLoadStubCompiler::CompileLoadCallback(
3033 Handle<String> name, 3035 Handle<String> name,
3034 Handle<JSObject> receiver, 3036 Handle<JSObject> receiver,
3035 Handle<JSObject> holder, 3037 Handle<JSObject> holder,
3036 Handle<AccessorInfo> callback) { 3038 Handle<AccessorInfo> callback) {
3037 // ----------- S t a t e ------------- 3039 // ----------- S t a t e -------------
3038 // -- ra : return address 3040 // -- ra : return address
3039 // -- a0 : key 3041 // -- a0 : key
3040 // -- a1 : receiver 3042 // -- a1 : receiver
3041 // ----------------------------------- 3043 // -----------------------------------
3042 Label miss; 3044 Label miss;
3043 3045
3044 // Check the key is the cached one. 3046 // Check the key is the cached one.
3045 __ Branch(&miss, ne, a0, Operand(name)); 3047 __ Branch(&miss, ne, a0, Operand(name));
3046 3048
3047 GenerateLoadCallback(receiver, holder, a1, a0, a2, a3, t0, callback, name, 3049 GenerateLoadCallback(receiver, holder, a1, a0, a2, a3, t0, callback, name,
3048 &miss); 3050 &miss);
3049 __ bind(&miss); 3051 __ bind(&miss);
3050 GenerateLoadMiss(masm(), Code::KEYED_LOAD_IC); 3052 GenerateLoadMiss(masm(), Code::KEYED_LOAD_IC);
3051 3053
3052 return GetCode(CALLBACKS, name); 3054 return GetCode(Code::CALLBACKS, name);
3053 } 3055 }
3054 3056
3055 3057
3056 Handle<Code> KeyedLoadStubCompiler::CompileLoadConstant( 3058 Handle<Code> KeyedLoadStubCompiler::CompileLoadConstant(
3057 Handle<String> name, 3059 Handle<String> name,
3058 Handle<JSObject> receiver, 3060 Handle<JSObject> receiver,
3059 Handle<JSObject> holder, 3061 Handle<JSObject> holder,
3060 Handle<JSFunction> value) { 3062 Handle<JSFunction> value) {
3061 // ----------- S t a t e ------------- 3063 // ----------- S t a t e -------------
3062 // -- ra : return address 3064 // -- ra : return address
3063 // -- a0 : key 3065 // -- a0 : key
3064 // -- a1 : receiver 3066 // -- a1 : receiver
3065 // ----------------------------------- 3067 // -----------------------------------
3066 Label miss; 3068 Label miss;
3067 3069
3068 // Check the key is the cached one. 3070 // Check the key is the cached one.
3069 __ Branch(&miss, ne, a0, Operand(name)); 3071 __ Branch(&miss, ne, a0, Operand(name));
3070 3072
3071 GenerateLoadConstant(receiver, holder, a1, a2, a3, t0, value, name, &miss); 3073 GenerateLoadConstant(receiver, holder, a1, a2, a3, t0, value, name, &miss);
3072 __ bind(&miss); 3074 __ bind(&miss);
3073 GenerateLoadMiss(masm(), Code::KEYED_LOAD_IC); 3075 GenerateLoadMiss(masm(), Code::KEYED_LOAD_IC);
3074 3076
3075 // Return the generated code. 3077 // Return the generated code.
3076 return GetCode(CONSTANT_FUNCTION, name); 3078 return GetCode(Code::CONSTANT_FUNCTION, name);
3077 } 3079 }
3078 3080
3079 3081
3080 Handle<Code> KeyedLoadStubCompiler::CompileLoadInterceptor( 3082 Handle<Code> KeyedLoadStubCompiler::CompileLoadInterceptor(
3081 Handle<JSObject> receiver, 3083 Handle<JSObject> receiver,
3082 Handle<JSObject> holder, 3084 Handle<JSObject> holder,
3083 Handle<String> name) { 3085 Handle<String> name) {
3084 // ----------- S t a t e ------------- 3086 // ----------- S t a t e -------------
3085 // -- ra : return address 3087 // -- ra : return address
3086 // -- a0 : key 3088 // -- a0 : key
3087 // -- a1 : receiver 3089 // -- a1 : receiver
3088 // ----------------------------------- 3090 // -----------------------------------
3089 Label miss; 3091 Label miss;
3090 3092
3091 // Check the key is the cached one. 3093 // Check the key is the cached one.
3092 __ Branch(&miss, ne, a0, Operand(name)); 3094 __ Branch(&miss, ne, a0, Operand(name));
3093 3095
3094 LookupResult lookup(isolate()); 3096 LookupResult lookup(isolate());
3095 LookupPostInterceptor(holder, name, &lookup); 3097 LookupPostInterceptor(holder, name, &lookup);
3096 GenerateLoadInterceptor(receiver, holder, &lookup, a1, a0, a2, a3, t0, name, 3098 GenerateLoadInterceptor(receiver, holder, &lookup, a1, a0, a2, a3, t0, name,
3097 &miss); 3099 &miss);
3098 __ bind(&miss); 3100 __ bind(&miss);
3099 GenerateLoadMiss(masm(), Code::KEYED_LOAD_IC); 3101 GenerateLoadMiss(masm(), Code::KEYED_LOAD_IC);
3100 3102
3101 return GetCode(INTERCEPTOR, name); 3103 return GetCode(Code::INTERCEPTOR, name);
3102 } 3104 }
3103 3105
3104 3106
3105 Handle<Code> KeyedLoadStubCompiler::CompileLoadArrayLength( 3107 Handle<Code> KeyedLoadStubCompiler::CompileLoadArrayLength(
3106 Handle<String> name) { 3108 Handle<String> name) {
3107 // ----------- S t a t e ------------- 3109 // ----------- S t a t e -------------
3108 // -- ra : return address 3110 // -- ra : return address
3109 // -- a0 : key 3111 // -- a0 : key
3110 // -- a1 : receiver 3112 // -- a1 : receiver
3111 // ----------------------------------- 3113 // -----------------------------------
3112 Label miss; 3114 Label miss;
3113 3115
3114 // Check the key is the cached one. 3116 // Check the key is the cached one.
3115 __ Branch(&miss, ne, a0, Operand(name)); 3117 __ Branch(&miss, ne, a0, Operand(name));
3116 3118
3117 GenerateLoadArrayLength(masm(), a1, a2, &miss); 3119 GenerateLoadArrayLength(masm(), a1, a2, &miss);
3118 __ bind(&miss); 3120 __ bind(&miss);
3119 GenerateLoadMiss(masm(), Code::KEYED_LOAD_IC); 3121 GenerateLoadMiss(masm(), Code::KEYED_LOAD_IC);
3120 3122
3121 return GetCode(CALLBACKS, name); 3123 return GetCode(Code::CALLBACKS, name);
3122 } 3124 }
3123 3125
3124 3126
3125 Handle<Code> KeyedLoadStubCompiler::CompileLoadStringLength( 3127 Handle<Code> KeyedLoadStubCompiler::CompileLoadStringLength(
3126 Handle<String> name) { 3128 Handle<String> name) {
3127 // ----------- S t a t e ------------- 3129 // ----------- S t a t e -------------
3128 // -- ra : return address 3130 // -- ra : return address
3129 // -- a0 : key 3131 // -- a0 : key
3130 // -- a1 : receiver 3132 // -- a1 : receiver
3131 // ----------------------------------- 3133 // -----------------------------------
3132 Label miss; 3134 Label miss;
3133 3135
3134 Counters* counters = masm()->isolate()->counters(); 3136 Counters* counters = masm()->isolate()->counters();
3135 __ IncrementCounter(counters->keyed_load_string_length(), 1, a2, a3); 3137 __ IncrementCounter(counters->keyed_load_string_length(), 1, a2, a3);
3136 3138
3137 // Check the key is the cached one. 3139 // Check the key is the cached one.
3138 __ Branch(&miss, ne, a0, Operand(name)); 3140 __ Branch(&miss, ne, a0, Operand(name));
3139 3141
3140 GenerateLoadStringLength(masm(), a1, a2, a3, &miss, true); 3142 GenerateLoadStringLength(masm(), a1, a2, a3, &miss, true);
3141 __ bind(&miss); 3143 __ bind(&miss);
3142 __ DecrementCounter(counters->keyed_load_string_length(), 1, a2, a3); 3144 __ DecrementCounter(counters->keyed_load_string_length(), 1, a2, a3);
3143 3145
3144 GenerateLoadMiss(masm(), Code::KEYED_LOAD_IC); 3146 GenerateLoadMiss(masm(), Code::KEYED_LOAD_IC);
3145 3147
3146 return GetCode(CALLBACKS, name); 3148 return GetCode(Code::CALLBACKS, name);
3147 } 3149 }
3148 3150
3149 3151
3150 Handle<Code> KeyedLoadStubCompiler::CompileLoadFunctionPrototype( 3152 Handle<Code> KeyedLoadStubCompiler::CompileLoadFunctionPrototype(
3151 Handle<String> name) { 3153 Handle<String> name) {
3152 // ----------- S t a t e ------------- 3154 // ----------- S t a t e -------------
3153 // -- ra : return address 3155 // -- ra : return address
3154 // -- a0 : key 3156 // -- a0 : key
3155 // -- a1 : receiver 3157 // -- a1 : receiver
3156 // ----------------------------------- 3158 // -----------------------------------
3157 Label miss; 3159 Label miss;
3158 3160
3159 Counters* counters = masm()->isolate()->counters(); 3161 Counters* counters = masm()->isolate()->counters();
3160 __ IncrementCounter(counters->keyed_load_function_prototype(), 1, a2, a3); 3162 __ IncrementCounter(counters->keyed_load_function_prototype(), 1, a2, a3);
3161 3163
3162 // Check the name hasn't changed. 3164 // Check the name hasn't changed.
3163 __ Branch(&miss, ne, a0, Operand(name)); 3165 __ Branch(&miss, ne, a0, Operand(name));
3164 3166
3165 GenerateLoadFunctionPrototype(masm(), a1, a2, a3, &miss); 3167 GenerateLoadFunctionPrototype(masm(), a1, a2, a3, &miss);
3166 __ bind(&miss); 3168 __ bind(&miss);
3167 __ DecrementCounter(counters->keyed_load_function_prototype(), 1, a2, a3); 3169 __ DecrementCounter(counters->keyed_load_function_prototype(), 1, a2, a3);
3168 GenerateLoadMiss(masm(), Code::KEYED_LOAD_IC); 3170 GenerateLoadMiss(masm(), Code::KEYED_LOAD_IC);
3169 3171
3170 return GetCode(CALLBACKS, name); 3172 return GetCode(Code::CALLBACKS, name);
3171 } 3173 }
3172 3174
3173 3175
3174 Handle<Code> KeyedLoadStubCompiler::CompileLoadElement( 3176 Handle<Code> KeyedLoadStubCompiler::CompileLoadElement(
3175 Handle<Map> receiver_map) { 3177 Handle<Map> receiver_map) {
3176 // ----------- S t a t e ------------- 3178 // ----------- S t a t e -------------
3177 // -- ra : return address 3179 // -- ra : return address
3178 // -- a0 : key 3180 // -- a0 : key
3179 // -- a1 : receiver 3181 // -- a1 : receiver
3180 // ----------------------------------- 3182 // -----------------------------------
3181 ElementsKind elements_kind = receiver_map->elements_kind(); 3183 ElementsKind elements_kind = receiver_map->elements_kind();
3182 Handle<Code> stub = KeyedLoadElementStub(elements_kind).GetCode(); 3184 Handle<Code> stub = KeyedLoadElementStub(elements_kind).GetCode();
3183 3185
3184 __ DispatchMap(a1, a2, receiver_map, stub, DO_SMI_CHECK); 3186 __ DispatchMap(a1, a2, receiver_map, stub, DO_SMI_CHECK);
3185 3187
3186 Handle<Code> ic = isolate()->builtins()->KeyedLoadIC_Miss(); 3188 Handle<Code> ic = isolate()->builtins()->KeyedLoadIC_Miss();
3187 __ Jump(ic, RelocInfo::CODE_TARGET); 3189 __ Jump(ic, RelocInfo::CODE_TARGET);
3188 3190
3189 // Return the generated code. 3191 // Return the generated code.
3190 return GetCode(NORMAL, factory()->empty_string()); 3192 return GetCode(Code::NORMAL, factory()->empty_string());
3191 } 3193 }
3192 3194
3193 3195
3194 Handle<Code> KeyedLoadStubCompiler::CompileLoadPolymorphic( 3196 Handle<Code> KeyedLoadStubCompiler::CompileLoadPolymorphic(
3195 MapHandleList* receiver_maps, 3197 MapHandleList* receiver_maps,
3196 CodeHandleList* handler_ics) { 3198 CodeHandleList* handler_ics) {
3197 // ----------- S t a t e ------------- 3199 // ----------- S t a t e -------------
3198 // -- ra : return address 3200 // -- ra : return address
3199 // -- a0 : key 3201 // -- a0 : key
3200 // -- a1 : receiver 3202 // -- a1 : receiver
3201 // ----------------------------------- 3203 // -----------------------------------
3202 Label miss; 3204 Label miss;
3203 __ JumpIfSmi(a1, &miss); 3205 __ JumpIfSmi(a1, &miss);
3204 3206
3205 int receiver_count = receiver_maps->length(); 3207 int receiver_count = receiver_maps->length();
3206 __ lw(a2, FieldMemOperand(a1, HeapObject::kMapOffset)); 3208 __ lw(a2, FieldMemOperand(a1, HeapObject::kMapOffset));
3207 for (int current = 0; current < receiver_count; ++current) { 3209 for (int current = 0; current < receiver_count; ++current) {
3208 __ Jump(handler_ics->at(current), RelocInfo::CODE_TARGET, 3210 __ Jump(handler_ics->at(current), RelocInfo::CODE_TARGET,
3209 eq, a2, Operand(receiver_maps->at(current))); 3211 eq, a2, Operand(receiver_maps->at(current)));
3210 } 3212 }
3211 3213
3212 __ bind(&miss); 3214 __ bind(&miss);
3213 Handle<Code> miss_ic = isolate()->builtins()->KeyedLoadIC_Miss(); 3215 Handle<Code> miss_ic = isolate()->builtins()->KeyedLoadIC_Miss();
3214 __ Jump(miss_ic, RelocInfo::CODE_TARGET); 3216 __ Jump(miss_ic, RelocInfo::CODE_TARGET);
3215 3217
3216 // Return the generated code. 3218 // Return the generated code.
3217 return GetCode(NORMAL, factory()->empty_string(), MEGAMORPHIC); 3219 return GetCode(Code::NORMAL, factory()->empty_string(), MEGAMORPHIC);
3218 } 3220 }
3219 3221
3220 3222
3221 Handle<Code> KeyedStoreStubCompiler::CompileStoreField(Handle<JSObject> object, 3223 Handle<Code> KeyedStoreStubCompiler::CompileStoreField(Handle<JSObject> object,
3222 int index, 3224 int index,
3223 Handle<Map> transition, 3225 Handle<Map> transition,
3224 Handle<String> name) { 3226 Handle<String> name) {
3225 // ----------- S t a t e ------------- 3227 // ----------- S t a t e -------------
3226 // -- a0 : value 3228 // -- a0 : value
3227 // -- a1 : key 3229 // -- a1 : key
(...skipping 18 matching lines...) Expand all
3246 name, 3248 name,
3247 a2, a1, a3, t0, 3249 a2, a1, a3, t0,
3248 &miss); 3250 &miss);
3249 __ bind(&miss); 3251 __ bind(&miss);
3250 3252
3251 __ DecrementCounter(counters->keyed_store_field(), 1, a3, t0); 3253 __ DecrementCounter(counters->keyed_store_field(), 1, a3, t0);
3252 Handle<Code> ic = masm()->isolate()->builtins()->KeyedStoreIC_Miss(); 3254 Handle<Code> ic = masm()->isolate()->builtins()->KeyedStoreIC_Miss();
3253 __ Jump(ic, RelocInfo::CODE_TARGET); 3255 __ Jump(ic, RelocInfo::CODE_TARGET);
3254 3256
3255 // Return the generated code. 3257 // Return the generated code.
3256 return GetCode(transition.is_null() ? FIELD : MAP_TRANSITION, name); 3258 return GetCode(transition.is_null()
3259 ? Code::FIELD
3260 : Code::MAP_TRANSITION, name);
3257 } 3261 }
3258 3262
3259 3263
3260 Handle<Code> KeyedStoreStubCompiler::CompileStoreElement( 3264 Handle<Code> KeyedStoreStubCompiler::CompileStoreElement(
3261 Handle<Map> receiver_map) { 3265 Handle<Map> receiver_map) {
3262 // ----------- S t a t e ------------- 3266 // ----------- S t a t e -------------
3263 // -- a0 : value 3267 // -- a0 : value
3264 // -- a1 : key 3268 // -- a1 : key
3265 // -- a2 : receiver 3269 // -- a2 : receiver
3266 // -- ra : return address 3270 // -- ra : return address
3267 // -- a3 : scratch 3271 // -- a3 : scratch
3268 // ----------------------------------- 3272 // -----------------------------------
3269 ElementsKind elements_kind = receiver_map->elements_kind(); 3273 ElementsKind elements_kind = receiver_map->elements_kind();
3270 bool is_js_array = receiver_map->instance_type() == JS_ARRAY_TYPE; 3274 bool is_js_array = receiver_map->instance_type() == JS_ARRAY_TYPE;
3271 Handle<Code> stub = 3275 Handle<Code> stub =
3272 KeyedStoreElementStub(is_js_array, elements_kind, grow_mode_).GetCode(); 3276 KeyedStoreElementStub(is_js_array, elements_kind, grow_mode_).GetCode();
3273 3277
3274 __ DispatchMap(a2, a3, receiver_map, stub, DO_SMI_CHECK); 3278 __ DispatchMap(a2, a3, receiver_map, stub, DO_SMI_CHECK);
3275 3279
3276 Handle<Code> ic = isolate()->builtins()->KeyedStoreIC_Miss(); 3280 Handle<Code> ic = isolate()->builtins()->KeyedStoreIC_Miss();
3277 __ Jump(ic, RelocInfo::CODE_TARGET); 3281 __ Jump(ic, RelocInfo::CODE_TARGET);
3278 3282
3279 // Return the generated code. 3283 // Return the generated code.
3280 return GetCode(NORMAL, factory()->empty_string()); 3284 return GetCode(Code::NORMAL, factory()->empty_string());
3281 } 3285 }
3282 3286
3283 3287
3284 Handle<Code> KeyedStoreStubCompiler::CompileStorePolymorphic( 3288 Handle<Code> KeyedStoreStubCompiler::CompileStorePolymorphic(
3285 MapHandleList* receiver_maps, 3289 MapHandleList* receiver_maps,
3286 CodeHandleList* handler_stubs, 3290 CodeHandleList* handler_stubs,
3287 MapHandleList* transitioned_maps) { 3291 MapHandleList* transitioned_maps) {
3288 // ----------- S t a t e ------------- 3292 // ----------- S t a t e -------------
3289 // -- a0 : value 3293 // -- a0 : value
3290 // -- a1 : key 3294 // -- a1 : key
(...skipping 17 matching lines...) Expand all
3308 __ Jump(handler_stubs->at(i), RelocInfo::CODE_TARGET); 3312 __ Jump(handler_stubs->at(i), RelocInfo::CODE_TARGET);
3309 __ bind(&next_map); 3313 __ bind(&next_map);
3310 } 3314 }
3311 } 3315 }
3312 3316
3313 __ bind(&miss); 3317 __ bind(&miss);
3314 Handle<Code> miss_ic = isolate()->builtins()->KeyedStoreIC_Miss(); 3318 Handle<Code> miss_ic = isolate()->builtins()->KeyedStoreIC_Miss();
3315 __ Jump(miss_ic, RelocInfo::CODE_TARGET); 3319 __ Jump(miss_ic, RelocInfo::CODE_TARGET);
3316 3320
3317 // Return the generated code. 3321 // Return the generated code.
3318 return GetCode(NORMAL, factory()->empty_string(), MEGAMORPHIC); 3322 return GetCode(Code::NORMAL, factory()->empty_string(), MEGAMORPHIC);
3319 } 3323 }
3320 3324
3321 3325
3322 Handle<Code> ConstructStubCompiler::CompileConstructStub( 3326 Handle<Code> ConstructStubCompiler::CompileConstructStub(
3323 Handle<JSFunction> function) { 3327 Handle<JSFunction> function) {
3324 // a0 : argc 3328 // a0 : argc
3325 // a1 : constructor 3329 // a1 : constructor
3326 // ra : return address 3330 // ra : return address
3327 // [sp] : last argument 3331 // [sp] : last argument
3328 Label generic_stub_call; 3332 Label generic_stub_call;
(...skipping 1408 matching lines...) Expand 10 before | Expand all | Expand 10 after
4737 __ Jump(ic_slow, RelocInfo::CODE_TARGET); 4741 __ Jump(ic_slow, RelocInfo::CODE_TARGET);
4738 } 4742 }
4739 } 4743 }
4740 4744
4741 4745
4742 #undef __ 4746 #undef __
4743 4747
4744 } } // namespace v8::internal 4748 } } // namespace v8::internal
4745 4749
4746 #endif // V8_TARGET_ARCH_MIPS 4750 #endif // V8_TARGET_ARCH_MIPS
OLDNEW
« no previous file with comments | « src/mips/ic-mips.cc ('k') | src/objects.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698