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

Side by Side Diff: src/arm/ic-arm.cc

Issue 502028: Streamline the calling convention of the call ICs by passing the... (Closed) Base URL: http://v8.googlecode.com/svn/branches/bleeding_edge/
Patch Set: '' Created 11 years 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/fast-codegen-arm.cc ('k') | src/fast-codegen.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 2006-2008 the V8 project authors. All rights reserved. 1 // Copyright 2006-2008 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 258 matching lines...) Expand 10 before | Expand all | Expand 10 after
269 __ bind(&boolean); 269 __ bind(&boolean);
270 StubCompiler::GenerateLoadGlobalFunctionPrototype( 270 StubCompiler::GenerateLoadGlobalFunctionPrototype(
271 masm, Context::BOOLEAN_FUNCTION_INDEX, r1); 271 masm, Context::BOOLEAN_FUNCTION_INDEX, r1);
272 272
273 // Probe the stub cache for the value object. 273 // Probe the stub cache for the value object.
274 __ bind(&probe); 274 __ bind(&probe);
275 StubCache::GenerateProbe(masm, flags, r1, r2, r3, no_reg); 275 StubCache::GenerateProbe(masm, flags, r1, r2, r3, no_reg);
276 276
277 // Cache miss: Jump to runtime. 277 // Cache miss: Jump to runtime.
278 __ bind(&miss); 278 __ bind(&miss);
279 Generate(masm, argc, ExternalReference(IC_Utility(kCallIC_Miss))); 279 GenerateMiss(masm, argc);
280 } 280 }
281 281
282 282
283 static void GenerateNormalHelper(MacroAssembler* masm, 283 static void GenerateNormalHelper(MacroAssembler* masm,
284 int argc, 284 int argc,
285 bool is_global_object, 285 bool is_global_object,
286 Label* miss) { 286 Label* miss) {
287 // Search dictionary - put result in register r1. 287 // Search dictionary - put result in register r1.
288 GenerateDictionaryLoad(masm, miss, r0, r1); 288 GenerateDictionaryLoad(masm, miss, r0, r1);
289 289
(...skipping 74 matching lines...) Expand 10 before | Expand all | Expand 10 after
364 __ bind(&invoke); 364 __ bind(&invoke);
365 GenerateNormalHelper(masm, argc, false, &miss); 365 GenerateNormalHelper(masm, argc, false, &miss);
366 366
367 // Global object access: Check access rights. 367 // Global object access: Check access rights.
368 __ bind(&global_proxy); 368 __ bind(&global_proxy);
369 __ CheckAccessGlobalProxy(r1, r0, &miss); 369 __ CheckAccessGlobalProxy(r1, r0, &miss);
370 __ b(&invoke); 370 __ b(&invoke);
371 371
372 // Cache miss: Jump to runtime. 372 // Cache miss: Jump to runtime.
373 __ bind(&miss); 373 __ bind(&miss);
374 Generate(masm, argc, ExternalReference(IC_Utility(kCallIC_Miss))); 374 GenerateMiss(masm, argc);
375 } 375 }
376 376
377 377
378 void CallIC::Generate(MacroAssembler* masm, 378 void CallIC::GenerateMiss(MacroAssembler* masm, int argc) {
379 int argc,
380 const ExternalReference& f) {
381 // ----------- S t a t e ------------- 379 // ----------- S t a t e -------------
382 // -- lr: return address 380 // -- lr: return address
383 // ----------------------------------- 381 // -----------------------------------
384 382
385 // Get the receiver of the function from the stack. 383 // Get the receiver of the function from the stack.
386 __ ldr(r2, MemOperand(sp, argc * kPointerSize)); 384 __ ldr(r2, MemOperand(sp, argc * kPointerSize));
387 // Get the name of the function to call from the stack. 385 // Get the name of the function to call from the stack.
388 __ ldr(r1, MemOperand(sp, (argc + 1) * kPointerSize)); 386 __ ldr(r1, MemOperand(sp, (argc + 1) * kPointerSize));
389 387
390 __ EnterInternalFrame(); 388 __ EnterInternalFrame();
391 389
392 // Push the receiver and the name of the function. 390 // Push the receiver and the name of the function.
393 __ stm(db_w, sp, r1.bit() | r2.bit()); 391 __ stm(db_w, sp, r1.bit() | r2.bit());
394 392
395 // Call the entry. 393 // Call the entry.
396 __ mov(r0, Operand(2)); 394 __ mov(r0, Operand(2));
397 __ mov(r1, Operand(f)); 395 __ mov(r1, Operand(ExternalReference(IC_Utility(kCallIC_Miss))));
398 396
399 CEntryStub stub(1); 397 CEntryStub stub(1);
400 __ CallStub(&stub); 398 __ CallStub(&stub);
401 399
402 // Move result to r1 and leave the internal frame. 400 // Move result to r1 and leave the internal frame.
403 __ mov(r1, Operand(r0)); 401 __ mov(r1, Operand(r0));
404 __ LeaveInternalFrame(); 402 __ LeaveInternalFrame();
405 403
406 // Check if the receiver is a global object of some sort. 404 // Check if the receiver is a global object of some sort.
407 Label invoke, global; 405 Label invoke, global;
(...skipping 426 matching lines...) Expand 10 before | Expand all | Expand 10 after
834 832
835 // Perform tail call to the entry. 833 // Perform tail call to the entry.
836 __ TailCallRuntime(f, 3, 1); 834 __ TailCallRuntime(f, 3, 1);
837 } 835 }
838 836
839 837
840 #undef __ 838 #undef __
841 839
842 840
843 } } // namespace v8::internal 841 } } // namespace v8::internal
OLDNEW
« no previous file with comments | « src/arm/fast-codegen-arm.cc ('k') | src/fast-codegen.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698