48 if (
tables_[generation]->IsUndefined()) {
53 CompilationCacheTable::cast(
tables_[generation]);
95 for (
int generation = 0; generation <
generations(); generation++) {
97 table->Remove(*function_info);
106 script_histogram_(
NULL),
107 script_histogram_initialized_(
false) { }
118 bool is_shared_cross_origin) {
123 if (
name.is_null()) {
124 return script->name()->IsUndefined();
127 if (line_offset != script->line_offset()->value())
return false;
128 if (column_offset != script->column_offset()->value())
return false;
130 if (!
name->IsString() || !script->name()->IsString())
return false;
132 if (is_shared_cross_origin != script->is_shared_cross_origin())
return false;
148 bool is_shared_cross_origin,
156 for (generation = 0; generation <
generations(); generation++) {
159 if (probe->IsSharedFunctionInfo()) {
168 is_shared_cross_origin)) {
169 result = *function_info;
193 if (result !=
NULL) {
200 is_shared_cross_origin));
203 if (generation != 0)
Put(source, context, shared);
227 int scope_position) {
234 for (generation = 0; generation <
generations(); generation++) {
236 result = table->LookupEval(source, context, strict_mode, scope_position);
237 if (result->IsSharedFunctionInfo())
break;
239 if (result->IsSharedFunctionInfo()) {
242 if (generation != 0) {
243 Put(source, context, function_info, scope_position);
257 int scope_position) {
261 function_info, scope_position);
275 for (generation = 0; generation <
generations(); generation++) {
277 result = table->LookupRegExp(source,
flags);
278 if (result->IsFixedArray())
break;
280 if (result->IsFixedArray()) {
282 if (generation != 0) {
317 bool is_shared_cross_origin,
322 is_shared_cross_origin, context);
330 int scope_position) {
334 if (context->IsNativeContext()) {
336 source, context, strict_mode, scope_position);
340 source, context, strict_mode, scope_position);
366 int scope_position) {
370 if (context->IsNativeContext()) {
void Put(Handle< String > source, Handle< Context > context, Handle< SharedFunctionInfo > function_info, int scope_position)
MaybeHandle< SharedFunctionInfo > Lookup(Handle< String > source, Handle< Context > context, StrictMode strict_mode, int scope_position)
MaybeHandle< FixedArray > Lookup(Handle< String > source, JSRegExp::Flags flags)
void Put(Handle< String > source, JSRegExp::Flags flags, Handle< FixedArray > data)
Handle< SharedFunctionInfo > Lookup(Handle< String > source, Handle< Object > name, int line_offset, int column_offset, bool is_shared_cross_origin, Handle< Context > context)
void Put(Handle< String > source, Handle< Context > context, Handle< SharedFunctionInfo > function_info)
CompilationCacheScript(Isolate *isolate, int generations)
bool HasOrigin(Handle< SharedFunctionInfo > function_info, Handle< Object > name, int line_offset, int column_offset, bool is_shared_cross_origin)
bool script_histogram_initialized_
static Handle< CompilationCacheTable > PutRegExp(Handle< CompilationCacheTable > cache, Handle< String > src, JSRegExp::Flags flags, Handle< FixedArray > value)
static Handle< CompilationCacheTable > PutEval(Handle< CompilationCacheTable > cache, Handle< String > src, Handle< Context > context, Handle< SharedFunctionInfo > value, int scope_position)
static Handle< CompilationCacheTable > Put(Handle< CompilationCacheTable > cache, Handle< String > src, Handle< Context > context, Handle< Object > value)
void Iterate(ObjectVisitor *v)
static const int kSubCacheCount
CompilationCache(Isolate *isolate)
CompilationCacheRegExp reg_exp_
void IterateFunctions(ObjectVisitor *v)
MaybeHandle< FixedArray > LookupRegExp(Handle< String > source, JSRegExp::Flags flags)
void PutEval(Handle< String > source, Handle< Context > context, Handle< SharedFunctionInfo > function_info, int scope_position)
MaybeHandle< SharedFunctionInfo > LookupScript(Handle< String > source, Handle< Object > name, int line_offset, int column_offset, bool is_shared_cross_origin, Handle< Context > context)
CompilationCacheEval eval_contextual_
void MarkCompactPrologue()
MaybeHandle< SharedFunctionInfo > LookupEval(Handle< String > source, Handle< Context > context, StrictMode strict_mode, int scope_position)
void PutScript(Handle< String > source, Handle< Context > context, Handle< SharedFunctionInfo > function_info)
CompilationCacheScript script_
void Remove(Handle< SharedFunctionInfo > function_info)
void PutRegExp(Handle< String > source, JSRegExp::Flags flags, Handle< FixedArray > data)
CompilationSubCache * subcaches_[kSubCacheCount]
CompilationCacheEval eval_global_
Handle< CompilationCacheTable > GetTable(int generation)
void Remove(Handle< SharedFunctionInfo > function_info)
void Iterate(ObjectVisitor *v)
void IterateFunctions(ObjectVisitor *v)
Handle< CompilationCacheTable > GetFirstTable()
void SetFirstTable(Handle< CompilationCacheTable > value)
Handle< T > CloseAndEscape(Handle< T > handle_value)
static Handle< T > cast(Handle< S > that)
static Handle< T > null()
static MUST_USE_RESULT Handle< CompilationCacheTable > New(Isolate *isolate, int at_least_space_for, MinimumCapacity capacity_option=USE_DEFAULT_MINIMUM_CAPACITY, PretenureFlag pretenure=NOT_TENURED)
StatsTable * stats_table()
static const int kNoPosition
void * CreateHistogram(const char *name, int min, int max, size_t buckets)
void AddHistogramSample(void *histogram, int sample)
bool Equals(String *other)
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)
static bool IterateElements(Isolate *isolate, Handle< JSArray > receiver, ArrayConcatVisitor *visitor)
A helper function that visits elements of a JSArray in numerical order.
static const int kEvalContextualGenerations
void MemsetPointer(T **dest, U *value, int counter)
static const int kRegExpGenerations
static const int kScriptGenerations
static const int kInitialCacheSize
static const int kEvalGlobalGenerations
Debugger support for the V8 JavaScript engine.