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

Side by Side Diff: src/hydrogen.h

Issue 18054002: Refactor HInferRepresentation into an HPhase and use the phase zone. (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: Rename hydrogen-phase.{cc,h} to hydrogen-infer-representation.{cc,h} Created 7 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 | « no previous file | src/hydrogen.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 2012 the V8 project authors. All rights reserved. 1 // Copyright 2012 the V8 project authors. All rights reserved.
2 // Redistribution and use in source and binary forms, with or without 2 // Redistribution and use in source and binary forms, with or without
3 // modification, are permitted provided that the following conditions are 3 // modification, are permitted provided that the following conditions are
4 // met: 4 // met:
5 // 5 //
6 // * Redistributions of source code must retain the above copyright 6 // * Redistributions of source code must retain the above copyright
7 // notice, this list of conditions and the following disclaimer. 7 // notice, this list of conditions and the following disclaimer.
8 // * Redistributions in binary form must reproduce the above 8 // * Redistributions in binary form must reproduce the above
9 // copyright notice, this list of conditions and the following 9 // copyright notice, this list of conditions and the following
10 // disclaimer in the documentation and/or other materials provided 10 // disclaimer in the documentation and/or other materials provided
(...skipping 688 matching lines...) Expand 10 before | Expand all | Expand 10 after
699 int local_count_; 699 int local_count_;
700 HEnvironment* outer_; 700 HEnvironment* outer_;
701 HEnterInlined* entry_; 701 HEnterInlined* entry_;
702 int pop_count_; 702 int pop_count_;
703 int push_count_; 703 int push_count_;
704 BailoutId ast_id_; 704 BailoutId ast_id_;
705 Zone* zone_; 705 Zone* zone_;
706 }; 706 };
707 707
708 708
709 class HInferRepresentation BASE_EMBEDDED {
710 public:
711 explicit HInferRepresentation(HGraph* graph)
712 : graph_(graph),
713 worklist_(8, graph->zone()),
714 in_worklist_(graph->GetMaximumValueID(), graph->zone()) { }
715
716 void Analyze();
717 void AddToWorklist(HValue* current);
718
719 private:
720 Zone* zone() const { return graph_->zone(); }
721
722 HGraph* graph_;
723 ZoneList<HValue*> worklist_;
724 BitVector in_worklist_;
725 };
726
727
728 class HOptimizedGraphBuilder; 709 class HOptimizedGraphBuilder;
729 710
730 enum ArgumentsAllowedFlag { 711 enum ArgumentsAllowedFlag {
731 ARGUMENTS_NOT_ALLOWED, 712 ARGUMENTS_NOT_ALLOWED,
732 ARGUMENTS_ALLOWED 713 ARGUMENTS_ALLOWED
733 }; 714 };
734 715
735 716
736 class HIfContinuation; 717 class HIfContinuation;
737 718
(...skipping 1335 matching lines...) Expand 10 before | Expand all | Expand 10 after
2073 EmbeddedVector<char, 64> filename_; 2054 EmbeddedVector<char, 64> filename_;
2074 HeapStringAllocator string_allocator_; 2055 HeapStringAllocator string_allocator_;
2075 StringStream trace_; 2056 StringStream trace_;
2076 int indent_; 2057 int indent_;
2077 }; 2058 };
2078 2059
2079 2060
2080 } } // namespace v8::internal 2061 } } // namespace v8::internal
2081 2062
2082 #endif // V8_HYDROGEN_H_ 2063 #endif // V8_HYDROGEN_H_
OLDNEW
« no previous file with comments | « no previous file | src/hydrogen.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698