OLD | NEW |
1 // Copyright 2013 the V8 project authors. All rights reserved. | 1 // Copyright 2013 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 3736 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
3747 } | 3747 } |
3748 } | 3748 } |
3749 | 3749 |
3750 | 3750 |
3751 void LCodeGen::DoCallFunction(LCallFunction* instr) { | 3751 void LCodeGen::DoCallFunction(LCallFunction* instr) { |
3752 ASSERT(ToRegister(instr->context()).is(rsi)); | 3752 ASSERT(ToRegister(instr->context()).is(rsi)); |
3753 ASSERT(ToRegister(instr->function()).is(rdi)); | 3753 ASSERT(ToRegister(instr->function()).is(rdi)); |
3754 ASSERT(ToRegister(instr->result()).is(rax)); | 3754 ASSERT(ToRegister(instr->result()).is(rax)); |
3755 | 3755 |
3756 int arity = instr->arity(); | 3756 int arity = instr->arity(); |
3757 CallFunctionStub stub(arity, NO_CALL_FUNCTION_FLAGS); | 3757 CallFunctionStub stub(arity, instr->hydrogen()->function_flags()); |
3758 if (instr->hydrogen()->IsTailCall()) { | 3758 CallCode(stub.GetCode(isolate()), RelocInfo::CODE_TARGET, instr); |
3759 if (NeedsEagerFrame()) __ leave(); | |
3760 __ jmp(stub.GetCode(isolate()), RelocInfo::CODE_TARGET); | |
3761 } else { | |
3762 CallCode(stub.GetCode(isolate()), RelocInfo::CODE_TARGET, instr); | |
3763 } | |
3764 } | 3759 } |
3765 | 3760 |
3766 | 3761 |
3767 void LCodeGen::DoCallNew(LCallNew* instr) { | 3762 void LCodeGen::DoCallNew(LCallNew* instr) { |
3768 ASSERT(ToRegister(instr->context()).is(rsi)); | 3763 ASSERT(ToRegister(instr->context()).is(rsi)); |
3769 ASSERT(ToRegister(instr->constructor()).is(rdi)); | 3764 ASSERT(ToRegister(instr->constructor()).is(rdi)); |
3770 ASSERT(ToRegister(instr->result()).is(rax)); | 3765 ASSERT(ToRegister(instr->result()).is(rax)); |
3771 | 3766 |
3772 __ Set(rax, instr->arity()); | 3767 __ Set(rax, instr->arity()); |
3773 // No cell in ebx for construct type feedback in optimized code | 3768 // No cell in ebx for construct type feedback in optimized code |
(...skipping 1776 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
5550 FixedArray::kHeaderSize - kPointerSize)); | 5545 FixedArray::kHeaderSize - kPointerSize)); |
5551 __ bind(&done); | 5546 __ bind(&done); |
5552 } | 5547 } |
5553 | 5548 |
5554 | 5549 |
5555 #undef __ | 5550 #undef __ |
5556 | 5551 |
5557 } } // namespace v8::internal | 5552 } } // namespace v8::internal |
5558 | 5553 |
5559 #endif // V8_TARGET_ARCH_X64 | 5554 #endif // V8_TARGET_ARCH_X64 |
OLD | NEW |