V8 Project
v8::internal::ForEachStatement Class Reference

#include <ast.h>

+ Inheritance diagram for v8::internal::ForEachStatement:
+ Collaboration diagram for v8::internal::ForEachStatement:

Public Types

enum  VisitMode { ENUMERATE , ITERATE }
 
- Public Types inherited from v8::internal::BreakableStatement
enum  BreakableType { TARGET_FOR_ANONYMOUS , TARGET_FOR_NAMED_ONLY }
 
- Public Types inherited from v8::internal::AstNode
enum  NodeType { kInvalid = -1 }
 

Public Member Functions

void Initialize (Expression *each, Expression *subject, Statement *body)
 
Expressioneach () const
 
Expressionsubject () const
 
- Public Member Functions inherited from v8::internal::IterationStatement
virtual IterationStatementAsIterationStatement () FINAL OVERRIDE
 
Statementbody () const
 
BailoutId OsrEntryId () const
 
virtual BailoutId ContinueId () const =0
 
virtual BailoutId StackCheckId () const =0
 
Label * continue_target ()
 
- Public Member Functions inherited from v8::internal::BreakableStatement
ZoneList< const AstRawString * > * labels () const
 
virtual BreakableStatementAsBreakableStatement () FINAL OVERRIDE
 
Label * break_target ()
 
bool is_target_for_anonymous () const
 
BailoutId EntryId () const
 
BailoutId ExitId () const
 
- Public Member Functions inherited from v8::internal::Statement
 Statement (Zone *zone, int position)
 
bool IsEmpty ()
 
virtual bool IsJump () const
 
- Public Member Functions inherited from v8::internal::AstNode
void * operator new (size_t size, Zone *zone)
 
 AstNode (int position)
 
virtual ~AstNode ()
 
virtual void Accept (AstVisitor *v)=0
 
virtual NodeType node_type () const =0
 
int position () const
 
virtual TargetCollector * AsTargetCollector ()
 
virtual MaterializedLiteralAsMaterializedLiteral ()
 
- Public Member Functions inherited from v8::internal::ZoneObject
 INLINE (void *operator new(size_t size, Zone *zone))
 
void operator delete (void *, size_t)
 
void operator delete (void *pointer, Zone *zone)
 

Protected Member Functions

 ForEachStatement (Zone *zone, ZoneList< const AstRawString * > *labels, int pos, IdGen *id_gen)
 
- Protected Member Functions inherited from v8::internal::IterationStatement
 IterationStatement (Zone *zone, ZoneList< const AstRawString * > *labels, int pos, IdGen *id_gen)
 
void Initialize (Statement *body)
 
- Protected Member Functions inherited from v8::internal::BreakableStatement
 BreakableStatement (Zone *zone, ZoneList< const AstRawString * > *labels, BreakableType breakable_type, int position, IdGen *id_gen)
 

Private Attributes

Expressioneach_
 
Expressionsubject_
 

Additional Inherited Members

- Static Protected Member Functions inherited from v8::internal::AstNode
static TypeFeedbackId reuse (BailoutId id)
 

Detailed Description

Definition at line 889 of file ast.h.

Member Enumeration Documentation

◆ VisitMode

Enumerator
ENUMERATE 
ITERATE 

Definition at line 891 of file ast.h.

891  {
892  ENUMERATE, // for (each in subject) body;
893  ITERATE // for (each of subject) body;
894  };

Constructor & Destructor Documentation

◆ ForEachStatement()

v8::internal::ForEachStatement::ForEachStatement ( Zone zone,
ZoneList< const AstRawString * > *  labels,
int  pos,
IdGen id_gen 
)
inlineprotected

Definition at line 906 of file ast.h.

908  : IterationStatement(zone, labels, pos, id_gen),
909  each_(NULL),
910  subject_(NULL) {}
ZoneList< const AstRawString * > * labels() const
Definition: ast.h:410
Expression * subject_
Definition: ast.h:914
IterationStatement(Zone *zone, ZoneList< const AstRawString * > *labels, int pos, IdGen *id_gen)
Definition: ast.h:742
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

Member Function Documentation

◆ each()

Expression* v8::internal::ForEachStatement::each ( ) const
inline

Definition at line 902 of file ast.h.

902 { return each_; }

References each_.

Referenced by Initialize().

+ Here is the caller graph for this function:

◆ Initialize()

void v8::internal::ForEachStatement::Initialize ( Expression each,
Expression subject,
Statement body 
)
inline

Definition at line 896 of file ast.h.

896  {
898  each_ = each;
899  subject_ = subject;
900  }
Expression * each() const
Definition: ast.h:902
Expression * subject() const
Definition: ast.h:903
void Initialize(Statement *body)
Definition: ast.h:748
Statement * body() const
Definition: ast.h:732

References v8::internal::IterationStatement::body(), each(), each_, v8::internal::IterationStatement::Initialize(), subject(), and subject_.

Referenced by v8::internal::FINAL< kOperandKind, kNumCachedOperands >::Initialize(), and v8::internal::Parser::InitializeForEachStatement().

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

◆ subject()

Expression* v8::internal::ForEachStatement::subject ( ) const
inline

Definition at line 903 of file ast.h.

903 { return subject_; }

References subject_.

Referenced by Initialize().

+ Here is the caller graph for this function:

Member Data Documentation

◆ each_

Expression* v8::internal::ForEachStatement::each_
private

Definition at line 913 of file ast.h.

Referenced by each(), and Initialize().

◆ subject_

Expression* v8::internal::ForEachStatement::subject_
private

Definition at line 914 of file ast.h.

Referenced by Initialize(), and subject().


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