Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(126)

Side by Side Diff: src/compiler/node-properties.h

Issue 426233002: Land the Fan (disabled) (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: Review feedback, rebase and "git cl format" Created 6 years, 4 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « src/compiler/node-matchers.h ('k') | src/compiler/node-properties-inl.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
(Empty)
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/v8.h"
9
10 #include "src/types.h"
11
12 namespace v8 {
13 namespace internal {
14 namespace compiler {
15
16 class Node;
17 class Operator;
18
19 // A facade that simplifies access to the different kinds of inputs to a node.
20 class NodeProperties {
21 public:
22 static inline bool HasValueInput(Node* node);
23 static inline bool HasContextInput(Node* node);
24 static inline bool HasEffectInput(Node* node);
25 static inline bool HasControlInput(Node* node);
26
27 static inline int GetValueInputCount(Node* node);
28 static inline int GetContextInputCount(Node* node);
29 static inline int GetEffectInputCount(Node* node);
30 static inline int GetControlInputCount(Node* node);
31
32 static inline Node* GetValueInput(Node* node, int index);
33 static inline Node* GetContextInput(Node* node);
34 static inline Node* GetEffectInput(Node* node, int index = 0);
35 static inline Node* GetControlInput(Node* node, int index = 0);
36
37 static inline bool HasValueOutput(Node* node);
38 static inline bool HasEffectOutput(Node* node);
39 static inline bool HasControlOutput(Node* node);
40
41 static inline int GetValueOutputCount(Node* node);
42 static inline int GetEffectOutputCount(Node* node);
43 static inline int GetControlOutputCount(Node* node);
44
45 static inline bool IsValueEdge(Node::Edge edge);
46 static inline bool IsContextEdge(Node::Edge edge);
47 static inline bool IsEffectEdge(Node::Edge edge);
48 static inline bool IsControlEdge(Node::Edge edge);
49
50 static inline bool IsControl(Node* node);
51 static inline bool IsBasicBlockBegin(Node* node);
52
53 static inline bool CanBeScheduled(Node* node);
54 static inline bool HasFixedSchedulePosition(Node* node);
55 static inline bool IsScheduleRoot(Node* node);
56
57 static inline void ReplaceEffectInput(Node* node, Node* effect,
58 int index = 0);
59 static inline void RemoveNonValueInputs(Node* node);
60
61 static inline Bounds GetBounds(Node* node);
62 static inline void SetBounds(Node* node, Bounds bounds);
63
64 static inline bool CanLazilyDeoptimize(Node* node);
65
66 private:
67 static inline int FirstValueIndex(Node* node);
68 static inline int FirstContextIndex(Node* node);
69 static inline int FirstEffectIndex(Node* node);
70 static inline int FirstControlIndex(Node* node);
71 static inline int PastValueIndex(Node* node);
72 static inline int PastContextIndex(Node* node);
73 static inline int PastEffectIndex(Node* node);
74 static inline int PastControlIndex(Node* node);
75
76 static inline bool IsInputRange(Node::Edge edge, int first, int count);
77 };
78 }
79 }
80 } // namespace v8::internal::compiler
81
82 #endif // V8_COMPILER_NODE_PROPERTIES_H_
OLDNEW
« no previous file with comments | « src/compiler/node-matchers.h ('k') | src/compiler/node-properties-inl.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698