Revision: 15355
Author:   [email protected]
Date:     Thu Jun 27 06:13:18 2013
Log:      Add templatized Run() method for Hydrogen phases.

Depends upon https://codereview.chromium.org/17657004

[email protected]
BUG=

Review URL: https://codereview.chromium.org/18034003
http://code.google.com/p/v8/source/detail?r=15355

Modified:
 /branches/bleeding_edge/src/hydrogen.cc
 /branches/bleeding_edge/src/hydrogen.h

=======================================
--- /branches/bleeding_edge/src/hydrogen.cc     Thu Jun 27 06:09:08 2013
+++ /branches/bleeding_edge/src/hydrogen.cc     Thu Jun 27 06:13:18 2013
@@ -4014,10 +4014,7 @@

   if (FLAG_use_canonicalizing) Canonicalize();

-  if (FLAG_use_gvn) {
-    HGlobalValueNumberingPhase phase(this);
-    phase.Run();
-  }
+  if (FLAG_use_gvn) Run<HGlobalValueNumberingPhase>();

   if (FLAG_use_range) {
     HRangeAnalysis rangeAnalysis(this);
=======================================
--- /branches/bleeding_edge/src/hydrogen.h      Thu Jun 27 06:09:08 2013
+++ /branches/bleeding_edge/src/hydrogen.h      Thu Jun 27 06:13:18 2013
@@ -426,6 +426,9 @@
  private:
   HConstant* GetConstant(SetOncePointer<HConstant>* pointer,
                          int32_t integer_value);
+
+  template<class Phase>
+  void Run() { Phase phase(this); phase.Run(); }

   void MarkLive(HValue* ref, HValue* instr, ZoneList<HValue*>* worklist);
   void MarkLiveInstructions();

--
--
v8-dev mailing list
[email protected]
http://groups.google.com/group/v8-dev
--- You received this message because you are subscribed to the Google Groups "v8-dev" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
For more options, visit https://groups.google.com/groups/opt_out.


Reply via email to