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

Side by Side Diff: src/hydrogen-gvn.cc

Issue 334763003: Start using OStreams. (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: Rebased. Reformatted. Feedback addressed. Created 6 years, 5 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 | « src/hydrogen-dce.cc ('k') | src/hydrogen-instructions.h » ('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 2013 the V8 project authors. All rights reserved. 1 // Copyright 2013 the V8 project authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #include "src/hydrogen.h" 5 #include "src/hydrogen.h"
6 #include "src/hydrogen-gvn.h" 6 #include "src/hydrogen-gvn.h"
7 #include "src/v8.h" 7 #include "src/v8.h"
8 8
9 namespace v8 { 9 namespace v8 {
10 namespace internal { 10 namespace internal {
(...skipping 431 matching lines...) Expand 10 before | Expand all | Expand 10 after
442 442
443 bool SideEffectsTracker::ComputeGlobalVar(Unique<Cell> cell, int* index) { 443 bool SideEffectsTracker::ComputeGlobalVar(Unique<Cell> cell, int* index) {
444 for (int i = 0; i < num_global_vars_; ++i) { 444 for (int i = 0; i < num_global_vars_; ++i) {
445 if (cell == global_vars_[i]) { 445 if (cell == global_vars_[i]) {
446 *index = i; 446 *index = i;
447 return true; 447 return true;
448 } 448 }
449 } 449 }
450 if (num_global_vars_ < kNumberOfGlobalVars) { 450 if (num_global_vars_ < kNumberOfGlobalVars) {
451 if (FLAG_trace_gvn) { 451 if (FLAG_trace_gvn) {
452 HeapStringAllocator allocator; 452 OFStream os(stdout);
453 StringStream stream(&allocator); 453 os << "Tracking global var [" << *cell.handle() << "] "
454 stream.Add("Tracking global var [%p] (mapped to index %d)\n", 454 << "(mapped to index " << num_global_vars_ << ")" << endl;
455 *cell.handle(), num_global_vars_);
456 stream.OutputToStdOut();
457 } 455 }
458 *index = num_global_vars_; 456 *index = num_global_vars_;
459 global_vars_[num_global_vars_++] = cell; 457 global_vars_[num_global_vars_++] = cell;
460 return true; 458 return true;
461 } 459 }
462 return false; 460 return false;
463 } 461 }
464 462
465 463
466 bool SideEffectsTracker::ComputeInobjectField(HObjectAccess access, 464 bool SideEffectsTracker::ComputeInobjectField(HObjectAccess access,
(...skipping 437 matching lines...) Expand 10 before | Expand all | Expand 10 after
904 dominated); 902 dominated);
905 successor_map->Kill(side_effects_on_all_paths); 903 successor_map->Kill(side_effects_on_all_paths);
906 successor_dominators->Kill(side_effects_on_all_paths); 904 successor_dominators->Kill(side_effects_on_all_paths);
907 } 905 }
908 } 906 }
909 current = next; 907 current = next;
910 } 908 }
911 } 909 }
912 910
913 } } // namespace v8::internal 911 } } // namespace v8::internal
OLDNEW
« no previous file with comments | « src/hydrogen-dce.cc ('k') | src/hydrogen-instructions.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698