WebKit Bugzilla
Attachment 339334 Details for
Bug 185213
: JSC should know how to cache custom getter accesses on the prototype chain
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Requests
|
Help
|
New Account
|
Log In
Remember
[x]
|
Forgot Password
Login:
[x]
[patch]
the patch
blah.patch (text/plain), 3.49 KB, created by
Filip Pizlo
on 2018-05-02 13:59:51 PDT
(
hide
)
Description:
the patch
Filename:
MIME Type:
Creator:
Filip Pizlo
Created:
2018-05-02 13:59:51 PDT
Size:
3.49 KB
patch
obsolete
>Index: JSTests/ChangeLog >=================================================================== >--- JSTests/ChangeLog (revision 231258) >+++ JSTests/ChangeLog (working copy) >@@ -1,3 +1,13 @@ >+2018-05-02 Filip Pizlo <fpizlo@apple.com> >+ >+ JSC should know how to cache custom getter accesses on the prototype chain >+ https://bugs.webkit.org/show_bug.cgi?id=185213 >+ >+ Reviewed by NOBODY (OOPS!). >+ >+ * microbenchmarks/get-custom-getter.js: Added. >+ (test): >+ > 2018-05-02 Robin Morisset <rmorisset@apple.com> > > emitCodeToGetArgumentsArrayLength should not crash on PhantomNewArrayWithSpread >Index: JSTests/microbenchmarks/get-custom-getter.js >=================================================================== >--- JSTests/microbenchmarks/get-custom-getter.js (nonexistent) >+++ JSTests/microbenchmarks/get-custom-getter.js (working copy) >@@ -0,0 +1,21 @@ >+// RegExp.input is a handy getter >+ >+var o = RegExp; >+o.input = "foo"; >+ >+function test(o) { >+ var result = null; >+ for (var i = 0; i < 30000; i++) >+ result = o.input; >+ >+ return result; >+} >+ >+for (var k = 0; k < 9; k++) { >+ var newResult = test(o) >+ if (newResult != "foo") >+ throw "Failed at " + k + " with " +newResult; >+ result = newResult; >+ o = {__proto__ : o } >+} >+ >Index: Source/JavaScriptCore/ChangeLog >=================================================================== >--- Source/JavaScriptCore/ChangeLog (revision 231258) >+++ Source/JavaScriptCore/ChangeLog (working copy) >@@ -1,3 +1,15 @@ >+2018-05-02 Filip Pizlo <fpizlo@apple.com> >+ >+ JSC should know how to cache custom getter accesses on the prototype chain >+ https://bugs.webkit.org/show_bug.cgi?id=185213 >+ >+ Reviewed by NOBODY (OOPS!). >+ >+ This was a simple fix after the work I did for bug 185174. >4x speed-up on the new get-custom-getter.js test. >+ >+ * jit/Repatch.cpp: >+ (JSC::tryCacheGetByID): >+ > 2018-05-01 Filip Pizlo <fpizlo@apple.com> > > JSC should be able to cache custom setter calls on the prototype chain >Index: Source/JavaScriptCore/jit/Repatch.cpp >=================================================================== >--- Source/JavaScriptCore/jit/Repatch.cpp (revision 231250) >+++ Source/JavaScriptCore/jit/Repatch.cpp (working copy) >@@ -301,13 +301,19 @@ static InlineCacheAction tryCacheGetByID > // We use ObjectPropertyConditionSet instead for faster accesses. > prototypeAccessChain = nullptr; > >+ // FIXME: Maybe this `if` should be inside generateConditionsForPropertyBlah. >+ // https://bugs.webkit.org/show_bug.cgi?id=185215 > if (slot.isUnset()) { > conditionSet = generateConditionsForPropertyMiss( > vm, codeBlock, exec, structure, propertyName.impl()); >- } else { >+ } else if (!slot.isCacheableCustom()) { > conditionSet = generateConditionsForPrototypePropertyHit( > vm, codeBlock, exec, structure, slot.slotBase(), > propertyName.impl()); >+ } else { >+ conditionSet = generateConditionsForPrototypePropertyHitCustom( >+ vm, codeBlock, exec, structure, slot.slotBase(), >+ propertyName.impl()); > } > > if (!conditionSet.isValid())
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Flags:
keith_miller
:
review+
Actions:
View
|
Formatted Diff
|
Diff
Attachments on
bug 185213
:
339330
| 339334