V8 Project
node-properties.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_COMPILER_NODE_PROPERTIES_H_
6 #define V8_COMPILER_NODE_PROPERTIES_H_
7 
8 #include "src/compiler/node.h"
9 #include "src/types.h"
10 
11 namespace v8 {
12 namespace internal {
13 namespace compiler {
14 
15 class Operator;
16 
17 // A facade that simplifies access to the different kinds of inputs to a node.
19  public:
20  static inline Node* GetValueInput(Node* node, int index);
21  static inline Node* GetContextInput(Node* node);
22  static inline Node* GetFrameStateInput(Node* node);
23  static inline Node* GetEffectInput(Node* node, int index = 0);
24  static inline Node* GetControlInput(Node* node, int index = 0);
25 
26  static inline int GetFrameStateIndex(Node* node);
27 
28  static inline bool IsValueEdge(Node::Edge edge);
29  static inline bool IsContextEdge(Node::Edge edge);
30  static inline bool IsEffectEdge(Node::Edge edge);
31  static inline bool IsControlEdge(Node::Edge edge);
32 
33  static inline bool IsControl(Node* node);
34 
35  static inline void ReplaceControlInput(Node* node, Node* control);
36  static inline void ReplaceEffectInput(Node* node, Node* effect,
37  int index = 0);
38  static inline void ReplaceFrameStateInput(Node* node, Node* frame_state);
39  static inline void RemoveNonValueInputs(Node* node);
40  static inline void ReplaceWithValue(Node* node, Node* value,
41  Node* effect = NULL);
42 
43  static inline Bounds GetBounds(Node* node);
44  static inline void SetBounds(Node* node, Bounds bounds);
45 
46  static inline int FirstValueIndex(Node* node);
47  static inline int FirstContextIndex(Node* node);
48  static inline int FirstFrameStateIndex(Node* node);
49  static inline int FirstEffectIndex(Node* node);
50  static inline int FirstControlIndex(Node* node);
51  static inline int PastValueIndex(Node* node);
52  static inline int PastContextIndex(Node* node);
53  static inline int PastFrameStateIndex(Node* node);
54  static inline int PastEffectIndex(Node* node);
55  static inline int PastControlIndex(Node* node);
56 
57  static inline bool IsInputRange(Node::Edge edge, int first, int count);
58 };
59 
60 } // namespace compiler
61 } // namespace internal
62 } // namespace v8
63 
64 #endif // V8_COMPILER_NODE_PROPERTIES_H_
static void ReplaceControlInput(Node *node, Node *control)
static void ReplaceWithValue(Node *node, Node *value, Node *effect=NULL)
static void ReplaceEffectInput(Node *node, Node *effect, int index=0)
static bool IsContextEdge(Node::Edge edge)
static Node * GetContextInput(Node *node)
static Node * GetValueInput(Node *node, int index)
static Node * GetFrameStateInput(Node *node)
static bool IsControlEdge(Node::Edge edge)
static void SetBounds(Node *node, Bounds bounds)
static bool IsEffectEdge(Node::Edge edge)
static bool IsValueEdge(Node::Edge edge)
static Node * GetEffectInput(Node *node, int index=0)
static void ReplaceFrameStateInput(Node *node, Node *frame_state)
static bool IsInputRange(Node::Edge edge, int first, int count)
static Node * GetControlInput(Node *node, int index=0)
enable harmony numeric enable harmony object literal extensions Optimize object Array DOM strings and string trace pretenuring decisions of HAllocate instructions Enables optimizations which favor memory size over execution speed maximum source size in bytes considered for a single inlining maximum cumulative number of AST nodes considered for inlining trace the tracking of allocation sites deoptimize every n garbage collections perform array bounds checks elimination analyze liveness of environment slots and zap dead values flushes the cache of optimized code for closures on every GC allow uint32 values on optimize frames if they are used only in safe operations track concurrent recompilation artificial compilation delay in ms do not emit check maps for constant values that have a leaf deoptimize the optimized code if the layout of the maps changes enable context specialization in TurboFan execution budget before interrupt is triggered max percentage of megamorphic generic ICs to allow optimization enable use of SAHF instruction if enable use of VFP3 instructions if available enable use of NEON instructions if enable use of SDIV and UDIV instructions if enable use of MLS instructions if enable loading bit constant by means of movw movt instruction enable unaligned accesses for enable use of d16 d31 registers on ARM this requires VFP3 force all emitted branches to be in long enable alignment of csp to bytes on platforms which prefer the register to always be NULL
Debugger support for the V8 JavaScript engine.
Definition: accessors.cc:20