| 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 2457 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2468 void CallStubCompiler::GenerateJumpFunction(Handle<Object> object, | 2468 void CallStubCompiler::GenerateJumpFunction(Handle<Object> object, |
| 2469 Register function, | 2469 Register function, |
| 2470 Label* miss) { | 2470 Label* miss) { |
| 2471 // Check that the function really is a function. | 2471 // Check that the function really is a function. |
| 2472 GenerateFunctionCheck(function, rbx, miss); | 2472 GenerateFunctionCheck(function, rbx, miss); |
| 2473 | 2473 |
| 2474 if (!function.is(rdi)) __ movq(rdi, function); | 2474 if (!function.is(rdi)) __ movq(rdi, function); |
| 2475 PatchImplicitReceiver(object); | 2475 PatchImplicitReceiver(object); |
| 2476 | 2476 |
| 2477 // Invoke the function. | 2477 // Invoke the function. |
| 2478 __ InvokeFunction(rdi, arguments(), JUMP_FUNCTION, | 2478 __ InvokeFunction(rdi, arguments(), JUMP_FUNCTION, NullCallWrapper()); |
| 2479 NullCallWrapper(), call_kind()); | |
| 2480 } | 2479 } |
| 2481 | 2480 |
| 2482 | 2481 |
| 2483 Handle<Code> CallStubCompiler::CompileCallInterceptor(Handle<JSObject> object, | 2482 Handle<Code> CallStubCompiler::CompileCallInterceptor(Handle<JSObject> object, |
| 2484 Handle<JSObject> holder, | 2483 Handle<JSObject> holder, |
| 2485 Handle<Name> name) { | 2484 Handle<Name> name) { |
| 2486 Label miss; | 2485 Label miss; |
| 2487 GenerateNameCheck(name, &miss); | 2486 GenerateNameCheck(name, &miss); |
| 2488 | 2487 |
| 2489 LookupResult lookup(isolate()); | 2488 LookupResult lookup(isolate()); |
| (...skipping 110 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2600 // Save value register, so we can restore it later. | 2599 // Save value register, so we can restore it later. |
| 2601 __ push(rax); | 2600 __ push(rax); |
| 2602 | 2601 |
| 2603 if (!setter.is_null()) { | 2602 if (!setter.is_null()) { |
| 2604 // Call the JavaScript setter with receiver and value on the stack. | 2603 // Call the JavaScript setter with receiver and value on the stack. |
| 2605 __ push(rdx); | 2604 __ push(rdx); |
| 2606 __ push(rax); | 2605 __ push(rax); |
| 2607 ParameterCount actual(1); | 2606 ParameterCount actual(1); |
| 2608 ParameterCount expected(setter); | 2607 ParameterCount expected(setter); |
| 2609 __ InvokeFunction(setter, expected, actual, | 2608 __ InvokeFunction(setter, expected, actual, |
| 2610 CALL_FUNCTION, NullCallWrapper(), CALL_AS_METHOD); | 2609 CALL_FUNCTION, NullCallWrapper()); |
| 2611 } else { | 2610 } else { |
| 2612 // If we generate a global code snippet for deoptimization only, remember | 2611 // If we generate a global code snippet for deoptimization only, remember |
| 2613 // the place to continue after deoptimization. | 2612 // the place to continue after deoptimization. |
| 2614 masm->isolate()->heap()->SetSetterStubDeoptPCOffset(masm->pc_offset()); | 2613 masm->isolate()->heap()->SetSetterStubDeoptPCOffset(masm->pc_offset()); |
| 2615 } | 2614 } |
| 2616 | 2615 |
| 2617 // We have to return the passed value, not the return value of the setter. | 2616 // We have to return the passed value, not the return value of the setter. |
| 2618 __ pop(rax); | 2617 __ pop(rax); |
| 2619 | 2618 |
| 2620 // Restore context register. | 2619 // Restore context register. |
| (...skipping 134 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2755 // ----------------------------------- | 2754 // ----------------------------------- |
| 2756 { | 2755 { |
| 2757 FrameScope scope(masm, StackFrame::INTERNAL); | 2756 FrameScope scope(masm, StackFrame::INTERNAL); |
| 2758 | 2757 |
| 2759 if (!getter.is_null()) { | 2758 if (!getter.is_null()) { |
| 2760 // Call the JavaScript getter with the receiver on the stack. | 2759 // Call the JavaScript getter with the receiver on the stack. |
| 2761 __ push(receiver); | 2760 __ push(receiver); |
| 2762 ParameterCount actual(0); | 2761 ParameterCount actual(0); |
| 2763 ParameterCount expected(getter); | 2762 ParameterCount expected(getter); |
| 2764 __ InvokeFunction(getter, expected, actual, | 2763 __ InvokeFunction(getter, expected, actual, |
| 2765 CALL_FUNCTION, NullCallWrapper(), CALL_AS_METHOD); | 2764 CALL_FUNCTION, NullCallWrapper()); |
| 2766 } else { | 2765 } else { |
| 2767 // If we generate a global code snippet for deoptimization only, remember | 2766 // If we generate a global code snippet for deoptimization only, remember |
| 2768 // the place to continue after deoptimization. | 2767 // the place to continue after deoptimization. |
| 2769 masm->isolate()->heap()->SetGetterStubDeoptPCOffset(masm->pc_offset()); | 2768 masm->isolate()->heap()->SetGetterStubDeoptPCOffset(masm->pc_offset()); |
| 2770 } | 2769 } |
| 2771 | 2770 |
| 2772 // Restore context register. | 2771 // Restore context register. |
| 2773 __ movq(rsi, Operand(rbp, StandardFrameConstants::kContextOffset)); | 2772 __ movq(rsi, Operand(rbp, StandardFrameConstants::kContextOffset)); |
| 2774 } | 2773 } |
| 2775 __ ret(0); | 2774 __ ret(0); |
| (...skipping 131 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2907 // ----------------------------------- | 2906 // ----------------------------------- |
| 2908 TailCallBuiltin(masm, Builtins::kKeyedLoadIC_Miss); | 2907 TailCallBuiltin(masm, Builtins::kKeyedLoadIC_Miss); |
| 2909 } | 2908 } |
| 2910 | 2909 |
| 2911 | 2910 |
| 2912 #undef __ | 2911 #undef __ |
| 2913 | 2912 |
| 2914 } } // namespace v8::internal | 2913 } } // namespace v8::internal |
| 2915 | 2914 |
| 2916 #endif // V8_TARGET_ARCH_X64 | 2915 #endif // V8_TARGET_ARCH_X64 |
| OLD | NEW |