Bug 150039 - Each *ById inline cache in the FTL must have its own CallSiteIndex
Summary: Each *ById inline cache in the FTL must have its own CallSiteIndex
Status: RESOLVED FIXED
Alias: None
Product: WebKit
Classification: Unclassified
Component: JavaScriptCore (show other bugs)
Version: WebKit Nightly Build
Hardware: Unspecified Unspecified
: P2 Normal
Assignee: Saam Barati
URL:
Keywords:
Depends on:
Blocks: 149409
  Show dependency treegraph
 
Reported: 2015-10-12 11:20 PDT by Saam Barati
Modified: 2015-10-12 13:38 PDT (History)
11 users (show)

See Also:


Attachments
patch (14.00 KB, patch)
2015-10-12 12:36 PDT, Saam Barati
fpizlo: review+
Details | Formatted Diff | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Saam Barati 2015-10-12 11:20:38 PDT
Currently, we create the CallSiteIndex when lowering to LLVM. This is wrong, FTL
might duplicate the inline cache patchpoint, in which case, each patchpoint
will have its own unique set of registers describing it. Therefore, it should
also have a unique call site index. This is strictly necessary for implementing
try/catch in the FTL.
Comment 1 Saam Barati 2015-10-12 12:36:25 PDT
Created attachment 262911 [details]
patch
Comment 2 WebKit Commit Bot 2015-10-12 12:37:45 PDT
Attachment 262911 [details] did not pass style-queue:


ERROR: Source/JavaScriptCore/ftl/FTLInlineCacheDescriptor.h:85:  Wrong number of spaces before statement. (expected: 12)  [whitespace/indent] [4]
ERROR: Source/JavaScriptCore/ftl/FTLInlineCacheDescriptor.h:149:  Wrong number of spaces before statement. (expected: 12)  [whitespace/indent] [4]
Total errors found: 2 in 7 files


If any of these errors are false positives, please file a bug against check-webkit-style.
Comment 3 Geoffrey Garen 2015-10-12 12:39:57 PDT
Comment on attachment 262911 [details]
patch

r=me

> Source/JavaScriptCore/dfg/DFGCommonData.cpp:60
> +CallSiteIndex CommonData::addUniqueCallSiteIndexForCodeOrigin(CodeOrigin codeOrigin)

I would take "ForCodeOrigin" out of this function name. In a language like C++, where type is a part of argument signature, you can save a lot on wordiness that way. (Note that you won't lose information at the call site or inside the callee, since both places call the argument "codeOrigin". And you can't make a mistake and pass something else because you'll get a compile error.)
Comment 4 Saam Barati 2015-10-12 13:38:39 PDT
Thanks for the suggestion. I agree that "ForCodeOrigin" is unnecessary in the name.

landed in:
http://trac.webkit.org/changeset/190885