Bug 137807 - Move JSC::MacroAssemblerX86Common::s_sse2CheckState definition to the right place
Summary: Move JSC::MacroAssemblerX86Common::s_sse2CheckState definition to the right p...
Status: RESOLVED FIXED
Alias: None
Product: WebKit
Classification: Unclassified
Component: JavaScriptCore (show other bugs)
Version: 528+ (Nightly build)
Hardware: Unspecified Unspecified
: P2 Normal
Assignee: Nobody
URL:
Keywords:
Depends on: 137873
Blocks: 137488
  Show dependency treegraph
 
Reported: 2014-10-16 23:18 PDT by Milan Crha
Modified: 2014-10-21 22:54 PDT (History)
4 users (show)

See Also:


Attachments
proposed patch (1.17 KB, patch)
2014-10-16 23:20 PDT, Milan Crha
ggaren: review-
ggaren: commit-queue-
Details | Formatted Diff | Diff
proposed patch ][ (1.20 KB, patch)
2014-10-20 01:44 PDT, Milan Crha
ossy: review-
ossy: commit-queue-
Details | Formatted Diff | Diff
patch for EWS (2.84 KB, patch)
2014-10-20 04:54 PDT, Csaba Osztrogonác
no flags Details | Formatted Diff | Diff
proposed patch ]I[ (1.84 KB, patch)
2014-10-20 12:31 PDT, Milan Crha
no flags Details | Formatted Diff | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Milan Crha 2014-10-16 23:18:43 PDT
The Source/JavaScriptCore/jit/JIT.cpp defines JSC::MacroAssemblerX86Common::s_sse2CheckState with a comment:
> // This probably does not belong here; adding here for now as a quick Windows build fix.
and it really is not, because with disabled JIT the variable is not defined and the build breaks.

The right (or better place) for it is MacroAssembler.cpp, just beside another static variable definition.
Comment 1 Milan Crha 2014-10-16 23:20:12 PDT
Created attachment 239999 [details]
proposed patch

Just move the variable definition, as noted above.
Comment 2 Csaba Osztrogonác 2014-10-17 02:30:20 PDT
It was originally introduced in https://trac.webkit.org/changeset/43789.
cc-ing Gavin as the author and Oliver as the reviewer of the patch.
Comment 3 Csaba Osztrogonác 2014-10-17 02:40:19 PDT
Comment on attachment 239999 [details]
proposed patch

View in context: https://bugs.webkit.org/attachment.cgi?id=239999&action=review

> Source/JavaScriptCore/assembler/MacroAssembler.cpp:38
> +#if CPU(X86) && !OS(MAC_OS_X)
> +MacroAssemblerX86Common::SSE2CheckState MacroAssemblerX86Common::s_sse2CheckState = NotCheckedSSE2;
> +#endif
> +

Why don't we move it into MacroAssemblerX86Common.cpp? It is only used inside MacroAssemblerX86Common.h
Comment 4 Milan Crha 2014-10-17 02:49:04 PDT
You are right, that's even better place. I didn't notice it being compiled on my machine (overlooked it), I noticed the MacroAssembler.cpp only, thus picked it.
Comment 5 Geoffrey Garen 2014-10-17 10:39:26 PDT
Comment on attachment 239999 [details]
proposed patch

I agree: Best to use X86Common.
Comment 6 Milan Crha 2014-10-20 01:44:55 PDT
Created attachment 240101 [details]
proposed patch ][

Move the chunk into MacroAssemblerX86Common.cpp
Comment 7 Csaba Osztrogonác 2014-10-20 03:50:08 PDT
(In reply to comment #6)
> Created attachment 240101 [details]
> proposed patch ][
> 
> Move the chunk into MacroAssemblerX86Common.cpp

The Windows EWS is unhappy. It seems MacroAssemblerX86Common.cpp isn't built
on Windows at all due to a typo here:
http://trac.webkit.org/browser/trunk/Source/JavaScriptCore/JavaScriptCore.vcxproj/JavaScriptCore.vcxproj#L308

I filed a new bug report to make this source build on Windows too: bug137873
Comment 8 Csaba Osztrogonác 2014-10-20 04:54:07 PDT
Created attachment 240111 [details]
patch for EWS

checking if the original patch + bug137873 make Windows EWS happy
Comment 9 Csaba Osztrogonác 2014-10-20 04:56:26 PDT
Comment on attachment 240101 [details]
proposed patch ][

r- now due to missing changelog.

Please add a changelog entry with Tools/Scripts/prepare-changelog
and upload the patch once the fix in bug137873 landed.
Comment 10 Milan Crha 2014-10-20 12:31:08 PDT
Created attachment 240138 [details]
proposed patch ]I[

Version ][ with added ChangeLog entry.
Comment 11 Csaba Osztrogonác 2014-10-21 01:21:48 PDT
Comment on attachment 240138 [details]
proposed patch ]I[

View in context: https://bugs.webkit.org/attachment.cgi?id=240138&action=review

r=me

> Source/JavaScriptCore/ChangeLog:6
> +        Reviewed by Csaba Osztrogonác.

You shouldn't have add my name manually here,
commit queue automatically relaces ooops before landing.

(And what if anyone else would like to review the patch?)
Comment 12 WebKit Commit Bot 2014-10-21 01:57:21 PDT
Comment on attachment 240138 [details]
proposed patch ]I[

Clearing flags on attachment: 240138

Committed r174933: <http://trac.webkit.org/changeset/174933>
Comment 13 WebKit Commit Bot 2014-10-21 01:57:26 PDT
All reviewed patches have been landed.  Closing bug.
Comment 14 Milan Crha 2014-10-21 10:28:34 PDT
(In reply to comment #11)
> You shouldn't have add my name manually here,
> commit queue automatically relaces ooops before landing.
> 
> (And what if anyone else would like to review the patch?)

That was just a wild guess. I'm new in the WebKit commit process, my first ChangeLog entry I can remember.

May I keep all three OOPS unchanged there? One was for a short description, another one for a bug link (the third was the aforementioned reviewer).
Comment 15 Csaba Osztrogonác 2014-10-21 10:32:42 PDT
(In reply to comment #14)
> (In reply to comment #11)
> > You shouldn't have add my name manually here,
> > commit queue automatically relaces ooops before landing.
> > 
> > (And what if anyone else would like to review the patch?)
> 
> That was just a wild guess. I'm new in the WebKit commit process, my first
> ChangeLog entry I can remember.
> 
> May I keep all three OOPS unchanged there? One was for a short description,
> another one for a bug link (the third was the aforementioned reviewer).

You can find the details here:
http://www.webkit.org/coding/contributing.html