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

Side by Side Diff: src/arm/full-codegen-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/code-stubs-arm.cc ('k') | src/arm/ic-arm.cc » ('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 131 matching lines...) Expand 10 before | Expand all | Expand 10 after
142 info->function()->name()->IsUtf8EqualTo(CStrVector(FLAG_stop_at))) { 142 info->function()->name()->IsUtf8EqualTo(CStrVector(FLAG_stop_at))) {
143 __ stop("stop-at"); 143 __ stop("stop-at");
144 } 144 }
145 #endif 145 #endif
146 146
147 // Classic mode functions and builtins need to replace the receiver with the 147 // Classic mode functions and builtins need to replace the receiver with the
148 // global proxy when called as functions (without an explicit receiver 148 // global proxy when called as functions (without an explicit receiver
149 // object). 149 // object).
150 if (info->is_classic_mode() && !info->is_native()) { 150 if (info->is_classic_mode() && !info->is_native()) {
151 Label ok; 151 Label ok;
152 __ cmp(r5, Operand::Zero());
153 __ b(eq, &ok);
154
155 int receiver_offset = info->scope()->num_parameters() * kPointerSize; 152 int receiver_offset = info->scope()->num_parameters() * kPointerSize;
156 __ ldr(r2, MemOperand(sp, receiver_offset)); 153 __ ldr(r2, MemOperand(sp, receiver_offset));
157 __ CompareRoot(r2, Heap::kUndefinedValueRootIndex); 154 __ CompareRoot(r2, Heap::kUndefinedValueRootIndex);
158 __ b(ne, &ok); 155 __ b(ne, &ok);
159 156
160 __ ldr(r2, GlobalObjectOperand()); 157 __ ldr(r2, GlobalObjectOperand());
161 __ ldr(r2, FieldMemOperand(r2, GlobalObject::kGlobalReceiverOffset)); 158 __ ldr(r2, FieldMemOperand(r2, GlobalObject::kGlobalReceiverOffset));
162 159
163 __ str(r2, MemOperand(sp, receiver_offset)); 160 __ str(r2, MemOperand(sp, receiver_offset));
164 161
(...skipping 3557 matching lines...) Expand 10 before | Expand all | Expand 10 after
3722 3719
3723 Label runtime, done; 3720 Label runtime, done;
3724 // Check for non-function argument (including proxy). 3721 // Check for non-function argument (including proxy).
3725 __ JumpIfSmi(r0, &runtime); 3722 __ JumpIfSmi(r0, &runtime);
3726 __ CompareObjectType(r0, r1, r1, JS_FUNCTION_TYPE); 3723 __ CompareObjectType(r0, r1, r1, JS_FUNCTION_TYPE);
3727 __ b(ne, &runtime); 3724 __ b(ne, &runtime);
3728 3725
3729 // InvokeFunction requires the function in r1. Move it in there. 3726 // InvokeFunction requires the function in r1. Move it in there.
3730 __ mov(r1, result_register()); 3727 __ mov(r1, result_register());
3731 ParameterCount count(arg_count); 3728 ParameterCount count(arg_count);
3732 __ InvokeFunction(r1, count, CALL_FUNCTION, 3729 __ InvokeFunction(r1, count, CALL_FUNCTION, NullCallWrapper());
3733 NullCallWrapper(), CALL_AS_FUNCTION);
3734 __ ldr(cp, MemOperand(fp, StandardFrameConstants::kContextOffset)); 3730 __ ldr(cp, MemOperand(fp, StandardFrameConstants::kContextOffset));
3735 __ jmp(&done); 3731 __ jmp(&done);
3736 3732
3737 __ bind(&runtime); 3733 __ bind(&runtime);
3738 __ push(r0); 3734 __ push(r0);
3739 __ CallRuntime(Runtime::kCall, args->length()); 3735 __ CallRuntime(Runtime::kCall, args->length());
3740 __ bind(&done); 3736 __ bind(&done);
3741 3737
3742 context()->Plug(r0); 3738 context()->Plug(r0);
3743 } 3739 }
(...skipping 1156 matching lines...) Expand 10 before | Expand all | Expand 10 after
4900 ASSERT(Memory::uint32_at(interrupt_address_pointer) == 4896 ASSERT(Memory::uint32_at(interrupt_address_pointer) ==
4901 reinterpret_cast<uint32_t>( 4897 reinterpret_cast<uint32_t>(
4902 isolate->builtins()->OsrAfterStackCheck()->entry())); 4898 isolate->builtins()->OsrAfterStackCheck()->entry()));
4903 return OSR_AFTER_STACK_CHECK; 4899 return OSR_AFTER_STACK_CHECK;
4904 } 4900 }
4905 4901
4906 4902
4907 } } // namespace v8::internal 4903 } } // namespace v8::internal
4908 4904
4909 #endif // V8_TARGET_ARCH_ARM 4905 #endif // V8_TARGET_ARCH_ARM
OLDNEW
« no previous file with comments | « src/arm/code-stubs-arm.cc ('k') | src/arm/ic-arm.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698