| OLD | NEW |
| 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/compiler/types.h" | 9 #include "src/compiler/types.h" |
| 10 #include "src/globals.h" | 10 #include "src/globals.h" |
| 11 #include "src/zone/zone-handle-set.h" |
| 11 | 12 |
| 12 namespace v8 { | 13 namespace v8 { |
| 13 namespace internal { | 14 namespace internal { |
| 14 namespace compiler { | 15 namespace compiler { |
| 15 | 16 |
| 16 class Graph; | 17 class Graph; |
| 17 class Operator; | 18 class Operator; |
| 18 class CommonOperatorBuilder; | 19 class CommonOperatorBuilder; |
| 19 | 20 |
| 20 // A facade that simplifies access to the different kinds of inputs to a node. | 21 // A facade that simplifies access to the different kinds of inputs to a node. |
| (...skipping 98 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 119 // Collect the branch-related projections from a node, such as IfTrue, | 120 // Collect the branch-related projections from a node, such as IfTrue, |
| 120 // IfFalse, IfSuccess, IfException, IfValue and IfDefault. | 121 // IfFalse, IfSuccess, IfException, IfValue and IfDefault. |
| 121 // - Branch: [ IfTrue, IfFalse ] | 122 // - Branch: [ IfTrue, IfFalse ] |
| 122 // - Call : [ IfSuccess, IfException ] | 123 // - Call : [ IfSuccess, IfException ] |
| 123 // - Switch: [ IfValue, ..., IfDefault ] | 124 // - Switch: [ IfValue, ..., IfDefault ] |
| 124 static void CollectControlProjections(Node* node, Node** proj, size_t count); | 125 static void CollectControlProjections(Node* node, Node** proj, size_t count); |
| 125 | 126 |
| 126 // Checks if two nodes are the same, looking past {CheckHeapObject}. | 127 // Checks if two nodes are the same, looking past {CheckHeapObject}. |
| 127 static bool IsSame(Node* a, Node* b); | 128 static bool IsSame(Node* a, Node* b); |
| 128 | 129 |
| 130 // Walks up the {effect} chain to find a witness that provides map |
| 131 // information about the {receiver}. Doesn't look through potentially |
| 132 // side effecting nodes. |
| 133 static bool InferReceiverMaps(Node* receiver, Node* effect, |
| 134 ZoneHandleSet<Map>* maps_return); |
| 135 |
| 129 // --------------------------------------------------------------------------- | 136 // --------------------------------------------------------------------------- |
| 130 // Context. | 137 // Context. |
| 131 | 138 |
| 132 // Try to retrieve the specialization context from the given {node}, | 139 // Try to retrieve the specialization context from the given {node}, |
| 133 // optionally utilizing the knowledge about the (outermost) function | 140 // optionally utilizing the knowledge about the (outermost) function |
| 134 // {context}. | 141 // {context}. |
| 135 static MaybeHandle<Context> GetSpecializationContext( | 142 static MaybeHandle<Context> GetSpecializationContext( |
| 136 Node* node, MaybeHandle<Context> context = MaybeHandle<Context>()); | 143 Node* node, MaybeHandle<Context> context = MaybeHandle<Context>()); |
| 137 | 144 |
| 138 // Walk up the context chain from the given {node} until we reduce the {depth} | 145 // Walk up the context chain from the given {node} until we reduce the {depth} |
| (...skipping 19 matching lines...) Expand all Loading... |
| 158 | 165 |
| 159 private: | 166 private: |
| 160 static inline bool IsInputRange(Edge edge, int first, int count); | 167 static inline bool IsInputRange(Edge edge, int first, int count); |
| 161 }; | 168 }; |
| 162 | 169 |
| 163 } // namespace compiler | 170 } // namespace compiler |
| 164 } // namespace internal | 171 } // namespace internal |
| 165 } // namespace v8 | 172 } // namespace v8 |
| 166 | 173 |
| 167 #endif // V8_COMPILER_NODE_PROPERTIES_H_ | 174 #endif // V8_COMPILER_NODE_PROPERTIES_H_ |
| OLD | NEW |