28 #ifndef V8_AST_VALUE_FACTORY_H_
29 #define V8_AST_VALUE_FACTORY_H_
95 static bool Compare(
void* a,
void* b);
238 #define STRING_CONSTANTS(F) \
239 F(anonymous_function, "(anonymous function)") \
240 F(arguments, "arguments") \
241 F(constructor, "constructor") \
245 F(dot_generator, ".generator") \
246 F(dot_generator_object, ".generator_object") \
247 F(dot_iterator, ".iterator") \
248 F(dot_module, ".module") \
249 F(dot_result, ".result") \
252 F(initialize_const_global, "initializeConstGlobal") \
253 F(initialize_var_global, "initializeVarGlobal") \
254 F(make_reference_error, "MakeReferenceError") \
255 F(make_syntax_error, "MakeSyntaxError") \
256 F(make_type_error, "MakeTypeError") \
257 F(module, "module") \
258 F(native, "native") \
260 F(proto, "__proto__") \
261 F(prototype, "prototype") \
263 F(use_asm, "use asm") \
264 F(use_strict, "use strict") \
275 #define F(name, str) \
276 name##_string_ = NULL;
284 reinterpret_cast<const uint8_t*
>(
string),
StrLength(
string)));
296 #define F(name, str) \
297 const AstRawString* name##_string() { \
298 if (name##_string_ == NULL) { \
299 const char* data = str; \
300 name##_string_ = GetOneByteString( \
301 Vector<const uint8_t>(reinterpret_cast<const uint8_t*>(data), \
302 static_cast<int>(strlen(data)))); \
304 return name##_string_; \
335 #define F(name, str) \
336 const AstRawString* name##_string_;
343 #undef STRING_CONSTANTS
#define STRING_CONSTANTS(F)
virtual int length() const OVERRIDE
AstConsString(const AstString *left, const AstString *right)
virtual void Internalize(Isolate *isolate) OVERRIDE
virtual void Internalize(Isolate *isolate) OVERRIDE
Vector< const byte > literal_bytes_
bool IsOneByteEqualTo(const char *data) const
static bool Compare(void *a, void *b)
bool AsArrayIndex(uint32_t *index) const
AstRawString(bool is_one_byte, const Vector< const byte > &literal_bytes, uint32_t hash)
const unsigned char * raw_data() const
uint16_t FirstCharacter() const
virtual int length() const OVERRIDE
Handle< String > string() const
virtual void Internalize(Isolate *isolate)=0
virtual int length() const =0
const AstRawString * GetOneByteString(const char *string)
void Internalize(Isolate *isolate)
AstValueFactory(Zone *zone, uint32_t hash_seed)
const AstValue * NewStringList(ZoneList< const AstRawString * > *strings)
const AstRawString * GetTwoByteString(Vector< const uint16_t > literal)
const AstValue * NewUndefined()
const AstRawString * GetOneByteString(Vector< const uint8_t > literal)
const AstValue * NewNumber(double number)
const AstValue * NewNull()
const AstValue * NewSmi(int number)
const AstConsString * NewConsString(const AstString *left, const AstString *right)
List< AstString * > strings_
List< AstValue * > values_
const AstRawString * GetString(Handle< String > literal)
const AstValue * NewTheHole()
const AstValue * NewString(const AstRawString *string)
const AstValue * NewBoolean(bool b)
const AstValue * NewSymbol(const char *name)
Handle< Object > value() const
const AstRawString * string_
void Internalize(Isolate *isolate)
ZoneList< const AstRawString * > * strings_
bool EqualsString(const AstRawString *string) const
bool BooleanValue() const
const AstRawString * AsString() const
AstValue(ZoneList< const AstRawString * > *s)
const char * symbol_name_
AstValue(const AstRawString *s)
bool IsPropertyName() const
AstValue(const char *name)
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 expose gc extension under the specified name show built in functions in stack traces use random jit cookie to mask large constants minimum length for automatic enable preparsing CPU profiler sampling interval in microseconds trace out of bounds accesses to external arrays default size of stack region v8 is allowed to maximum length of function source code printed in a stack trace min size of a semi the new space consists of two semi spaces print one trace line following each garbage collection do not print trace line after scavenger collection print cumulative GC statistics in name
enable harmony numeric enable harmony object literal extensions true
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
#define DCHECK(condition)
int Compare(const T &a, const T &b)
int StrLength(const char *string)
Debugger support for the V8 JavaScript engine.