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 136860
Local OSR availability calculation should be reusable
https://bugs.webkit.org/show_bug.cgi?id=136860
Summary
Local OSR availability calculation should be reusable
Filip Pizlo
Reported
2014-09-16 10:56:40 PDT
Patch forthcoming.
Attachments
the patch
(15.10 KB, patch)
2014-09-16 11:47 PDT
,
Filip Pizlo
oliver
: review+
Details
Formatted Diff
Diff
View All
Add attachment
proposed patch, testcase, etc.
Filip Pizlo
Comment 1
2014-09-16 11:47:06 PDT
Created
attachment 238190
[details]
the patch
WebKit Commit Bot
Comment 2
2014-09-16 11:49:19 PDT
Attachment 238190
[details]
did not pass style-queue: ERROR: Source/JavaScriptCore/dfg/DFGOSRAvailabilityAnalysisPhase.cpp:139: When wrapping a line, only indent 4 spaces. [whitespace/indent] [3] ERROR: Source/JavaScriptCore/dfg/DFGOSRAvailabilityAnalysisPhase.cpp:146: When wrapping a line, only indent 4 spaces. [whitespace/indent] [3] ERROR: Source/JavaScriptCore/dfg/DFGOSRAvailabilityAnalysisPhase.cpp:152: When wrapping a line, only indent 4 spaces. [whitespace/indent] [3] ERROR: Source/JavaScriptCore/dfg/DFGOSRAvailabilityAnalysisPhase.cpp:158: When wrapping a line, only indent 4 spaces. [whitespace/indent] [3] Total errors found: 4 in 4 files If any of these errors are false positives, please file a bug against check-webkit-style.
Filip Pizlo
Comment 3
2014-09-16 11:50:11 PDT
(In reply to
comment #2
)
>
Attachment 238190
[details]
did not pass style-queue: > > > ERROR: Source/JavaScriptCore/dfg/DFGOSRAvailabilityAnalysisPhase.cpp:139: When wrapping a line, only indent 4 spaces. [whitespace/indent] [3] > ERROR: Source/JavaScriptCore/dfg/DFGOSRAvailabilityAnalysisPhase.cpp:146: When wrapping a line, only indent 4 spaces. [whitespace/indent] [3] > ERROR: Source/JavaScriptCore/dfg/DFGOSRAvailabilityAnalysisPhase.cpp:152: When wrapping a line, only indent 4 spaces. [whitespace/indent] [3] > ERROR: Source/JavaScriptCore/dfg/DFGOSRAvailabilityAnalysisPhase.cpp:158: When wrapping a line, only indent 4 spaces. [whitespace/indent] [3] > Total errors found: 4 in 4 files > > > If any of these errors are false positives, please file a bug against check-webkit-style.
I fixed all of these locally.
Oliver Hunt
Comment 4
2014-09-16 11:52:39 PDT
Comment on
attachment 238190
[details]
the patch View in context:
https://bugs.webkit.org/attachment.cgi?id=238190&action=review
r=me with the reference change
> Source/JavaScriptCore/ChangeLog:19 > + This reduces the amount of style points one could conceivably get in the future when > + hacking JSC, but creating a single reusable thingy for computing local OSR availability.
The last half of this sentence doesn't seem to make sense - early finish?
> Source/JavaScriptCore/ftl/FTLLowerDFGToLLVM.cpp:6747 > + Operands<Availability> availability() { return m_availabilityCalculator.m_availability; } > +
const Operands<Availability>&
Filip Pizlo
Comment 5
2014-09-16 12:01:41 PDT
(In reply to
comment #4
)
> (From update of
attachment 238190
[details]
) > View in context:
https://bugs.webkit.org/attachment.cgi?id=238190&action=review
> > r=me with the reference change > > > Source/JavaScriptCore/ChangeLog:19 > > + This reduces the amount of style points one could conceivably get in the future when > > + hacking JSC, but creating a single reusable thingy for computing local OSR availability. > > The last half of this sentence doesn't seem to make sense - early finish?
s/but/by I will fix.
> > > Source/JavaScriptCore/ftl/FTLLowerDFGToLLVM.cpp:6747 > > + Operands<Availability> availability() { return m_availabilityCalculator.m_availability; } > > + > > const Operands<Availability>&
Why? What does it buy us? I don't like adding const unless I have a story for what it will accomplish, since pointless uses of const run the risk of just requiring more code to be written (const/non-const variants of things...). In this case, you can already edit the availability by doing m_availabilityCalculator.m_availability. A humorous example of when you last asked me to make something const was Node::child1()/child2()/child3(). The result was that everyone would wanted to edit children had to be more verbose - Node->children.setChild1(...). This wasn't a good thing. I take it as a given that the purpose of a compiler's internal data structures is that they may be edited. There is usually no point in dragging const around.
Filip Pizlo
Comment 6
2014-09-16 12:05:33 PDT
(In reply to
comment #5
)
> (In reply to
comment #4
) > > (From update of
attachment 238190
[details]
[details]) > > View in context:
https://bugs.webkit.org/attachment.cgi?id=238190&action=review
> > > > r=me with the reference change > > > > > Source/JavaScriptCore/ChangeLog:19 > > > + This reduces the amount of style points one could conceivably get in the future when > > > + hacking JSC, but creating a single reusable thingy for computing local OSR availability. > > > > The last half of this sentence doesn't seem to make sense - early finish? > > s/but/by > > I will fix. > > > > > > Source/JavaScriptCore/ftl/FTLLowerDFGToLLVM.cpp:6747 > > > + Operands<Availability> availability() { return m_availabilityCalculator.m_availability; } > > > + > > > > const Operands<Availability>& > > Why? What does it buy us? > > I don't like adding const unless I have a story for what it will accomplish, since pointless uses of const run the risk of just requiring more code to be written (const/non-const variants of things...). In this case, you can already edit the availability by doing m_availabilityCalculator.m_availability. > > A humorous example of when you last asked me to make something const was Node::child1()/child2()/child3(). The result was that everyone would wanted to edit children had to be more verbose - Node->children.setChild1(...). This wasn't a good thing. > > I take it as a given that the purpose of a compiler's internal data structures is that they may be edited. There is usually no point in dragging const around.
*facepalm* Discussion on irc revealed that I was using Operands<Availability> without a &. Ollie recommends Operands<Availability>& (i.e. non-const ref). I will do that.
Filip Pizlo
Comment 7
2014-09-16 15:26:03 PDT
Landed in
http://trac.webkit.org/changeset/173672
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