| OLD | NEW |
| 1 // Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file | 1 // Copyright (c) 2012, 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_XXX. | 5 #include "vm/globals.h" // Needed here to get TARGET_ARCH_XXX. |
| 6 | 6 |
| 7 #include "vm/flow_graph_compiler.h" | 7 #include "vm/flow_graph_compiler.h" |
| 8 | 8 |
| 9 #include "vm/cha.h" | 9 #include "vm/cha.h" |
| 10 #include "vm/dart_entry.h" | 10 #include "vm/dart_entry.h" |
| (...skipping 783 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 794 // Allocate all unallocated input locations. | 794 // Allocate all unallocated input locations. |
| 795 const bool should_pop = !instr->IsPushArgument(); | 795 const bool should_pop = !instr->IsPushArgument(); |
| 796 for (intptr_t i = locs->input_count() - 1; i >= 0; i--) { | 796 for (intptr_t i = locs->input_count() - 1; i >= 0; i--) { |
| 797 Location loc = locs->in(i); | 797 Location loc = locs->in(i); |
| 798 Register reg = kNoRegister; | 798 Register reg = kNoRegister; |
| 799 if (loc.IsRegister()) { | 799 if (loc.IsRegister()) { |
| 800 reg = loc.reg(); | 800 reg = loc.reg(); |
| 801 } else if (loc.IsUnallocated() || loc.IsConstant()) { | 801 } else if (loc.IsUnallocated() || loc.IsConstant()) { |
| 802 ASSERT(loc.IsConstant() || | 802 ASSERT(loc.IsConstant() || |
| 803 ((loc.policy() == Location::kRequiresRegister) || | 803 ((loc.policy() == Location::kRequiresRegister) || |
| 804 (loc.policy() == Location::kWritableRegister))); | 804 (loc.policy() == Location::kWritableRegister) || |
| 805 (loc.policy() == Location::kAny))); |
| 805 reg = AllocateFreeRegister(blocked_registers); | 806 reg = AllocateFreeRegister(blocked_registers); |
| 806 locs->set_in(i, Location::RegisterLocation(reg)); | 807 locs->set_in(i, Location::RegisterLocation(reg)); |
| 807 } | 808 } |
| 808 ASSERT(reg != kNoRegister); | 809 ASSERT(reg != kNoRegister); |
| 809 | 810 |
| 810 // Inputs are consumed from the simulated frame. In case of a call argument | 811 // Inputs are consumed from the simulated frame. In case of a call argument |
| 811 // we leave it until the call instruction. | 812 // we leave it until the call instruction. |
| 812 if (should_pop) { | 813 if (should_pop) { |
| 813 assembler()->PopRegister(reg); | 814 assembler()->PopRegister(reg); |
| 814 } | 815 } |
| (...skipping 265 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1080 const AbstractTypeArguments& type_arguments = | 1081 const AbstractTypeArguments& type_arguments = |
| 1081 AbstractTypeArguments::Handle(type.arguments()); | 1082 AbstractTypeArguments::Handle(type.arguments()); |
| 1082 const bool is_raw_type = type_arguments.IsNull() || | 1083 const bool is_raw_type = type_arguments.IsNull() || |
| 1083 type_arguments.IsRaw(type_arguments.Length()); | 1084 type_arguments.IsRaw(type_arguments.Length()); |
| 1084 return is_raw_type; | 1085 return is_raw_type; |
| 1085 } | 1086 } |
| 1086 return true; | 1087 return true; |
| 1087 } | 1088 } |
| 1088 | 1089 |
| 1089 } // namespace dart | 1090 } // namespace dart |
| OLD | NEW |