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/intermediate_language.h" | 5 #include "vm/intermediate_language.h" |
6 | 6 |
7 #include "vm/bit_vector.h" | 7 #include "vm/bit_vector.h" |
8 #include "vm/bootstrap.h" | 8 #include "vm/bootstrap.h" |
9 #include "vm/compiler.h" | 9 #include "vm/compiler.h" |
10 #include "vm/constant_propagator.h" | 10 #include "vm/constant_propagator.h" |
(...skipping 2151 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2162 | 2162 |
2163 | 2163 |
2164 bool BoxIntegerInstr::ValueFitsSmi() const { | 2164 bool BoxIntegerInstr::ValueFitsSmi() const { |
2165 Range* range = value()->definition()->range(); | 2165 Range* range = value()->definition()->range(); |
2166 return RangeUtils::Fits(range, RangeBoundary::kRangeBoundarySmi); | 2166 return RangeUtils::Fits(range, RangeBoundary::kRangeBoundarySmi); |
2167 } | 2167 } |
2168 | 2168 |
2169 | 2169 |
2170 Definition* BoxIntegerInstr::Canonicalize(FlowGraph* flow_graph) { | 2170 Definition* BoxIntegerInstr::Canonicalize(FlowGraph* flow_graph) { |
2171 if ((input_use_list() == NULL) && !HasTryBlockUse(env_use_list())) { | 2171 if ((input_use_list() == NULL) && !HasTryBlockUse(env_use_list())) { |
2172 // Environments can accomodate any representation. No need to box. | 2172 // Environments can accommodate any representation. No need to box. |
2173 return value()->definition(); | 2173 return value()->definition(); |
2174 } | 2174 } |
2175 | 2175 |
2176 return this; | 2176 return this; |
2177 } | 2177 } |
2178 | 2178 |
2179 | 2179 |
2180 Definition* BoxInt64Instr::Canonicalize(FlowGraph* flow_graph) { | 2180 Definition* BoxInt64Instr::Canonicalize(FlowGraph* flow_graph) { |
2181 Definition* replacement = BoxIntegerInstr::Canonicalize(flow_graph); | 2181 Definition* replacement = BoxIntegerInstr::Canonicalize(flow_graph); |
2182 if (replacement != this) { | 2182 if (replacement != this) { |
(...skipping 1994 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
4177 "native function '%s' (%" Pd " arguments) cannot be found", | 4177 "native function '%s' (%" Pd " arguments) cannot be found", |
4178 native_name().ToCString(), function().NumParameters()); | 4178 native_name().ToCString(), function().NumParameters()); |
4179 } | 4179 } |
4180 set_is_auto_scope(auto_setup_scope); | 4180 set_is_auto_scope(auto_setup_scope); |
4181 set_native_c_function(native_function); | 4181 set_native_c_function(native_function); |
4182 } | 4182 } |
4183 | 4183 |
4184 #undef __ | 4184 #undef __ |
4185 | 4185 |
4186 } // namespace dart | 4186 } // namespace dart |
OLD | NEW |