RESOLVED FIXED132351
JSProxies should be cacheable
https://bugs.webkit.org/show_bug.cgi?id=132351
Summary JSProxies should be cacheable
Mark Hahnenberg
Reported 2014-04-29 12:59:27 PDT
Whenever we encounter a proxy in an inline cache we should try to cache on the proxy's target instead of giving up.
Attachments
Patch (14.67 KB, patch)
2014-04-29 13:05 PDT, Mark Hahnenberg
no flags
Patch (19.64 KB, patch)
2014-04-29 14:06 PDT, Mark Hahnenberg
ggaren: review+
Mark Hahnenberg
Comment 1 2014-04-29 13:05:25 PDT
WebKit Commit Bot
Comment 2 2014-04-29 13:07:23 PDT
Attachment 230406 [details] did not pass style-queue: ERROR: Source/JavaScriptCore/jit/Repatch.cpp:311: Weird number of spaces at line-start. Are you using a 4-space indent? [whitespace/indent] [3] ERROR: Source/JavaScriptCore/jit/Repatch.cpp:322: Weird number of spaces at line-start. Are you using a 4-space indent? [whitespace/indent] [3] ERROR: Source/JavaScriptCore/runtime/Operations.h:264: Multi line control clauses should use braces. [whitespace/braces] [4] Total errors found: 3 in 11 files If any of these errors are false positives, please file a bug against check-webkit-style.
Filip Pizlo
Comment 3 2014-04-29 13:07:35 PDT
Comment on attachment 230406 [details] Patch Lol can has some tests? I'd add a fako Proxy in jsc.cpp that behaves like JSGLobalObject (maybe we have one already?) and then write some tests that various try and either succeed or fail in caching on it.
Mark Hahnenberg
Comment 4 2014-04-29 14:06:11 PDT
WebKit Commit Bot
Comment 5 2014-04-29 14:08:14 PDT
Attachment 230414 [details] did not pass style-queue: ERROR: Source/JavaScriptCore/runtime/Operations.h:264: Multi line control clauses should use braces. [whitespace/braces] [4] Total errors found: 1 in 13 files If any of these errors are false positives, please file a bug against check-webkit-style.
Geoffrey Garen
Comment 6 2014-04-29 14:54:49 PDT
Comment on attachment 230414 [details] Patch View in context: https://bugs.webkit.org/attachment.cgi?id=230414&action=review r=me > Source/JavaScriptCore/ChangeLog:15 > + This is performance neutral on the benchmarks we track, although currently we won't I would remove "although", and just start a new sentence. > Source/JavaScriptCore/jsc.cpp:611 > + Structure* structure = Proxy::createStructure(exec->vm(), exec->lexicalGlobalObject(), jsTarget->prototype()); You could just instantiate JSProxy here. > Source/JavaScriptCore/jit/Repatch.cpp:746 > + if (!structure->propertyAccessesAreCacheable()) > + return false; Let's rearrange this to share the propertyAccessesAreCacheable() check. It's nice to keep the PureForwardingProxyType thingy only substituting the base, and not doing anything else.
Mark Hahnenberg
Comment 7 2014-04-29 15:22:40 PDT
Note You need to log in before you can comment on or make changes to this bug.