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

Side by Side Diff: src/mips/macro-assembler-mips.cc

Issue 137663005: MIPS: This is a preview of a first step towards unification of the hydrogen call machinery. (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
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 | Annotate | Revision Log
« no previous file with comments | « src/mips/macro-assembler-mips.h ('k') | no next file » | 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 3660 matching lines...) Expand 10 before | Expand all | Expand 10 after
3671 ASSERT(flag == JUMP_FUNCTION); 3671 ASSERT(flag == JUMP_FUNCTION);
3672 Jump(code); 3672 Jump(code);
3673 } 3673 }
3674 // Continue here if InvokePrologue does handle the invocation due to 3674 // Continue here if InvokePrologue does handle the invocation due to
3675 // mismatched parameter counts. 3675 // mismatched parameter counts.
3676 bind(&done); 3676 bind(&done);
3677 } 3677 }
3678 } 3678 }
3679 3679
3680 3680
3681 void MacroAssembler::InvokeCode(Handle<Code> code,
3682 const ParameterCount& expected,
3683 const ParameterCount& actual,
3684 RelocInfo::Mode rmode,
3685 InvokeFlag flag) {
3686 // You can't call a function without a valid frame.
3687 ASSERT(flag == JUMP_FUNCTION || has_frame());
3688
3689 Label done;
3690
3691 bool definitely_mismatches = false;
3692 InvokePrologue(expected, actual, code, no_reg,
3693 &done, &definitely_mismatches, flag,
3694 NullCallWrapper());
3695 if (!definitely_mismatches) {
3696 if (flag == CALL_FUNCTION) {
3697 Call(code, rmode);
3698 } else {
3699 Jump(code, rmode);
3700 }
3701 // Continue here if InvokePrologue does handle the invocation due to
3702 // mismatched parameter counts.
3703 bind(&done);
3704 }
3705 }
3706
3707
3708 void MacroAssembler::InvokeFunction(Register function, 3681 void MacroAssembler::InvokeFunction(Register function,
3709 const ParameterCount& actual, 3682 const ParameterCount& actual,
3710 InvokeFlag flag, 3683 InvokeFlag flag,
3711 const CallWrapper& call_wrapper) { 3684 const CallWrapper& call_wrapper) {
3712 // You can't call a function without a valid frame. 3685 // You can't call a function without a valid frame.
3713 ASSERT(flag == JUMP_FUNCTION || has_frame()); 3686 ASSERT(flag == JUMP_FUNCTION || has_frame());
3714 3687
3715 // Contract with called JS functions requires that function is passed in a1. 3688 // Contract with called JS functions requires that function is passed in a1.
3716 ASSERT(function.is(a1)); 3689 ASSERT(function.is(a1));
3717 Register expected_reg = a2; 3690 Register expected_reg = a2;
(...skipping 2049 matching lines...) Expand 10 before | Expand all | Expand 10 after
5767 opcode == BGTZL); 5740 opcode == BGTZL);
5768 opcode = (cond == eq) ? BEQ : BNE; 5741 opcode = (cond == eq) ? BEQ : BNE;
5769 instr = (instr & ~kOpcodeMask) | opcode; 5742 instr = (instr & ~kOpcodeMask) | opcode;
5770 masm_.emit(instr); 5743 masm_.emit(instr);
5771 } 5744 }
5772 5745
5773 5746
5774 } } // namespace v8::internal 5747 } } // namespace v8::internal
5775 5748
5776 #endif // V8_TARGET_ARCH_MIPS 5749 #endif // V8_TARGET_ARCH_MIPS
OLDNEW
« no previous file with comments | « src/mips/macro-assembler-mips.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698