Changeset 175416 in webkit
- Timestamp:
- Oct 31, 2014, 12:28:12 PM (12 years ago)
- Location:
- trunk/Source/JavaScriptCore
- Files:
-
- 2 edited
-
ChangeLog (modified) (1 diff)
-
runtime/RegExpObject.cpp (modified) (1 diff)
Legend:
- Unmodified
- Added
- Removed
-
trunk/Source/JavaScriptCore/ChangeLog
r175411 r175416 1 2014-10-31 Andreas Kling <akling@apple.com> 2 3 Make writes to RegExpObject.lastIndex cacheable. 4 <https://webkit.org/b/138255> 5 6 Reviewed by Geoffrey Garen. 7 8 We were neglecting to IC the puts to RegExpObject.lastIndex on Octane/regexp, 9 and ended up spending 4.5% of a time profile in operationPutByIdNonStrict. 10 11 ~3% progression on Octane/regexp. 12 13 * runtime/RegExpObject.cpp: 14 (JSC::regExpObjectSetLastIndexStrict): 15 (JSC::regExpObjectSetLastIndexNonStrict): 16 (JSC::RegExpObject::put): 17 1 18 2014-10-31 Chris Dumez <cdumez@apple.com> 2 19 -
trunk/Source/JavaScriptCore/runtime/RegExpObject.cpp
r175365 r175416 291 291 } 292 292 293 static void regExpObjectSetLastIndexStrict(ExecState* exec, JSObject* slotBase, EncodedJSValue, EncodedJSValue value) 294 { 295 asRegExpObject(slotBase)->setLastIndex(exec, JSValue::decode(value), true); 296 } 297 298 static void regExpObjectSetLastIndexNonStrict(ExecState* exec, JSObject* slotBase, EncodedJSValue, EncodedJSValue value) 299 { 300 asRegExpObject(slotBase)->setLastIndex(exec, JSValue::decode(value), false); 301 } 302 293 303 void RegExpObject::put(JSCell* cell, ExecState* exec, PropertyName propertyName, JSValue value, PutPropertySlot& slot) 294 304 { 295 305 if (propertyName == exec->propertyNames().lastIndex) { 296 306 asRegExpObject(cell)->setLastIndex(exec, value, slot.isStrictMode()); 307 slot.setCustomProperty(asRegExpObject(cell), slot.isStrictMode() 308 ? regExpObjectSetLastIndexStrict 309 : regExpObjectSetLastIndexNonStrict); 297 310 return; 298 311 }
Note:
See TracChangeset
for help on using the changeset viewer.