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 2425 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2436 | 2436 |
2437 void CallStubCompiler::GenerateJumpFunction(Handle<Object> object, | 2437 void CallStubCompiler::GenerateJumpFunction(Handle<Object> object, |
2438 Register function, | 2438 Register function, |
2439 Label* miss) { | 2439 Label* miss) { |
2440 ASSERT(function.is(a1)); | 2440 ASSERT(function.is(a1)); |
2441 // Check that the function really is a function. | 2441 // Check that the function really is a function. |
2442 GenerateFunctionCheck(function, a3, miss); | 2442 GenerateFunctionCheck(function, a3, miss); |
2443 PatchImplicitReceiver(object); | 2443 PatchImplicitReceiver(object); |
2444 | 2444 |
2445 // Invoke the function. | 2445 // Invoke the function. |
2446 __ InvokeFunction(a1, arguments(), JUMP_FUNCTION, | 2446 __ InvokeFunction(a1, arguments(), JUMP_FUNCTION, NullCallWrapper()); |
2447 NullCallWrapper(), call_kind()); | |
2448 } | 2447 } |
2449 | 2448 |
2450 | 2449 |
2451 Handle<Code> CallStubCompiler::CompileCallInterceptor(Handle<JSObject> object, | 2450 Handle<Code> CallStubCompiler::CompileCallInterceptor(Handle<JSObject> object, |
2452 Handle<JSObject> holder, | 2451 Handle<JSObject> holder, |
2453 Handle<Name> name) { | 2452 Handle<Name> name) { |
2454 Label miss; | 2453 Label miss; |
2455 | 2454 |
2456 GenerateNameCheck(name, &miss); | 2455 GenerateNameCheck(name, &miss); |
2457 | 2456 |
(...skipping 116 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2574 // Save value register, so we can restore it later. | 2573 // Save value register, so we can restore it later. |
2575 __ push(a0); | 2574 __ push(a0); |
2576 | 2575 |
2577 if (!setter.is_null()) { | 2576 if (!setter.is_null()) { |
2578 // Call the JavaScript setter with receiver and value on the stack. | 2577 // Call the JavaScript setter with receiver and value on the stack. |
2579 __ push(a1); | 2578 __ push(a1); |
2580 __ push(a0); | 2579 __ push(a0); |
2581 ParameterCount actual(1); | 2580 ParameterCount actual(1); |
2582 ParameterCount expected(setter); | 2581 ParameterCount expected(setter); |
2583 __ InvokeFunction(setter, expected, actual, | 2582 __ InvokeFunction(setter, expected, actual, |
2584 CALL_FUNCTION, NullCallWrapper(), CALL_AS_METHOD); | 2583 CALL_FUNCTION, NullCallWrapper()); |
2585 } else { | 2584 } else { |
2586 // If we generate a global code snippet for deoptimization only, remember | 2585 // If we generate a global code snippet for deoptimization only, remember |
2587 // the place to continue after deoptimization. | 2586 // the place to continue after deoptimization. |
2588 masm->isolate()->heap()->SetSetterStubDeoptPCOffset(masm->pc_offset()); | 2587 masm->isolate()->heap()->SetSetterStubDeoptPCOffset(masm->pc_offset()); |
2589 } | 2588 } |
2590 | 2589 |
2591 // We have to return the passed value, not the return value of the setter. | 2590 // We have to return the passed value, not the return value of the setter. |
2592 __ pop(v0); | 2591 __ pop(v0); |
2593 | 2592 |
2594 // Restore context register. | 2593 // Restore context register. |
(...skipping 111 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2706 // ----------------------------------- | 2705 // ----------------------------------- |
2707 { | 2706 { |
2708 FrameScope scope(masm, StackFrame::INTERNAL); | 2707 FrameScope scope(masm, StackFrame::INTERNAL); |
2709 | 2708 |
2710 if (!getter.is_null()) { | 2709 if (!getter.is_null()) { |
2711 // Call the JavaScript getter with the receiver on the stack. | 2710 // Call the JavaScript getter with the receiver on the stack. |
2712 __ push(receiver); | 2711 __ push(receiver); |
2713 ParameterCount actual(0); | 2712 ParameterCount actual(0); |
2714 ParameterCount expected(getter); | 2713 ParameterCount expected(getter); |
2715 __ InvokeFunction(getter, expected, actual, | 2714 __ InvokeFunction(getter, expected, actual, |
2716 CALL_FUNCTION, NullCallWrapper(), CALL_AS_METHOD); | 2715 CALL_FUNCTION, NullCallWrapper()); |
2717 } else { | 2716 } else { |
2718 // If we generate a global code snippet for deoptimization only, remember | 2717 // If we generate a global code snippet for deoptimization only, remember |
2719 // the place to continue after deoptimization. | 2718 // the place to continue after deoptimization. |
2720 masm->isolate()->heap()->SetGetterStubDeoptPCOffset(masm->pc_offset()); | 2719 masm->isolate()->heap()->SetGetterStubDeoptPCOffset(masm->pc_offset()); |
2721 } | 2720 } |
2722 | 2721 |
2723 // Restore context register. | 2722 // Restore context register. |
2724 __ lw(cp, MemOperand(fp, StandardFrameConstants::kContextOffset)); | 2723 __ lw(cp, MemOperand(fp, StandardFrameConstants::kContextOffset)); |
2725 } | 2724 } |
2726 __ Ret(); | 2725 __ Ret(); |
(...skipping 158 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2885 // ----------------------------------- | 2884 // ----------------------------------- |
2886 TailCallBuiltin(masm, Builtins::kKeyedLoadIC_Miss); | 2885 TailCallBuiltin(masm, Builtins::kKeyedLoadIC_Miss); |
2887 } | 2886 } |
2888 | 2887 |
2889 | 2888 |
2890 #undef __ | 2889 #undef __ |
2891 | 2890 |
2892 } } // namespace v8::internal | 2891 } } // namespace v8::internal |
2893 | 2892 |
2894 #endif // V8_TARGET_ARCH_MIPS | 2893 #endif // V8_TARGET_ARCH_MIPS |
OLD | NEW |