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

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

Issue 13125002: Fix checked mode crash when clearing reaching type of a value. (Closed) Base URL: http://dart.googlecode.com/svn/branches/bleeding_edge/dart/
Patch Set: Created 7 years, 8 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 | « runtime/vm/intermediate_language.h ('k') | 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) 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/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 510 matching lines...) Expand 10 before | Expand all | Expand 10 after
521 ASSERT(other != NULL); 521 ASSERT(other != NULL);
522 ASSERT(this != other); 522 ASSERT(this != other);
523 523
524 Value* current = NULL; 524 Value* current = NULL;
525 Value* next = input_use_list(); 525 Value* next = input_use_list();
526 if (next != NULL) { 526 if (next != NULL) {
527 // Change all the definitions. 527 // Change all the definitions.
528 while (next != NULL) { 528 while (next != NULL) {
529 current = next; 529 current = next;
530 current->set_definition(other); 530 current->set_definition(other);
531 // Do not discard some useful inferred types.
532 // TODO(srdjan): Enable once checked mode issues investigated.
533 // if (current->Type() == this->Type()) {
534 // current->SetReachingType(NULL);
535 // }
536 next = current->next_use(); 531 next = current->next_use();
537 } 532 }
538 533
539 // Concatenate the lists. 534 // Concatenate the lists.
540 next = other->input_use_list(); 535 next = other->input_use_list();
541 current->set_next_use(next); 536 current->set_next_use(next);
542 if (next != NULL) next->set_previous_use(current); 537 if (next != NULL) next->set_previous_use(current);
543 other->set_input_use_list(input_use_list()); 538 other->set_input_use_list(input_use_list());
544 set_input_use_list(NULL); 539 set_input_use_list(NULL);
545 } 540 }
(...skipping 1794 matching lines...) Expand 10 before | Expand all | Expand 10 after
2340 default: 2335 default:
2341 UNREACHABLE(); 2336 UNREACHABLE();
2342 } 2337 }
2343 return kPowRuntimeEntry; 2338 return kPowRuntimeEntry;
2344 } 2339 }
2345 2340
2346 2341
2347 #undef __ 2342 #undef __
2348 2343
2349 } // namespace dart 2344 } // namespace dart
OLDNEW
« no previous file with comments | « runtime/vm/intermediate_language.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698