}
-BitVector* AstGraphBuilder::GetVariablesAssignedInLoop(
- IterationStatement* stmt) {
- if (loop_assignment_analysis_ == NULL) return NULL;
- return loop_assignment_analysis_->GetVariablesAssignedInLoop(stmt);
-}
-
-
void AstGraphBuilder::VisitDoWhileStatement(DoWhileStatement* stmt) {
LoopBuilder while_loop(this);
while_loop.BeginLoop(GetVariablesAssignedInLoop(stmt));
// Create node to instantiate a new closure.
Node* info = jsgraph()->Constant(shared_info);
- Node* pretenure = expr->pretenure() ? jsgraph()->TrueConstant()
- : jsgraph()->FalseConstant();
+ Node* pretenure = jsgraph()->BooleanConstant(expr->pretenure());
const Operator* op = javascript()->CallRuntime(Runtime::kNewClosure, 3);
Node* value = NewNode(op, context, info, pretenure);
ast_context()->ProduceValue(value);
case Variable::LOCAL:
case Variable::CONTEXT:
// Local var, const, or let variable or context variable.
- return variable->is_this() ? jsgraph()->TrueConstant()
- : jsgraph()->FalseConstant();
+ return jsgraph()->BooleanConstant(variable->is_this());
case Variable::LOOKUP: {
// Dynamic lookup of context variable (anywhere in the chain).
Node* name = jsgraph()->Constant(variable->name());
}
}
+
+BitVector* AstGraphBuilder::GetVariablesAssignedInLoop(
+ IterationStatement* stmt) {
+ if (loop_assignment_analysis_ == NULL) return NULL;
+ return loop_assignment_analysis_->GetVariablesAssignedInLoop(stmt);
}
-}
-} // namespace v8::internal::compiler
+
+} // namespace compiler
+} // namespace internal
+} // namespace v8
SetOncePointer<Node> function_closure_;
SetOncePointer<Node> function_context_;
+ // Result of loop assignment analysis performed before graph creation.
LoopAssignmentAnalysis* loop_assignment_analysis_;
CompilationInfo* info() const { return info_; }
Node* node, BailoutId ast_id,
OutputFrameStateCombine combine = OutputFrameStateCombine::Ignore());
- OutputFrameStateCombine StateCombineFromAstContext();
-
BitVector* GetVariablesAssignedInLoop(IterationStatement* stmt);
DEFINE_AST_VISITOR_SUBCLASS_MEMBERS();
Scope* AstGraphBuilder::current_scope() const {
return execution_context_->scope();
}
-}
-}
-} // namespace v8::internal::compiler
+
+} // namespace compiler
+} // namespace internal
+} // namespace v8
#endif // V8_COMPILER_AST_GRAPH_BUILDER_H_