| 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/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/dart_entry.h" | 8 #include "vm/dart_entry.h" |
| 9 #include "vm/flow_graph_allocator.h" | 9 #include "vm/flow_graph_allocator.h" |
| 10 #include "vm/flow_graph_builder.h" | 10 #include "vm/flow_graph_builder.h" |
| (...skipping 346 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 357 // We cannot give an answer if the given type is malformed. | 357 // We cannot give an answer if the given type is malformed. |
| 358 if (type.IsMalformed()) { | 358 if (type.IsMalformed()) { |
| 359 return false; | 359 return false; |
| 360 } | 360 } |
| 361 | 361 |
| 362 // We should never test for an instance of null. | 362 // We should never test for an instance of null. |
| 363 ASSERT(!type.IsNullType()); | 363 ASSERT(!type.IsNullType()); |
| 364 | 364 |
| 365 // Consider the compile type of the value. | 365 // Consider the compile type of the value. |
| 366 const AbstractType& compile_type = AbstractType::Handle(CompileType()); | 366 const AbstractType& compile_type = AbstractType::Handle(CompileType()); |
| 367 ASSERT(!compile_type.IsMalformed()); | 367 if (compile_type.IsMalformed()) { |
| 368 return false; |
| 369 } |
| 368 | 370 |
| 369 // If the compile type of the value is void, we are type checking the result | 371 // If the compile type of the value is void, we are type checking the result |
| 370 // of a void function, which was checked to be null at the return statement | 372 // of a void function, which was checked to be null at the return statement |
| 371 // inside the function. | 373 // inside the function. |
| 372 if (compile_type.IsVoidType()) { | 374 if (compile_type.IsVoidType()) { |
| 373 ASSERT(FLAG_enable_type_checks); | 375 ASSERT(FLAG_enable_type_checks); |
| 374 *is_instance = true; | 376 *is_instance = true; |
| 375 return true; | 377 return true; |
| 376 } | 378 } |
| 377 | 379 |
| (...skipping 1706 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2084 new_max = new_max.Clamp(); | 2086 new_max = new_max.Clamp(); |
| 2085 } | 2087 } |
| 2086 | 2088 |
| 2087 return Range::Update(&range_, new_min, new_max); | 2089 return Range::Update(&range_, new_min, new_max); |
| 2088 } | 2090 } |
| 2089 | 2091 |
| 2090 | 2092 |
| 2091 #undef __ | 2093 #undef __ |
| 2092 | 2094 |
| 2093 } // namespace dart | 2095 } // namespace dart |
| OLD | NEW |