35 static bool Match(
void* key1,
void* key2) {
36 String* name1 = *
static_cast<String**
>(key1);
37 String* name2 = *
static_cast<String**
>(key2);
38 ASSERT(name1->IsInternalizedString());
39 ASSERT(name2->IsInternalizedString());
40 return name1 == name2;
49 ZoneHashMap::Entry* p = map->
Lookup(name.location(), name->Hash(),
false,
52 ASSERT(*static_cast<String**>(p->key) == *name);
64 static int current() {
return current_; }
73 void Interface::DoAdd(
74 void*
name, uint32_t hash, Interface*
interface, Zone* zone,
bool* ok) {
79 if (FLAG_print_interface_details) {
80 PrintF(
"%*s# Adding...\n", Nesting::current(),
"");
81 PrintF(
"%*sthis = ", Nesting::current(),
"");
82 this->
Print(Nesting::current());
83 PrintF(
"%*s%s : ", Nesting::current(),
"",
84 (*static_cast<String**>(name))->ToAsciiArray());
85 interface->Print(Nesting::current());
90 ZoneAllocationPolicy allocator(zone);
97 ZoneHashMap::Entry* p = (*map)->
Lookup(name, hash, !
IsFrozen(), allocator);
101 }
else if (p->value ==
NULL) {
107 static_cast<Interface*
>(p->value)->
Unify(interface, zone, ok);
111 if (FLAG_print_interface_details) {
112 PrintF(
"%*sthis' = ", Nesting::current(),
"");
113 this->
Print(Nesting::current());
114 PrintF(
"%*s# Added.\n", Nesting::current(),
"");
121 if (this->forward_)
return this->Chase()->
Unify(that, zone, ok);
122 if (that->forward_)
return this->
Unify(that->Chase(), zone, ok);
127 if (
this == that)
return;
140 if (FLAG_print_interface_details) {
141 PrintF(
"%*s# Unifying...\n", Nesting::current(),
"");
142 PrintF(
"%*sthis = ", Nesting::current(),
"");
143 this->
Print(Nesting::current());
144 PrintF(
"%*sthat = ", Nesting::current(),
"");
145 that->Print(Nesting::current());
150 if (this->exports_ !=
NULL && (that->exports_ ==
NULL ||
151 this->exports_->occupancy() >= that->exports_->
occupancy())) {
152 this->DoUnify(that, ok, zone);
154 that->DoUnify(
this, ok, zone);
158 if (FLAG_print_interface_details) {
159 PrintF(
"%*sthis' = ", Nesting::current(),
"");
160 this->
Print(Nesting::current());
161 PrintF(
"%*sthat' = ", Nesting::current(),
"");
162 that->Print(Nesting::current());
163 PrintF(
"%*s# Unified.\n", Nesting::current(),
"");
169 void Interface::DoUnify(
Interface* that,
bool* ok,
Zone* zone) {
174 ASSERT(this->index_ == -1);
175 ASSERT(that->index_ == -1);
185 for (ZoneHashMap::Entry* p = map->
Start(); p !=
NULL; p = map->
Next(p)) {
186 this->DoAdd(p->key, p->hash, static_cast<Interface*>(p->value), zone, ok);
193 int this_size = this->exports_ ==
NULL ? 0 : this->exports_->
occupancy();
195 if (that->
IsFrozen() && this_size > that_size) {
201 this->flags_ |= that->flags_;
202 that->forward_ =
this;
208 int n0 = n > 0 ? n : 0;
210 if (FLAG_print_interface_details) {
211 PrintF(
"%p", static_cast<void*>(
this));
212 for (Interface* link = this->forward_; link !=
NULL; link = link->forward_)
213 PrintF(
"->%p", static_cast<void*>(link));
226 if (map ==
NULL || map->occupancy() == 0) {
228 }
else if (n < 0 || n0 >= 2 * FLAG_print_interface_depth) {
233 for (ZoneHashMap::Entry* p = map->Start(); p !=
NULL; p = map->Next(p)) {
234 String* name = *
static_cast<String**
>(p->key);
235 Interface*
interface = static_cast<Interface*>(p->value);
236 PrintF(
"%*s%s : ", n0 + 2,
"", name->ToAsciiArray());
237 interface->Print(n0 + 2);
enable upcoming ES6 features enable harmony block scoping enable harmony enable harmony proxies enable harmony generators enable harmony numeric enable harmony string enable harmony math functions harmony_scoping harmony_symbols harmony_collections harmony_iteration harmony_strings harmony_scoping harmony_maths tracks arrays with only smi values Optimize object Array DOM strings and string pretenure call new trace pretenuring decisions of HAllocate instructions track fields with only smi values track fields with heap values track_fields track_fields Enables optimizations which favor memory size over execution speed use string slices optimization filter maximum number of GVN fix point iterations use function inlining use allocation folding eliminate write barriers targeting allocations in optimized code maximum source size in bytes considered for a single inlining maximum cumulative number of AST nodes considered for inlining crankshaft harvests type feedback from stub cache trace check elimination phase hydrogen tracing filter NULL
void PrintF(const char *format,...)
enable upcoming ES6 features enable harmony block scoping enable harmony enable harmony proxies enable harmony generators enable harmony numeric enable harmony string enable harmony math functions harmony_scoping harmony_symbols harmony_collections harmony_iteration harmony_strings harmony_scoping harmony_maths tracks arrays with only smi values Optimize object Array DOM strings and string pretenure call new trace pretenuring decisions of HAllocate instructions track fields with only smi values track fields with heap values track_fields track_fields Enables optimizations which favor memory size over execution speed use string slices optimization filter maximum number of GVN fix point iterations use function inlining use allocation folding eliminate write barriers targeting allocations in optimized code maximum source size in bytes considered for a single inlining maximum cumulative number of AST nodes considered for inlining crankshaft harvests type feedback from stub cache trace check elimination phase hydrogen tracing filter trace hydrogen to given file name trace inlining decisions trace store elimination trace all use positions trace global value numbering trace hydrogen escape analysis trace the tracking of allocation sites trace map generalization environment for every instruction deoptimize every n garbage collections put a break point before deoptimizing deoptimize uncommon cases use on stack replacement trace array bounds check elimination perform array index dehoisting use load elimination use store elimination use constant folding eliminate unreachable code number of stress runs when picking a function to watch for shared function not JSFunction itself flushes the cache of optimized code for closures on every GC functions with arguments object maximum number of escape analysis fix point iterations allow uint32 values on optimize frames if they are used only in safe operations track concurrent recompilation artificial compilation delay in ms concurrent on stack replacement do not emit check maps for constant values that have a leaf map
Interface * Lookup(Handle< String > name, Zone *zone)
#define ASSERT(condition)
enable upcoming ES6 features enable harmony block scoping enable harmony enable harmony proxies enable harmony generators enable harmony numeric enable harmony string enable harmony math functions harmony_scoping harmony_symbols harmony_collections harmony_iteration harmony_strings harmony_scoping harmony_maths tracks arrays with only smi values Optimize object Array DOM strings and string pretenure call new trace pretenuring decisions of HAllocate instructions track fields with only smi values track fields with heap values track_fields track_fields Enables optimizations which favor memory size over execution speed use string slices optimization filter maximum number of GVN fix point iterations use function inlining use allocation folding eliminate write barriers targeting allocations in optimized code maximum source size in bytes considered for a single inlining maximum cumulative number of AST nodes considered for inlining crankshaft harvests type feedback from stub cache trace check elimination phase hydrogen tracing filter trace hydrogen to given file name trace inlining decisions trace store elimination trace all use positions trace global value numbering trace hydrogen escape analysis trace the tracking of allocation sites trace map generalization environment for every instruction deoptimize every n garbage collections put a break point before deoptimizing deoptimize uncommon cases use on stack replacement trace array bounds check elimination perform array index dehoisting use load elimination use store elimination use constant folding eliminate unreachable code number of stress runs when picking a function to watch for shared function not JSFunction itself flushes the cache of optimized code for closures on every GC functions with arguments object maximum number of escape analysis fix point iterations allow uint32 values on optimize frames if they are used only in safe operations track concurrent recompilation artificial compilation delay in ms concurrent on stack replacement do not emit check maps for constant values that have a leaf deoptimize the optimized code if the layout of the maps changes number of stack frames inspected by the profiler percentage of ICs that must have type info to allow optimization extra verbose compilation tracing generate extra emit comments in code disassembly enable use of SSE3 instructions if available enable use of CMOV instruction if available enable use of VFP3 instructions if available enable use of NEON instructions if enable use of SDIV and UDIV 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 expose natives in global object expose freeBuffer extension expose gc extension under the specified name expose externalize string extension number of stack frames to capture disable builtin natives files print name of functions for which code is generated use random jit cookie to mask large constants trace lazy optimization use adaptive optimizations always try to OSR functions trace optimize function deoptimization minimum length for automatic enable preparsing maximum number of optimization attempts before giving up cache prototype transitions trace debugging JSON request response trace out of bounds accesses to external arrays trace_js_array_abuse automatically set the debug break flag when debugger commands are in the queue abort by crashing maximum length of function source code printed in a stack trace max size of the new max size of the old max size of executable always perform global GCs print one trace line following each garbage collection do not print trace line after scavenger collection print statistics of the maximum memory committed for the heap in only print modified registers Don t break for ASM_UNIMPLEMENTED_BREAK macros print stack trace when an illegal exception is thrown randomize hashes to avoid predictable hash Fixed seed to use to hash property Print the time it takes to deserialize the snapshot testing_bool_flag testing_int_flag string flag tmp file in which to serialize heap Print the time it takes to lazily compile hydrogen code stubs concurrent_recompilation concurrent_sweeping Print usage including on console Map counters to a file Enable debugger compile events enable GDBJIT interface(disables compacting GC)") DEFINE_bool(gdbjit_full
void Unify(Interface *that, Zone *zone, bool *ok)
uint32_t occupancy() const
Entry * Lookup(void *key, uint32_t hash, bool insert, AllocationPolicy allocator=AllocationPolicy())
void MakeModule(bool *ok)
static const uint32_t kDefaultHashMapCapacity
void Print(const v8::FunctionCallbackInfo< v8::Value > &args)
TemplateHashMapImpl< ZoneAllocationPolicy > ZoneHashMap
enable upcoming ES6 features enable harmony block scoping enable harmony enable harmony proxies enable harmony generators enable harmony numeric enable harmony string enable harmony math functions harmony_scoping harmony_symbols harmony_collections harmony_iteration harmony_strings harmony_scoping harmony_maths tracks arrays with only smi values Optimize object Array DOM strings and string pretenure call new trace pretenuring decisions of HAllocate instructions track fields with only smi values track fields with heap values track_fields track_fields Enables optimizations which favor memory size over execution speed use string slices optimization filter maximum number of GVN fix point iterations use function inlining use allocation folding eliminate write barriers targeting allocations in optimized code maximum source size in bytes considered for a single inlining maximum cumulative number of AST nodes considered for inlining crankshaft harvests type feedback from stub cache trace check elimination phase hydrogen tracing filter trace hydrogen to given file name trace inlining decisions trace store elimination trace all use positions trace global value numbering trace hydrogen escape analysis trace the tracking of allocation sites trace map generalization environment for every instruction deoptimize every n garbage collections put a break point before deoptimizing deoptimize uncommon cases use on stack replacement trace array bounds check elimination perform array index dehoisting use load elimination use store elimination use constant folding eliminate unreachable code number of stress runs when picking a function to watch for shared function not JSFunction itself flushes the cache of optimized code for closures on every GC functions with arguments object maximum number of escape analysis fix point iterations allow uint32 values on optimize frames if they are used only in safe operations track concurrent recompilation artificial compilation delay in ms concurrent on stack replacement do not emit check maps for constant values that have a leaf deoptimize the optimized code if the layout of the maps changes number of stack frames inspected by the profiler percentage of ICs that must have type info to allow optimization extra verbose compilation tracing generate extra emit comments in code disassembly enable use of SSE3 instructions if available enable use of CMOV instruction if available enable use of VFP3 instructions if available enable use of NEON instructions if enable use of SDIV and UDIV 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 expose natives in global object expose freeBuffer extension expose gc extension under the specified name expose externalize string extension number of stack frames to capture disable builtin natives files print name of functions for which code is generated use random jit cookie to mask large constants trace lazy optimization use adaptive optimizations always try to OSR functions trace optimize function deoptimization minimum length for automatic enable preparsing maximum number of optimization attempts before giving up cache prototype transitions trace debugging JSON request response trace out of bounds accesses to external arrays trace_js_array_abuse automatically set the debug break flag when debugger commands are in the queue abort by crashing maximum length of function source code printed in a stack trace max size of the new max size of the old max size of executable always perform global GCs print one trace line following each garbage collection do not print trace line after scavenger collection print statistics of the maximum memory committed for the heap in name
Entry * Next(Entry *p) const