5 #ifndef V8_COMPILER_AST_GRAPH_BUILDER_H_
6 #define V8_COMPILER_AST_GRAPH_BUILDER_H_
35 class AstEffectContext;
36 class AstValueContext;
106 #define DECLARE_VISIT(type) virtual void Visit##type(type* node);
165 void VisitNot(UnaryOperation* expr);
230 values()->push_back(node);
238 Node* back =
values()->back();
244 void Poke(
int depth, Node* node) {
246 int index =
static_cast<int>(
values()->size()) - depth - 1;
247 values()->at(index) = node;
251 int index =
static_cast<int>(
values()->size()) - depth - 1;
252 return values()->at(index);
315 int original_height_;
369 drop_extra_(drop_extra) {
370 owner_->set_breakable(
this);
374 owner_->set_breakable(next_);
404 owner_->set_execution_context(
this);
405 owner_->set_current_context(context);
409 owner_->set_execution_context(next_);
410 owner_->set_current_context(outer_);
#define DECLARE_VISIT(type)
StrictMode strict_mode() const
bool IsStackAllocated() const
bool IsStackLocal() const
Node * Checkpoint(BailoutId ast_id, OutputFrameStateCombine combine)
Environment(AstGraphBuilder *builder, Scope *scope, Node *control_dependency)
void Bind(Variable *variable, Node *node)
int parameters_count() const
void UpdateStateValues(Node **state_values, int offset, int count)
AstGraphBuilder * builder() const
void Poke(int depth, Node *node)
Node * Lookup(Variable *variable)
void set_breakable(BreakableScope *brk)
void VisitIfNotNull(Statement *stmt)
Node * BuildHoleCheckSilent(Node *value, Node *for_hole, Node *not_hole)
Scope * current_scope() const
Node * BuildVariableDelete(Variable *var)
void VisitForInAssignment(Expression *expr, Node *value)
SetOncePointer< Node > function_closure_
Node * BuildToBoolean(Node *value)
Node * BuildLoadClosure()
SetOncePointer< Node > function_context_
AstContext * ast_context_
Environment * environment()
Node * BuildVariableLoad(Variable *var, BailoutId bailout_id, ContextualMode mode=CONTEXTUAL)
Node * BuildArgumentsObject(Variable *arguments)
ContextScope * execution_context_
ContextScope * execution_context() const
void VisitDelete(UnaryOperation *expr)
virtual BaseEnvironment * CopyEnvironment(BaseEnvironment *env)
void VisitIterationBody(IterationStatement *stmt, LoopBuilder *loop, int)
void VisitComma(BinaryOperation *expr)
Node * BuildLoadBuiltinsObject()
virtual void VisitDeclarations(ZoneList< Declaration * > *declarations)
void VisitTypeof(UnaryOperation *expr)
Node * BuildHoleCheckThrow(Node *value, Variable *var, Node *not_hole)
void set_ast_context(AstContext *ctx)
AstContext * ast_context() const
OutputFrameStateCombine StateCombineFromAstContext()
void set_execution_context(ContextScope *ctx)
DISALLOW_COPY_AND_ASSIGN(AstGraphBuilder)
void VisitVoid(UnaryOperation *expr)
Node * ProcessArguments(const Operator *op, int arity)
void VisitForValues(ZoneList< Expression * > *exprs)
Node * BuildLoadObjectField(Node *object, int offset)
Node * BuildLocalFunctionContext(Node *context, Node *closure)
ZoneList< Handle< Object > > globals_
Node * GetFunctionClosure()
AstGraphBuilder(CompilationInfo *info, JSGraph *jsgraph)
Node * GetFunctionContext()
void VisitForValueOrNull(Expression *expr)
void PrepareFrameState(Node *node, BailoutId ast_id, OutputFrameStateCombine combine=kIgnoreOutput)
BreakableScope * breakable() const
void VisitForEffect(Expression *expr)
void VisitArithmeticExpression(BinaryOperation *expr)
Node * BuildLoadGlobalObject()
void VisitLogicalExpression(BinaryOperation *expr)
DEFINE_AST_VISITOR_SUBCLASS_MEMBERS()
void VisitForTest(Expression *expr)
void VisitNot(UnaryOperation *expr)
ZoneList< Handle< Object > > * globals()
StructuredGraphBuilder::Environment BaseEnvironment
JSOperatorBuilder * javascript()
void VisitForValue(Expression *expr)
Node * BuildThrowReferenceError(Variable *var)
Node * BuildVariableAssignment(Variable *var, Node *value, Token::Value op, BailoutId bailout_id)
void VisitCallJSRuntime(CallRuntime *expr)
Node * BuildBinaryOp(Node *left, Node *right, Token::Value op)
BreakableScope * breakable_
ControlBuilder * control_
AstGraphBuilder * owner() const
Environment * environment() const
AstContext(AstGraphBuilder *owner, Expression::Context kind)
Expression::Context kind_
void ContinueTarget(BreakableStatement *target)
virtual void ProduceValue(Node *value)=0
BreakableScope * FindBreakable(BreakableStatement *target)
void BreakTarget(BreakableStatement *target)
ContextScope(AstGraphBuilder *owner, Scope *scope, Node *context)
OutputFrameStateCombine GetStateCombine()
BreakableScope(AstGraphBuilder *owner, BreakableStatement *target, ControlBuilder *control, int drop_extra)
BreakableStatement * target_
virtual Node * ConsumeValue()=0
virtual ~AstEffectContext()
virtual Node * ConsumeValue() OVERRIDE
AstEffectContext(AstGraphBuilder *owner)
virtual ~AstTestContext()
AstTestContext(AstGraphBuilder *owner)
virtual void ProduceValue(Node *value) OVERRIDE
AstValueContext(AstGraphBuilder *owner)
virtual ~AstValueContext()
JSOperatorBuilder * javascript()
StructuredGraphBuilder * builder() const
Node * current_context() const
Environment * environment() const
enable harmony numeric enable harmony object literal extensions Optimize object Array DOM strings and string trace pretenuring decisions of HAllocate instructions Enables optimizations which favor memory size over execution speed maximum source size in bytes considered for a single inlining maximum cumulative number of AST nodes considered for inlining trace the tracking of allocation sites deoptimize every n garbage collections perform array bounds checks elimination analyze liveness of environment slots and zap dead values flushes the cache of optimized code for closures on every GC allow uint32 values on optimize frames if they are used only in safe operations track concurrent recompilation artificial compilation delay in ms do not emit check maps for constant values that have a leaf deoptimize the optimized code if the layout of the maps changes enable context specialization in TurboFan execution budget before interrupt is triggered max percentage of megamorphic generic ICs to allow optimization enable use of SAHF instruction if enable use of VFP3 instructions if available enable use of NEON instructions if enable use of SDIV and UDIV instructions if enable use of MLS instructions if enable loading bit constant by means of movw movt instruction enable unaligned accesses for enable use of d16 d31 registers on ARM this requires VFP3 force all emitted branches to be in long mode(MIPS only)") DEFINE_BOOL(enable_always_align_csp
#define DCHECK(condition)
Debugger support for the V8 JavaScript engine.