Changeset 259807 in webkit
- Timestamp:
- Apr 9, 2020, 10:59:06 AM (6 years ago)
- Location:
- trunk
- Files:
-
- 1 added
- 3 edited
-
JSTests/ChangeLog (modified) (1 diff)
-
JSTests/microbenchmarks/delete-cache-strict-mode.js (added)
-
Source/JavaScriptCore/ChangeLog (modified) (1 diff)
-
Source/JavaScriptCore/jit/Repatch.cpp (modified) (1 diff)
Legend:
- Unmodified
- Added
- Removed
-
trunk/JSTests/ChangeLog
r259800 r259807 1 2020-04-09 Saam Barati <sbarati@apple.com> 2 3 We can still cache delete in strict mode as long as the property is not "non-configurable" 4 https://bugs.webkit.org/show_bug.cgi?id=210148 5 6 Reviewed by Tadeu Zagallo. 7 8 * microbenchmarks/delete-cache-strict-mode.js: Added. 9 (assert): 10 (doDel): 11 (doDelByVal): 12 1 13 2020-04-09 Alexey Shvayka <shvaikalesh@gmail.com> 2 14 -
trunk/Source/JavaScriptCore/ChangeLog
r259803 r259807 1 2020-04-09 Saam Barati <sbarati@apple.com> 2 3 We can still cache delete in strict mode as long as the property is not "non-configurable" 4 https://bugs.webkit.org/show_bug.cgi?id=210148 5 6 Reviewed by Tadeu Zagallo. 7 8 We were incorrectly not inline caching all delete misses in strict mode. 9 We only must to not cache deletes on non-configurable properties in strict 10 mode, as that should throw a runtime error. Delete misses can still be cached 11 in strict mode without any issues. This is a 4x speedup on the microbenchmark. 12 13 * jit/Repatch.cpp: 14 (JSC::tryCacheDeleteBy): 15 1 16 2020-04-09 Sergio Villar Senin <svillar@igalia.com> 2 17 -
trunk/Source/JavaScriptCore/jit/Repatch.cpp
r259681 r259807 782 782 ASSERT(isValidOffset(newOffset)); 783 783 newCase = AccessCase::createDelete(vm, codeBlock, propertyName, newOffset, oldStructure, newStructure); 784 } else if (!ecmaMode.isStrict()) { 785 if (slot.isNonconfigurable()) 786 newCase = AccessCase::create(vm, codeBlock, AccessCase::DeleteNonConfigurable, propertyName, invalidOffset, oldStructure, { }, nullptr); 787 else 788 newCase = AccessCase::create(vm, codeBlock, AccessCase::DeleteMiss, propertyName, invalidOffset, oldStructure, { }, nullptr); 789 } 784 } else if (slot.isNonconfigurable()) { 785 if (ecmaMode.isStrict()) 786 return GiveUpOnCache; 787 788 newCase = AccessCase::create(vm, codeBlock, AccessCase::DeleteNonConfigurable, propertyName, invalidOffset, oldStructure, { }, nullptr); 789 } else 790 newCase = AccessCase::create(vm, codeBlock, AccessCase::DeleteMiss, propertyName, invalidOffset, oldStructure, { }, nullptr); 790 791 791 792 result = stubInfo.addAccessCase(locker, globalObject, codeBlock, propertyName, WTFMove(newCase));
Note:
See TracChangeset
for help on using the changeset viewer.