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

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

Issue 1451143005: [turbofan] Decouple inlining and native context specialization. (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Remove misleading comment about MaybeHandle. Created 5 years, 1 month 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
« no previous file with comments | « src/compiler/js-native-context-specialization.cc ('k') | src/compiler/node-properties.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2013 the V8 project authors. All rights reserved. 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 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #ifndef V8_COMPILER_NODE_PROPERTIES_H_ 5 #ifndef V8_COMPILER_NODE_PROPERTIES_H_
6 #define V8_COMPILER_NODE_PROPERTIES_H_ 6 #define V8_COMPILER_NODE_PROPERTIES_H_
7 7
8 #include "src/compiler/node.h" 8 #include "src/compiler/node.h"
9 #include "src/types.h" 9 #include "src/types.h"
10 10
(...skipping 98 matching lines...) Expand 10 before | Expand all | Expand 10 after
109 static Node* FindProjection(Node* node, size_t projection_index); 109 static Node* FindProjection(Node* node, size_t projection_index);
110 110
111 // Collect the branch-related projections from a node, such as IfTrue, 111 // Collect the branch-related projections from a node, such as IfTrue,
112 // IfFalse, IfSuccess, IfException, IfValue and IfDefault. 112 // IfFalse, IfSuccess, IfException, IfValue and IfDefault.
113 // - Branch: [ IfTrue, IfFalse ] 113 // - Branch: [ IfTrue, IfFalse ]
114 // - Call : [ IfSuccess, IfException ] 114 // - Call : [ IfSuccess, IfException ]
115 // - Switch: [ IfValue, ..., IfDefault ] 115 // - Switch: [ IfValue, ..., IfDefault ]
116 static void CollectControlProjections(Node* node, Node** proj, size_t count); 116 static void CollectControlProjections(Node* node, Node** proj, size_t count);
117 117
118 // --------------------------------------------------------------------------- 118 // ---------------------------------------------------------------------------
119 // Context.
120
121 // Try to retrieve the specialization context from the given {node},
122 // optionally utilizing the knowledge about the (outermost) function
123 // {context}.
124 static MaybeHandle<Context> GetSpecializationContext(
125 Node* node, MaybeHandle<Context> context = MaybeHandle<Context>());
126
127 // Try to retrieve the specialization native context from the given
128 // {node}, optionally utilizing the knowledge about the (outermost)
129 // {native_context}.
130 static MaybeHandle<Context> GetSpecializationNativeContext(
131 Node* node, MaybeHandle<Context> native_context = MaybeHandle<Context>());
132
133 // Try to retrieve the specialization global object from the given
134 // {node}, optionally utilizing the knowledge about the (outermost)
135 // {native_context}.
136 static MaybeHandle<JSGlobalObject> GetSpecializationGlobalObject(
137 Node* node, MaybeHandle<Context> native_context = MaybeHandle<Context>());
138
139 // ---------------------------------------------------------------------------
119 // Type. 140 // Type.
120 141
121 static bool IsTyped(Node* node) { return node->type() != nullptr; } 142 static bool IsTyped(Node* node) { return node->type() != nullptr; }
122 static Type* GetType(Node* node) { 143 static Type* GetType(Node* node) {
123 DCHECK(IsTyped(node)); 144 DCHECK(IsTyped(node));
124 return node->type(); 145 return node->type();
125 } 146 }
126 static Type* GetTypeOrAny(Node* node); 147 static Type* GetTypeOrAny(Node* node);
127 static void SetType(Node* node, Type* type) { 148 static void SetType(Node* node, Type* type) {
128 DCHECK_NOT_NULL(type); 149 DCHECK_NOT_NULL(type);
129 node->set_type(type); 150 node->set_type(type);
130 } 151 }
131 static void RemoveType(Node* node) { node->set_type(nullptr); } 152 static void RemoveType(Node* node) { node->set_type(nullptr); }
132 static bool AllValueInputsAreTyped(Node* node); 153 static bool AllValueInputsAreTyped(Node* node);
133 154
134 private: 155 private:
135 static inline bool IsInputRange(Edge edge, int first, int count); 156 static inline bool IsInputRange(Edge edge, int first, int count);
136 }; 157 };
137 158
138 } // namespace compiler 159 } // namespace compiler
139 } // namespace internal 160 } // namespace internal
140 } // namespace v8 161 } // namespace v8
141 162
142 #endif // V8_COMPILER_NODE_PROPERTIES_H_ 163 #endif // V8_COMPILER_NODE_PROPERTIES_H_
OLDNEW
« no previous file with comments | « src/compiler/js-native-context-specialization.cc ('k') | src/compiler/node-properties.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698