V8 Project
|
#include <ast-value-factory.h>
Public Member Functions | |
bool | IsString () const |
bool | IsNumber () const |
const AstRawString * | AsString () const |
double | AsNumber () const |
bool | EqualsString (const AstRawString *string) const |
bool | IsPropertyName () const |
bool | BooleanValue () const |
void | Internalize (Isolate *isolate) |
Handle< Object > | value () const |
![]() | |
INLINE (void *operator new(size_t size, Zone *zone)) | |
void | operator delete (void *, size_t) |
void | operator delete (void *pointer, Zone *zone) |
Private Types | |
enum | Type { STRING , SYMBOL , NUMBER , SMI , BOOLEAN , STRING_ARRAY , NULL_TYPE , UNDEFINED , THE_HOLE } |
Private Member Functions | |
AstValue (const AstRawString *s) | |
AstValue (const char *name) | |
AstValue (double n) | |
AstValue (Type t, int i) | |
AstValue (bool b) | |
AstValue (ZoneList< const AstRawString * > *s) | |
AstValue (Type t) | |
Private Attributes | |
Type | type_ |
union { | |
const AstRawString * string_ | |
double number_ | |
int smi_ | |
bool bool_ | |
ZoneList< const AstRawString * > * strings_ | |
const char * symbol_name_ | |
}; | |
Handle< Object > | value_ |
Friends | |
class | AstValueFactory |
Definition at line 139 of file ast-value-factory.h.
|
private |
Enumerator | |
---|---|
STRING | |
SYMBOL | |
NUMBER | |
SMI | |
BOOLEAN | |
STRING_ARRAY | |
NULL_TYPE | |
UNDEFINED | |
THE_HOLE |
Definition at line 187 of file ast-value-factory.h.
|
inlineexplicitprivate |
|
inlineexplicitprivate |
Definition at line 201 of file ast-value-factory.h.
References name, and symbol_name_.
|
inlineexplicitprivate |
Definition at line 205 of file ast-value-factory.h.
|
inlineexplicitprivate |
|
inlineexplicitprivate |
Definition at line 212 of file ast-value-factory.h.
References strings_.
|
inlineexplicitprivate |
|
inline |
Definition at line 156 of file ast-value-factory.h.
References NUMBER, number_, SMI, smi_, type_, and UNREACHABLE.
Referenced by v8::internal::ParserTraits::BuildUnaryExpression().
|
inline |
Definition at line 149 of file ast-value-factory.h.
References STRING, string_, type_, and UNREACHABLE.
bool v8::internal::AstValue::BooleanValue | ( | ) | const |
Definition at line 149 of file ast-value-factory.cc.
References bool_, BOOLEAN, DCHECK, v8::internal::DoubleToBoolean(), v8::internal::AstString::IsEmpty(), NULL, NULL_TYPE, NUMBER, number_, SMI, smi_, STRING, string_, STRING_ARRAY, SYMBOL, THE_HOLE, type_, UNDEFINED, and UNREACHABLE.
Referenced by v8::internal::ParserTraits::BuildUnaryExpression().
|
inline |
void v8::internal::AstValue::Internalize | ( | Isolate * | isolate | ) |
Definition at line 179 of file ast-value-factory.cc.
References bool_, BOOLEAN, DCHECK, v8::internal::Isolate::factory(), v8::internal::FAST_ELEMENTS, v8::internal::Smi::FromInt(), v8::internal::Object::GetProperty(), v8::internal::handle(), v8::internal::Handle< T >::is_null(), v8::internal::Isolate::native_context(), NULL, NULL_TYPE, NUMBER, number_, SMI, smi_, v8::internal::AstString::string(), STRING, string_, STRING_ARRAY, strings_, SYMBOL, symbol_name_, v8::internal::TENURED, THE_HOLE, type_, UNDEFINED, and value_.
Referenced by v8::internal::AstValueFactory::NewBoolean(), v8::internal::AstValueFactory::NewNull(), v8::internal::AstValueFactory::NewNumber(), v8::internal::AstValueFactory::NewSmi(), v8::internal::AstValueFactory::NewString(), v8::internal::AstValueFactory::NewStringList(), v8::internal::AstValueFactory::NewSymbol(), v8::internal::AstValueFactory::NewTheHole(), and v8::internal::AstValueFactory::NewUndefined().
|
inline |
Definition at line 145 of file ast-value-factory.h.
References NUMBER, SMI, and type_.
Referenced by v8::internal::ParserTraits::BuildUnaryExpression().
bool v8::internal::AstValue::IsPropertyName | ( | ) | const |
Definition at line 140 of file ast-value-factory.cc.
References v8::internal::AstRawString::AsArrayIndex(), STRING, string_, and type_.
|
inline |
Definition at line 176 of file ast-value-factory.h.
References DCHECK, v8::internal::AstString::string(), STRING, string_, type_, and value_.
|
friend |
Definition at line 185 of file ast-value-factory.h.
union { ... } |
bool v8::internal::AstValue::bool_ |
Definition at line 227 of file ast-value-factory.h.
Referenced by AstValue(), BooleanValue(), and Internalize().
double v8::internal::AstValue::number_ |
Definition at line 225 of file ast-value-factory.h.
Referenced by AsNumber(), AstValue(), BooleanValue(), and Internalize().
int v8::internal::AstValue::smi_ |
Definition at line 226 of file ast-value-factory.h.
Referenced by AsNumber(), AstValue(), BooleanValue(), and Internalize().
const AstRawString* v8::internal::AstValue::string_ |
Definition at line 224 of file ast-value-factory.h.
Referenced by AsString(), AstValue(), BooleanValue(), EqualsString(), Internalize(), IsPropertyName(), and value().
ZoneList<const AstRawString*>* v8::internal::AstValue::strings_ |
Definition at line 228 of file ast-value-factory.h.
Referenced by AstValue(), and Internalize().
const char* v8::internal::AstValue::symbol_name_ |
Definition at line 229 of file ast-value-factory.h.
Referenced by AstValue(), and Internalize().
|
private |
Definition at line 220 of file ast-value-factory.h.
Referenced by AsNumber(), AsString(), AstValue(), BooleanValue(), EqualsString(), Internalize(), IsNumber(), IsPropertyName(), IsString(), and value().
Definition at line 233 of file ast-value-factory.h.
Referenced by Internalize(), and value().