WebKit Bugzilla
New
Browse
Search+
Log In
×
Sign in with GitHub
or
Remember my login
Create Account
·
Forgot Password
Forgotten password account recovery
RESOLVED FIXED
181525
JITMathIC code in the FTL is wrong when code gets duplicated
https://bugs.webkit.org/show_bug.cgi?id=181525
Summary
JITMathIC code in the FTL is wrong when code gets duplicated
Saam Barati
Reported
2018-01-11 01:42:34 PST
B3 may duplicate code for arbitrary reasons. The code in FTLLower should generate a new mathIC per invocation of the watchpoint callback.
Attachments
patch
(10.48 KB, patch)
2018-01-11 01:54 PST
,
Saam Barati
no flags
Details
Formatted Diff
Diff
patch
(10.13 KB, patch)
2018-01-11 11:15 PST
,
Saam Barati
msaboff
: review+
Details
Formatted Diff
Diff
patch for landing
(10.05 KB, patch)
2018-01-11 11:59 PST
,
Saam Barati
no flags
Details
Formatted Diff
Diff
patch for landing
(10.48 KB, patch)
2018-01-11 12:01 PST
,
Saam Barati
no flags
Details
Formatted Diff
Diff
Show Obsolete
(3)
View All
Add attachment
proposed patch, testcase, etc.
Saam Barati
Comment 1
2018-01-11 01:43:07 PST
<
rdar://problem/36351993
>
Saam Barati
Comment 2
2018-01-11 01:54:34 PST
Created
attachment 331043
[details]
patch
Saam Barati
Comment 3
2018-01-11 11:15:30 PST
Created
attachment 331079
[details]
patch
Michael Saboff
Comment 4
2018-01-11 11:21:20 PST
Comment on
attachment 331079
[details]
patch View in context:
https://bugs.webkit.org/attachment.cgi?id=331079&action=review
r=me
> Source/JavaScriptCore/bytecode/CodeBlock.h:267 > JITAddIC* addJITAddIC(ArithProfile*); > JITMulIC* addJITMulIC(ArithProfile*); > - JITNegIC* addJITNegIC(ArithProfile*); > JITSubIC* addJITSubIC(ArithProfile*); > + JITNegIC* addJITNegIC(ArithProfile*); > + > + template <typename Generator, typename = typename std::enable_if<std::is_same<Generator, JITAddGenerator>::value>::type> > + JITAddIC* addMathIC(ArithProfile* profile) { return addJITAddIC(profile); } > + > + template <typename Generator, typename = typename std::enable_if<std::is_same<Generator, JITSubGenerator>::value>::type> > + JITSubIC* addMathIC(ArithProfile* profile) { return addJITSubIC(profile); } > + > + template <typename Generator, typename = typename std::enable_if<std::is_same<Generator, JITMulGenerator>::value>::type> > + JITMulIC* addMathIC(ArithProfile* profile) { return addJITMulIC(profile); } > + > + template <typename Generator, typename = typename std::enable_if<std::is_same<Generator, JITNegGenerator>::value>::type> > + JITNegIC* addMathIC(ArithProfile* profile) { return addJITNegIC(profile); }
The declarations were alphabetical. Now the declarations and template declarations have different orders and don't appear to follow any order.
Keith Miller
Comment 5
2018-01-11 11:25:33 PST
Comment on
attachment 331079
[details]
patch View in context:
https://bugs.webkit.org/attachment.cgi?id=331079&action=review
r=me.
> Source/JavaScriptCore/bytecode/CodeBlock.h:257 > + template <typename Generator, typename = typename std::enable_if<std::is_same<Generator, JITAddGenerator>::value>::type>
Ugg... we should really make a macro for this...
Saam Barati
Comment 6
2018-01-11 11:27:59 PST
Comment on
attachment 331079
[details]
patch View in context:
https://bugs.webkit.org/attachment.cgi?id=331079&action=review
>> Source/JavaScriptCore/bytecode/CodeBlock.h:257 >> + template <typename Generator, typename = typename std::enable_if<std::is_same<Generator, JITAddGenerator>::value>::type> > > Ugg... we should really make a macro for this...
I still want my constexpr if! I can't wait
>> Source/JavaScriptCore/bytecode/CodeBlock.h:267 >> + JITNegIC* addMathIC(ArithProfile* profile) { return addJITNegIC(profile); } > > The declarations were alphabetical. Now the declarations and template declarations have different orders and don't appear to follow any order.
Will fix.
Saam Barati
Comment 7
2018-01-11 11:59:47 PST
Created
attachment 331087
[details]
patch for landing
Saam Barati
Comment 8
2018-01-11 12:01:39 PST
Created
attachment 331088
[details]
patch for landing
WebKit Commit Bot
Comment 9
2018-01-11 14:18:22 PST
Comment on
attachment 331088
[details]
patch for landing Clearing flags on attachment: 331088 Committed
r226806
: <
https://trac.webkit.org/changeset/226806
>
WebKit Commit Bot
Comment 10
2018-01-11 14:18:24 PST
All reviewed patches have been landed. Closing bug.
Note
You need to
log in
before you can comment on or make changes to this bug.
Top of Page
Format For Printing
XML
Clone This Bug