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_ARM. | 5 #include "vm/globals.h" // Needed here to get TARGET_ARCH_ARM. |
6 #if defined(TARGET_ARCH_ARM) | 6 #if defined(TARGET_ARCH_ARM) |
7 | 7 |
8 #include "vm/flow_graph_compiler.h" | 8 #include "vm/flow_graph_compiler.h" |
9 | 9 |
10 #include "vm/ast_printer.h" | 10 #include "vm/ast_printer.h" |
(...skipping 702 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
713 // type check runtime call is the checked value. | 713 // type check runtime call is the checked value. |
714 __ Drop(6); | 714 __ Drop(6); |
715 __ Pop(R0); | 715 __ Pop(R0); |
716 | 716 |
717 __ Bind(&is_assignable); | 717 __ Bind(&is_assignable); |
718 // Restore instantiator (R2) and its type arguments (R1). | 718 // Restore instantiator (R2) and its type arguments (R1). |
719 __ PopList((1 << R1) | (1 << R2)); | 719 __ PopList((1 << R1) | (1 << R2)); |
720 } | 720 } |
721 | 721 |
722 | 722 |
723 void FlowGraphCompiler::EmitInstructionPrologue(Instruction* instr) { | |
724 if (!is_optimizing()) { | |
725 if (FLAG_enable_type_checks && instr->IsAssertAssignable()) { | |
726 AssertAssignableInstr* assert = instr->AsAssertAssignable(); | |
727 AddCurrentDescriptor(PcDescriptors::kDeopt, | |
728 assert->deopt_id(), | |
729 assert->token_pos()); | |
730 } else if (instr->IsGuardField() || | |
731 instr->CanBecomeDeoptimizationTarget()) { | |
732 AddCurrentDescriptor(PcDescriptors::kDeopt, | |
733 instr->deopt_id(), | |
734 Scanner::kDummyTokenIndex); | |
735 } | |
736 AllocateRegistersLocally(instr); | |
737 } else if (instr->MayThrow() && | |
738 (CurrentTryIndex() != CatchClauseNode::kInvalidTryIndex)) { | |
739 // Optimized try-block: Sync locals to fixed stack locations. | |
740 EmitTrySync(instr, CurrentTryIndex()); | |
741 } | |
742 } | |
743 | |
744 | |
745 void FlowGraphCompiler::EmitTrySyncMove(intptr_t dest_offset, | 723 void FlowGraphCompiler::EmitTrySyncMove(intptr_t dest_offset, |
746 Location loc, | 724 Location loc, |
747 bool* push_emitted) { | 725 bool* push_emitted) { |
748 if (loc.IsConstant()) { | 726 if (loc.IsConstant()) { |
749 if (!*push_emitted) { | 727 if (!*push_emitted) { |
750 __ Push(R0); | 728 __ Push(R0); |
751 *push_emitted = true; | 729 *push_emitted = true; |
752 } | 730 } |
753 __ LoadObject(R0, loc.constant()); | 731 __ LoadObject(R0, loc.constant()); |
754 __ StoreToOffset(kWord, R0, FP, dest_offset); | 732 __ StoreToOffset(kWord, R0, FP, dest_offset); |
(...skipping 1158 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1913 DRegister dreg = EvenDRegisterOf(reg); | 1891 DRegister dreg = EvenDRegisterOf(reg); |
1914 __ vldrd(dreg, Address(SP, kDoubleSize, Address::PostIndex)); | 1892 __ vldrd(dreg, Address(SP, kDoubleSize, Address::PostIndex)); |
1915 } | 1893 } |
1916 | 1894 |
1917 | 1895 |
1918 #undef __ | 1896 #undef __ |
1919 | 1897 |
1920 } // namespace dart | 1898 } // namespace dart |
1921 | 1899 |
1922 #endif // defined TARGET_ARCH_ARM | 1900 #endif // defined TARGET_ARCH_ARM |
OLD | NEW |