| 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 706 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 717 } | 717 } |
| 718 | 718 |
| 719 | 719 |
| 720 void FlowGraphCompiler::EmitInstructionPrologue(Instruction* instr) { | 720 void FlowGraphCompiler::EmitInstructionPrologue(Instruction* instr) { |
| 721 if (!is_optimizing()) { | 721 if (!is_optimizing()) { |
| 722 if (FLAG_enable_type_checks && instr->IsAssertAssignable()) { | 722 if (FLAG_enable_type_checks && instr->IsAssertAssignable()) { |
| 723 AssertAssignableInstr* assert = instr->AsAssertAssignable(); | 723 AssertAssignableInstr* assert = instr->AsAssertAssignable(); |
| 724 AddCurrentDescriptor(PcDescriptors::kDeopt, | 724 AddCurrentDescriptor(PcDescriptors::kDeopt, |
| 725 assert->deopt_id(), | 725 assert->deopt_id(), |
| 726 assert->token_pos()); | 726 assert->token_pos()); |
| 727 } else if (instr->IsGuardField()) { | 727 } else if (instr->CanBeDeoptimizationTarget() || instr->IsGuardField()) { |
| 728 GuardFieldInstr* guard = instr->AsGuardField(); | |
| 729 AddCurrentDescriptor(PcDescriptors::kDeopt, | |
| 730 guard->deopt_id(), | |
| 731 Scanner::kDummyTokenIndex); | |
| 732 } else if (instr->CanBeDeoptimizationTarget()) { | |
| 733 AddCurrentDescriptor(PcDescriptors::kDeopt, | 728 AddCurrentDescriptor(PcDescriptors::kDeopt, |
| 734 instr->deopt_id(), | 729 instr->deopt_id(), |
| 735 Scanner::kDummyTokenIndex); | 730 Scanner::kDummyTokenIndex); |
| 736 } | 731 } |
| 737 AllocateRegistersLocally(instr); | 732 AllocateRegistersLocally(instr); |
| 738 } else if (instr->MayThrow() && | 733 } else if (instr->MayThrow() && |
| 739 (CurrentTryIndex() != CatchClauseNode::kInvalidTryIndex)) { | 734 (CurrentTryIndex() != CatchClauseNode::kInvalidTryIndex)) { |
| 740 // Optimized try-block: Sync locals to fixed stack locations. | 735 // Optimized try-block: Sync locals to fixed stack locations. |
| 741 EmitTrySync(instr, CurrentTryIndex()); | 736 EmitTrySync(instr, CurrentTryIndex()); |
| 742 } | 737 } |
| (...skipping 1190 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1933 __ movups(reg, Address(RSP, 0)); | 1928 __ movups(reg, Address(RSP, 0)); |
| 1934 __ addq(RSP, Immediate(kFpuRegisterSize)); | 1929 __ addq(RSP, Immediate(kFpuRegisterSize)); |
| 1935 } | 1930 } |
| 1936 | 1931 |
| 1937 | 1932 |
| 1938 #undef __ | 1933 #undef __ |
| 1939 | 1934 |
| 1940 } // namespace dart | 1935 } // namespace dart |
| 1941 | 1936 |
| 1942 #endif // defined TARGET_ARCH_X64 | 1937 #endif // defined TARGET_ARCH_X64 |
| OLD | NEW |