| OLD | NEW |
| 1 // Copyright (c) 2013, the Dart project authors. Please see the AUTHORS file | 1 // Copyright (c) 2013, the Dart project authors. Please see the AUTHORS file |
| 2 // for details. All rights reserved. Use of this source code is governed by a | 2 // for details. All rights reserved. Use of this source code is governed by a |
| 3 // BSD-style license that can be found in the LICENSE file. | 3 // BSD-style license that can be found in the LICENSE file. |
| 4 | 4 |
| 5 #include "vm/globals.h" // Needed here to get TARGET_ARCH_X64. | 5 #include "vm/globals.h" // Needed here to get TARGET_ARCH_X64. |
| 6 #if defined(TARGET_ARCH_X64) | 6 #if defined(TARGET_ARCH_X64) |
| 7 | 7 |
| 8 #include "vm/flow_graph_compiler.h" | 8 #include "vm/flow_graph_compiler.h" |
| 9 | 9 |
| 10 #include "lib/error.h" | 10 #include "lib/error.h" |
| (...skipping 704 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 715 } | 715 } |
| 716 | 716 |
| 717 | 717 |
| 718 void FlowGraphCompiler::EmitInstructionPrologue(Instruction* instr) { | 718 void FlowGraphCompiler::EmitInstructionPrologue(Instruction* instr) { |
| 719 if (!is_optimizing()) { | 719 if (!is_optimizing()) { |
| 720 if (FLAG_enable_type_checks && instr->IsAssertAssignable()) { | 720 if (FLAG_enable_type_checks && instr->IsAssertAssignable()) { |
| 721 AssertAssignableInstr* assert = instr->AsAssertAssignable(); | 721 AssertAssignableInstr* assert = instr->AsAssertAssignable(); |
| 722 AddCurrentDescriptor(PcDescriptors::kDeopt, | 722 AddCurrentDescriptor(PcDescriptors::kDeopt, |
| 723 assert->deopt_id(), | 723 assert->deopt_id(), |
| 724 assert->token_pos()); | 724 assert->token_pos()); |
| 725 } else if (instr->IsGuardField()) { | 725 } else if (instr->IsGuardField() || |
| 726 GuardFieldInstr* guard = instr->AsGuardField(); | 726 instr->CanBecomeDeoptimizationTarget()) { |
| 727 AddCurrentDescriptor(PcDescriptors::kDeopt, | |
| 728 guard->deopt_id(), | |
| 729 Scanner::kDummyTokenIndex); | |
| 730 } else if (instr->CanBeDeoptimizationTarget()) { | |
| 731 AddCurrentDescriptor(PcDescriptors::kDeopt, | 727 AddCurrentDescriptor(PcDescriptors::kDeopt, |
| 732 instr->deopt_id(), | 728 instr->deopt_id(), |
| 733 Scanner::kDummyTokenIndex); | 729 Scanner::kDummyTokenIndex); |
| 734 } | 730 } |
| 735 AllocateRegistersLocally(instr); | 731 AllocateRegistersLocally(instr); |
| 736 } else if (instr->MayThrow() && | 732 } else if (instr->MayThrow() && |
| 737 (CurrentTryIndex() != CatchClauseNode::kInvalidTryIndex)) { | 733 (CurrentTryIndex() != CatchClauseNode::kInvalidTryIndex)) { |
| 738 // Optimized try-block: Sync locals to fixed stack locations. | 734 // Optimized try-block: Sync locals to fixed stack locations. |
| 739 EmitTrySync(instr, CurrentTryIndex()); | 735 EmitTrySync(instr, CurrentTryIndex()); |
| 740 } | 736 } |
| (...skipping 1156 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1897 __ movups(reg, Address(RSP, 0)); | 1893 __ movups(reg, Address(RSP, 0)); |
| 1898 __ addq(RSP, Immediate(kFpuRegisterSize)); | 1894 __ addq(RSP, Immediate(kFpuRegisterSize)); |
| 1899 } | 1895 } |
| 1900 | 1896 |
| 1901 | 1897 |
| 1902 #undef __ | 1898 #undef __ |
| 1903 | 1899 |
| 1904 } // namespace dart | 1900 } // namespace dart |
| 1905 | 1901 |
| 1906 #endif // defined TARGET_ARCH_X64 | 1902 #endif // defined TARGET_ARCH_X64 |
| OLD | NEW |