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

Unified Diff: src/hydrogen-infer-representation.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, 6 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « src/hydrogen.cc ('k') | src/hydrogen-infer-representation.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/hydrogen-infer-representation.h
diff --git a/src/vm-state.h b/src/hydrogen-infer-representation.h
similarity index 72%
copy from src/vm-state.h
copy to src/hydrogen-infer-representation.h
index 765b5701595b7f9637da05b0783662d603506463..7c605696c4b956152bdd9dfc74c83e80569e3714 100644
--- a/src/vm-state.h
+++ b/src/hydrogen-infer-representation.h
@@ -1,4 +1,4 @@
-// Copyright 2010 the V8 project authors. All rights reserved.
+// Copyright 2013 the V8 project authors. All rights reserved.
// Redistribution and use in source and binary forms, with or without
// modification, are permitted provided that the following conditions are
// met:
@@ -25,37 +25,33 @@
// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
-#ifndef V8_VM_STATE_H_
-#define V8_VM_STATE_H_
+#ifndef V8_HYDROGEN_INFER_REPRESENTATION_H_
+#define V8_HYDROGEN_INFER_REPRESENTATION_H_
-#include "allocation.h"
-#include "isolate.h"
+#include "hydrogen.h"
namespace v8 {
namespace internal {
-template <StateTag Tag>
-class VMState BASE_EMBEDDED {
- public:
- explicit inline VMState(Isolate* isolate);
- inline ~VMState();
- private:
- Isolate* isolate_;
- StateTag previous_tag_;
-};
+class HInferRepresentationPhase : public HPhase {
+ public:
+ explicit HInferRepresentationPhase(HGraph* graph)
+ : HPhase("H_Infer representations", graph),
+ worklist_(8, zone()),
+ in_worklist_(graph->GetMaximumValueID(), zone()) { }
+ void Run();
+ void AddToWorklist(HValue* current);
-class ExternalCallbackScope BASE_EMBEDDED {
- public:
- inline ExternalCallbackScope(Isolate* isolate, Address callback);
- inline ~ExternalCallbackScope();
private:
- Isolate* isolate_;
- Address previous_callback_;
+ ZoneList<HValue*> worklist_;
+ BitVector in_worklist_;
+
+ DISALLOW_COPY_AND_ASSIGN(HInferRepresentationPhase);
};
-} } // namespace v8::internal
+} } // namespace v8::internal
-#endif // V8_VM_STATE_H_
+#endif // V8_HYDROGEN_INFER_REPRESENTATION_H_
« no previous file with comments | « src/hydrogen.cc ('k') | src/hydrogen-infer-representation.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698