OLD | NEW |
---|---|
1 // Copyright 2014 the V8 project authors. All rights reserved. | 1 // Copyright 2014 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_AST_GRAPH_BUILDER_H_ | 5 #ifndef V8_COMPILER_AST_GRAPH_BUILDER_H_ |
6 #define V8_COMPILER_AST_GRAPH_BUILDER_H_ | 6 #define V8_COMPILER_AST_GRAPH_BUILDER_H_ |
7 | 7 |
8 #include "src/ast/ast.h" | 8 #include "src/ast/ast.h" |
9 #include "src/compiler/js-graph.h" | 9 #include "src/compiler/js-graph.h" |
10 #include "src/compiler/liveness-analyzer.h" | 10 #include "src/compiler/liveness-analyzer.h" |
(...skipping 246 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
257 Node** EnsureInputBufferSize(int size); | 257 Node** EnsureInputBufferSize(int size); |
258 | 258 |
259 // Named and keyed loads require a VectorSlotPair for successful lowering. | 259 // Named and keyed loads require a VectorSlotPair for successful lowering. |
260 VectorSlotPair CreateVectorSlotPair(FeedbackVectorSlot slot) const; | 260 VectorSlotPair CreateVectorSlotPair(FeedbackVectorSlot slot) const; |
261 | 261 |
262 // Determine which contexts need to be checked for extension objects that | 262 // Determine which contexts need to be checked for extension objects that |
263 // might shadow the optimistic declaration of dynamic lookup variables. | 263 // might shadow the optimistic declaration of dynamic lookup variables. |
264 uint32_t ComputeBitsetForDynamicGlobal(Variable* variable); | 264 uint32_t ComputeBitsetForDynamicGlobal(Variable* variable); |
265 uint32_t ComputeBitsetForDynamicContext(Variable* variable); | 265 uint32_t ComputeBitsetForDynamicContext(Variable* variable); |
266 | 266 |
267 // Computes the frequency for JSCallFunction and JSCallConstruct nodes. | |
268 float ComputeCallFrequency(FeedbackVectorSlot slot) const; | |
Jarin
2016/09/12 13:10:01
Why not double?
Benedikt Meurer
2016/09/13 17:45:07
Because space. float fits perfectly for the two op
| |
269 | |
267 // =========================================================================== | 270 // =========================================================================== |
268 // The following build methods all generate graph fragments and return one | 271 // The following build methods all generate graph fragments and return one |
269 // resulting node. The operand stack height remains the same, variables and | 272 // resulting node. The operand stack height remains the same, variables and |
270 // other dependencies tracked by the environment might be mutated though. | 273 // other dependencies tracked by the environment might be mutated though. |
271 | 274 |
272 // Builders to create local function, script and block contexts. | 275 // Builders to create local function, script and block contexts. |
273 Node* BuildLocalActivationContext(Node* context); | 276 Node* BuildLocalActivationContext(Node* context); |
274 Node* BuildLocalFunctionContext(Scope* scope); | 277 Node* BuildLocalFunctionContext(Scope* scope); |
275 Node* BuildLocalScriptContext(Scope* scope); | 278 Node* BuildLocalScriptContext(Scope* scope); |
276 Node* BuildLocalBlockContext(Scope* scope); | 279 Node* BuildLocalBlockContext(Scope* scope); |
(...skipping 327 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
604 | 607 |
605 // Prepare environment to be used as loop header. | 608 // Prepare environment to be used as loop header. |
606 void PrepareForLoop(BitVector* assigned, bool is_osr = false); | 609 void PrepareForLoop(BitVector* assigned, bool is_osr = false); |
607 }; | 610 }; |
608 | 611 |
609 } // namespace compiler | 612 } // namespace compiler |
610 } // namespace internal | 613 } // namespace internal |
611 } // namespace v8 | 614 } // namespace v8 |
612 | 615 |
613 #endif // V8_COMPILER_AST_GRAPH_BUILDER_H_ | 616 #endif // V8_COMPILER_AST_GRAPH_BUILDER_H_ |
OLD | NEW |