Index: src/hydrogen-uint32-analysis.h |
diff --git a/src/marking-thread.h b/src/hydrogen-uint32-analysis.h |
similarity index 70% |
copy from src/marking-thread.h |
copy to src/hydrogen-uint32-analysis.h |
index 9efa3af13262165972abf179defac6f83fed4ac9..59739d1ccf13ffc428996432417019a8a84c2829 100644 |
--- a/src/marking-thread.h |
+++ b/src/hydrogen-uint32-analysis.h |
@@ -25,47 +25,35 @@ |
// (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_UINT32_ANALYSIS_H_ |
+#define V8_HYDROGEN_UINT32_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 { |
+ |
+// Discover instructions that can be marked with kUint32 flag allowing |
+// them to produce full range uint32 values. |
+class HUint32AnalysisPhase : public HPhase { |
public: |
- explicit MarkingThread(Isolate* isolate); |
+ explicit HUint32AnalysisPhase(HGraph* graph) |
+ : HPhase("H_Compute safe UInt32 operations", graph), phis_(4, zone()) { } |
void Run(); |
- void Stop(); |
- void StartMarking(); |
- void WaitForMarkingThread(); |
- |
- ~MarkingThread() { |
- delete start_marking_semaphore_; |
- delete end_marking_semaphore_; |
- delete stop_semaphore_; |
- } |
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_; |
+ INLINE(bool IsSafeUint32Use(HValue* val, HValue* use)); |
+ INLINE(bool Uint32UsesAreSafe(HValue* uint32val)); |
+ INLINE(bool CheckPhiOperands(HPhi* phi)); |
+ INLINE(void UnmarkPhi(HPhi* phi, ZoneList<HPhi*>* worklist)); |
+ INLINE(void UnmarkUnsafePhis()); |
+ |
+ ZoneList<HPhi*> phis_; |
}; |
+ |
} } // namespace v8::internal |
-#endif // V8_MARKING_THREAD_H_ |
+#endif // V8_HYDROGEN_UINT32_ANALYSIS_H_ |