OLD | NEW |
1 // Copyright 2011 the V8 project authors. All rights reserved. | 1 // Copyright 2011 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 3557 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
3568 { MaybeObject* maybe_result = stub->TryGetCode(); | 3568 { MaybeObject* maybe_result = stub->TryGetCode(); |
3569 if (!maybe_result->ToObject(&result)) return maybe_result; | 3569 if (!maybe_result->ToObject(&result)) return maybe_result; |
3570 } | 3570 } |
3571 Call(Handle<Code>(Code::cast(result)), RelocInfo::CODE_TARGET, | 3571 Call(Handle<Code>(Code::cast(result)), RelocInfo::CODE_TARGET, |
3572 kNoASTId, cond, r1, r2); | 3572 kNoASTId, cond, r1, r2); |
3573 return result; | 3573 return result; |
3574 } | 3574 } |
3575 | 3575 |
3576 | 3576 |
3577 void MacroAssembler::TailCallStub(CodeStub* stub) { | 3577 void MacroAssembler::TailCallStub(CodeStub* stub) { |
3578 ASSERT(stub->CompilingCallsToThisStubIsGCSafe() || allow_stub_calls_); | 3578 ASSERT(allow_stub_calls_ || stub->CompilingCallsToThisStubIsGCSafe()); |
3579 Jump(stub->GetCode(), RelocInfo::CODE_TARGET); | 3579 Jump(stub->GetCode(), RelocInfo::CODE_TARGET); |
3580 } | 3580 } |
3581 | 3581 |
3582 | 3582 |
3583 MaybeObject* MacroAssembler::TryTailCallStub(CodeStub* stub, | 3583 MaybeObject* MacroAssembler::TryTailCallStub(CodeStub* stub, |
3584 Condition cond, | 3584 Condition cond, |
3585 Register r1, | 3585 Register r1, |
3586 const Operand& r2) { | 3586 const Operand& r2) { |
3587 Object* result; | 3587 Object* result; |
3588 { MaybeObject* maybe_result = stub->TryGetCode(); | 3588 { MaybeObject* maybe_result = stub->TryGetCode(); |
(...skipping 98 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
3687 1); | 3687 1); |
3688 mov(v0, s0); | 3688 mov(v0, s0); |
3689 jmp(&leave_exit_frame); | 3689 jmp(&leave_exit_frame); |
3690 | 3690 |
3691 return result; | 3691 return result; |
3692 } | 3692 } |
3693 | 3693 |
3694 | 3694 |
3695 bool MacroAssembler::AllowThisStubCall(CodeStub* stub) { | 3695 bool MacroAssembler::AllowThisStubCall(CodeStub* stub) { |
3696 if (!has_frame_ && stub->SometimesSetsUpAFrame()) return false; | 3696 if (!has_frame_ && stub->SometimesSetsUpAFrame()) return false; |
3697 return stub->CompilingCallsToThisStubIsGCSafe() || allow_stub_calls_; | 3697 return allow_stub_calls_ || stub->CompilingCallsToThisStubIsGCSafe(); |
3698 } | 3698 } |
3699 | 3699 |
3700 | 3700 |
3701 void MacroAssembler::IllegalOperation(int num_arguments) { | 3701 void MacroAssembler::IllegalOperation(int num_arguments) { |
3702 if (num_arguments > 0) { | 3702 if (num_arguments > 0) { |
3703 addiu(sp, sp, num_arguments * kPointerSize); | 3703 addiu(sp, sp, num_arguments * kPointerSize); |
3704 } | 3704 } |
3705 LoadRoot(v0, Heap::kUndefinedValueRootIndex); | 3705 LoadRoot(v0, Heap::kUndefinedValueRootIndex); |
3706 } | 3706 } |
3707 | 3707 |
(...skipping 1048 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
4756 opcode == BGTZL); | 4756 opcode == BGTZL); |
4757 opcode = (cond == eq) ? BEQ : BNE; | 4757 opcode = (cond == eq) ? BEQ : BNE; |
4758 instr = (instr & ~kOpcodeMask) | opcode; | 4758 instr = (instr & ~kOpcodeMask) | opcode; |
4759 masm_.emit(instr); | 4759 masm_.emit(instr); |
4760 } | 4760 } |
4761 | 4761 |
4762 | 4762 |
4763 } } // namespace v8::internal | 4763 } } // namespace v8::internal |
4764 | 4764 |
4765 #endif // V8_TARGET_ARCH_MIPS | 4765 #endif // V8_TARGET_ARCH_MIPS |
OLD | NEW |