v8
3.25.30(node0.11.13)
V8 is Google's open source JavaScript engine
|
#include <hydrogen.h>
Data Structures | |
class | BASE_EMBEDDED |
Public Member Functions | |
HOptimizedGraphBuilder (CompilationInfo *info) | |
virtual bool | BuildGraph () V8_OVERRIDE |
BreakAndContinueScope * | break_scope () const |
void | set_break_scope (BreakAndContinueScope *head) |
bool | inline_bailout () |
HValue * | context () |
HOsrBuilder * | osr () const |
void | Bailout (BailoutReason reason) |
HBasicBlock * | CreateJoin (HBasicBlock *first, HBasicBlock *second, BailoutId join_id) |
FunctionState * | function_state () const |
void | VisitDeclarations (ZoneList< Declaration * > *declarations) |
void * | operator new (size_t size, Zone *zone) |
void | operator delete (void *pointer, Zone *zone) |
void | operator delete (void *pointer) |
DEFINE_AST_VISITOR_SUBCLASS_MEMBERS () | |
Public Member Functions inherited from HGraphBuilder | |
HGraphBuilder (CompilationInfo *info) | |
virtual | ~HGraphBuilder () |
HBasicBlock * | current_block () const |
void | set_current_block (HBasicBlock *block) |
HEnvironment * | environment () const |
Zone * | zone () const |
HGraph * | graph () const |
Isolate * | isolate () const |
CompilationInfo * | top_info () |
HGraph * | CreateGraph () |
void | Push (HValue *value) |
HValue * | Pop () |
HInstruction * | AddInstruction (HInstruction *instr) |
void | FinishCurrentBlock (HControlInstruction *last) |
void | FinishExitCurrentBlock (HControlInstruction *instruction) |
void | Goto (HBasicBlock *from, HBasicBlock *target, FunctionState *state=NULL, bool add_simulate=true) |
void | Goto (HBasicBlock *target, FunctionState *state=NULL, bool add_simulate=true) |
void | GotoNoSimulate (HBasicBlock *from, HBasicBlock *target) |
void | GotoNoSimulate (HBasicBlock *target) |
void | AddLeaveInlined (HBasicBlock *block, HValue *return_value, FunctionState *state) |
void | AddLeaveInlined (HValue *return_value, FunctionState *state) |
template<class I > | |
HInstruction * | NewUncasted () |
template<class I > | |
I * | New () |
template<class I > | |
HInstruction * | AddUncasted () |
template<class I > | |
I * | Add () |
template<class I , class P1 > | |
HInstruction * | NewUncasted (P1 p1) |
template<class I , class P1 > | |
I * | New (P1 p1) |
template<class I , class P1 > | |
HInstruction * | AddUncasted (P1 p1) |
template<class I , class P1 > | |
I * | Add (P1 p1) |
template<class I , class P1 , class P2 > | |
HInstruction * | NewUncasted (P1 p1, P2 p2) |
template<class I , class P1 , class P2 > | |
I * | New (P1 p1, P2 p2) |
template<class I , class P1 , class P2 > | |
HInstruction * | AddUncasted (P1 p1, P2 p2) |
template<class I , class P1 , class P2 > | |
I * | Add (P1 p1, P2 p2) |
template<class I , class P1 , class P2 , class P3 > | |
HInstruction * | NewUncasted (P1 p1, P2 p2, P3 p3) |
template<class I , class P1 , class P2 , class P3 > | |
I * | New (P1 p1, P2 p2, P3 p3) |
template<class I , class P1 , class P2 , class P3 > | |
HInstruction * | AddUncasted (P1 p1, P2 p2, P3 p3) |
template<class I , class P1 , class P2 , class P3 > | |
I * | Add (P1 p1, P2 p2, P3 p3) |
template<class I , class P1 , class P2 , class P3 , class P4 > | |
HInstruction * | NewUncasted (P1 p1, P2 p2, P3 p3, P4 p4) |
template<class I , class P1 , class P2 , class P3 , class P4 > | |
I * | New (P1 p1, P2 p2, P3 p3, P4 p4) |
template<class I , class P1 , class P2 , class P3 , class P4 > | |
HInstruction * | AddUncasted (P1 p1, P2 p2, P3 p3, P4 p4) |
template<class I , class P1 , class P2 , class P3 , class P4 > | |
I * | Add (P1 p1, P2 p2, P3 p3, P4 p4) |
template<class I , class P1 , class P2 , class P3 , class P4 , class P5 > | |
HInstruction * | NewUncasted (P1 p1, P2 p2, P3 p3, P4 p4, P5 p5) |
template<class I , class P1 , class P2 , class P3 , class P4 , class P5 > | |
I * | New (P1 p1, P2 p2, P3 p3, P4 p4, P5 p5) |
template<class I , class P1 , class P2 , class P3 , class P4 , class P5 > | |
HInstruction * | AddUncasted (P1 p1, P2 p2, P3 p3, P4 p4, P5 p5) |
template<class I , class P1 , class P2 , class P3 , class P4 , class P5 > | |
I * | Add (P1 p1, P2 p2, P3 p3, P4 p4, P5 p5) |
template<class I , class P1 , class P2 , class P3 , class P4 , class P5 , class P6 > | |
HInstruction * | NewUncasted (P1 p1, P2 p2, P3 p3, P4 p4, P5 p5, P6 p6) |
template<class I , class P1 , class P2 , class P3 , class P4 , class P5 , class P6 > | |
I * | New (P1 p1, P2 p2, P3 p3, P4 p4, P5 p5, P6 p6) |
template<class I , class P1 , class P2 , class P3 , class P4 , class P5 , class P6 > | |
HInstruction * | AddUncasted (P1 p1, P2 p2, P3 p3, P4 p4, P5 p5, P6 p6) |
template<class I , class P1 , class P2 , class P3 , class P4 , class P5 , class P6 > | |
I * | Add (P1 p1, P2 p2, P3 p3, P4 p4, P5 p5, P6 p6) |
template<class I , class P1 , class P2 , class P3 , class P4 , class P5 , class P6 , class P7 > | |
HInstruction * | NewUncasted (P1 p1, P2 p2, P3 p3, P4 p4, P5 p5, P6 p6, P7 p7) |
template<class I , class P1 , class P2 , class P3 , class P4 , class P5 , class P6 , class P7 > | |
I * | New (P1 p1, P2 p2, P3 p3, P4 p4, P5 p5, P6 p6, P7 p7) |
template<class I , class P1 , class P2 , class P3 , class P4 , class P5 , class P6 , class P7 > | |
HInstruction * | AddUncasted (P1 p1, P2 p2, P3 p3, P4 p4, P5 p5, P6 p6, P7 p7) |
template<class I , class P1 , class P2 , class P3 , class P4 , class P5 , class P6 , class P7 > | |
I * | Add (P1 p1, P2 p2, P3 p3, P4 p4, P5 p5, P6 p6, P7 p7) |
template<class I , class P1 , class P2 , class P3 , class P4 , class P5 , class P6 , class P7 , class P8 > | |
HInstruction * | NewUncasted (P1 p1, P2 p2, P3 p3, P4 p4, P5 p5, P6 p6, P7 p7, P8 p8) |
template<class I , class P1 , class P2 , class P3 , class P4 , class P5 , class P6 , class P7 , class P8 > | |
I * | New (P1 p1, P2 p2, P3 p3, P4 p4, P5 p5, P6 p6, P7 p7, P8 p8) |
template<class I , class P1 , class P2 , class P3 , class P4 , class P5 , class P6 , class P7 , class P8 > | |
HInstruction * | AddUncasted (P1 p1, P2 p2, P3 p3, P4 p4, P5 p5, P6 p6, P7 p7, P8 p8) |
template<class I , class P1 , class P2 , class P3 , class P4 , class P5 , class P6 , class P7 , class P8 > | |
I * | Add (P1 p1, P2 p2, P3 p3, P4 p4, P5 p5, P6 p6, P7 p7, P8 p8) |
void | AddSimulate (BailoutId id, RemovableSimulate removable=FIXED_SIMULATE) |
template<> | |
HDeoptimize * | Add (const char *reason, Deoptimizer::BailoutType type) |
template<> | |
HInstruction * | AddUncasted (const char *reason, Deoptimizer::BailoutType type) |
template<> | |
HSimulate * | Add (BailoutId id, RemovableSimulate removable) |
template<> | |
HSimulate * | Add (BailoutId id) |
template<> | |
HInstruction * | AddUncasted (BailoutId id) |
template<> | |
HReturn * | Add (HValue *value) |
template<> | |
HReturn * | Add (HConstant *value) |
template<> | |
HInstruction * | AddUncasted (HValue *value) |
template<> | |
HInstruction * | AddUncasted (HConstant *value) |
template<> | |
HCallRuntime * | Add (Handle< String > name, const Runtime::Function *c_function, int argument_count) |
template<> | |
HInstruction * | AddUncasted (Handle< String > name, const Runtime::Function *c_function, int argument_count) |
template<> | |
HContext * | New () |
template<> | |
HInstruction * | NewUncasted () |
Protected Types | |
typedef void(HOptimizedGraphBuilder::* | InlineFunctionGenerator )(CallRuntime *call) |
Static Protected Attributes | |
static const InlineFunctionGenerator | kInlineFunctionGenerators [] |
static const int | kMaxCallPolymorphism = 4 |
static const int | kMaxLoadPolymorphism = 4 |
static const int | kMaxStorePolymorphism = 4 |
static const int | kUnlimitedMaxInlinedSourceSize = 100000 |
static const int | kUnlimitedMaxInlinedNodes = 10000 |
static const int | kUnlimitedMaxInlinedNodesCumulative = 10000 |
static const int | kMaxFastLiteralDepth = 3 |
static const int | kMaxFastLiteralProperties = 8 |
Friends | |
class | FunctionState |
class | AstContext |
class | KeyedLoadFastElementStub |
class | HOsrBuilder |
Definition at line 1984 of file hydrogen.h.
|
protected |
Definition at line 2074 of file hydrogen.h.
|
explicit |
Definition at line 2980 of file hydrogen.cc.
References HGraphBuilder::SetSourcePosition(), CompilationInfo::shared_info(), and CompilationInfo::zone().
|
inlineprotected |
Definition at line 2099 of file hydrogen.h.
Referenced by HOptimizedGraphBuilder::VisitArithmeticExpression(), HOptimizedGraphBuilder::VisitDelete(), HOptimizedGraphBuilder::VisitLogicalExpression(), HOptimizedGraphBuilder::VisitNot(), HOptimizedGraphBuilder::VisitTypeof(), and HOptimizedGraphBuilder::VisitVoid().
void Bailout | ( | BailoutReason | reason | ) |
Definition at line 3868 of file hydrogen.cc.
References HOptimizedGraphBuilder::current_info(), and CompilationInfo::set_bailout_reason().
Referenced by HOptimizedGraphBuilder::BuildGraph(), OptimizedCompileJob::OptimizeGraph(), HOptimizedGraphBuilder::SetUpScope(), and HOptimizedGraphBuilder::VisitDelete().
Definition at line 2169 of file hydrogen.h.
References HGraphBuilder::environment().
Definition at line 2182 of file hydrogen.h.
References HGraphBuilder::environment(), HOptimizedGraphBuilder::IsEligibleForEnvironmentLivenessAnalysis(), and v8::internal::USE().
|
inline |
Definition at line 2044 of file hydrogen.h.
|
virtual |
Implements HGraphBuilder.
Definition at line 3910 of file hydrogen.cc.
References ASSERT, HOptimizedGraphBuilder::Bailout(), Scope::calls_eval(), TypeFeedbackInfo::cast(), v8::internal::code(), HGraphBuilder::CreateBasicBlock(), HGraphBuilder::current_block(), HOptimizedGraphBuilder::current_info(), Scope::declarations(), BailoutId::Declarations(), HGraphBuilder::environment(), HOsrBuilder::FinishGraph(), Scope::function(), BailoutId::FunctionEntry(), HGraphBuilder::Goto(), HGraphBuilder::graph(), Scope::HasIllegalRedeclaration(), Scope::is_function_scope(), v8::internal::NULL, HOptimizedGraphBuilder::osr(), CompilationInfo::scope(), HGraphBuilder::set_current_block(), HOptimizedGraphBuilder::SetUpScope(), HOptimizedGraphBuilder::VisitDeclarations(), and HOptimizedGraphBuilder::VisitStatements().
|
protected |
Definition at line 3047 of file hydrogen.cc.
References HGraphBuilder::CreateLoopHeaderBlock(), HGraphBuilder::Goto(), and HGraphBuilder::set_current_block().
Referenced by HOptimizedGraphBuilder::BuildLoopEntry(), and HOsrBuilder::BuildOsrLoopEntry().
|
protected |
Definition at line 3055 of file hydrogen.cc.
References HOptimizedGraphBuilder::BuildLoopEntry(), HOsrBuilder::BuildOsrLoopEntry(), HOsrBuilder::HasOsrEntryAt(), and HOptimizedGraphBuilder::osr().
|
inlineprotected |
Definition at line 2106 of file hydrogen.h.
References HOptimizedGraphBuilder::function_state().
|
inlineprotected |
Definition at line 2115 of file hydrogen.h.
References HOptimizedGraphBuilder::function_state().
|
inlinevirtual |
Implements HGraphBuilder.
Definition at line 2049 of file hydrogen.h.
References HGraphBuilder::environment().
Referenced by HOptimizedGraphBuilder::set_ast_context().
HBasicBlock * CreateJoin | ( | HBasicBlock * | first, |
HBasicBlock * | second, | ||
BailoutId | join_id | ||
) |
Definition at line 3001 of file hydrogen.cc.
References HGraphBuilder::Goto(), HGraphBuilder::graph(), and v8::internal::NULL.
Referenced by HOptimizedGraphBuilder::VisitLogicalExpression(), and HOptimizedGraphBuilder::VisitNot().
|
protected |
Definition at line 3030 of file hydrogen.cc.
References BreakableStatement::ExitId(), HGraphBuilder::Goto(), and v8::internal::NULL.
|
inlineprotected |
Definition at line 2103 of file hydrogen.h.
References HOptimizedGraphBuilder::function_state().
Referenced by HOptimizedGraphBuilder::Bailout(), HOptimizedGraphBuilder::BuildGraph(), HOsrBuilder::HasOsrEntryAt(), and HOptimizedGraphBuilder::VisitDeclarations().
DEFINE_AST_VISITOR_SUBCLASS_MEMBERS | ( | ) |
|
inlineprotected |
Definition at line 2168 of file hydrogen.h.
References HGraphBuilder::environment().
Referenced by HOptimizedGraphBuilder::VisitLogicalExpression().
|
inlineprotected |
Definition at line 2109 of file hydrogen.h.
References HOptimizedGraphBuilder::function_state().
|
inline |
Definition at line 2059 of file hydrogen.h.
Referenced by HOptimizedGraphBuilder::call_context(), HOptimizedGraphBuilder::ClearInlinedTestContext(), HOptimizedGraphBuilder::current_info(), HOptimizedGraphBuilder::function_return(), HOptimizedGraphBuilder::function_strict_mode(), and HOptimizedGraphBuilder::inlined_test_context().
|
inlineprotected |
Definition at line 2118 of file hydrogen.h.
References HOptimizedGraphBuilder::function_state().
Referenced by HOptimizedGraphBuilder::VisitDelete().
|
inline |
Definition at line 2047 of file hydrogen.h.
Referenced by OptimizedCompileJob::CreateGraph().
|
inlineprotected |
Definition at line 2112 of file hydrogen.h.
References HOptimizedGraphBuilder::function_state().
|
inlineprotected |
Definition at line 2170 of file hydrogen.h.
References Variable::is_arguments(), and Variable::is_this().
Referenced by HOptimizedGraphBuilder::BindIfLive(), and HOptimizedGraphBuilder::LookupAndMakeLive().
|
protected |
Definition at line 3018 of file hydrogen.cc.
References IterationStatement::ContinueId(), HGraphBuilder::Goto(), and v8::internal::NULL.
Definition at line 2196 of file hydrogen.h.
References HGraphBuilder::environment(), HOptimizedGraphBuilder::IsEligibleForEnvironmentLivenessAnalysis(), and v8::internal::USE().
|
inline |
Definition at line 2066 of file hydrogen.h.
|
inline |
Definition at line 2067 of file hydrogen.h.
|
inline |
Definition at line 2063 of file hydrogen.h.
References Zone::New(), v8::internal::size, and HGraphBuilder::zone().
|
inline |
Definition at line 2051 of file hydrogen.h.
Referenced by HOptimizedGraphBuilder::BuildGraph(), and HOptimizedGraphBuilder::BuildLoopEntry().
|
protected |
Definition at line 4122 of file hydrogen.cc.
References HOptimizedGraphBuilder::PushArgumentsFromEnvironment().
|
protected |
|
protected |
Definition at line 4109 of file hydrogen.cc.
References List< T, ZoneAllocationPolicy >::Add(), HGraphBuilder::Pop(), and HGraphBuilder::zone().
Referenced by HOptimizedGraphBuilder::PreProcessCall().
|
inlineprotected |
Definition at line 2100 of file hydrogen.h.
References HOptimizedGraphBuilder::context().
Referenced by AstContext::AstContext(), and AstContext::~AstContext().
|
inline |
Definition at line 2045 of file hydrogen.h.
Referenced by HOptimizedGraphBuilder::BASE_EMBEDDED::BreakAndContinueScope().
|
inlineprotected |
Definition at line 2097 of file hydrogen.h.
|
protected |
Definition at line 4128 of file hydrogen.cc.
References HGraphBuilder::AddInstruction(), Scope::arguments(), ASSERT_EQ, HOptimizedGraphBuilder::Bailout(), HGraphBuilder::environment(), HGraphBuilder::graph(), Variable::IsStackAllocated(), v8::internal::NULL, Scope::num_parameters(), and HGraphBuilder::zone().
Referenced by HOptimizedGraphBuilder::BuildGraph().
|
inlineprotected |
Definition at line 2167 of file hydrogen.h.
References HGraphBuilder::environment().
Referenced by HOptimizedGraphBuilder::VisitLogicalExpression().
Definition at line 2237 of file hydrogen.h.
References v8::internal::map, and HGraphBuilder::zone().
|
protected |
Definition at line 9581 of file hydrogen.cc.
References HOptimizedGraphBuilder::ast_context(), HValue::cast(), CHECK_ALIVE, HGraphBuilder::Pop(), AstContext::ReturnValue(), HGraphBuilder::ScriptPositionToSourcePosition(), HGraphBuilder::SetSourcePosition(), HOptimizedGraphBuilder::VisitForValue(), and HGraphBuilder::zone().
|
protected |
Definition at line 9470 of file hydrogen.cc.
References CHECK_ALIVE, and HOptimizedGraphBuilder::VisitForEffect().
void VisitDeclarations | ( | ZoneList< Declaration * > * | declarations | ) |
Definition at line 10156 of file hydrogen.cc.
References ASSERT, HOptimizedGraphBuilder::current_info(), BitFieldBase< StrictMode, shift, size, uint32_t >::encode(), BitFieldBase< bool, shift, size, uint32_t >::encode(), Isolate::factory(), v8::internal::flags, HGraphBuilder::isolate(), Factory::NewFixedArray(), and v8::internal::TENURED.
Referenced by HOptimizedGraphBuilder::BuildGraph().
|
protected |
Definition at line 8780 of file hydrogen.cc.
References HGraphBuilder::AddLoadJSBuiltin(), HOptimizedGraphBuilder::ast_context(), HOptimizedGraphBuilder::Bailout(), CHECK_ALIVE, HOptimizedGraphBuilder::function_strict_mode(), HGraphBuilder::graph(), HValue::id(), Variable::is_this(), Variable::IsContextSlot(), Variable::IsStackAllocated(), Variable::IsUnallocated(), obj, HGraphBuilder::Pop(), AstContext::ReturnInstruction(), AstContext::ReturnValue(), HOptimizedGraphBuilder::VisitForEffect(), and HOptimizedGraphBuilder::VisitForValue().
|
protected |
Definition at line 3902 of file hydrogen.cc.
References List< T, ZoneAllocationPolicy >::at(), CHECK_ALIVE, and HOptimizedGraphBuilder::VisitForValue().
|
protected |
Definition at line 3894 of file hydrogen.cc.
Referenced by HOptimizedGraphBuilder::VisitLogicalExpression(), and HOptimizedGraphBuilder::VisitNot().
|
protected |
Definition at line 3874 of file hydrogen.cc.
Referenced by HOptimizedGraphBuilder::VisitComma(), HOptimizedGraphBuilder::VisitDelete(), HOptimizedGraphBuilder::VisitLogicalExpression(), HOptimizedGraphBuilder::VisitNot(), and HOptimizedGraphBuilder::VisitVoid().
|
protected |
Definition at line 3887 of file hydrogen.cc.
References v8::internal::ARGUMENTS_NOT_ALLOWED.
Referenced by HOptimizedGraphBuilder::VisitTypeof().
|
protected |
Definition at line 3880 of file hydrogen.cc.
Referenced by HOptimizedGraphBuilder::VisitArithmeticExpression(), HOptimizedGraphBuilder::VisitDelete(), HOptimizedGraphBuilder::VisitExpressions(), and HOptimizedGraphBuilder::VisitLogicalExpression().
|
protected |
Definition at line 9478 of file hydrogen.cc.
References v8::internal::AND, ASSERT, HOptimizedGraphBuilder::ast_context(), CHECK_ALIVE, CHECK_BAILOUT, HOptimizedGraphBuilder::CreateJoin(), HGraphBuilder::current_block(), HOptimizedGraphBuilder::Drop(), HGraphBuilder::FinishCurrentBlock(), HGraphBuilder::graph(), AstContext::IsValue(), v8::internal::NULL, HGraphBuilder::Pop(), AstContext::ReturnValue(), HGraphBuilder::set_current_block(), HOptimizedGraphBuilder::Top(), HOptimizedGraphBuilder::VisitForControl(), HOptimizedGraphBuilder::VisitForEffect(), and HOptimizedGraphBuilder::VisitForValue().
|
protected |
Definition at line 4512 of file hydrogen.cc.
References ASSERT, IterationStatement::body(), CHECK_BAILOUT, and IterationStatement::StackCheckId().
|
protected |
Definition at line 8834 of file hydrogen.cc.
References ASSERT, HOptimizedGraphBuilder::ast_context(), CHECK_BAILOUT, HOptimizedGraphBuilder::CreateJoin(), HGraphBuilder::graph(), AstContext::IsEffect(), v8::internal::NULL, HGraphBuilder::Pop(), HGraphBuilder::Push(), AstContext::ReturnValue(), HGraphBuilder::set_current_block(), HOptimizedGraphBuilder::VisitForControl(), and HOptimizedGraphBuilder::VisitForEffect().
Definition at line 4167 of file hydrogen.cc.
References List< T, ZoneAllocationPolicy >::at(), CHECK_ALIVE, and Statement::IsJump().
Referenced by HOptimizedGraphBuilder::BuildGraph().
|
protected |
Definition at line 8826 of file hydrogen.cc.
References HOptimizedGraphBuilder::ast_context(), CHECK_ALIVE, HValue::id(), HGraphBuilder::Pop(), AstContext::ReturnInstruction(), and HOptimizedGraphBuilder::VisitForTypeOf().
|
protected |
Definition at line 8820 of file hydrogen.cc.
References HOptimizedGraphBuilder::ast_context(), CHECK_ALIVE, HGraphBuilder::graph(), AstContext::ReturnValue(), and HOptimizedGraphBuilder::VisitForEffect().
|
friend |
Definition at line 2638 of file hydrogen.h.
|
friend |
Definition at line 2637 of file hydrogen.h.
|
friend |
Definition at line 2640 of file hydrogen.h.
|
friend |
Definition at line 2639 of file hydrogen.h.
|
staticprotected |
Definition at line 2077 of file hydrogen.h.
|
staticprotected |
Definition at line 2081 of file hydrogen.h.
|
staticprotected |
Definition at line 2093 of file hydrogen.h.
|
staticprotected |
Definition at line 2094 of file hydrogen.h.
|
staticprotected |
Definition at line 2082 of file hydrogen.h.
|
staticprotected |
Definition at line 2083 of file hydrogen.h.
|
staticprotected |
Definition at line 2088 of file hydrogen.h.
|
staticprotected |
Definition at line 2089 of file hydrogen.h.
|
staticprotected |
Definition at line 2087 of file hydrogen.h.