WebKit Bugzilla
New
Browse
Log In
×
Sign in with GitHub
or
Remember my login
Create Account
·
Forgot Password
Forgotten password account recovery
RESOLVED FIXED
Bug 194953
DFGBytecodeParser should not declare that a node won't clobberExit if DFGFixupPhase can later declare it does clobberExit
https://bugs.webkit.org/show_bug.cgi?id=194953
Summary
DFGBytecodeParser should not declare that a node won't clobberExit if DFGFixu...
Robin Morisset
Reported
2019-02-22 11:28:18 PST
Or we fairly naturally hit validation errors out of DFGFixupPhase.. There is already such a rule for GetByVal, but we must also be conservative for other nodes that: - (a) may or may not clobberExit depending on their arrayMode - (b) and get their arrayMode from profiling information in DFGBytecodeParser - (c) and can have their arrayMode refined by DFGFixupPhase.
Attachments
Patch
(4.38 KB, patch)
2019-02-22 11:52 PST
,
Robin Morisset
saam
: review+
saam
: commit-queue-
Details
Formatted Diff
Diff
Patch
(4.45 KB, patch)
2019-02-22 13:29 PST
,
Robin Morisset
no flags
Details
Formatted Diff
Diff
Show Obsolete
(1)
View All
Add attachment
proposed patch, testcase, etc.
Robin Morisset
Comment 1
2019-02-22 11:43:34 PST
<
rdar://problem/47595253
>
Robin Morisset
Comment 2
2019-02-22 11:52:33 PST
Created
attachment 362738
[details]
Patch
Saam Barati
Comment 3
2019-02-22 12:00:54 PST
Comment on
attachment 362738
[details]
Patch View in context:
https://bugs.webkit.org/attachment.cgi?id=362738&action=review
r=me
> Source/JavaScriptCore/ChangeLog:14 > + Otherwise we are likely to hit validation failure after fixup.
instead of "likely" I think you should describe precisely when/why this happens.
> Source/JavaScriptCore/dfg/DFGByteCodeParser.cpp:7216 > + m_exitOK = false; // PutByVal and PutByValDirect must be treated as if they clobber exit state, since FixupPhase may make them generic.
This one isn't actually needed since PutByVal always clobbers exit unless it's in ForceOSR exit mode. And if it's in that mode, I don't think we can ever refine it to be wider? I'm ok with keeping this here conservatively, but this isn't the right comment to have.
Robin Morisset
Comment 4
2019-02-22 12:13:28 PST
(In reply to Saam Barati from
comment #3
)
> Comment on
attachment 362738
[details]
> Patch > > View in context: >
https://bugs.webkit.org/attachment.cgi?id=362738&action=review
> > r=me > > > Source/JavaScriptCore/ChangeLog:14 > > + Otherwise we are likely to hit validation failure after fixup. > > instead of "likely" I think you should describe precisely when/why this > happens.
OK, I am replacing this line by the following: "Otherwise we will hit a validation failure after fixup if the next node was marked ExitValid and exits to the same semantic origin."
> > Source/JavaScriptCore/dfg/DFGByteCodeParser.cpp:7216 > > + m_exitOK = false; // PutByVal and PutByValDirect must be treated as if they clobber exit state, since FixupPhase may make them generic. > > This one isn't actually needed since PutByVal always clobbers exit unless > it's in ForceOSR exit mode. And if it's in that mode, I don't think we can > ever refine it to be wider? I'm ok with keeping this here conservatively, > but this isn't the right comment to have.
I am not entirely sure whether or not we can refine it to be wider. Looking at ArrayMode::refine, it will be widened to Generic whenever "base && index && !isInt32Speculation(index)". I cannot tell if this is likely to ever happen or not, but it is not blatantly impossible.
Robin Morisset
Comment 5
2019-02-22 13:29:09 PST
Created
attachment 362758
[details]
Patch Improved a sentence in the Changelog, per Saam's suggestion.
WebKit Commit Bot
Comment 6
2019-02-22 16:05:16 PST
Comment on
attachment 362758
[details]
Patch Clearing flags on attachment: 362758 Committed
r241968
: <
https://trac.webkit.org/changeset/241968
>
WebKit Commit Bot
Comment 7
2019-02-22 16:05:18 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