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

Side by Side Diff: src/arm/virtual-frame-arm.cc

Issue 1623004: Faster invocation of custom comparator function. (Closed)
Patch Set: Next round Created 10 years, 8 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
« no previous file with comments | « src/arm/virtual-frame-arm.h ('k') | src/array.js » ('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 2009 the V8 project authors. All rights reserved. 1 // Copyright 2009 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 173 matching lines...) Expand 10 before | Expand all | Expand 10 after
184 184
185 185
186 void VirtualFrame::PushTryHandler(HandlerType type) { 186 void VirtualFrame::PushTryHandler(HandlerType type) {
187 // Grow the expression stack by handler size less one (the return 187 // Grow the expression stack by handler size less one (the return
188 // address in lr is already counted by a call instruction). 188 // address in lr is already counted by a call instruction).
189 Adjust(kHandlerSize - 1); 189 Adjust(kHandlerSize - 1);
190 __ PushTryHandler(IN_JAVASCRIPT, type); 190 __ PushTryHandler(IN_JAVASCRIPT, type);
191 } 191 }
192 192
193 193
194 void VirtualFrame::CallJSFunction(int arg_count) {
195 // InvokeFunction requires function in r1.
196 EmitPop(r1);
197
198 // +1 for receiver.
199 Forget(arg_count + 1);
200 ASSERT(cgen()->HasValidEntryRegisters());
201 ParameterCount count(arg_count);
202 __ InvokeFunction(r1, count, CALL_FUNCTION);
203 // Restore the context.
204 __ ldr(cp, Context());
205 }
206
207
194 void VirtualFrame::CallRuntime(Runtime::Function* f, int arg_count) { 208 void VirtualFrame::CallRuntime(Runtime::Function* f, int arg_count) {
195 Forget(arg_count); 209 Forget(arg_count);
196 ASSERT(cgen()->HasValidEntryRegisters()); 210 ASSERT(cgen()->HasValidEntryRegisters());
197 __ CallRuntime(f, arg_count); 211 __ CallRuntime(f, arg_count);
198 } 212 }
199 213
200 214
201 void VirtualFrame::CallRuntime(Runtime::FunctionId id, int arg_count) { 215 void VirtualFrame::CallRuntime(Runtime::FunctionId id, int arg_count) {
202 Forget(arg_count); 216 Forget(arg_count);
203 ASSERT(cgen()->HasValidEntryRegisters()); 217 ASSERT(cgen()->HasValidEntryRegisters());
(...skipping 85 matching lines...) Expand 10 before | Expand all | Expand 10 after
289 void VirtualFrame::EmitPushMultiple(int count, int src_regs) { 303 void VirtualFrame::EmitPushMultiple(int count, int src_regs) {
290 ASSERT(stack_pointer_ == element_count() - 1); 304 ASSERT(stack_pointer_ == element_count() - 1);
291 Adjust(count); 305 Adjust(count);
292 __ stm(db_w, sp, src_regs); 306 __ stm(db_w, sp, src_regs);
293 } 307 }
294 308
295 309
296 #undef __ 310 #undef __
297 311
298 } } // namespace v8::internal 312 } } // namespace v8::internal
OLDNEW
« no previous file with comments | « src/arm/virtual-frame-arm.h ('k') | src/array.js » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698