V8 Project
|
#include <full-codegen.h>
Classes | |
class | AccumulatorValueContext |
struct | BackEdgeEntry |
struct | BailoutEntry |
class | BASE_EMBEDDED |
class | Breakable |
class | EffectContext |
class | Finally |
class | ForIn |
class | Iteration |
class | NestedBlock |
class | PcField |
class | StackValueContext |
class | StateField |
class | TestContext |
class | TryCatch |
class | TryFinally |
class | WithOrCatch |
Public Types | |
enum | State { NO_REGISTERS , TOS_REG } |
Public Member Functions | |
FullCodeGenerator (MacroAssembler *masm, CompilationInfo *info) | |
void | Initialize () |
Static Public Member Functions | |
static bool | MakeCode (CompilationInfo *info) |
static const char * | State2String (State state) |
Static Public Attributes | |
static const int | kMaxBackEdgeWeight = 127 |
Private Types | |
typedef void(FullCodeGenerator::* | InlineFunctionGenerator) (CallRuntime *expr) |
Static Private Member Functions | |
static Register | result_register () |
static Register | context_register () |
Private Attributes | |
MacroAssembler * | masm_ |
CompilationInfo * | info_ |
Scope * | scope_ |
Label | return_label_ |
NestedStatement * | nesting_stack_ |
int | loop_depth_ |
ZoneList< Handle< Object > > * | globals_ |
Handle< FixedArray > | modules_ |
int | module_index_ |
const ExpressionContext * | context_ |
ZoneList< BailoutEntry > | bailout_entries_ |
ZoneList< BackEdgeEntry > | back_edges_ |
int | ic_total_count_ |
Handle< FixedArray > | handler_table_ |
Handle< Cell > | profiling_counter_ |
bool | generate_debug_code_ |
Static Private Attributes | |
static const InlineFunctionGenerator | kInlineFunctionGenerators [] |
Friends | |
class | NestedStatement |
Definition at line 57 of file full-codegen.h.
|
private |
Definition at line 296 of file full-codegen.h.
|
inline |
Definition at line 64 of file full-codegen.h.
References DCHECK, Initialize(), and v8::internal::CompilationInfo::IsStub().
|
private |
Definition at line 586 of file full-codegen.cc.
References __, v8::internal::List< T, AllocationPolicy >::at(), context_register(), DCHECK, v8::internal::Scope::declarations(), v8::internal::Smi::FromInt(), v8::internal::Scope::GetScopeInfo(), v8::internal::Interface::Index(), v8::internal::Variable::index(), v8::internal::Scope::interface(), v8::internal::Scope::is_global_scope(), v8::internal::StandardFrameConstants::kContextOffset, LoadContextField(), masm_, v8::internal::Scope::module_var(), NULL, v8::internal::Context::PREVIOUS_INDEX, v8::internal::compiler::Push(), scope(), scope_, and StoreToFrameField().
Referenced by VisitDeclarations().
|
private |
|
private |
Definition at line 421 of file full-codegen.cc.
References CallIC().
|
private |
Definition at line 428 of file full-codegen.cc.
References CallIC(), and strict_mode().
|
private |
|
inlineprivate |
Definition at line 602 of file full-codegen.h.
References context_.
Referenced by v8::internal::FullCodeGenerator::TestContext::cast(), DoTest(), set_new_context(), VisitForAccumulatorValue(), VisitForControl(), VisitForEffect(), VisitForStackValue(), VisitInDuplicateContext(), and VisitLogicalExpression().
|
staticprivate |
|
private |
|
private |
|
private |
Definition at line 795 of file full-codegen.cc.
References DCHECK, v8::internal::BitFieldBase< T, shift, size, U >::encode(), is_eval(), is_native(), v8::internal::BitFieldBase< T, shift, size, U >::is_valid(), and strict_mode().
|
private |
|
inlineprivate |
Definition at line 594 of file full-codegen.h.
References DCHECK, and loop_depth_.
|
private |
|
private |
|
private |
Definition at line 578 of file full-codegen.cc.
References context(), and DoTest().
|
private |
|
private |
|
private |
|
private |
|
private |
Definition at line 351 of file full-codegen.cc.
References __, v8::internal::Assembler::Align(), back_edges_, v8::internal::kPointerSize, loop_depth(), masm(), v8::internal::pc, and v8::internal::AssemblerBase::pc_offset().
Referenced by MakeCode().
|
private |
|
private |
|
private |
|
private |
|
private |
|
private |
|
private |
|
private |
Definition at line 896 of file full-codegen.cc.
References DCHECK, FindInlineFunctionGenerator(), function(), v8::internal::Runtime::INLINE, and NULL.
|
private |
|
private |
|
private |
|
private |
|
private |
|
private |
|
private |
|
private |
|
private |
|
private |
|
private |
|
private |
|
private |
|
private |
|
private |
|
private |
|
private |
|
private |
|
private |
|
private |
|
private |
|
private |
|
private |
Definition at line 368 of file full-codegen.cc.
References FeedbackVector().
|
private |
|
private |
|
inlineprivate |
Definition at line 432 of file full-codegen.h.
References v8::internal::CompilationInfo::feedback_vector(), and info_.
Referenced by EnsureSlotContainsAllocationSite().
|
private |
Definition at line 886 of file full-codegen.cc.
References arraysize, DCHECK, v8::internal::Runtime::kFirstInlineFunction, and kInlineFunctionGenerators.
Referenced by EmitInlineRuntimeCall().
|
inlineprivate |
Definition at line 609 of file full-codegen.h.
References v8::internal::CompilationInfo::function(), and info_.
Referenced by EmitInlineRuntimeCall().
|
private |
|
inlineprivate |
Definition at line 642 of file full-codegen.h.
References handler_table_.
Referenced by MakeCode().
|
inlineprivate |
void v8::internal::FullCodeGenerator::Initialize | ( | ) |
Definition at line 401 of file full-codegen.cc.
References generate_debug_code_, v8::internal::Snapshot::HaveASnapshotToStartFrom(), info_, masm_, v8::internal::AssemblerBase::serializer_enabled(), v8::internal::AssemblerBase::set_emit_debug_code(), v8::internal::AssemblerBase::set_predictable_code_size(), and v8::internal::CompilationInfo::zone().
Referenced by FullCodeGenerator().
|
inlineprivate |
Definition at line 606 of file full-codegen.h.
References info_, and v8::internal::CompilationInfo::is_eval().
Referenced by DeclareGlobalsFlags().
|
inlineprivate |
Definition at line 607 of file full-codegen.h.
References info_, and v8::internal::CompilationInfo::is_native().
Referenced by DeclareGlobalsFlags().
|
inlineprivate |
Definition at line 592 of file full-codegen.h.
References loop_depth_.
Referenced by EmitBackEdgeTable(), and RecordBackEdge().
|
static |
Definition at line 304 of file full-codegen.cc.
References v8::internal::Code::ComputeFlags(), v8::internal::Isolate::counters(), DCHECK, EmitBackEdgeTable(), v8::internal::AssemblerBase::enable_serializer(), v8::internal::anonymous_namespace{flags.cc}::flags, v8::internal::CompilationInfo::function(), Generate(), handler_table(), v8::internal::Isolate::has_pending_exception(), v8::internal::CompilationInfo::HasDeoptimizationSupport(), v8::internal::CompilationInfo::isolate(), v8::internal::CompilationInfo::IsOptimizable(), v8::internal::KB, LOG_CODE_EVENT, v8::internal::CodeGenerator::MakeCodeEpilogue(), v8::internal::CodeGenerator::MakeCodePrologue(), masm(), NULL, PopulateDeoptimizationData(), PopulateTypeFeedbackInfo(), v8::internal::Assembler::positions_recorder(), v8::internal::CodeGenerator::PrintCode(), script(), v8::internal::CompilationInfo::script(), v8::internal::CompilationInfo::SetCode(), and v8::internal::CompilationInfo::will_serialize().
Referenced by v8::internal::Compiler::BuildFunctionInfo(), v8::internal::CompileUnoptimizedCode(), and v8::internal::Compiler::EnsureDeoptimizationSupport().
|
inlineprivate |
Definition at line 599 of file full-codegen.h.
References masm_.
Referenced by EmitBackEdgeTable(), and MakeCode().
Definition at line 378 of file full-codegen.cc.
References bailout_entries_, DCHECK, v8::internal::Smi::FromInt(), v8::internal::CompilationInfo::HasDeoptimizationSupport(), info_, v8::internal::DeoptimizationOutputData::New(), and v8::internal::TENURED.
Referenced by MakeCode().
Definition at line 393 of file full-codegen.cc.
References DCHECK, and ic_total_count_.
Referenced by MakeCode().
|
private |
Definition at line 416 of file full-codegen.cc.
References v8::internal::Expression::id(), and PrepareForBailoutForId().
Referenced by VisitForAccumulatorValue(), VisitForEffect(), and VisitForStackValue().
|
private |
Definition at line 451 of file full-codegen.cc.
References bailout_entries_, DCHECK, v8::internal::BitFieldBase< T, shift, size, U >::encode(), v8::internal::CompilationInfo::HasDeoptimizationSupport(), info_, v8::internal::Smi::IsValid(), masm_, and v8::internal::AssemblerBase::pc_offset().
Referenced by PrepareForBailout(), RecordJSReturnSite(), and VisitLogicalExpression().
|
private |
|
private |
Definition at line 468 of file full-codegen.cc.
References back_edges_, DCHECK, v8::internal::Code::kMaxLoopNestingMarker, loop_depth(), masm_, v8::internal::Min(), and v8::internal::AssemblerBase::pc_offset().
|
private |
Definition at line 434 of file full-codegen.cc.
References DCHECK, PrepareForBailoutForId(), and TOS_REG.
|
staticprivate |
Referenced by v8::internal::FullCodeGenerator::AccumulatorValueContext::Plug(), v8::internal::FullCodeGenerator::TestContext::Plug(), v8::internal::FullCodeGenerator::AccumulatorValueContext::PlugTOS(), v8::internal::FullCodeGenerator::TestContext::PlugTOS(), and VisitLogicalExpression().
|
inlineprivate |
Definition at line 610 of file full-codegen.h.
References scope_.
Referenced by AllocateModules(), and v8::internal::FullCodeGenerator::NestedBlock::Exit().
Definition at line 605 of file full-codegen.h.
References info_, and v8::internal::CompilationInfo::script().
Referenced by MakeCode().
|
inlineprivate |
Definition at line 603 of file full-codegen.h.
References context(), and context_.
Referenced by v8::internal::FullCodeGenerator::BASE_EMBEDDED::ExpressionContext().
|
private |
Definition at line 840 of file full-codegen.cc.
References v8::internal::BreakableStatementChecker::Check(), v8::internal::DebugCodegen::GenerateSlot(), info_, v8::internal::BreakableStatementChecker::is_breakable(), v8::internal::CompilationInfo::is_debug(), masm_, v8::internal::AstNode::position(), and v8::internal::CodeGenerator::RecordPositions().
|
private |
Definition at line 803 of file full-codegen.cc.
References masm_, and v8::internal::CodeGenerator::RecordPositions().
|
private |
Definition at line 808 of file full-codegen.cc.
References masm_, and v8::internal::CodeGenerator::RecordPositions().
|
private |
Definition at line 866 of file full-codegen.cc.
References v8::internal::RelocInfo::kNoPosition, masm_, and v8::internal::Assembler::positions_recorder().
Referenced by VisitArithmeticExpression().
|
private |
Definition at line 813 of file full-codegen.cc.
References v8::internal::BreakableStatementChecker::Check(), v8::internal::DebugCodegen::GenerateSlot(), info_, v8::internal::BreakableStatementChecker::is_breakable(), v8::internal::CompilationInfo::is_debug(), masm_, v8::internal::AstNode::position(), and v8::internal::CodeGenerator::RecordPositions().
|
private |
|
private |
Definition at line 479 of file full-codegen.cc.
References v8::internal::DIV, and loop_depth_.
Referenced by VisitArithmeticExpression().
|
private |
|
private |
|
inlinestatic |
Definition at line 90 of file full-codegen.h.
References NO_REGISTERS, NULL, TOS_REG, and UNREACHABLE.
Referenced by v8::internal::Deoptimizer::DoComputeOutputFrames().
|
inlineprivate |
Definition at line 608 of file full-codegen.h.
References strict_mode().
Referenced by CallStoreIC(), DeclareGlobalsFlags(), and strict_mode().
|
private |
Definition at line 1605 of file full-codegen.cc.
References EmitLiteralCompareNil(), EmitLiteralCompareTypeof(), v8::internal::kNullValue, and v8::internal::kUndefinedValue.
|
private |
|
private |
Definition at line 1029 of file full-codegen.cc.
References EmitBinaryOp(), EmitInlineSmiBinaryOp(), masm_, mode(), v8::internal::NO_OVERWRITE, v8::internal::OVERWRITE_LEFT, v8::internal::OVERWRITE_RIGHT, v8::internal::Expression::ResultOverwriteAllowed(), SetSourcePosition(), ShouldInlineSmiCase(), VisitForAccumulatorValue(), and VisitForStackValue().
|
private |
Definition at line 953 of file full-codegen.cc.
References masm_, VisitForEffect(), and VisitInDuplicateContext().
|
private |
Definition at line 682 of file full-codegen.cc.
References AllocateModules(), DCHECK, DeclareGlobals(), DeclareModules(), globals_, v8::internal::Scope::is_global_scope(), masm_, module_index_, modules_, v8::internal::Scope::num_modules(), scope_, and v8::internal::TENURED.
|
inlineprivate |
Definition at line 370 of file full-codegen.h.
References context(), PrepareForBailout(), and TOS_REG.
Referenced by VisitArithmeticExpression(), VisitInDuplicateContext(), and VisitLogicalExpression().
|
inlineprivate |
Definition at line 382 of file full-codegen.h.
References context().
Referenced by VisitInDuplicateContext(), and VisitLogicalExpression().
|
inlineprivate |
Definition at line 364 of file full-codegen.h.
References context(), NO_REGISTERS, and PrepareForBailout().
Referenced by VisitComma(), and VisitInDuplicateContext().
|
inlineprivate |
Definition at line 376 of file full-codegen.h.
References context(), NO_REGISTERS, and PrepareForBailout().
Referenced by VisitArithmeticExpression(), and VisitInDuplicateContext().
|
private |
|
private |
Definition at line 938 of file full-codegen.cc.
References v8::internal::FullCodeGenerator::TestContext::cast(), context(), v8::internal::FullCodeGenerator::TestContext::fall_through(), v8::internal::FullCodeGenerator::TestContext::false_label(), v8::internal::FullCodeGenerator::TestContext::true_label(), VisitForAccumulatorValue(), VisitForControl(), VisitForEffect(), and VisitForStackValue().
Referenced by VisitComma(), and VisitLogicalExpression().
|
private |
Definition at line 960 of file full-codegen.cc.
References __, v8::internal::AND, v8::internal::FullCodeGenerator::TestContext::cast(), context(), DCHECK, DoTest(), v8::internal::FullCodeGenerator::TestContext::false_label(), masm_, NO_REGISTERS, PrepareForBailoutForId(), v8::internal::compiler::Push(), result_register(), v8::internal::FullCodeGenerator::TestContext::true_label(), VisitForAccumulatorValue(), VisitForControl(), and VisitInDuplicateContext().
|
friend |
Definition at line 848 of file full-codegen.h.
|
private |
Definition at line 842 of file full-codegen.h.
Referenced by EmitBackEdgeTable(), and RecordBackEdge().
|
private |
Definition at line 841 of file full-codegen.h.
Referenced by PopulateDeoptimizationData(), and PrepareForBailoutForId().
|
private |
Definition at line 840 of file full-codegen.h.
Referenced by context(), and set_new_context().
|
private |
Definition at line 846 of file full-codegen.h.
Referenced by Initialize().
Definition at line 837 of file full-codegen.h.
Referenced by VisitDeclarations().
|
private |
Definition at line 844 of file full-codegen.h.
Referenced by handler_table().
|
private |
Definition at line 843 of file full-codegen.h.
Referenced by PopulateTypeFeedbackInfo().
|
private |
Definition at line 832 of file full-codegen.h.
Referenced by FeedbackVector(), function(), Initialize(), is_eval(), is_native(), PopulateDeoptimizationData(), PrepareForBailoutForId(), script(), SetExpressionPosition(), and SetStatementPosition().
|
staticprivate |
Definition at line 298 of file full-codegen.h.
Referenced by FindInlineFunctionGenerator().
|
static |
Definition at line 99 of file full-codegen.h.
|
private |
Definition at line 836 of file full-codegen.h.
Referenced by decrement_loop_depth(), increment_loop_depth(), loop_depth(), and ShouldInlineSmiCase().
|
private |
Definition at line 831 of file full-codegen.h.
Referenced by AllocateModules(), Initialize(), masm(), v8::internal::FullCodeGenerator::BASE_EMBEDDED::masm(), PrepareForBailoutForId(), RecordBackEdge(), SetExpressionPosition(), SetFunctionPosition(), SetReturnPosition(), SetSourcePosition(), SetStatementPosition(), VisitArithmeticExpression(), VisitComma(), VisitDeclarations(), and VisitLogicalExpression().
|
private |
Definition at line 839 of file full-codegen.h.
Referenced by VisitDeclarations().
|
private |
Definition at line 838 of file full-codegen.h.
Referenced by VisitDeclarations().
|
private |
Definition at line 835 of file full-codegen.h.
Referenced by EmitUnwindBeforeReturn(), and v8::internal::FullCodeGenerator::BASE_EMBEDDED::NestedStatement().
Definition at line 845 of file full-codegen.h.
|
private |
Definition at line 834 of file full-codegen.h.
|
private |
Definition at line 833 of file full-codegen.h.
Referenced by AllocateModules(), scope(), and VisitDeclarations().