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 "lib/error.h" | 10 #include "lib/error.h" |
(...skipping 324 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
335 __ Bind(&is_assignable); | 335 __ Bind(&is_assignable); |
336 // Restore instantiator and its type arguments. | 336 // Restore instantiator and its type arguments. |
337 __ PopList((1 << R1) | (1 << R2)); | 337 __ PopList((1 << R1) | (1 << R2)); |
338 } | 338 } |
339 | 339 |
340 | 340 |
341 void FlowGraphCompiler::EmitInstructionPrologue(Instruction* instr) { | 341 void FlowGraphCompiler::EmitInstructionPrologue(Instruction* instr) { |
342 if (!is_optimizing()) { | 342 if (!is_optimizing()) { |
343 if (FLAG_enable_type_checks && instr->IsAssertAssignable()) { | 343 if (FLAG_enable_type_checks && instr->IsAssertAssignable()) { |
344 AssertAssignableInstr* assert = instr->AsAssertAssignable(); | 344 AssertAssignableInstr* assert = instr->AsAssertAssignable(); |
345 AddCurrentDescriptor(PcDescriptors::kDeoptBefore, | 345 AddCurrentDescriptor(PcDescriptors::kDeopt, |
346 assert->deopt_id(), | 346 assert->deopt_id(), |
347 assert->token_pos()); | 347 assert->token_pos()); |
| 348 } else if (instr->IsGuardField()) { |
| 349 GuardFieldInstr* guard = instr->AsGuardField(); |
| 350 AddCurrentDescriptor(PcDescriptors::kDeopt, |
| 351 guard->deopt_id(), |
| 352 Scanner::kDummyTokenIndex); |
| 353 } else if (instr->CanBeDeoptimizationTarget()) { |
| 354 AddCurrentDescriptor(PcDescriptors::kDeopt, |
| 355 instr->deopt_id(), |
| 356 Scanner::kDummyTokenIndex); |
348 } | 357 } |
349 AllocateRegistersLocally(instr); | 358 AllocateRegistersLocally(instr); |
350 } | 359 } |
351 } | 360 } |
352 | 361 |
353 | 362 |
354 void FlowGraphCompiler::EmitInstructionEpilogue(Instruction* instr) { | 363 void FlowGraphCompiler::EmitInstructionEpilogue(Instruction* instr) { |
355 if (is_optimizing()) return; | 364 if (is_optimizing()) return; |
356 Definition* defn = instr->AsDefinition(); | 365 Definition* defn = instr->AsDefinition(); |
357 if ((defn != NULL) && defn->is_used()) { | 366 if ((defn != NULL) && defn->is_used()) { |
(...skipping 453 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
811 void FlowGraphCompiler::GenerateDartCall(intptr_t deopt_id, | 820 void FlowGraphCompiler::GenerateDartCall(intptr_t deopt_id, |
812 intptr_t token_pos, | 821 intptr_t token_pos, |
813 const ExternalLabel* label, | 822 const ExternalLabel* label, |
814 PcDescriptors::Kind kind, | 823 PcDescriptors::Kind kind, |
815 LocationSummary* locs) { | 824 LocationSummary* locs) { |
816 __ BranchLinkPatchable(label); | 825 __ BranchLinkPatchable(label); |
817 AddCurrentDescriptor(kind, deopt_id, token_pos); | 826 AddCurrentDescriptor(kind, deopt_id, token_pos); |
818 RecordSafepoint(locs); | 827 RecordSafepoint(locs); |
819 // Marks either the continuation point in unoptimized code or the | 828 // Marks either the continuation point in unoptimized code or the |
820 // deoptimization point in optimized code, after call. | 829 // deoptimization point in optimized code, after call. |
| 830 const intptr_t deopt_id_after = Isolate::ToDeoptAfter(deopt_id); |
821 if (is_optimizing()) { | 831 if (is_optimizing()) { |
822 AddDeoptIndexAtCall(deopt_id, token_pos); | 832 AddDeoptIndexAtCall(deopt_id_after, token_pos); |
823 } else { | 833 } else { |
824 // Add deoptimization continuation point after the call and before the | 834 // Add deoptimization continuation point after the call and before the |
825 // arguments are removed. | 835 // arguments are removed. |
826 AddCurrentDescriptor(PcDescriptors::kDeoptAfter, | 836 AddCurrentDescriptor(PcDescriptors::kDeopt, deopt_id_after, token_pos); |
827 deopt_id, | |
828 token_pos); | |
829 } | 837 } |
830 } | 838 } |
831 | 839 |
832 | 840 |
833 void FlowGraphCompiler::GenerateCallRuntime(intptr_t token_pos, | 841 void FlowGraphCompiler::GenerateCallRuntime(intptr_t token_pos, |
834 intptr_t deopt_id, | 842 intptr_t deopt_id, |
835 const RuntimeEntry& entry, | 843 const RuntimeEntry& entry, |
836 LocationSummary* locs) { | 844 LocationSummary* locs) { |
837 __ Unimplemented("call runtime"); | 845 __ Unimplemented("call runtime"); |
838 } | 846 } |
(...skipping 213 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1052 | 1060 |
1053 | 1061 |
1054 void ParallelMoveResolver::Exchange(const Address& mem1, const Address& mem2) { | 1062 void ParallelMoveResolver::Exchange(const Address& mem1, const Address& mem2) { |
1055 UNIMPLEMENTED(); | 1063 UNIMPLEMENTED(); |
1056 } | 1064 } |
1057 | 1065 |
1058 | 1066 |
1059 } // namespace dart | 1067 } // namespace dart |
1060 | 1068 |
1061 #endif // defined TARGET_ARCH_ARM | 1069 #endif // defined TARGET_ARCH_ARM |
OLD | NEW |