V8 Project
v8::internal::AstContext Class Referenceabstract

#include <hydrogen.h>

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

Public Member Functions

bool IsEffect () const
 
bool IsValue () const
 
bool IsTest () const
 
virtual void ReturnValue (HValue *value)=0
 
virtual void ReturnInstruction (HInstruction *instr, BailoutId ast_id)=0
 
virtual void ReturnControl (HControlInstruction *instr, BailoutId ast_id)=0
 
virtual void ReturnContinuation (HIfContinuation *continuation, BailoutId ast_id)=0
 
void set_for_typeof (bool for_typeof)
 
bool is_for_typeof ()
 

Protected Member Functions

 AstContext (HOptimizedGraphBuilder *owner, Expression::Context kind)
 
virtual ~AstContext ()
 
HOptimizedGraphBuilderowner () const
 
Zonezone () const
 

Private Attributes

HOptimizedGraphBuilderowner_
 
Expression::Context kind_
 
AstContextouter_
 
bool for_typeof_
 

Detailed Description

Definition at line 761 of file hydrogen.h.

Constructor & Destructor Documentation

◆ AstContext()

v8::internal::AstContext::AstContext ( HOptimizedGraphBuilder owner,
Expression::Context  kind 
)
protected

Definition at line 3985 of file hydrogen.cc.

3986  : owner_(owner),
3987  kind_(kind),
3988  outer_(owner->ast_context()),
3989  for_typeof_(false) {
3990  owner->set_ast_context(this); // Push.
3991 #ifdef DEBUG
3992  DCHECK(owner->environment()->frame_type() == JS_FUNCTION);
3993  original_length_ = owner->environment()->length();
3994 #endif
3995 }
HOptimizedGraphBuilder * owner() const
Definition: hydrogen.h:798
Expression::Context kind_
Definition: hydrogen.h:810
AstContext * outer_
Definition: hydrogen.h:811
HOptimizedGraphBuilder * owner_
Definition: hydrogen.h:809
HEnvironment * environment() const
Definition: hydrogen.h:1059
AstContext * ast_context() const
Definition: hydrogen.h:2163
void set_ast_context(AstContext *context)
Definition: hydrogen.h:2164
#define DCHECK(condition)
Definition: logging.h:205

References DCHECK, v8::internal::HGraphBuilder::environment(), v8::internal::JS_FUNCTION, owner(), and v8::internal::HOptimizedGraphBuilder::set_ast_context().

+ Here is the call graph for this function:

◆ ~AstContext()

v8::internal::AstContext::~AstContext ( )
protectedvirtual

Definition at line 3998 of file hydrogen.cc.

3998  {
3999  owner_->set_ast_context(outer_); // Pop.
4000 }

References outer_, owner_, and v8::internal::HOptimizedGraphBuilder::set_ast_context().

+ Here is the call graph for this function:

Member Function Documentation

◆ is_for_typeof()

bool v8::internal::AstContext::is_for_typeof ( )
inline

Definition at line 792 of file hydrogen.h.

792 { return for_typeof_; }

References for_typeof_.

◆ IsEffect()

bool v8::internal::AstContext::IsEffect ( ) const
inline

Definition at line 763 of file hydrogen.h.

763 { return kind_ == Expression::kEffect; }

References v8::internal::Expression::kEffect, and kind_.

Referenced by v8::internal::HOptimizedGraphBuilder::TryInlineBuiltinMethodCall().

+ Here is the caller graph for this function:

◆ IsTest()

bool v8::internal::AstContext::IsTest ( ) const
inline

Definition at line 765 of file hydrogen.h.

765 { return kind_ == Expression::kTest; }

References kind_, and v8::internal::Expression::kTest.

Referenced by v8::internal::FINAL< kOperandKind, kNumCachedOperands >::cast().

+ Here is the caller graph for this function:

◆ IsValue()

bool v8::internal::AstContext::IsValue ( ) const
inline

Definition at line 764 of file hydrogen.h.

764 { return kind_ == Expression::kValue; }

References kind_, and v8::internal::Expression::kValue.

◆ owner()

HOptimizedGraphBuilder* v8::internal::AstContext::owner ( ) const
inlineprotected

Definition at line 798 of file hydrogen.h.

798 { return owner_; }

References owner_.

Referenced by AstContext().

+ Here is the caller graph for this function:

◆ ReturnContinuation()

virtual void v8::internal::AstContext::ReturnContinuation ( HIfContinuation *  continuation,
BailoutId  ast_id 
)
pure virtual

Implemented in v8::internal::FINAL< kOperandKind, kNumCachedOperands >, v8::internal::FINAL< kOperandKind, kNumCachedOperands >, and v8::internal::FINAL< kOperandKind, kNumCachedOperands >.

Referenced by v8::internal::HOptimizedGraphBuilder::HandleLiteralCompareNil().

+ Here is the caller graph for this function:

◆ ReturnControl()

virtual void v8::internal::AstContext::ReturnControl ( HControlInstruction instr,
BailoutId  ast_id 
)
pure virtual

◆ ReturnInstruction()

◆ ReturnValue()

◆ set_for_typeof()

void v8::internal::AstContext::set_for_typeof ( bool  for_typeof)
inline

Definition at line 791 of file hydrogen.h.

791 { for_typeof_ = for_typeof; }

References for_typeof_.

◆ zone()

Zone * v8::internal::AstContext::zone ( ) const
inlineprotected

Definition at line 2745 of file hydrogen.h.

2745 { return owner_->zone(); }

References owner_, and v8::internal::HGraphBuilder::zone().

+ Here is the call graph for this function:

Member Data Documentation

◆ for_typeof_

bool v8::internal::AstContext::for_typeof_
private

Definition at line 812 of file hydrogen.h.

Referenced by is_for_typeof(), and set_for_typeof().

◆ kind_

Expression::Context v8::internal::AstContext::kind_
private

Definition at line 810 of file hydrogen.h.

Referenced by IsEffect(), IsTest(), and IsValue().

◆ outer_

AstContext* v8::internal::AstContext::outer_
private

Definition at line 811 of file hydrogen.h.

Referenced by ~AstContext().

◆ owner_

HOptimizedGraphBuilder* v8::internal::AstContext::owner_
private

Definition at line 809 of file hydrogen.h.

Referenced by owner(), zone(), and ~AstContext().


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