Changeset 134555 in webkit for trunk/Source/JavaScriptCore/runtime/JSFunction.cpp
- Timestamp:
- Nov 13, 2012, 11:22:57 PM (13 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/Source/JavaScriptCore/runtime/JSFunction.cpp
r134460 r134555 84 84 , m_executable() 85 85 , m_scope(exec->globalData(), this, globalObject) 86 // We initialize blind so that changes to the prototype after function creation but before 87 // the optimizer kicks in don't disable optimizations. Once the optimizer kicks in, the 88 // watchpoint will start watching and any changes will both force deoptimization and disable 89 // future attempts to optimize. This is necessary because we are guaranteed that the 90 // inheritorID is changed exactly once prior to optimizations kicking in. We could be 91 // smarter and count the number of times the prototype is clobbered and only optimize if it 92 // was clobbered exactly once, but that seems like overkill. In almost all cases it will be 93 // clobbered once, and if it's clobbered more than once, that will probably only occur 94 // before we started optimizing, anyway. 95 , m_inheritorIDWatchpoint(InitializedBlind) 86 96 { 87 97 } … … 344 354 thisObject->methodTable()->getOwnPropertySlot(thisObject, exec, propertyName, slot); 345 355 thisObject->m_cachedInheritorID.clear(); 356 thisObject->m_inheritorIDWatchpoint.notifyWrite(); 346 357 // Don't allow this to be cached, since a [[Put]] must clear m_cachedInheritorID. 347 358 PutPropertySlot dontCache; … … 390 401 thisObject->methodTable()->getOwnPropertySlot(thisObject, exec, propertyName, slot); 391 402 thisObject->m_cachedInheritorID.clear(); 403 thisObject->m_inheritorIDWatchpoint.notifyWrite(); 392 404 return Base::defineOwnProperty(object, exec, propertyName, descriptor, throwException); 393 405 }
Note:
See TracChangeset
for help on using the changeset viewer.