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

Side by Side Diff: src/arm/ic-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/full-codegen-arm.cc ('k') | src/arm/lithium-codegen-arm.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 397 matching lines...) Expand 10 before | Expand all | Expand 10 after
408 408
409 // Check that the value isn't a smi. 409 // Check that the value isn't a smi.
410 __ JumpIfSmi(r1, miss); 410 __ JumpIfSmi(r1, miss);
411 411
412 // Check that the value is a JSFunction. 412 // Check that the value is a JSFunction.
413 __ CompareObjectType(r1, scratch, scratch, JS_FUNCTION_TYPE); 413 __ CompareObjectType(r1, scratch, scratch, JS_FUNCTION_TYPE);
414 __ b(ne, miss); 414 __ b(ne, miss);
415 415
416 // Invoke the function. 416 // Invoke the function.
417 ParameterCount actual(argc); 417 ParameterCount actual(argc);
418 __ InvokeFunction(r1, actual, JUMP_FUNCTION, 418 __ InvokeFunction(r1, actual, JUMP_FUNCTION, NullCallWrapper());
419 NullCallWrapper(), CALL_AS_METHOD);
420 } 419 }
421 420
422 421
423 void CallICBase::GenerateNormal(MacroAssembler* masm, int argc) { 422 void CallICBase::GenerateNormal(MacroAssembler* masm, int argc) {
424 // ----------- S t a t e ------------- 423 // ----------- S t a t e -------------
425 // -- r2 : name 424 // -- r2 : name
426 // -- lr : return address 425 // -- lr : return address
427 // ----------------------------------- 426 // -----------------------------------
428 Label miss; 427 Label miss;
429 428
(...skipping 60 matching lines...) Expand 10 before | Expand all | Expand 10 after
490 __ b(ne, &invoke); 489 __ b(ne, &invoke);
491 490
492 // Patch the receiver on the stack. 491 // Patch the receiver on the stack.
493 __ bind(&global); 492 __ bind(&global);
494 __ LoadRoot(r2, Heap::kUndefinedValueRootIndex); 493 __ LoadRoot(r2, Heap::kUndefinedValueRootIndex);
495 __ str(r2, MemOperand(sp, argc * kPointerSize)); 494 __ str(r2, MemOperand(sp, argc * kPointerSize));
496 __ bind(&invoke); 495 __ bind(&invoke);
497 } 496 }
498 497
499 // Invoke the function. 498 // Invoke the function.
500 CallKind call_kind = CallICBase::Contextual::decode(extra_state)
501 ? CALL_AS_FUNCTION
502 : CALL_AS_METHOD;
503 ParameterCount actual(argc); 499 ParameterCount actual(argc);
504 __ InvokeFunction(r1, 500 __ InvokeFunction(r1, actual, JUMP_FUNCTION, NullCallWrapper());
505 actual,
506 JUMP_FUNCTION,
507 NullCallWrapper(),
508 call_kind);
509 } 501 }
510 502
511 503
512 void CallIC::GenerateMegamorphic(MacroAssembler* masm, 504 void CallIC::GenerateMegamorphic(MacroAssembler* masm,
513 int argc, 505 int argc,
514 ExtraICState extra_ic_state) { 506 ExtraICState extra_ic_state) {
515 // ----------- S t a t e ------------- 507 // ----------- S t a t e -------------
516 // -- r2 : name 508 // -- r2 : name
517 // -- lr : return address 509 // -- lr : return address
518 // ----------------------------------- 510 // -----------------------------------
(...skipping 1159 matching lines...) Expand 10 before | Expand all | Expand 10 after
1678 } else { 1670 } else {
1679 ASSERT(Assembler::GetCondition(branch_instr) == ne); 1671 ASSERT(Assembler::GetCondition(branch_instr) == ne);
1680 patcher.EmitCondition(eq); 1672 patcher.EmitCondition(eq);
1681 } 1673 }
1682 } 1674 }
1683 1675
1684 1676
1685 } } // namespace v8::internal 1677 } } // namespace v8::internal
1686 1678
1687 #endif // V8_TARGET_ARCH_ARM 1679 #endif // V8_TARGET_ARCH_ARM
OLDNEW
« no previous file with comments | « src/arm/full-codegen-arm.cc ('k') | src/arm/lithium-codegen-arm.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698