summaryrefslogtreecommitdiff
path: root/deps/v8/src/compiler/ast-graph-builder.h
diff options
context:
space:
mode:
authorMichaël Zasso <targos@protonmail.com>2016-12-23 16:30:57 +0100
committerMichaël Zasso <targos@protonmail.com>2017-01-26 22:46:17 +0100
commit2739185b790e040c3b044c577327f5d44bffad4a (patch)
tree29a466999212f4c85958379d9d400eec8a185ba5 /deps/v8/src/compiler/ast-graph-builder.h
parenta67a04d7654faaa04c8da00e42981ebc9fd0911c (diff)
downloadnode-new-2739185b790e040c3b044c577327f5d44bffad4a.tar.gz
deps: update V8 to 5.5.372.40
PR-URL: https://github.com/nodejs/node/pull/9618 Reviewed-By: Ali Ijaz Sheikh <ofrobots@google.com> Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl>
Diffstat (limited to 'deps/v8/src/compiler/ast-graph-builder.h')
-rw-r--r--deps/v8/src/compiler/ast-graph-builder.h20
1 files changed, 15 insertions, 5 deletions
diff --git a/deps/v8/src/compiler/ast-graph-builder.h b/deps/v8/src/compiler/ast-graph-builder.h
index bd307ba29a..27f2c9b4c6 100644
--- a/deps/v8/src/compiler/ast-graph-builder.h
+++ b/deps/v8/src/compiler/ast-graph-builder.h
@@ -37,6 +37,7 @@ class TypeHintAnalysis;
class AstGraphBuilder : public AstVisitor<AstGraphBuilder> {
public:
AstGraphBuilder(Zone* local_zone, CompilationInfo* info, JSGraph* jsgraph,
+ float invocation_frequency,
LoopAssignmentAnalysis* loop_assignment = nullptr,
TypeHintAnalysis* type_hint_analysis = nullptr);
virtual ~AstGraphBuilder() {}
@@ -80,6 +81,7 @@ class AstGraphBuilder : public AstVisitor<AstGraphBuilder> {
Zone* local_zone_;
CompilationInfo* info_;
JSGraph* jsgraph_;
+ float const invocation_frequency_;
Environment* environment_;
AstContext* ast_context_;
@@ -264,6 +266,9 @@ class AstGraphBuilder : public AstVisitor<AstGraphBuilder> {
uint32_t ComputeBitsetForDynamicGlobal(Variable* variable);
uint32_t ComputeBitsetForDynamicContext(Variable* variable);
+ // Computes the frequency for JSCallFunction and JSCallConstruct nodes.
+ float ComputeCallFrequency(FeedbackVectorSlot slot) const;
+
// ===========================================================================
// The following build methods all generate graph fragments and return one
// resulting node. The operand stack height remains the same, variables and
@@ -278,8 +283,8 @@ class AstGraphBuilder : public AstVisitor<AstGraphBuilder> {
// Builder to create an arguments object if it is used.
Node* BuildArgumentsObject(Variable* arguments);
- // Builder to create an array of rest parameters if used
- Node* BuildRestArgumentsArray(Variable* rest, int index);
+ // Builder to create an array of rest parameters if used.
+ Node* BuildRestArgumentsArray(Variable* rest);
// Builder that assigns to the {.this_function} internal variable if needed.
Node* BuildThisFunctionVariable(Variable* this_function_var);
@@ -342,8 +347,7 @@ class AstGraphBuilder : public AstVisitor<AstGraphBuilder> {
// Builder for adding the [[HomeObject]] to a value if the value came from a
// function literal and needs a home object. Do nothing otherwise.
Node* BuildSetHomeObject(Node* value, Node* home_object,
- ObjectLiteralProperty* property,
- int slot_number = 0);
+ LiteralProperty* property, int slot_number = 0);
// Builders for error reporting at runtime.
Node* BuildThrowError(Node* exception, BailoutId bailout_id);
@@ -575,6 +579,11 @@ class AstGraphBuilder::Environment : public ZoneObject {
// Copies this environment at a loop header control-flow point.
Environment* CopyForLoop(BitVector* assigned, bool is_osr = false);
+ // Copies this environment for Osr entry. This only produces environment
+ // of the right shape, the caller is responsible for filling in the right
+ // values and dependencies.
+ Environment* CopyForOsrEntry();
+
private:
AstGraphBuilder* builder_;
int parameters_count_;
@@ -604,7 +613,8 @@ class AstGraphBuilder::Environment : public ZoneObject {
bool IsLivenessBlockConsistent();
// Prepare environment to be used as loop header.
- void PrepareForLoop(BitVector* assigned, bool is_osr = false);
+ void PrepareForLoop(BitVector* assigned);
+ void PrepareForOsrEntry();
};
} // namespace compiler