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

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

Issue 10919008: Unbox phis that were proven to be of type Double. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: address Srdjan's comments Created 8 years, 3 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') | runtime/vm/intermediate_language_ia32.cc » ('j') | 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 585 matching lines...) Expand 10 before | Expand all | Expand 10 after
596 // Currently, phis are stored in a sparse array that holds the phi 596 // Currently, phis are stored in a sparse array that holds the phi
597 // for variable with index i at position i. 597 // for variable with index i at position i.
598 // TODO(fschneider): Store phis in a more compact way. 598 // TODO(fschneider): Store phis in a more compact way.
599 if (phis_ == NULL) { 599 if (phis_ == NULL) {
600 phis_ = new ZoneGrowableArray<PhiInstr*>(var_count); 600 phis_ = new ZoneGrowableArray<PhiInstr*>(var_count);
601 for (intptr_t i = 0; i < var_count; i++) { 601 for (intptr_t i = 0; i < var_count; i++) {
602 phis_->Add(NULL); 602 phis_->Add(NULL);
603 } 603 }
604 } 604 }
605 ASSERT((*phis_)[var_index] == NULL); 605 ASSERT((*phis_)[var_index] == NULL);
606 (*phis_)[var_index] = new PhiInstr(PredecessorCount()); 606 (*phis_)[var_index] = new PhiInstr(this, PredecessorCount());
607 phi_count_++; 607 phi_count_++;
608 } 608 }
609 609
610 610
611 void JoinEntryInstr::RemoveDeadPhis() { 611 void JoinEntryInstr::RemoveDeadPhis() {
612 if (phis_ == NULL) return; 612 if (phis_ == NULL) return;
613 613
614 for (intptr_t i = 0; i < phis_->length(); i++) { 614 for (intptr_t i = 0; i < phis_->length(); i++) {
615 PhiInstr* phi = (*phis_)[i]; 615 PhiInstr* phi = (*phis_)[i];
616 if ((phi != NULL) && !phi->is_alive()) { 616 if ((phi != NULL) && !phi->is_alive()) {
(...skipping 906 matching lines...) Expand 10 before | Expand all | Expand 10 after
1523 value->set_use_index(i); 1523 value->set_use_index(i);
1524 value->AddToEnvUseList(); 1524 value->AddToEnvUseList();
1525 } 1525 }
1526 instr->set_env(copy); 1526 instr->set_env(copy);
1527 } 1527 }
1528 1528
1529 1529
1530 #undef __ 1530 #undef __
1531 1531
1532 } // namespace dart 1532 } // namespace dart
OLDNEW
« no previous file with comments | « runtime/vm/intermediate_language.h ('k') | runtime/vm/intermediate_language_ia32.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698