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

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

Issue 138553002: MIPS: Remove CALL_AS_FUNCTION and CALL_AS_METHOD. (Closed) Base URL: https://github.com/v8/v8.git@gbl
Patch Set: 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
« no previous file with comments | « src/mips/full-codegen-mips.cc ('k') | src/mips/lithium-codegen-mips.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 399 matching lines...) Expand 10 before | Expand all | Expand 10 after
410 410
411 // Check that the value isn't a smi. 411 // Check that the value isn't a smi.
412 __ JumpIfSmi(a1, miss); 412 __ JumpIfSmi(a1, miss);
413 413
414 // Check that the value is a JSFunction. 414 // Check that the value is a JSFunction.
415 __ GetObjectType(a1, scratch, scratch); 415 __ GetObjectType(a1, scratch, scratch);
416 __ Branch(miss, ne, scratch, Operand(JS_FUNCTION_TYPE)); 416 __ Branch(miss, ne, scratch, Operand(JS_FUNCTION_TYPE));
417 417
418 // Invoke the function. 418 // Invoke the function.
419 ParameterCount actual(argc); 419 ParameterCount actual(argc);
420 __ InvokeFunction(a1, actual, JUMP_FUNCTION, 420 __ InvokeFunction(a1, actual, JUMP_FUNCTION, NullCallWrapper());
421 NullCallWrapper(), CALL_AS_METHOD);
422 } 421 }
423 422
424 423
425 void CallICBase::GenerateNormal(MacroAssembler* masm, int argc) { 424 void CallICBase::GenerateNormal(MacroAssembler* masm, int argc) {
426 // ----------- S t a t e ------------- 425 // ----------- S t a t e -------------
427 // -- a2 : name 426 // -- a2 : name
428 // -- ra : return address 427 // -- ra : return address
429 // ----------------------------------- 428 // -----------------------------------
430 Label miss; 429 Label miss;
431 430
(...skipping 59 matching lines...) Expand 10 before | Expand all | Expand 10 after
491 __ Branch(&global, eq, a3, Operand(JS_GLOBAL_OBJECT_TYPE)); 490 __ Branch(&global, eq, a3, Operand(JS_GLOBAL_OBJECT_TYPE));
492 __ Branch(&invoke, ne, a3, Operand(JS_BUILTINS_OBJECT_TYPE)); 491 __ Branch(&invoke, ne, a3, Operand(JS_BUILTINS_OBJECT_TYPE));
493 492
494 // Patch the receiver on the stack. 493 // Patch the receiver on the stack.
495 __ bind(&global); 494 __ bind(&global);
496 __ LoadRoot(a2, Heap::kUndefinedValueRootIndex); 495 __ LoadRoot(a2, Heap::kUndefinedValueRootIndex);
497 __ sw(a2, MemOperand(sp, argc * kPointerSize)); 496 __ sw(a2, MemOperand(sp, argc * kPointerSize));
498 __ bind(&invoke); 497 __ bind(&invoke);
499 } 498 }
500 // Invoke the function. 499 // Invoke the function.
501 CallKind call_kind = CallICBase::Contextual::decode(extra_state)
502 ? CALL_AS_FUNCTION
503 : CALL_AS_METHOD;
504 ParameterCount actual(argc); 500 ParameterCount actual(argc);
505 __ InvokeFunction(a1, 501 __ InvokeFunction(a1, actual, JUMP_FUNCTION, NullCallWrapper());
506 actual,
507 JUMP_FUNCTION,
508 NullCallWrapper(),
509 call_kind);
510 } 502 }
511 503
512 504
513 void CallIC::GenerateMegamorphic(MacroAssembler* masm, 505 void CallIC::GenerateMegamorphic(MacroAssembler* masm,
514 int argc, 506 int argc,
515 ExtraICState extra_ic_state) { 507 ExtraICState extra_ic_state) {
516 // ----------- S t a t e ------------- 508 // ----------- S t a t e -------------
517 // -- a2 : name 509 // -- a2 : name
518 // -- ra : return address 510 // -- ra : return address
519 // ----------------------------------- 511 // -----------------------------------
(...skipping 1166 matching lines...) Expand 10 before | Expand all | Expand 10 after
1686 } else { 1678 } else {
1687 ASSERT(Assembler::IsBne(branch_instr)); 1679 ASSERT(Assembler::IsBne(branch_instr));
1688 patcher.ChangeBranchCondition(eq); 1680 patcher.ChangeBranchCondition(eq);
1689 } 1681 }
1690 } 1682 }
1691 1683
1692 1684
1693 } } // namespace v8::internal 1685 } } // namespace v8::internal
1694 1686
1695 #endif // V8_TARGET_ARCH_MIPS 1687 #endif // V8_TARGET_ARCH_MIPS
OLDNEW
« no previous file with comments | « src/mips/full-codegen-mips.cc ('k') | src/mips/lithium-codegen-mips.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698