| 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 2551 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2562 void CallStubCompiler::GenerateJumpFunction(Handle<Object> object, | 2562 void CallStubCompiler::GenerateJumpFunction(Handle<Object> object, |
| 2563 Register function, | 2563 Register function, |
| 2564 Label* miss) { | 2564 Label* miss) { |
| 2565 // Check that the function really is a function. | 2565 // Check that the function really is a function. |
| 2566 GenerateFunctionCheck(function, ebx, miss); | 2566 GenerateFunctionCheck(function, ebx, miss); |
| 2567 | 2567 |
| 2568 if (!function.is(edi)) __ mov(edi, function); | 2568 if (!function.is(edi)) __ mov(edi, function); |
| 2569 PatchImplicitReceiver(object); | 2569 PatchImplicitReceiver(object); |
| 2570 | 2570 |
| 2571 // Invoke the function. | 2571 // Invoke the function. |
| 2572 __ InvokeFunction(edi, arguments(), JUMP_FUNCTION, | 2572 __ InvokeFunction(edi, arguments(), JUMP_FUNCTION, NullCallWrapper()); |
| 2573 NullCallWrapper(), call_kind()); | |
| 2574 } | 2573 } |
| 2575 | 2574 |
| 2576 | 2575 |
| 2577 Handle<Code> CallStubCompiler::CompileCallInterceptor(Handle<JSObject> object, | 2576 Handle<Code> CallStubCompiler::CompileCallInterceptor(Handle<JSObject> object, |
| 2578 Handle<JSObject> holder, | 2577 Handle<JSObject> holder, |
| 2579 Handle<Name> name) { | 2578 Handle<Name> name) { |
| 2580 Label miss; | 2579 Label miss; |
| 2581 | 2580 |
| 2582 GenerateNameCheck(name, &miss); | 2581 GenerateNameCheck(name, &miss); |
| 2583 | 2582 |
| (...skipping 112 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2696 // Save value register, so we can restore it later. | 2695 // Save value register, so we can restore it later. |
| 2697 __ push(eax); | 2696 __ push(eax); |
| 2698 | 2697 |
| 2699 if (!setter.is_null()) { | 2698 if (!setter.is_null()) { |
| 2700 // Call the JavaScript setter with receiver and value on the stack. | 2699 // Call the JavaScript setter with receiver and value on the stack. |
| 2701 __ push(edx); | 2700 __ push(edx); |
| 2702 __ push(eax); | 2701 __ push(eax); |
| 2703 ParameterCount actual(1); | 2702 ParameterCount actual(1); |
| 2704 ParameterCount expected(setter); | 2703 ParameterCount expected(setter); |
| 2705 __ InvokeFunction(setter, expected, actual, | 2704 __ InvokeFunction(setter, expected, actual, |
| 2706 CALL_FUNCTION, NullCallWrapper(), CALL_AS_METHOD); | 2705 CALL_FUNCTION, NullCallWrapper()); |
| 2707 } else { | 2706 } else { |
| 2708 // If we generate a global code snippet for deoptimization only, remember | 2707 // If we generate a global code snippet for deoptimization only, remember |
| 2709 // the place to continue after deoptimization. | 2708 // the place to continue after deoptimization. |
| 2710 masm->isolate()->heap()->SetSetterStubDeoptPCOffset(masm->pc_offset()); | 2709 masm->isolate()->heap()->SetSetterStubDeoptPCOffset(masm->pc_offset()); |
| 2711 } | 2710 } |
| 2712 | 2711 |
| 2713 // We have to return the passed value, not the return value of the setter. | 2712 // We have to return the passed value, not the return value of the setter. |
| 2714 __ pop(eax); | 2713 __ pop(eax); |
| 2715 | 2714 |
| 2716 // Restore context register. | 2715 // Restore context register. |
| (...skipping 122 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2839 Handle<JSFunction> getter) { | 2838 Handle<JSFunction> getter) { |
| 2840 { | 2839 { |
| 2841 FrameScope scope(masm, StackFrame::INTERNAL); | 2840 FrameScope scope(masm, StackFrame::INTERNAL); |
| 2842 | 2841 |
| 2843 if (!getter.is_null()) { | 2842 if (!getter.is_null()) { |
| 2844 // Call the JavaScript getter with the receiver on the stack. | 2843 // Call the JavaScript getter with the receiver on the stack. |
| 2845 __ push(receiver); | 2844 __ push(receiver); |
| 2846 ParameterCount actual(0); | 2845 ParameterCount actual(0); |
| 2847 ParameterCount expected(getter); | 2846 ParameterCount expected(getter); |
| 2848 __ InvokeFunction(getter, expected, actual, | 2847 __ InvokeFunction(getter, expected, actual, |
| 2849 CALL_FUNCTION, NullCallWrapper(), CALL_AS_METHOD); | 2848 CALL_FUNCTION, NullCallWrapper()); |
| 2850 } else { | 2849 } else { |
| 2851 // If we generate a global code snippet for deoptimization only, remember | 2850 // If we generate a global code snippet for deoptimization only, remember |
| 2852 // the place to continue after deoptimization. | 2851 // the place to continue after deoptimization. |
| 2853 masm->isolate()->heap()->SetGetterStubDeoptPCOffset(masm->pc_offset()); | 2852 masm->isolate()->heap()->SetGetterStubDeoptPCOffset(masm->pc_offset()); |
| 2854 } | 2853 } |
| 2855 | 2854 |
| 2856 // Restore context register. | 2855 // Restore context register. |
| 2857 __ mov(esi, Operand(ebp, StandardFrameConstants::kContextOffset)); | 2856 __ mov(esi, Operand(ebp, StandardFrameConstants::kContextOffset)); |
| 2858 } | 2857 } |
| 2859 __ ret(0); | 2858 __ ret(0); |
| (...skipping 133 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2993 // ----------------------------------- | 2992 // ----------------------------------- |
| 2994 TailCallBuiltin(masm, Builtins::kKeyedLoadIC_Miss); | 2993 TailCallBuiltin(masm, Builtins::kKeyedLoadIC_Miss); |
| 2995 } | 2994 } |
| 2996 | 2995 |
| 2997 | 2996 |
| 2998 #undef __ | 2997 #undef __ |
| 2999 | 2998 |
| 3000 } } // namespace v8::internal | 2999 } } // namespace v8::internal |
| 3001 | 3000 |
| 3002 #endif // V8_TARGET_ARCH_IA32 | 3001 #endif // V8_TARGET_ARCH_IA32 |
| OLD | NEW |