Bug 119084 - [Win] Compile fix.
Summary: [Win] Compile fix.
Status: RESOLVED FIXED
Alias: None
Product: WebKit
Classification: Unclassified
Component: Web Template Framework (show other bugs)
Version: 528+ (Nightly build)
Hardware: PC Unspecified
: P2 Normal
Assignee: Brent Fulgham
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2013-07-25 06:07 PDT by peavo
Modified: 2013-07-25 23:54 PDT (History)
5 users (show)

See Also:


Attachments
Patch (1.45 KB, patch)
2013-07-25 06:15 PDT, peavo
no flags Details | Formatted Diff | Diff
Patch (1.37 KB, patch)
2013-07-25 13:50 PDT, peavo
no flags Details | Formatted Diff | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description peavo 2013-07-25 06:07:45 PDT
While compiling JavaScriptCore, I get the following error:

C:\WebKit\WebKitBuild\Release_WinCairo\include\private\wtf/Atomics.h(283): error C2059: syntax error : ''
Comment 1 peavo 2013-07-25 06:15:38 PDT
Created attachment 207453 [details]
Patch
Comment 3 Brent Fulgham 2013-07-25 13:15:24 PDT
Comment on attachment 207453 [details]
Patch

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

I want olliej or ggaren to double-check this, but it seems fine to me.

Due to Visual Studio's decision to not support inline assembly in 64-bit builds, we'll also have to start adding external ASM files on Windows builds.  Maybe this code could should end up in such an external file.

> Source/WTF/wtf/Atomics.h:278
> +#if OS(WINDOWS)

Shouldn't this be inside the "#if ENABLE(COMPARE_AND_SWAP)" macro?  I wonder if this block shouldn't be a sibling of the existing "#if CPU(X86) || CPU(X86_64)".
Comment 4 Brent Fulgham 2013-07-25 13:43:31 PDT
I'm going to land this manually, to move it inside the existing method declaration leaving the C implementation (added after this patch was suggested) as a final fallback.
Comment 5 peavo 2013-07-25 13:50:50 PDT
Created attachment 207483 [details]
Patch
Comment 6 peavo 2013-07-25 13:53:19 PDT
(In reply to comment #4)
> I'm going to land this manually, to move it inside the existing method declaration leaving the C implementation (added after this patch was suggested) as a final fallback.

Ok, didn't see this comment before I updated patch, thanks :)
Comment 7 Brent Fulgham 2013-07-25 13:56:43 PDT
Landed in r153345 (http://trac.webkit.org/changeset/153345).
Comment 8 Brent Fulgham 2013-07-25 13:57:35 PDT
(In reply to comment #6)
> (In reply to comment #4)
> > I'm going to land this manually, to move it inside the existing method declaration leaving the C implementation (added after this patch was suggested) as a final fallback.
> 
> Ok, didn't see this comment before I updated patch, thanks :)

I changed the bug slightly to reflect that we weren't fixing the build, but were providing a nice, optimized ASM implementation.  Very nice!

Thanks for coming up with this fix.
Comment 9 peavo 2013-07-25 14:11:37 PDT
(In reply to comment #8)
> (In reply to comment #6)
> > (In reply to comment #4)
> > > I'm going to land this manually, to move it inside the existing method declaration leaving the C implementation (added after this patch was suggested) as a final fallback.
> > 
> > Ok, didn't see this comment before I updated patch, thanks :)
> 
> I changed the bug slightly to reflect that we weren't fixing the build, but were providing a nice, optimized ASM implementation.  Very nice!
> 
> Thanks for coming up with this fix.

Very good, thanks for reviewing ;)