V8 Project
v8::internal::Processor Class Reference
+ Inheritance diagram for v8::internal::Processor:
+ Collaboration diagram for v8::internal::Processor:

Public Member Functions

 Processor (Variable *result, Zone *zone, AstNode::IdGen *ast_node_id_gen)
 
virtual ~Processor ()
 
void Process (ZoneList< Statement * > *statements)
 
bool result_assigned () const
 
AstNodeFactory< AstNullVisitor > * factory ()
 

Private Member Functions

ExpressionSetResult (Expression *value)
 
void VisitIterationStatement (IterationStatement *stmt)
 
 DEFINE_AST_VISITOR_SUBCLASS_MEMBERS ()
 

Private Attributes

Variableresult_
 
bool result_assigned_
 
bool is_set_
 
bool in_try_
 
AstNodeFactory< AstNullVisitor > factory_
 

Detailed Description

Definition at line 16 of file rewriter.cc.

Constructor & Destructor Documentation

◆ Processor()

v8::internal::Processor::Processor ( Variable result,
Zone zone,
AstNode::IdGen ast_node_id_gen 
)
inline

Definition at line 18 of file rewriter.cc.

19  : result_(result),
20  result_assigned_(false),
21  is_set_(false),
22  in_try_(false),
23  // Passing a null AstValueFactory is fine, because Processor doesn't
24  // need to create strings or literals.
25  factory_(zone, NULL, ast_node_id_gen) {
26  InitializeAstVisitor(zone);
27  }
AstNodeFactory< AstNullVisitor > factory_
Definition: rewriter.cc:54
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 enable alignment of csp to bytes on platforms which prefer the register to always be NULL

◆ ~Processor()

virtual v8::internal::Processor::~Processor ( )
inlinevirtual

Definition at line 29 of file rewriter.cc.

29 { }

Member Function Documentation

◆ DEFINE_AST_VISITOR_SUBCLASS_MEMBERS()

v8::internal::Processor::DEFINE_AST_VISITOR_SUBCLASS_MEMBERS ( )
private

◆ factory()

AstNodeFactory<AstNullVisitor>* v8::internal::Processor::factory ( )
inline

Definition at line 34 of file rewriter.cc.

34  {
35  return &factory_;
36  }

References factory_.

Referenced by v8::internal::Rewriter::Rewrite(), and SetResult().

+ Here is the caller graph for this function:

◆ Process()

void v8::internal::Processor::Process ( ZoneList< Statement * > *  statements)

Definition at line 75 of file rewriter.cc.

75  {
76  for (int i = statements->length() - 1; i >= 0; --i) {
77  Visit(statements->at(i));
78  }
79 }

References v8::internal::List< T, AllocationPolicy >::at().

Referenced by v8::internal::Rewriter::Rewrite().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ result_assigned()

bool v8::internal::Processor::result_assigned ( ) const
inline

Definition at line 32 of file rewriter.cc.

32 { return result_assigned_; }

References result_assigned_.

Referenced by v8::internal::Rewriter::Rewrite().

+ Here is the caller graph for this function:

◆ SetResult()

Expression* v8::internal::Processor::SetResult ( Expression value)
inlineprivate

Definition at line 56 of file rewriter.cc.

56  {
57  result_assigned_ = true;
58  VariableProxy* result_proxy = factory()->NewVariableProxy(result_);
59  return factory()->NewAssignment(
60  Token::ASSIGN, result_proxy, value, RelocInfo::kNoPosition);
61  }
AstNodeFactory< AstNullVisitor > * factory()
Definition: rewriter.cc:34
static const int kNoPosition
Definition: assembler.h:317

References factory(), v8::internal::RelocInfo::kNoPosition, result_, and result_assigned_.

+ Here is the call graph for this function:

◆ VisitIterationStatement()

void v8::internal::Processor::VisitIterationStatement ( IterationStatement stmt)
private

Definition at line 122 of file rewriter.cc.

122  {
123  // Rewrite the body.
124  bool set_after_loop = is_set_;
125  Visit(node->body());
126  is_set_ = is_set_ && set_after_loop;
127 }

References v8::internal::IterationStatement::body(), and is_set_.

+ Here is the call graph for this function:

Member Data Documentation

◆ factory_

AstNodeFactory<AstNullVisitor> v8::internal::Processor::factory_
private

Definition at line 54 of file rewriter.cc.

Referenced by factory().

◆ in_try_

bool v8::internal::Processor::in_try_
private

Definition at line 52 of file rewriter.cc.

◆ is_set_

bool v8::internal::Processor::is_set_
private

Definition at line 51 of file rewriter.cc.

Referenced by VisitIterationStatement().

◆ result_

Variable* v8::internal::Processor::result_
private

Definition at line 39 of file rewriter.cc.

Referenced by SetResult().

◆ result_assigned_

bool v8::internal::Processor::result_assigned_
private

Definition at line 45 of file rewriter.cc.

Referenced by result_assigned(), and SetResult().


The documentation for this class was generated from the following file: