V8 Project
|
#include <ast-value-factory.h>
Public Member Functions | |
AstValueFactory (Zone *zone, uint32_t hash_seed) | |
const AstRawString * | GetOneByteString (Vector< const uint8_t > literal) |
const AstRawString * | GetOneByteString (const char *string) |
const AstRawString * | GetTwoByteString (Vector< const uint16_t > literal) |
const AstRawString * | GetString (Handle< String > literal) |
const AstConsString * | NewConsString (const AstString *left, const AstString *right) |
void | Internalize (Isolate *isolate) |
bool | IsInternalized () |
const AstValue * | NewString (const AstRawString *string) |
const AstValue * | NewSymbol (const char *name) |
const AstValue * | NewNumber (double number) |
const AstValue * | NewSmi (int number) |
const AstValue * | NewBoolean (bool b) |
const AstValue * | NewStringList (ZoneList< const AstRawString * > *strings) |
const AstValue * | NewNull () |
const AstValue * | NewUndefined () |
const AstValue * | NewTheHole () |
Private Member Functions | |
const AstRawString * | GetString (uint32_t hash, bool is_one_byte, Vector< const byte > literal_bytes) |
Private Attributes | |
HashMap | string_table_ |
List< AstValue * > | values_ |
List< AstString * > | strings_ |
Zone * | zone_ |
Isolate * | isolate_ |
uint32_t | hash_seed_ |
Definition at line 268 of file ast-value-factory.h.
Definition at line 270 of file ast-value-factory.h.
References v8::internal::F, and STRING_CONSTANTS.
|
inline |
Definition at line 282 of file ast-value-factory.h.
References GetOneByteString(), and v8::internal::StrLength().
const AstRawString * v8::internal::AstValueFactory::GetOneByteString | ( | Vector< const uint8_t > | literal | ) |
Definition at line 233 of file ast-value-factory.cc.
References GetString(), hash_seed_, v8::internal::Vector< T >::length(), and v8::internal::Vector< T >::start().
Referenced by v8::internal::Scanner::CurrentSymbol(), v8::internal::ParserTraits::GetNumberAsSymbol(), GetOneByteString(), GetString(), v8::internal::ParserTraits::NewThrowError(), and v8::internal::Scanner::NextSymbol().
const AstRawString * v8::internal::AstValueFactory::GetString | ( | Handle< String > | literal | ) |
Definition at line 249 of file ast-value-factory.cc.
References DCHECK, GetOneByteString(), GetTwoByteString(), v8::internal::String::FlatContent::IsOneByte(), v8::internal::String::FlatContent::IsTwoByte(), v8::internal::String::FlatContent::ToOneByteVector(), and v8::internal::String::FlatContent::ToUC16Vector().
Referenced by v8::internal::Scope::DeserializeScopeChain(), GetOneByteString(), GetTwoByteString(), and v8::internal::Parser::ParseLazy().
|
private |
Definition at line 383 of file ast-value-factory.cc.
References v8::internal::AstRawString::Internalize(), isolate_, v8::internal::Vector< T >::length(), v8::internal::TemplateHashMapImpl< AllocationPolicy >::Lookup(), v8::internal::Zone::NewArray(), NULL, v8::internal::Vector< T >::start(), string_table_, strings_, and zone_.
const AstRawString * v8::internal::AstValueFactory::GetTwoByteString | ( | Vector< const uint16_t > | literal | ) |
Definition at line 241 of file ast-value-factory.cc.
References GetString(), hash_seed_, v8::internal::Vector< T >::length(), and v8::internal::Vector< T >::start().
Referenced by v8::internal::Scanner::CurrentSymbol(), GetString(), and v8::internal::Scanner::NextSymbol().
void v8::internal::AstValueFactory::Internalize | ( | Isolate * | isolate | ) |
Definition at line 273 of file ast-value-factory.cc.
References isolate_, strings_, and values_.
Referenced by v8::internal::Parser::DoParseProgram(), v8::internal::Parser::Internalize(), and v8::internal::Parser::Parse().
|
inline |
Definition at line 332 of file ast-value-factory.cc.
References v8::internal::AstValue::Internalize(), isolate_, values_, and zone_.
const AstConsString * v8::internal::AstValueFactory::NewConsString | ( | const AstString * | left, |
const AstString * | right | ||
) |
Definition at line 260 of file ast-value-factory.cc.
References v8::internal::AstConsString::Internalize(), isolate_, strings_, and zone_.
Referenced by v8::internal::FuncNameInferrer::MakeNameFromStackHelper().
const AstValue * v8::internal::AstValueFactory::NewNull | ( | ) |
Definition at line 353 of file ast-value-factory.cc.
References v8::internal::AstValue::Internalize(), isolate_, v8::internal::AstValue::NULL_TYPE, values_, and zone_.
const AstValue * v8::internal::AstValueFactory::NewNumber | ( | double | number | ) |
Definition at line 311 of file ast-value-factory.cc.
References v8::internal::AstValue::Internalize(), isolate_, values_, and zone_.
Definition at line 321 of file ast-value-factory.cc.
References v8::internal::AstValue::Internalize(), isolate_, v8::internal::AstValue::SMI, values_, and zone_.
const AstValue * v8::internal::AstValueFactory::NewString | ( | const AstRawString * | string | ) |
Definition at line 290 of file ast-value-factory.cc.
References DCHECK, v8::internal::AstValue::Internalize(), isolate_, NULL, values_, and zone_.
const AstValue * v8::internal::AstValueFactory::NewStringList | ( | ZoneList< const AstRawString * > * | strings | ) |
Definition at line 342 of file ast-value-factory.cc.
References v8::internal::AstValue::Internalize(), isolate_, values_, and zone_.
const AstValue * v8::internal::AstValueFactory::NewSymbol | ( | const char * | name | ) |
Definition at line 301 of file ast-value-factory.cc.
References v8::internal::AstValue::Internalize(), isolate_, name, values_, and zone_.
const AstValue * v8::internal::AstValueFactory::NewTheHole | ( | ) |
Definition at line 373 of file ast-value-factory.cc.
References v8::internal::AstValue::Internalize(), isolate_, v8::internal::AstValue::THE_HOLE, values_, and zone_.
const AstValue * v8::internal::AstValueFactory::NewUndefined | ( | ) |
Definition at line 363 of file ast-value-factory.cc.
References v8::internal::AstValue::Internalize(), isolate_, v8::internal::AstValue::UNDEFINED, values_, and zone_.
|
private |
Definition at line 333 of file ast-value-factory.h.
Referenced by GetOneByteString(), and GetTwoByteString().
|
private |
Definition at line 331 of file ast-value-factory.h.
Referenced by GetString(), Internalize(), IsInternalized(), NewBoolean(), NewConsString(), NewNull(), NewNumber(), NewSmi(), NewString(), NewStringList(), NewSymbol(), NewTheHole(), and NewUndefined().
|
private |
Definition at line 325 of file ast-value-factory.h.
Referenced by GetString().
Definition at line 329 of file ast-value-factory.h.
Referenced by GetString(), Internalize(), and NewConsString().
Definition at line 328 of file ast-value-factory.h.
Referenced by Internalize(), NewBoolean(), NewNull(), NewNumber(), NewSmi(), NewString(), NewStringList(), NewSymbol(), NewTheHole(), and NewUndefined().
|
private |
Definition at line 330 of file ast-value-factory.h.
Referenced by GetString(), NewBoolean(), NewConsString(), NewNull(), NewNumber(), NewSmi(), NewString(), NewStringList(), NewSymbol(), NewTheHole(), and NewUndefined().