| OLD | NEW |
| 1 // Copyright 2012 the V8 project authors. All rights reserved.7 | 1 // Copyright 2012 the V8 project authors. All rights reserved.7 |
| 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 3845 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 3856 RecordSafepointWithLazyDeopt(instr, RECORD_SIMPLE_SAFEPOINT); | 3856 RecordSafepointWithLazyDeopt(instr, RECORD_SIMPLE_SAFEPOINT); |
| 3857 } | 3857 } |
| 3858 | 3858 |
| 3859 | 3859 |
| 3860 void LCodeGen::DoCallFunction(LCallFunction* instr) { | 3860 void LCodeGen::DoCallFunction(LCallFunction* instr) { |
| 3861 ASSERT(ToRegister(instr->context()).is(cp)); | 3861 ASSERT(ToRegister(instr->context()).is(cp)); |
| 3862 ASSERT(ToRegister(instr->function()).is(a1)); | 3862 ASSERT(ToRegister(instr->function()).is(a1)); |
| 3863 ASSERT(ToRegister(instr->result()).is(v0)); | 3863 ASSERT(ToRegister(instr->result()).is(v0)); |
| 3864 | 3864 |
| 3865 int arity = instr->arity(); | 3865 int arity = instr->arity(); |
| 3866 CallFunctionStub stub(arity, NO_CALL_FUNCTION_FLAGS); | 3866 CallFunctionStub stub(arity, instr->hydrogen()->function_flags()); |
| 3867 if (instr->hydrogen()->IsTailCall()) { | 3867 CallCode(stub.GetCode(isolate()), RelocInfo::CODE_TARGET, instr); |
| 3868 if (NeedsEagerFrame()) __ mov(sp, fp); | |
| 3869 __ Jump(stub.GetCode(isolate()), RelocInfo::CODE_TARGET); | |
| 3870 } else { | |
| 3871 CallCode(stub.GetCode(isolate()), RelocInfo::CODE_TARGET, instr); | |
| 3872 } | |
| 3873 } | 3868 } |
| 3874 | 3869 |
| 3875 | 3870 |
| 3876 void LCodeGen::DoCallNew(LCallNew* instr) { | 3871 void LCodeGen::DoCallNew(LCallNew* instr) { |
| 3877 ASSERT(ToRegister(instr->context()).is(cp)); | 3872 ASSERT(ToRegister(instr->context()).is(cp)); |
| 3878 ASSERT(ToRegister(instr->constructor()).is(a1)); | 3873 ASSERT(ToRegister(instr->constructor()).is(a1)); |
| 3879 ASSERT(ToRegister(instr->result()).is(v0)); | 3874 ASSERT(ToRegister(instr->result()).is(v0)); |
| 3880 | 3875 |
| 3881 __ li(a0, Operand(instr->arity())); | 3876 __ li(a0, Operand(instr->arity())); |
| 3882 // No cell in a2 for construct type feedback in optimized code | 3877 // No cell in a2 for construct type feedback in optimized code |
| (...skipping 1854 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 5737 __ Subu(scratch, result, scratch); | 5732 __ Subu(scratch, result, scratch); |
| 5738 __ lw(result, FieldMemOperand(scratch, | 5733 __ lw(result, FieldMemOperand(scratch, |
| 5739 FixedArray::kHeaderSize - kPointerSize)); | 5734 FixedArray::kHeaderSize - kPointerSize)); |
| 5740 __ bind(&done); | 5735 __ bind(&done); |
| 5741 } | 5736 } |
| 5742 | 5737 |
| 5743 | 5738 |
| 5744 #undef __ | 5739 #undef __ |
| 5745 | 5740 |
| 5746 } } // namespace v8::internal | 5741 } } // namespace v8::internal |
| OLD | NEW |