| Index: src/hydrogen-mark-deoptimize.h
|
| diff --git a/src/hydrogen-minus-zero.h b/src/hydrogen-mark-deoptimize.h
|
| similarity index 64%
|
| copy from src/hydrogen-minus-zero.h
|
| copy to src/hydrogen-mark-deoptimize.h
|
| index d23ec1196b3419cdc06e20aa3e12688979306009..0aa2c2c754069e4cf658429707a02ffe8fe4fa92 100644
|
| --- a/src/hydrogen-minus-zero.h
|
| +++ b/src/hydrogen-mark-deoptimize.h
|
| @@ -25,8 +25,8 @@
|
| // (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_MINUS_ZERO_H_
|
| -#define V8_HYDROGEN_MINUS_ZERO_H_
|
| +#ifndef V8_HYDROGEN_MARK_DEOPTIMIZE_H_
|
| +#define V8_HYDROGEN_MARK_DEOPTIMIZE_H_
|
|
|
| #include "hydrogen.h"
|
|
|
| @@ -34,23 +34,30 @@ namespace v8 {
|
| namespace internal {
|
|
|
|
|
| -class HComputeMinusZeroChecksPhase : public HPhase {
|
| +// Compute DeoptimizeOnUndefined flag for phis. Any phi that can reach a use
|
| +// with DeoptimizeOnUndefined set must have DeoptimizeOnUndefined set.
|
| +// Currently only HCompareNumericAndBranch, with double input representation,
|
| +// has this flag set. The flag is used by HChange tagged->double, which must
|
| +// deoptimize if one of its uses has this flag set.
|
| +class HMarkDeoptimizeOnUndefinedPhase : public HPhase {
|
| public:
|
| - explicit HComputeMinusZeroChecksPhase(HGraph* graph)
|
| - : HPhase("H_Compute minus zero checks", graph),
|
| - visited_(graph->GetMaximumValueID(), zone()) { }
|
| + explicit HMarkDeoptimizeOnUndefinedPhase(HGraph* graph)
|
| + : HPhase("H_Mark deoptimize on undefined", graph),
|
| + worklist_(16, zone()) {}
|
|
|
| void Run();
|
|
|
| private:
|
| - void PropagateMinusZeroChecks(HValue* value);
|
| + void ProcessPhi(HPhi* phi);
|
|
|
| - BitVector visited_;
|
| + // Preallocated worklist used as an optimization so we don't have
|
| + // to allocate a new ZoneList for every ProcessPhi() invocation.
|
| + ZoneList<HPhi*> worklist_;
|
|
|
| - DISALLOW_COPY_AND_ASSIGN(HComputeMinusZeroChecksPhase);
|
| + DISALLOW_COPY_AND_ASSIGN(HMarkDeoptimizeOnUndefinedPhase);
|
| };
|
|
|
|
|
| } } // namespace v8::internal
|
|
|
| -#endif // V8_HYDROGEN_MINUS_ZERO_H_
|
| +#endif // V8_HYDROGEN_MARK_DEOPTIMIZE_H_
|
|
|