| 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 1918 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1929 break; | 1929 break; |
| 1930 case Token::DIV: | 1930 case Token::DIV: |
| 1931 __ div_d(result, left, right); | 1931 __ div_d(result, left, right); |
| 1932 break; | 1932 break; |
| 1933 case Token::MOD: { | 1933 case Token::MOD: { |
| 1934 // Save a0-a3 on the stack. | 1934 // Save a0-a3 on the stack. |
| 1935 RegList saved_regs = a0.bit() | a1.bit() | a2.bit() | a3.bit(); | 1935 RegList saved_regs = a0.bit() | a1.bit() | a2.bit() | a3.bit(); |
| 1936 __ MultiPush(saved_regs); | 1936 __ MultiPush(saved_regs); |
| 1937 | 1937 |
| 1938 __ PrepareCallCFunction(0, 2, scratch0()); | 1938 __ PrepareCallCFunction(0, 2, scratch0()); |
| 1939 __ SetCallCDoubleArguments(left, right); | 1939 __ MovToFloatParameters(left, right); |
| 1940 __ CallCFunction( | 1940 __ CallCFunction( |
| 1941 ExternalReference::mod_two_doubles_operation(isolate()), | 1941 ExternalReference::mod_two_doubles_operation(isolate()), |
| 1942 0, 2); | 1942 0, 2); |
| 1943 // Move the result in the double result register. | 1943 // Move the result in the double result register. |
| 1944 __ GetCFunctionDoubleResult(result); | 1944 __ MovFromFloatResult(result); |
| 1945 | 1945 |
| 1946 // Restore saved register. | 1946 // Restore saved register. |
| 1947 __ MultiPop(saved_regs); | 1947 __ MultiPop(saved_regs); |
| 1948 break; | 1948 break; |
| 1949 } | 1949 } |
| 1950 default: | 1950 default: |
| 1951 UNREACHABLE(); | 1951 UNREACHABLE(); |
| 1952 break; | 1952 break; |
| 1953 } | 1953 } |
| 1954 } | 1954 } |
| (...skipping 853 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2808 } | 2808 } |
| 2809 } | 2809 } |
| 2810 | 2810 |
| 2811 | 2811 |
| 2812 void LCodeGen::DoLoadGlobalGeneric(LLoadGlobalGeneric* instr) { | 2812 void LCodeGen::DoLoadGlobalGeneric(LLoadGlobalGeneric* instr) { |
| 2813 ASSERT(ToRegister(instr->context()).is(cp)); | 2813 ASSERT(ToRegister(instr->context()).is(cp)); |
| 2814 ASSERT(ToRegister(instr->global_object()).is(a0)); | 2814 ASSERT(ToRegister(instr->global_object()).is(a0)); |
| 2815 ASSERT(ToRegister(instr->result()).is(v0)); | 2815 ASSERT(ToRegister(instr->result()).is(v0)); |
| 2816 | 2816 |
| 2817 __ li(a2, Operand(instr->name())); | 2817 __ li(a2, Operand(instr->name())); |
| 2818 RelocInfo::Mode mode = instr->for_typeof() ? RelocInfo::CODE_TARGET | 2818 ContextualMode mode = instr->for_typeof() ? NOT_CONTEXTUAL : CONTEXTUAL; |
| 2819 : RelocInfo::CODE_TARGET_CONTEXT; | 2819 Handle<Code> ic = LoadIC::initialize_stub(isolate(), mode); |
| 2820 Handle<Code> ic = isolate()->builtins()->LoadIC_Initialize(); | 2820 CallCode(ic, RelocInfo::CODE_TARGET, instr); |
| 2821 CallCode(ic, mode, instr); | |
| 2822 } | 2821 } |
| 2823 | 2822 |
| 2824 | 2823 |
| 2825 void LCodeGen::DoStoreGlobalCell(LStoreGlobalCell* instr) { | 2824 void LCodeGen::DoStoreGlobalCell(LStoreGlobalCell* instr) { |
| 2826 Register value = ToRegister(instr->value()); | 2825 Register value = ToRegister(instr->value()); |
| 2827 Register cell = scratch0(); | 2826 Register cell = scratch0(); |
| 2828 | 2827 |
| 2829 // Load the cell. | 2828 // Load the cell. |
| 2830 __ li(cell, Operand(instr->hydrogen()->cell().handle())); | 2829 __ li(cell, Operand(instr->hydrogen()->cell().handle())); |
| 2831 | 2830 |
| (...skipping 14 matching lines...) Expand all Loading... |
| 2846 // Cells are always rescanned, so no write barrier here. | 2845 // Cells are always rescanned, so no write barrier here. |
| 2847 } | 2846 } |
| 2848 | 2847 |
| 2849 | 2848 |
| 2850 void LCodeGen::DoStoreGlobalGeneric(LStoreGlobalGeneric* instr) { | 2849 void LCodeGen::DoStoreGlobalGeneric(LStoreGlobalGeneric* instr) { |
| 2851 ASSERT(ToRegister(instr->context()).is(cp)); | 2850 ASSERT(ToRegister(instr->context()).is(cp)); |
| 2852 ASSERT(ToRegister(instr->global_object()).is(a1)); | 2851 ASSERT(ToRegister(instr->global_object()).is(a1)); |
| 2853 ASSERT(ToRegister(instr->value()).is(a0)); | 2852 ASSERT(ToRegister(instr->value()).is(a0)); |
| 2854 | 2853 |
| 2855 __ li(a2, Operand(instr->name())); | 2854 __ li(a2, Operand(instr->name())); |
| 2856 Handle<Code> ic = (instr->strict_mode_flag() == kStrictMode) | 2855 Handle<Code> ic = StoreIC::initialize_stub(isolate(), |
| 2857 ? isolate()->builtins()->StoreIC_Initialize_Strict() | 2856 instr->strict_mode_flag(), |
| 2858 : isolate()->builtins()->StoreIC_Initialize(); | 2857 CONTEXTUAL); |
| 2859 CallCode(ic, RelocInfo::CODE_TARGET_CONTEXT, instr); | 2858 CallCode(ic, RelocInfo::CODE_TARGET, instr); |
| 2860 } | 2859 } |
| 2861 | 2860 |
| 2862 | 2861 |
| 2863 void LCodeGen::DoLoadContextSlot(LLoadContextSlot* instr) { | 2862 void LCodeGen::DoLoadContextSlot(LLoadContextSlot* instr) { |
| 2864 Register context = ToRegister(instr->context()); | 2863 Register context = ToRegister(instr->context()); |
| 2865 Register result = ToRegister(instr->result()); | 2864 Register result = ToRegister(instr->result()); |
| 2866 | 2865 |
| 2867 __ lw(result, ContextOperand(context, instr->slot_index())); | 2866 __ lw(result, ContextOperand(context, instr->slot_index())); |
| 2868 if (instr->hydrogen()->RequiresHoleCheck()) { | 2867 if (instr->hydrogen()->RequiresHoleCheck()) { |
| 2869 __ LoadRoot(at, Heap::kTheHoleValueRootIndex); | 2868 __ LoadRoot(at, Heap::kTheHoleValueRootIndex); |
| (...skipping 76 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2946 } | 2945 } |
| 2947 | 2946 |
| 2948 | 2947 |
| 2949 void LCodeGen::DoLoadNamedGeneric(LLoadNamedGeneric* instr) { | 2948 void LCodeGen::DoLoadNamedGeneric(LLoadNamedGeneric* instr) { |
| 2950 ASSERT(ToRegister(instr->context()).is(cp)); | 2949 ASSERT(ToRegister(instr->context()).is(cp)); |
| 2951 ASSERT(ToRegister(instr->object()).is(a0)); | 2950 ASSERT(ToRegister(instr->object()).is(a0)); |
| 2952 ASSERT(ToRegister(instr->result()).is(v0)); | 2951 ASSERT(ToRegister(instr->result()).is(v0)); |
| 2953 | 2952 |
| 2954 // Name is always in a2. | 2953 // Name is always in a2. |
| 2955 __ li(a2, Operand(instr->name())); | 2954 __ li(a2, Operand(instr->name())); |
| 2956 Handle<Code> ic = isolate()->builtins()->LoadIC_Initialize(); | 2955 Handle<Code> ic = LoadIC::initialize_stub(isolate(), NOT_CONTEXTUAL); |
| 2957 CallCode(ic, RelocInfo::CODE_TARGET, instr); | 2956 CallCode(ic, RelocInfo::CODE_TARGET, instr); |
| 2958 } | 2957 } |
| 2959 | 2958 |
| 2960 | 2959 |
| 2961 void LCodeGen::DoLoadFunctionPrototype(LLoadFunctionPrototype* instr) { | 2960 void LCodeGen::DoLoadFunctionPrototype(LLoadFunctionPrototype* instr) { |
| 2962 Register scratch = scratch0(); | 2961 Register scratch = scratch0(); |
| 2963 Register function = ToRegister(instr->function()); | 2962 Register function = ToRegister(instr->function()); |
| 2964 Register result = ToRegister(instr->result()); | 2963 Register result = ToRegister(instr->result()); |
| 2965 | 2964 |
| 2966 // Check that the function really is a function. Load map into the | 2965 // Check that the function really is a function. Load map into the |
| (...skipping 397 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 3364 // Deoptimize if the receiver is not a JS object. | 3363 // Deoptimize if the receiver is not a JS object. |
| 3365 __ SmiTst(receiver, scratch); | 3364 __ SmiTst(receiver, scratch); |
| 3366 DeoptimizeIf(eq, instr->environment(), scratch, Operand(zero_reg)); | 3365 DeoptimizeIf(eq, instr->environment(), scratch, Operand(zero_reg)); |
| 3367 | 3366 |
| 3368 __ GetObjectType(receiver, scratch, scratch); | 3367 __ GetObjectType(receiver, scratch, scratch); |
| 3369 DeoptimizeIf(lt, instr->environment(), | 3368 DeoptimizeIf(lt, instr->environment(), |
| 3370 scratch, Operand(FIRST_SPEC_OBJECT_TYPE)); | 3369 scratch, Operand(FIRST_SPEC_OBJECT_TYPE)); |
| 3371 __ Branch(&result_in_receiver); | 3370 __ Branch(&result_in_receiver); |
| 3372 | 3371 |
| 3373 __ bind(&global_object); | 3372 __ bind(&global_object); |
| 3373 CallStubCompiler::FetchGlobalProxy(masm(), receiver, function); |
| 3374 | 3374 |
| 3375 __ lw(result, MemOperand(fp, StandardFrameConstants::kContextOffset)); | |
| 3376 __ lw(result, ContextOperand(result, Context::GLOBAL_OBJECT_INDEX)); | |
| 3377 __ lw(result, | |
| 3378 FieldMemOperand(result, JSGlobalObject::kGlobalReceiverOffset)); | |
| 3379 if (result.is(receiver)) { | 3375 if (result.is(receiver)) { |
| 3380 __ bind(&result_in_receiver); | 3376 __ bind(&result_in_receiver); |
| 3381 } else { | 3377 } else { |
| 3382 Label result_ok; | 3378 Label result_ok; |
| 3383 __ Branch(&result_ok); | 3379 __ Branch(&result_ok); |
| 3384 __ bind(&result_in_receiver); | 3380 __ bind(&result_in_receiver); |
| 3385 __ mov(result, receiver); | 3381 __ mov(result, receiver); |
| 3386 __ bind(&result_ok); | 3382 __ bind(&result_ok); |
| 3387 } | 3383 } |
| 3388 } | 3384 } |
| (...skipping 464 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 3853 Register temp2 = ToRegister(instr->temp2()); | 3849 Register temp2 = ToRegister(instr->temp2()); |
| 3854 | 3850 |
| 3855 MathExpGenerator::EmitMathExp( | 3851 MathExpGenerator::EmitMathExp( |
| 3856 masm(), input, result, double_scratch1, double_scratch2, | 3852 masm(), input, result, double_scratch1, double_scratch2, |
| 3857 temp1, temp2, scratch0()); | 3853 temp1, temp2, scratch0()); |
| 3858 } | 3854 } |
| 3859 | 3855 |
| 3860 | 3856 |
| 3861 void LCodeGen::DoMathLog(LMathLog* instr) { | 3857 void LCodeGen::DoMathLog(LMathLog* instr) { |
| 3862 __ PrepareCallCFunction(0, 1, scratch0()); | 3858 __ PrepareCallCFunction(0, 1, scratch0()); |
| 3863 __ SetCallCDoubleArguments(ToDoubleRegister(instr->value())); | 3859 __ MovToFloatParameter(ToDoubleRegister(instr->value())); |
| 3864 __ CallCFunction(ExternalReference::math_log_double_function(isolate()), | 3860 __ CallCFunction(ExternalReference::math_log_double_function(isolate()), |
| 3865 0, 1); | 3861 0, 1); |
| 3866 __ GetCFunctionDoubleResult(ToDoubleRegister(instr->result())); | 3862 __ MovFromFloatResult(ToDoubleRegister(instr->result())); |
| 3867 } | 3863 } |
| 3868 | 3864 |
| 3869 | 3865 |
| 3870 void LCodeGen::DoInvokeFunction(LInvokeFunction* instr) { | 3866 void LCodeGen::DoInvokeFunction(LInvokeFunction* instr) { |
| 3871 ASSERT(ToRegister(instr->context()).is(cp)); | 3867 ASSERT(ToRegister(instr->context()).is(cp)); |
| 3872 ASSERT(ToRegister(instr->function()).is(a1)); | 3868 ASSERT(ToRegister(instr->function()).is(a1)); |
| 3873 ASSERT(instr->HasPointerMap()); | 3869 ASSERT(instr->HasPointerMap()); |
| 3874 | 3870 |
| 3875 Handle<JSFunction> known_function = instr->hydrogen()->known_function(); | 3871 Handle<JSFunction> known_function = instr->hydrogen()->known_function(); |
| 3876 if (known_function.is_null()) { | 3872 if (known_function.is_null()) { |
| (...skipping 21 matching lines...) Expand all Loading... |
| 3898 isolate()->stub_cache()->ComputeKeyedCallInitialize(arity); | 3894 isolate()->stub_cache()->ComputeKeyedCallInitialize(arity); |
| 3899 CallCode(ic, RelocInfo::CODE_TARGET, instr); | 3895 CallCode(ic, RelocInfo::CODE_TARGET, instr); |
| 3900 } | 3896 } |
| 3901 | 3897 |
| 3902 | 3898 |
| 3903 void LCodeGen::DoCallNamed(LCallNamed* instr) { | 3899 void LCodeGen::DoCallNamed(LCallNamed* instr) { |
| 3904 ASSERT(ToRegister(instr->context()).is(cp)); | 3900 ASSERT(ToRegister(instr->context()).is(cp)); |
| 3905 ASSERT(ToRegister(instr->result()).is(v0)); | 3901 ASSERT(ToRegister(instr->result()).is(v0)); |
| 3906 | 3902 |
| 3907 int arity = instr->arity(); | 3903 int arity = instr->arity(); |
| 3908 RelocInfo::Mode mode = RelocInfo::CODE_TARGET; | |
| 3909 Handle<Code> ic = | 3904 Handle<Code> ic = |
| 3910 isolate()->stub_cache()->ComputeCallInitialize(arity, mode); | 3905 isolate()->stub_cache()->ComputeCallInitialize(arity, NOT_CONTEXTUAL); |
| 3911 __ li(a2, Operand(instr->name())); | 3906 __ li(a2, Operand(instr->name())); |
| 3912 CallCode(ic, mode, instr); | 3907 CallCode(ic, RelocInfo::CODE_TARGET, instr); |
| 3913 } | 3908 } |
| 3914 | 3909 |
| 3915 | 3910 |
| 3916 void LCodeGen::DoCallFunction(LCallFunction* instr) { | 3911 void LCodeGen::DoCallFunction(LCallFunction* instr) { |
| 3917 ASSERT(ToRegister(instr->context()).is(cp)); | 3912 ASSERT(ToRegister(instr->context()).is(cp)); |
| 3918 ASSERT(ToRegister(instr->function()).is(a1)); | 3913 ASSERT(ToRegister(instr->function()).is(a1)); |
| 3919 ASSERT(ToRegister(instr->result()).is(v0)); | 3914 ASSERT(ToRegister(instr->result()).is(v0)); |
| 3920 | 3915 |
| 3921 int arity = instr->arity(); | 3916 int arity = instr->arity(); |
| 3922 CallFunctionStub stub(arity, NO_CALL_FUNCTION_FLAGS); | 3917 CallFunctionFlags flags = |
| 3918 instr->hydrogen()->IsContextualCall() ? |
| 3919 RECEIVER_IS_IMPLICIT : NO_CALL_FUNCTION_FLAGS; |
| 3920 CallFunctionStub stub(arity, flags); |
| 3923 if (instr->hydrogen()->IsTailCall()) { | 3921 if (instr->hydrogen()->IsTailCall()) { |
| 3924 if (NeedsEagerFrame()) __ mov(sp, fp); | 3922 if (NeedsEagerFrame()) __ mov(sp, fp); |
| 3925 __ Jump(stub.GetCode(isolate()), RelocInfo::CODE_TARGET); | 3923 __ Jump(stub.GetCode(isolate()), RelocInfo::CODE_TARGET); |
| 3926 } else { | 3924 } else { |
| 3927 CallCode(stub.GetCode(isolate()), RelocInfo::CODE_TARGET, instr); | 3925 CallCode(stub.GetCode(isolate()), RelocInfo::CODE_TARGET, instr); |
| 3928 } | 3926 } |
| 3929 } | 3927 } |
| 3930 | 3928 |
| 3931 | 3929 |
| 3932 void LCodeGen::DoCallGlobal(LCallGlobal* instr) { | 3930 void LCodeGen::DoCallGlobal(LCallGlobal* instr) { |
| 3933 ASSERT(ToRegister(instr->context()).is(cp)); | 3931 ASSERT(ToRegister(instr->context()).is(cp)); |
| 3934 ASSERT(ToRegister(instr->result()).is(v0)); | 3932 ASSERT(ToRegister(instr->result()).is(v0)); |
| 3935 | 3933 |
| 3936 int arity = instr->arity(); | 3934 int arity = instr->arity(); |
| 3937 RelocInfo::Mode mode = RelocInfo::CODE_TARGET_CONTEXT; | |
| 3938 Handle<Code> ic = | 3935 Handle<Code> ic = |
| 3939 isolate()->stub_cache()->ComputeCallInitialize(arity, mode); | 3936 isolate()->stub_cache()->ComputeCallInitialize(arity, CONTEXTUAL); |
| 3940 __ li(a2, Operand(instr->name())); | 3937 __ li(a2, Operand(instr->name())); |
| 3941 CallCode(ic, mode, instr); | 3938 CallCode(ic, RelocInfo::CODE_TARGET, instr); |
| 3942 } | 3939 } |
| 3943 | 3940 |
| 3944 | 3941 |
| 3945 void LCodeGen::DoCallKnownGlobal(LCallKnownGlobal* instr) { | 3942 void LCodeGen::DoCallKnownGlobal(LCallKnownGlobal* instr) { |
| 3946 ASSERT(ToRegister(instr->result()).is(v0)); | 3943 ASSERT(ToRegister(instr->result()).is(v0)); |
| 3947 CallKnownFunction(instr->hydrogen()->target(), | 3944 CallKnownFunction(instr->hydrogen()->target(), |
| 3948 instr->hydrogen()->formal_parameter_count(), | 3945 instr->hydrogen()->formal_parameter_count(), |
| 3949 instr->arity(), | 3946 instr->arity(), |
| 3950 instr, | 3947 instr, |
| 3951 CALL_AS_FUNCTION, | 3948 CALL_AS_FUNCTION, |
| (...skipping 20 matching lines...) Expand all Loading... |
| 3972 ASSERT(ToRegister(instr->constructor()).is(a1)); | 3969 ASSERT(ToRegister(instr->constructor()).is(a1)); |
| 3973 ASSERT(ToRegister(instr->result()).is(v0)); | 3970 ASSERT(ToRegister(instr->result()).is(v0)); |
| 3974 | 3971 |
| 3975 __ li(a0, Operand(instr->arity())); | 3972 __ li(a0, Operand(instr->arity())); |
| 3976 __ li(a2, Operand(instr->hydrogen()->property_cell())); | 3973 __ li(a2, Operand(instr->hydrogen()->property_cell())); |
| 3977 ElementsKind kind = instr->hydrogen()->elements_kind(); | 3974 ElementsKind kind = instr->hydrogen()->elements_kind(); |
| 3978 AllocationSiteOverrideMode override_mode = | 3975 AllocationSiteOverrideMode override_mode = |
| 3979 (AllocationSite::GetMode(kind) == TRACK_ALLOCATION_SITE) | 3976 (AllocationSite::GetMode(kind) == TRACK_ALLOCATION_SITE) |
| 3980 ? DISABLE_ALLOCATION_SITES | 3977 ? DISABLE_ALLOCATION_SITES |
| 3981 : DONT_OVERRIDE; | 3978 : DONT_OVERRIDE; |
| 3982 ContextCheckMode context_mode = CONTEXT_CHECK_NOT_REQUIRED; | |
| 3983 | 3979 |
| 3984 if (instr->arity() == 0) { | 3980 if (instr->arity() == 0) { |
| 3985 ArrayNoArgumentConstructorStub stub(kind, context_mode, override_mode); | 3981 ArrayNoArgumentConstructorStub stub(kind, override_mode); |
| 3986 CallCode(stub.GetCode(isolate()), RelocInfo::CONSTRUCT_CALL, instr); | 3982 CallCode(stub.GetCode(isolate()), RelocInfo::CONSTRUCT_CALL, instr); |
| 3987 } else if (instr->arity() == 1) { | 3983 } else if (instr->arity() == 1) { |
| 3988 Label done; | 3984 Label done; |
| 3989 if (IsFastPackedElementsKind(kind)) { | 3985 if (IsFastPackedElementsKind(kind)) { |
| 3990 Label packed_case; | 3986 Label packed_case; |
| 3991 // We might need a change here, | 3987 // We might need a change here, |
| 3992 // look at the first argument. | 3988 // look at the first argument. |
| 3993 __ lw(t1, MemOperand(sp, 0)); | 3989 __ lw(t1, MemOperand(sp, 0)); |
| 3994 __ Branch(&packed_case, eq, t1, Operand(zero_reg)); | 3990 __ Branch(&packed_case, eq, t1, Operand(zero_reg)); |
| 3995 | 3991 |
| 3996 ElementsKind holey_kind = GetHoleyElementsKind(kind); | 3992 ElementsKind holey_kind = GetHoleyElementsKind(kind); |
| 3997 ArraySingleArgumentConstructorStub stub(holey_kind, context_mode, | 3993 ArraySingleArgumentConstructorStub stub(holey_kind, override_mode); |
| 3998 override_mode); | |
| 3999 CallCode(stub.GetCode(isolate()), RelocInfo::CONSTRUCT_CALL, instr); | 3994 CallCode(stub.GetCode(isolate()), RelocInfo::CONSTRUCT_CALL, instr); |
| 4000 __ jmp(&done); | 3995 __ jmp(&done); |
| 4001 __ bind(&packed_case); | 3996 __ bind(&packed_case); |
| 4002 } | 3997 } |
| 4003 | 3998 |
| 4004 ArraySingleArgumentConstructorStub stub(kind, context_mode, override_mode); | 3999 ArraySingleArgumentConstructorStub stub(kind, override_mode); |
| 4005 CallCode(stub.GetCode(isolate()), RelocInfo::CONSTRUCT_CALL, instr); | 4000 CallCode(stub.GetCode(isolate()), RelocInfo::CONSTRUCT_CALL, instr); |
| 4006 __ bind(&done); | 4001 __ bind(&done); |
| 4007 } else { | 4002 } else { |
| 4008 ArrayNArgumentsConstructorStub stub(kind, context_mode, override_mode); | 4003 ArrayNArgumentsConstructorStub stub(kind, override_mode); |
| 4009 CallCode(stub.GetCode(isolate()), RelocInfo::CONSTRUCT_CALL, instr); | 4004 CallCode(stub.GetCode(isolate()), RelocInfo::CONSTRUCT_CALL, instr); |
| 4010 } | 4005 } |
| 4011 } | 4006 } |
| 4012 | 4007 |
| 4013 | 4008 |
| 4014 void LCodeGen::DoCallRuntime(LCallRuntime* instr) { | 4009 void LCodeGen::DoCallRuntime(LCallRuntime* instr) { |
| 4015 CallRuntime(instr->function(), instr->arity(), instr); | 4010 CallRuntime(instr->function(), instr->arity(), instr); |
| 4016 } | 4011 } |
| 4017 | 4012 |
| 4018 | 4013 |
| (...skipping 109 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 4128 } | 4123 } |
| 4129 | 4124 |
| 4130 | 4125 |
| 4131 void LCodeGen::DoStoreNamedGeneric(LStoreNamedGeneric* instr) { | 4126 void LCodeGen::DoStoreNamedGeneric(LStoreNamedGeneric* instr) { |
| 4132 ASSERT(ToRegister(instr->context()).is(cp)); | 4127 ASSERT(ToRegister(instr->context()).is(cp)); |
| 4133 ASSERT(ToRegister(instr->object()).is(a1)); | 4128 ASSERT(ToRegister(instr->object()).is(a1)); |
| 4134 ASSERT(ToRegister(instr->value()).is(a0)); | 4129 ASSERT(ToRegister(instr->value()).is(a0)); |
| 4135 | 4130 |
| 4136 // Name is always in a2. | 4131 // Name is always in a2. |
| 4137 __ li(a2, Operand(instr->name())); | 4132 __ li(a2, Operand(instr->name())); |
| 4138 Handle<Code> ic = (instr->strict_mode_flag() == kStrictMode) | 4133 Handle<Code> ic = StoreIC::initialize_stub(isolate(), |
| 4139 ? isolate()->builtins()->StoreIC_Initialize_Strict() | 4134 instr->strict_mode_flag(), |
| 4140 : isolate()->builtins()->StoreIC_Initialize(); | 4135 NOT_CONTEXTUAL); |
| 4141 CallCode(ic, RelocInfo::CODE_TARGET, instr); | 4136 CallCode(ic, RelocInfo::CODE_TARGET, instr); |
| 4142 } | 4137 } |
| 4143 | 4138 |
| 4144 | 4139 |
| 4145 void LCodeGen::ApplyCheckIf(Condition condition, | 4140 void LCodeGen::ApplyCheckIf(Condition condition, |
| 4146 LBoundsCheck* check, | 4141 LBoundsCheck* check, |
| 4147 Register src1, | 4142 Register src1, |
| 4148 const Operand& src2) { | 4143 const Operand& src2) { |
| 4149 if (FLAG_debug_code && check->hydrogen()->skip_check()) { | 4144 if (FLAG_debug_code && check->hydrogen()->skip_check()) { |
| 4150 Label done; | 4145 Label done; |
| (...skipping 1660 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 5811 __ Subu(scratch, result, scratch); | 5806 __ Subu(scratch, result, scratch); |
| 5812 __ lw(result, FieldMemOperand(scratch, | 5807 __ lw(result, FieldMemOperand(scratch, |
| 5813 FixedArray::kHeaderSize - kPointerSize)); | 5808 FixedArray::kHeaderSize - kPointerSize)); |
| 5814 __ bind(&done); | 5809 __ bind(&done); |
| 5815 } | 5810 } |
| 5816 | 5811 |
| 5817 | 5812 |
| 5818 #undef __ | 5813 #undef __ |
| 5819 | 5814 |
| 5820 } } // namespace v8::internal | 5815 } } // namespace v8::internal |
| OLD | NEW |