Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(615)

Side by Side Diff: runtime/vm/intermediate_language.cc

Issue 11087062: Fix a crash in compiler. (Closed) Base URL: http://dart.googlecode.com/svn/branches/bleeding_edge/dart/
Patch Set: Created 8 years, 2 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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
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
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
OLDNEW
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698