Index: src/hydrogen-range-analysis.h |
diff --git a/src/marking-thread.h b/src/hydrogen-range-analysis.h |
similarity index 68% |
copy from src/marking-thread.h |
copy to src/hydrogen-range-analysis.h |
index 9efa3af13262165972abf179defac6f83fed4ac9..b699d3a3f0d702466b859671f739bfa774813a0d 100644 |
--- a/src/marking-thread.h |
+++ b/src/hydrogen-range-analysis.h |
@@ -25,47 +25,38 @@ |
// (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_MARKING_THREAD_H_ |
-#define V8_MARKING_THREAD_H_ |
+#ifndef V8_HYDROGEN_RANGE_ANALYSIS_H_ |
+#define V8_HYDROGEN_RANGE_ANALYSIS_H_ |
-#include "atomicops.h" |
-#include "flags.h" |
-#include "platform.h" |
-#include "v8utils.h" |
- |
-#include "spaces.h" |
- |
-#include "heap.h" |
+#include "hydrogen.h" |
namespace v8 { |
namespace internal { |
-class MarkingThread : public Thread { |
- public: |
- explicit MarkingThread(Isolate* isolate); |
- void Run(); |
- void Stop(); |
- void StartMarking(); |
- void WaitForMarkingThread(); |
+class HRangeAnalysisPhase : public HPhase { |
+ public: |
+ explicit HRangeAnalysisPhase(HGraph* graph) |
+ : HPhase("H_Range analysis", graph), changed_ranges_(16, zone()) { } |
- ~MarkingThread() { |
- delete start_marking_semaphore_; |
- delete end_marking_semaphore_; |
- delete stop_semaphore_; |
+ void Run() { |
+ Analyze(graph()->entry_block()); |
} |
private: |
- Isolate* isolate_; |
- Heap* heap_; |
- Semaphore* start_marking_semaphore_; |
- Semaphore* end_marking_semaphore_; |
- Semaphore* stop_semaphore_; |
- volatile AtomicWord stop_thread_; |
- int id_; |
- static Atomic32 id_counter_; |
+ void TraceRange(const char* msg, ...); |
+ void Analyze(HBasicBlock* block); |
+ void InferControlFlowRange(HCompareNumericAndBranch* test, |
+ HBasicBlock* dest); |
+ void UpdateControlFlowRange(Token::Value op, HValue* value, HValue* other); |
+ void InferRange(HValue* value); |
+ void RollBackTo(int index); |
+ void AddRange(HValue* value, Range* range); |
+ |
+ ZoneList<HValue*> changed_ranges_; |
}; |
+ |
} } // namespace v8::internal |
-#endif // V8_MARKING_THREAD_H_ |
+#endif // V8_HYDROGEN_RANGE_ANALYSIS_H_ |