OLD | NEW |
1 // Copyright 2014 the V8 project authors. All rights reserved. | 1 // Copyright 2014 the V8 project authors. All rights reserved. |
2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
4 | 4 |
5 #include "src/compiler/instruction-selector-impl.h" | 5 #include "src/compiler/instruction-selector-impl.h" |
6 #include "src/compiler/node-matchers.h" | 6 #include "src/compiler/node-matchers.h" |
7 | 7 |
8 namespace v8 { | 8 namespace v8 { |
9 namespace internal { | 9 namespace internal { |
10 namespace compiler { | 10 namespace compiler { |
(...skipping 689 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
700 case CallDescriptor::kCallAddress: | 700 case CallDescriptor::kCallAddress: |
701 opcode = kArchCallAddress; | 701 opcode = kArchCallAddress; |
702 break; | 702 break; |
703 case CallDescriptor::kCallJSFunction: | 703 case CallDescriptor::kCallJSFunction: |
704 opcode = kArchCallJSFunction; | 704 opcode = kArchCallJSFunction; |
705 break; | 705 break; |
706 default: | 706 default: |
707 UNREACHABLE(); | 707 UNREACHABLE(); |
708 return; | 708 return; |
709 } | 709 } |
710 opcode |= MiscField::encode(descriptor->deoptimization_support()); | 710 opcode |= MiscField::encode(descriptor->flags()); |
711 | 711 |
712 // Emit the call instruction. | 712 // Emit the call instruction. |
713 Instruction* call_instr = | 713 Instruction* call_instr = |
714 Emit(opcode, buffer.outputs.size(), &buffer.outputs.front(), | 714 Emit(opcode, buffer.outputs.size(), &buffer.outputs.front(), |
715 buffer.instruction_args.size(), &buffer.instruction_args.front()); | 715 buffer.instruction_args.size(), &buffer.instruction_args.front()); |
716 | 716 |
717 call_instr->MarkAsCall(); | 717 call_instr->MarkAsCall(); |
718 if (deoptimization != NULL) { | 718 if (deoptimization != NULL) { |
719 DCHECK(continuation != NULL); | 719 DCHECK(continuation != NULL); |
720 call_instr->MarkAsControl(); | 720 call_instr->MarkAsControl(); |
721 } | 721 } |
722 | 722 |
723 // Caller clean up of stack for C-style calls. | 723 // Caller clean up of stack for C-style calls. |
724 if (descriptor->kind() == CallDescriptor::kCallAddress && | 724 if (descriptor->kind() == CallDescriptor::kCallAddress && |
725 !buffer.pushed_nodes.empty()) { | 725 !buffer.pushed_nodes.empty()) { |
726 DCHECK(deoptimization == NULL && continuation == NULL); | 726 DCHECK(deoptimization == NULL && continuation == NULL); |
727 Emit(kArchDrop | | 727 Emit(kArchDrop | |
728 MiscField::encode(static_cast<int>(buffer.pushed_nodes.size())), | 728 MiscField::encode(static_cast<int>(buffer.pushed_nodes.size())), |
729 NULL); | 729 NULL); |
730 } | 730 } |
731 } | 731 } |
732 | 732 |
733 } // namespace compiler | 733 } // namespace compiler |
734 } // namespace internal | 734 } // namespace internal |
735 } // namespace v8 | 735 } // namespace v8 |
OLD | NEW |