v8  3.14.5(node0.10.28)
V8 is Google's open source JavaScript engine
 All Data Structures Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
FunctionLiteral Class Reference

#include <ast.h>

Inheritance diagram for FunctionLiteral:
Collaboration diagram for FunctionLiteral:

Public Types

enum  Type { ANONYMOUS_EXPRESSION, NAMED_EXPRESSION, DECLARATION }
 
enum  ParameterFlag { kNoDuplicateParameters = 0, kHasDuplicateParameters = 1 }
 
enum  IsFunctionFlag { kGlobalOrEval, kIsFunction }
 
enum  IsParenthesizedFlag { kIsParenthesized, kNotParenthesized }
 
- Public Types inherited from Expression
enum  Context { kUninitialized, kEffect, kValue, kTest }
 
- Public Types inherited from AstNode
enum  Type { kInvalid = -1 }
 

Public Member Functions

Handle< Stringname () const
 
Scopescope () const
 
ZoneList< Statement * > * body () const
 
void set_function_token_position (int pos)
 
int function_token_position () const
 
int start_position () const
 
int end_position () const
 
int SourceSize () const
 
bool is_expression () const
 
bool is_anonymous () const
 
bool is_classic_mode () const
 
LanguageMode language_mode () const
 
int materialized_literal_count ()
 
int expected_property_count ()
 
int handler_count ()
 
bool has_only_simple_this_property_assignments ()
 
Handle< FixedArraythis_property_assignments ()
 
int parameter_count ()
 
bool AllowsLazyCompilation ()
 
bool AllowsLazyCompilationWithoutContext ()
 
Handle< Stringdebug_name () const
 
Handle< Stringinferred_name () const
 
void set_inferred_name (Handle< String > inferred_name)
 
bool pretenure ()
 
void set_pretenure ()
 
bool has_duplicate_parameters ()
 
bool is_function ()
 
bool is_parenthesized ()
 
void set_parenthesized ()
 
int ast_node_count ()
 
AstProperties::Flags * flags ()
 
void set_ast_properties (AstProperties *ast_properties)
 
- Public Member Functions inherited from Expression
virtual int position () const
 
virtual bool IsValidLeftHandSide ()
 
virtual bool ToBooleanIsTrue ()
 
virtual bool ToBooleanIsFalse ()
 
virtual bool IsPropertyName ()
 
virtual bool ResultOverwriteAllowed ()
 
bool IsSmiLiteral ()
 
bool IsStringLiteral ()
 
bool IsNullLiteral ()
 
virtual bool IsMonomorphic ()
 
virtual SmallMapListGetReceiverTypes ()
 
Handle< MapGetMonomorphicReceiverType ()
 
BailoutId id () const
 
TypeFeedbackId test_id () const
 
- Public Member Functions inherited from AstNode
void * operator new (size_t size, Zone *zone)
 
 AstNode ()
 
virtual ~AstNode ()
 
virtual void Accept (AstVisitor *v)=0
 
virtual Type node_type () const =0
 
virtual TargetCollectorAsTargetCollector ()
 
virtual BreakableStatementAsBreakableStatement ()
 
virtual IterationStatementAsIterationStatement ()
 
virtual MaterializedLiteralAsMaterializedLiteral ()
 
- Public Member Functions inherited from 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

 FunctionLiteral (Isolate *isolate, Handle< String > name, Scope *scope, ZoneList< Statement * > *body, int materialized_literal_count, int expected_property_count, int handler_count, bool has_only_simple_this_property_assignments, Handle< FixedArray > this_property_assignments, int parameter_count, Type type, ParameterFlag has_duplicate_parameters, IsFunctionFlag is_function, IsParenthesizedFlag is_parenthesized)
 
- Protected Member Functions inherited from Expression
 Expression (Isolate *isolate)
 

Additional Inherited Members

- Static Protected Member Functions inherited from AstNode
static int GetNextId (Isolate *isolate)
 
static int ReserveIdRange (Isolate *isolate, int n)
 
static TypeFeedbackId reuse (BailoutId id)
 

Detailed Description

Definition at line 1927 of file ast.h.

Member Enumeration Documentation

Enumerator
kGlobalOrEval 
kIsFunction 

Definition at line 1940 of file ast.h.

Enumerator
kIsParenthesized 
kNotParenthesized 

Definition at line 1945 of file ast.h.

Enumerator
kNoDuplicateParameters 
kHasDuplicateParameters 

Definition at line 1935 of file ast.h.

enum Type
Enumerator
ANONYMOUS_EXPRESSION 
NAMED_EXPRESSION 
DECLARATION 

Definition at line 1929 of file ast.h.

Constructor & Destructor Documentation

FunctionLiteral ( Isolate isolate,
Handle< String name,
Scope scope,
ZoneList< Statement * > *  body,
int  materialized_literal_count,
int  expected_property_count,
int  handler_count,
bool  has_only_simple_this_property_assignments,
Handle< FixedArray this_property_assignments,
int  parameter_count,
Type  type,
ParameterFlag  has_duplicate_parameters,
IsFunctionFlag  is_function,
IsParenthesizedFlag  is_parenthesized 
)
inlineprotected

Definition at line 2017 of file ast.h.

Member Function Documentation

bool AllowsLazyCompilation ( )
bool AllowsLazyCompilationWithoutContext ( )
int ast_node_count ( )
inline

Definition at line 2010 of file ast.h.

Referenced by Compiler::SetFunctionInfo().

ZoneList<Statement*>* body ( ) const
inline

Definition at line 1954 of file ast.h.

Handle<String> debug_name ( ) const
inline

Definition at line 1979 of file ast.h.

Referenced by OptimizingCompiler::CreateGraph(), and Parser::ParseLazy().

int end_position ( ) const

Definition at line 166 of file ast.cc.

References Scope::end_position(), and FunctionLiteral::scope().

Referenced by Compiler::SetFunctionInfo().

int expected_property_count ( )
inline

Definition at line 1966 of file ast.h.

Referenced by Compiler::BuildFunctionInfo().

AstProperties::Flags* flags ( )
inline

Definition at line 2011 of file ast.h.

Referenced by FullCodeGenerator::MakeCode(), and Compiler::SetFunctionInfo().

int function_token_position ( ) const
inline

Definition at line 1956 of file ast.h.

Referenced by Compiler::SetFunctionInfo().

int handler_count ( )
inline

Definition at line 1967 of file ast.h.

bool has_duplicate_parameters ( )
inline

Definition at line 1992 of file ast.h.

Referenced by Compiler::SetFunctionInfo().

bool has_only_simple_this_property_assignments ( )
inline

Definition at line 1968 of file ast.h.

Referenced by Compiler::SetFunctionInfo().

Handle<String> inferred_name ( ) const
inline

Definition at line 1984 of file ast.h.

Referenced by Compiler::SetFunctionInfo().

bool is_anonymous ( ) const
inline

Definition at line 1961 of file ast.h.

Referenced by Compiler::SetFunctionInfo().

bool is_classic_mode ( ) const
inline

Definition at line 1962 of file ast.h.

References v8::internal::CLASSIC_MODE.

bool is_expression ( ) const
inline

Definition at line 1960 of file ast.h.

Referenced by Compiler::SetFunctionInfo().

bool is_function ( )
inline

Definition at line 1996 of file ast.h.

Referenced by Compiler::SetFunctionInfo().

bool is_parenthesized ( )
inline

Definition at line 2003 of file ast.h.

Referenced by Compiler::BuildFunctionInfo().

LanguageMode language_mode ( ) const

Definition at line 171 of file ast.cc.

References Scope::language_mode(), and FunctionLiteral::scope().

Referenced by Compiler::CompileLazy(), and Compiler::SetFunctionInfo().

int materialized_literal_count ( )
inline

Definition at line 1965 of file ast.h.

Referenced by Compiler::BuildFunctionInfo().

int parameter_count ( )
inline

Definition at line 1974 of file ast.h.

Referenced by Compiler::SetFunctionInfo().

bool pretenure ( )
inline

Definition at line 1989 of file ast.h.

void set_ast_properties ( AstProperties *  ast_properties)
inline

Definition at line 2012 of file ast.h.

void set_function_token_position ( int  pos)
inline

Definition at line 1955 of file ast.h.

void set_inferred_name ( Handle< String inferred_name)
inline

Definition at line 1985 of file ast.h.

void set_parenthesized ( )
inline

Definition at line 2006 of file ast.h.

void set_pretenure ( )
inline

Definition at line 1990 of file ast.h.

int SourceSize ( ) const
inline

Definition at line 1959 of file ast.h.

int start_position ( ) const

Definition at line 161 of file ast.cc.

References FunctionLiteral::scope(), and Scope::start_position().

Referenced by Compiler::SetFunctionInfo().

Handle<FixedArray> this_property_assignments ( )
inline

Definition at line 1971 of file ast.h.

Referenced by Compiler::SetFunctionInfo().


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