| 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_IA32. | 5 #include "vm/globals.h" // Needed here to get TARGET_ARCH_IA32. |
| 6 #if defined(TARGET_ARCH_IA32) | 6 #if defined(TARGET_ARCH_IA32) |
| 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 709 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 720 } | 720 } |
| 721 | 721 |
| 722 | 722 |
| 723 void FlowGraphCompiler::EmitInstructionPrologue(Instruction* instr) { | 723 void FlowGraphCompiler::EmitInstructionPrologue(Instruction* instr) { |
| 724 if (!is_optimizing()) { | 724 if (!is_optimizing()) { |
| 725 if (FLAG_enable_type_checks && instr->IsAssertAssignable()) { | 725 if (FLAG_enable_type_checks && instr->IsAssertAssignable()) { |
| 726 AssertAssignableInstr* assert = instr->AsAssertAssignable(); | 726 AssertAssignableInstr* assert = instr->AsAssertAssignable(); |
| 727 AddCurrentDescriptor(PcDescriptors::kDeopt, | 727 AddCurrentDescriptor(PcDescriptors::kDeopt, |
| 728 assert->deopt_id(), | 728 assert->deopt_id(), |
| 729 assert->token_pos()); | 729 assert->token_pos()); |
| 730 } else if (instr->IsGuardField()) { | 730 } else if (instr->IsGuardField() || |
| 731 GuardFieldInstr* guard = instr->AsGuardField(); | 731 instr->CanBecomeDeoptimizationTarget()) { |
| 732 AddCurrentDescriptor(PcDescriptors::kDeopt, | |
| 733 guard->deopt_id(), | |
| 734 Scanner::kDummyTokenIndex); | |
| 735 } else if (instr->CanBeDeoptimizationTarget()) { | |
| 736 AddCurrentDescriptor(PcDescriptors::kDeopt, | 732 AddCurrentDescriptor(PcDescriptors::kDeopt, |
| 737 instr->deopt_id(), | 733 instr->deopt_id(), |
| 738 Scanner::kDummyTokenIndex); | 734 Scanner::kDummyTokenIndex); |
| 739 } | 735 } |
| 740 AllocateRegistersLocally(instr); | 736 AllocateRegistersLocally(instr); |
| 741 } else if (instr->MayThrow() && | 737 } else if (instr->MayThrow() && |
| 742 (CurrentTryIndex() != CatchClauseNode::kInvalidTryIndex)) { | 738 (CurrentTryIndex() != CatchClauseNode::kInvalidTryIndex)) { |
| 743 // Optimized try-block: Sync locals to fixed stack locations. | 739 // Optimized try-block: Sync locals to fixed stack locations. |
| 744 EmitTrySync(instr, CurrentTryIndex()); | 740 EmitTrySync(instr, CurrentTryIndex()); |
| 745 } | 741 } |
| (...skipping 1170 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1916 __ movups(reg, Address(ESP, 0)); | 1912 __ movups(reg, Address(ESP, 0)); |
| 1917 __ addl(ESP, Immediate(kFpuRegisterSize)); | 1913 __ addl(ESP, Immediate(kFpuRegisterSize)); |
| 1918 } | 1914 } |
| 1919 | 1915 |
| 1920 | 1916 |
| 1921 #undef __ | 1917 #undef __ |
| 1922 | 1918 |
| 1923 } // namespace dart | 1919 } // namespace dart |
| 1924 | 1920 |
| 1925 #endif // defined TARGET_ARCH_IA32 | 1921 #endif // defined TARGET_ARCH_IA32 |
| OLD | NEW |