| OLD | NEW |
| 1 // Copyright 2013 the V8 project authors. All rights reserved. | 1 // Copyright 2013 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 2470 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2481 | 2481 |
| 2482 void CallStubCompiler::GenerateJumpFunction(Handle<Object> object, | 2482 void CallStubCompiler::GenerateJumpFunction(Handle<Object> object, |
| 2483 Register function, | 2483 Register function, |
| 2484 Label* miss) { | 2484 Label* miss) { |
| 2485 ASSERT(function.Is(x1)); | 2485 ASSERT(function.Is(x1)); |
| 2486 // Check that the function really is a function. | 2486 // Check that the function really is a function. |
| 2487 GenerateFunctionCheck(function, x3, miss); | 2487 GenerateFunctionCheck(function, x3, miss); |
| 2488 PatchImplicitReceiver(object); | 2488 PatchImplicitReceiver(object); |
| 2489 | 2489 |
| 2490 // Invoke the function. | 2490 // Invoke the function. |
| 2491 __ InvokeFunction(function, arguments(), JUMP_FUNCTION, | 2491 __ InvokeFunction(function, arguments(), JUMP_FUNCTION, NullCallWrapper()); |
| 2492 NullCallWrapper(), call_kind()); | |
| 2493 } | 2492 } |
| 2494 | 2493 |
| 2495 | 2494 |
| 2496 Handle<Code> CallStubCompiler::CompileCallInterceptor(Handle<JSObject> object, | 2495 Handle<Code> CallStubCompiler::CompileCallInterceptor(Handle<JSObject> object, |
| 2497 Handle<JSObject> holder, | 2496 Handle<JSObject> holder, |
| 2498 Handle<Name> name) { | 2497 Handle<Name> name) { |
| 2499 Label miss; | 2498 Label miss; |
| 2500 Register name_reg = x2; | 2499 Register name_reg = x2; |
| 2501 | 2500 |
| 2502 GenerateNameCheck(name, &miss); | 2501 GenerateNameCheck(name, &miss); |
| (...skipping 107 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2610 | 2609 |
| 2611 // Save value register, so we can restore it later. | 2610 // Save value register, so we can restore it later. |
| 2612 __ Push(value_reg); | 2611 __ Push(value_reg); |
| 2613 | 2612 |
| 2614 if (!setter.is_null()) { | 2613 if (!setter.is_null()) { |
| 2615 // Call the JavaScript setter with receiver and value on the stack. | 2614 // Call the JavaScript setter with receiver and value on the stack. |
| 2616 __ Push(receiver_reg, value_reg); | 2615 __ Push(receiver_reg, value_reg); |
| 2617 ParameterCount actual(1); | 2616 ParameterCount actual(1); |
| 2618 ParameterCount expected(setter); | 2617 ParameterCount expected(setter); |
| 2619 __ InvokeFunction(setter, expected, actual, | 2618 __ InvokeFunction(setter, expected, actual, |
| 2620 CALL_FUNCTION, NullCallWrapper(), CALL_AS_METHOD); | 2619 CALL_FUNCTION, NullCallWrapper()); |
| 2621 } else { | 2620 } else { |
| 2622 // If we generate a global code snippet for deoptimization only, remember | 2621 // If we generate a global code snippet for deoptimization only, remember |
| 2623 // the place to continue after deoptimization. | 2622 // the place to continue after deoptimization. |
| 2624 masm->isolate()->heap()->SetSetterStubDeoptPCOffset(masm->pc_offset()); | 2623 masm->isolate()->heap()->SetSetterStubDeoptPCOffset(masm->pc_offset()); |
| 2625 } | 2624 } |
| 2626 | 2625 |
| 2627 // We have to return the passed value, not the return value of the setter. | 2626 // We have to return the passed value, not the return value of the setter. |
| 2628 __ Pop(value_reg); | 2627 __ Pop(value_reg); |
| 2629 | 2628 |
| 2630 // Restore context register. | 2629 // Restore context register. |
| (...skipping 115 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2746 Handle<JSFunction> getter) { | 2745 Handle<JSFunction> getter) { |
| 2747 { | 2746 { |
| 2748 FrameScope scope(masm, StackFrame::INTERNAL); | 2747 FrameScope scope(masm, StackFrame::INTERNAL); |
| 2749 | 2748 |
| 2750 if (!getter.is_null()) { | 2749 if (!getter.is_null()) { |
| 2751 // Call the JavaScript getter with the receiver on the stack. | 2750 // Call the JavaScript getter with the receiver on the stack. |
| 2752 __ Push(receiver); | 2751 __ Push(receiver); |
| 2753 ParameterCount actual(0); | 2752 ParameterCount actual(0); |
| 2754 ParameterCount expected(getter); | 2753 ParameterCount expected(getter); |
| 2755 __ InvokeFunction(getter, expected, actual, | 2754 __ InvokeFunction(getter, expected, actual, |
| 2756 CALL_FUNCTION, NullCallWrapper(), CALL_AS_METHOD); | 2755 CALL_FUNCTION, NullCallWrapper()); |
| 2757 } else { | 2756 } else { |
| 2758 // If we generate a global code snippet for deoptimization only, remember | 2757 // If we generate a global code snippet for deoptimization only, remember |
| 2759 // the place to continue after deoptimization. | 2758 // the place to continue after deoptimization. |
| 2760 masm->isolate()->heap()->SetGetterStubDeoptPCOffset(masm->pc_offset()); | 2759 masm->isolate()->heap()->SetGetterStubDeoptPCOffset(masm->pc_offset()); |
| 2761 } | 2760 } |
| 2762 | 2761 |
| 2763 // Restore context register. | 2762 // Restore context register. |
| 2764 __ Ldr(cp, MemOperand(fp, StandardFrameConstants::kContextOffset)); | 2763 __ Ldr(cp, MemOperand(fp, StandardFrameConstants::kContextOffset)); |
| 2765 } | 2764 } |
| 2766 __ Ret(); | 2765 __ Ret(); |
| (...skipping 162 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2929 | 2928 |
| 2930 // Miss case, call the runtime. | 2929 // Miss case, call the runtime. |
| 2931 __ Bind(&miss); | 2930 __ Bind(&miss); |
| 2932 TailCallBuiltin(masm, Builtins::kKeyedLoadIC_Miss); | 2931 TailCallBuiltin(masm, Builtins::kKeyedLoadIC_Miss); |
| 2933 } | 2932 } |
| 2934 | 2933 |
| 2935 | 2934 |
| 2936 } } // namespace v8::internal | 2935 } } // namespace v8::internal |
| 2937 | 2936 |
| 2938 #endif // V8_TARGET_ARCH_A64 | 2937 #endif // V8_TARGET_ARCH_A64 |
| OLD | NEW |