| Index: src/hydrogen-osr.h
|
| diff --git a/src/hydrogen-uint32-analysis.h b/src/hydrogen-osr.h
|
| similarity index 60%
|
| copy from src/hydrogen-uint32-analysis.h
|
| copy to src/hydrogen-osr.h
|
| index 59739d1ccf13ffc428996432417019a8a84c2829..0c6b65d0d4e55774f6408c9eb95f1149dce12a35 100644
|
| --- a/src/hydrogen-uint32-analysis.h
|
| +++ b/src/hydrogen-osr.h
|
| @@ -25,35 +25,46 @@
|
| // (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_HYDROGEN_UINT32_ANALYSIS_H_
|
| -#define V8_HYDROGEN_UINT32_ANALYSIS_H_
|
| +#ifndef V8_HYDROGEN_OSR_H_
|
| +#define V8_HYDROGEN_OSR_H_
|
|
|
| #include "hydrogen.h"
|
| +#include "ast.h"
|
| +#include "zone.h"
|
|
|
| namespace v8 {
|
| namespace internal {
|
|
|
| -
|
| -// Discover instructions that can be marked with kUint32 flag allowing
|
| -// them to produce full range uint32 values.
|
| -class HUint32AnalysisPhase : public HPhase {
|
| +// Responsible for building graph parts related to OSR and otherwise
|
| +// setting up the graph to do an OSR compile.
|
| +class HOsrBuilder : public ZoneObject {
|
| public:
|
| - explicit HUint32AnalysisPhase(HGraph* graph)
|
| - : HPhase("H_Compute safe UInt32 operations", graph), phis_(4, zone()) { }
|
| + explicit HOsrBuilder(HOptimizedGraphBuilder* builder)
|
| + : builder_(builder),
|
| + osr_entry_(NULL),
|
| + osr_loop_entry_(NULL),
|
| + osr_values_(NULL) { }
|
| + // Creates the loop entry block for the given statement, setting up OSR
|
| + // entries as necessary, and sets the current block to the new block.
|
| + HBasicBlock* BuildPossibleOsrLoopEntry(IterationStatement* statement);
|
| +
|
| + // Process the hydrogen graph after it has been completed, performing
|
| + // any OSR-specific cleanups or changes.
|
| + void FinishGraph();
|
|
|
| - void Run();
|
| + // Process the OSR values and phis after initial graph optimization.
|
| + void FinishOsrValues();
|
|
|
| private:
|
| - 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());
|
| + HBasicBlock* BuildLoopEntry();
|
| + bool HasOsrEntryAt(IterationStatement* statement);
|
|
|
| - ZoneList<HPhi*> phis_;
|
| + HOptimizedGraphBuilder* builder_;
|
| + HBasicBlock* osr_entry_;
|
| + HBasicBlock* osr_loop_entry_;
|
| + ZoneList<HUnknownOSRValue*>* osr_values_;
|
| };
|
|
|
| -
|
| } } // namespace v8::internal
|
|
|
| -#endif // V8_HYDROGEN_UINT32_ANALYSIS_H_
|
| +#endif // V8_HYDROGEN_OSR_H_
|
|
|