V8 Project
hydrogen-mark-deoptimize.h
Go to the documentation of this file.
1 // Copyright 2013 the V8 project authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file.
4 
5 #ifndef V8_HYDROGEN_MARK_DEOPTIMIZE_H_
6 #define V8_HYDROGEN_MARK_DEOPTIMIZE_H_
7 
8 #include "src/hydrogen.h"
9 
10 namespace v8 {
11 namespace internal {
12 
13 
14 // Compute DeoptimizeOnUndefined flag for phis. Any phi that can reach a use
15 // with DeoptimizeOnUndefined set must have DeoptimizeOnUndefined set.
16 // Currently only HCompareNumericAndBranch, with double input representation,
17 // has this flag set. The flag is used by HChange tagged->double, which must
18 // deoptimize if one of its uses has this flag set.
20  public:
22  : HPhase("H_Mark deoptimize on undefined", graph),
23  worklist_(16, zone()) {}
24 
25  void Run();
26 
27  private:
28  void ProcessPhi(HPhi* phi);
29 
30  // Preallocated worklist used as an optimization so we don't have
31  // to allocate a new ZoneList for every ProcessPhi() invocation.
33 
35 };
36 
37 
39  public:
41  : HPhase("H_Compute change undefined to nan", graph) {}
42 
43  void Run();
44 
45  private:
47 };
48 
49 
50 } } // namespace v8::internal
51 
52 #endif // V8_HYDROGEN_MARK_DEOPTIMIZE_H_
DISALLOW_COPY_AND_ASSIGN(HComputeChangeUndefinedToNaN)
DISALLOW_COPY_AND_ASSIGN(HMarkDeoptimizeOnUndefinedPhase)
HGraph * graph() const
Definition: hydrogen.h:2802
Debugger support for the V8 JavaScript engine.
Definition: accessors.cc:20