Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(215)

Side by Side Diff: src/arm/stub-cache-arm.cc

Issue 136403005: Remove CALL_AS_FUNCTION and CALL_AS_METHOD. (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: Don't store/restore ecx/rcx/r5 given that it doesn't contain callkind anymore Created 6 years, 11 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « src/arm/macro-assembler-arm.cc ('k') | src/ast.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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 2429 matching lines...) Expand 10 before | Expand all | Expand 10 after
2440 2440
2441 void CallStubCompiler::GenerateJumpFunction(Handle<Object> object, 2441 void CallStubCompiler::GenerateJumpFunction(Handle<Object> object,
2442 Register function, 2442 Register function,
2443 Label* miss) { 2443 Label* miss) {
2444 ASSERT(function.is(r1)); 2444 ASSERT(function.is(r1));
2445 // Check that the function really is a function. 2445 // Check that the function really is a function.
2446 GenerateFunctionCheck(function, r3, miss); 2446 GenerateFunctionCheck(function, r3, miss);
2447 PatchImplicitReceiver(object); 2447 PatchImplicitReceiver(object);
2448 2448
2449 // Invoke the function. 2449 // Invoke the function.
2450 __ InvokeFunction(r1, arguments(), JUMP_FUNCTION, 2450 __ InvokeFunction(r1, arguments(), JUMP_FUNCTION, NullCallWrapper());
2451 NullCallWrapper(), call_kind());
2452 } 2451 }
2453 2452
2454 2453
2455 Handle<Code> CallStubCompiler::CompileCallInterceptor(Handle<JSObject> object, 2454 Handle<Code> CallStubCompiler::CompileCallInterceptor(Handle<JSObject> object,
2456 Handle<JSObject> holder, 2455 Handle<JSObject> holder,
2457 Handle<Name> name) { 2456 Handle<Name> name) {
2458 Label miss; 2457 Label miss;
2459 GenerateNameCheck(name, &miss); 2458 GenerateNameCheck(name, &miss);
2460 2459
2461 // Get the number of arguments. 2460 // Get the number of arguments.
(...skipping 114 matching lines...) Expand 10 before | Expand all | Expand 10 after
2576 2575
2577 // Save value register, so we can restore it later. 2576 // Save value register, so we can restore it later.
2578 __ push(r0); 2577 __ push(r0);
2579 2578
2580 if (!setter.is_null()) { 2579 if (!setter.is_null()) {
2581 // Call the JavaScript setter with receiver and value on the stack. 2580 // Call the JavaScript setter with receiver and value on the stack.
2582 __ Push(r1, r0); 2581 __ Push(r1, r0);
2583 ParameterCount actual(1); 2582 ParameterCount actual(1);
2584 ParameterCount expected(setter); 2583 ParameterCount expected(setter);
2585 __ InvokeFunction(setter, expected, actual, 2584 __ InvokeFunction(setter, expected, actual,
2586 CALL_FUNCTION, NullCallWrapper(), CALL_AS_METHOD); 2585 CALL_FUNCTION, NullCallWrapper());
2587 } else { 2586 } else {
2588 // If we generate a global code snippet for deoptimization only, remember 2587 // If we generate a global code snippet for deoptimization only, remember
2589 // the place to continue after deoptimization. 2588 // the place to continue after deoptimization.
2590 masm->isolate()->heap()->SetSetterStubDeoptPCOffset(masm->pc_offset()); 2589 masm->isolate()->heap()->SetSetterStubDeoptPCOffset(masm->pc_offset());
2591 } 2590 }
2592 2591
2593 // We have to return the passed value, not the return value of the setter. 2592 // We have to return the passed value, not the return value of the setter.
2594 __ pop(r0); 2593 __ pop(r0);
2595 2594
2596 // Restore context register. 2595 // Restore context register.
(...skipping 114 matching lines...) Expand 10 before | Expand all | Expand 10 after
2711 // ----------------------------------- 2710 // -----------------------------------
2712 { 2711 {
2713 FrameScope scope(masm, StackFrame::INTERNAL); 2712 FrameScope scope(masm, StackFrame::INTERNAL);
2714 2713
2715 if (!getter.is_null()) { 2714 if (!getter.is_null()) {
2716 // Call the JavaScript getter with the receiver on the stack. 2715 // Call the JavaScript getter with the receiver on the stack.
2717 __ push(receiver); 2716 __ push(receiver);
2718 ParameterCount actual(0); 2717 ParameterCount actual(0);
2719 ParameterCount expected(getter); 2718 ParameterCount expected(getter);
2720 __ InvokeFunction(getter, expected, actual, 2719 __ InvokeFunction(getter, expected, actual,
2721 CALL_FUNCTION, NullCallWrapper(), CALL_AS_METHOD); 2720 CALL_FUNCTION, NullCallWrapper());
2722 } else { 2721 } else {
2723 // If we generate a global code snippet for deoptimization only, remember 2722 // If we generate a global code snippet for deoptimization only, remember
2724 // the place to continue after deoptimization. 2723 // the place to continue after deoptimization.
2725 masm->isolate()->heap()->SetGetterStubDeoptPCOffset(masm->pc_offset()); 2724 masm->isolate()->heap()->SetGetterStubDeoptPCOffset(masm->pc_offset());
2726 } 2725 }
2727 2726
2728 // Restore context register. 2727 // Restore context register.
2729 __ ldr(cp, MemOperand(fp, StandardFrameConstants::kContextOffset)); 2728 __ ldr(cp, MemOperand(fp, StandardFrameConstants::kContextOffset));
2730 } 2729 }
2731 __ Ret(); 2730 __ Ret();
(...skipping 159 matching lines...) Expand 10 before | Expand all | Expand 10 after
2891 // ----------------------------------- 2890 // -----------------------------------
2892 TailCallBuiltin(masm, Builtins::kKeyedLoadIC_Miss); 2891 TailCallBuiltin(masm, Builtins::kKeyedLoadIC_Miss);
2893 } 2892 }
2894 2893
2895 2894
2896 #undef __ 2895 #undef __
2897 2896
2898 } } // namespace v8::internal 2897 } } // namespace v8::internal
2899 2898
2900 #endif // V8_TARGET_ARCH_ARM 2899 #endif // V8_TARGET_ARCH_ARM
OLDNEW
« no previous file with comments | « src/arm/macro-assembler-arm.cc ('k') | src/ast.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698