<?xml version="1.0" encoding="UTF-8" standalone="yes" ?>
<!DOCTYPE bugzilla SYSTEM "https://bugs.webkit.org/page.cgi?id=bugzilla.dtd">

<bugzilla version="5.0.4.1"
          urlbase="https://bugs.webkit.org/"
          
          maintainer="admin@webkit.org"
>

    <bug>
          <bug_id>119084</bug_id>
          
          <creation_ts>2013-07-25 06:07:45 -0700</creation_ts>
          <short_desc>[Win] Compile fix.</short_desc>
          <delta_ts>2013-07-25 23:54:26 -0700</delta_ts>
          <reporter_accessible>1</reporter_accessible>
          <cclist_accessible>1</cclist_accessible>
          <classification_id>1</classification_id>
          <classification>Unclassified</classification>
          <product>WebKit</product>
          <component>Web Template Framework</component>
          <version>528+ (Nightly build)</version>
          <rep_platform>PC</rep_platform>
          <op_sys>Unspecified</op_sys>
          <bug_status>RESOLVED</bug_status>
          <resolution>FIXED</resolution>
          
          
          <bug_file_loc></bug_file_loc>
          <status_whiteboard></status_whiteboard>
          <keywords></keywords>
          <priority>P2</priority>
          <bug_severity>Normal</bug_severity>
          <target_milestone>---</target_milestone>
          
          
          <everconfirmed>0</everconfirmed>
          <reporter>peavo</reporter>
          <assigned_to name="Brent Fulgham">bfulgham</assigned_to>
          <cc>benjamin</cc>
    
    <cc>bfulgham</cc>
    
    <cc>cmarcelo</cc>
    
    <cc>commit-queue</cc>
    
    <cc>oliver</cc>
          

      

      

      

          <comment_sort_order>oldest_to_newest</comment_sort_order>  
          <long_desc isprivate="0" >
    <commentid>911590</commentid>
    <comment_count>0</comment_count>
    <who name="">peavo</who>
    <bug_when>2013-07-25 06:07:45 -0700</bug_when>
    <thetext>While compiling JavaScriptCore, I get the following error:

C:\WebKit\WebKitBuild\Release_WinCairo\include\private\wtf/Atomics.h(283): error C2059: syntax error : &apos;&apos;</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>911594</commentid>
    <comment_count>1</comment_count>
      <attachid>207453</attachid>
    <who name="">peavo</who>
    <bug_when>2013-07-25 06:15:38 -0700</bug_when>
    <thetext>Created attachment 207453
Patch</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>911595</commentid>
    <comment_count>2</comment_count>
    <who name="">peavo</who>
    <bug_when>2013-07-25 06:18:37 -0700</bug_when>
    <thetext>Assembly code taken from http://stackoverflow.com/questions/5796459/is-there-an-8-bit-atomic-cas-cmpxchg-intrinsic-for-x64-in-visual-c</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>911739</commentid>
    <comment_count>3</comment_count>
      <attachid>207453</attachid>
    <who name="Brent Fulgham">bfulgham</who>
    <bug_when>2013-07-25 13:15:24 -0700</bug_when>
    <thetext>Comment on attachment 207453
Patch

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

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

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

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

Shouldn&apos;t this be inside the &quot;#if ENABLE(COMPARE_AND_SWAP)&quot; macro?  I wonder if this block shouldn&apos;t be a sibling of the existing &quot;#if CPU(X86) || CPU(X86_64)&quot;.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>911744</commentid>
    <comment_count>4</comment_count>
    <who name="Brent Fulgham">bfulgham</who>
    <bug_when>2013-07-25 13:43:31 -0700</bug_when>
    <thetext>I&apos;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.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>911749</commentid>
    <comment_count>5</comment_count>
      <attachid>207483</attachid>
    <who name="">peavo</who>
    <bug_when>2013-07-25 13:50:50 -0700</bug_when>
    <thetext>Created attachment 207483
Patch</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>911751</commentid>
    <comment_count>6</comment_count>
    <who name="">peavo</who>
    <bug_when>2013-07-25 13:53:19 -0700</bug_when>
    <thetext>(In reply to comment #4)
&gt; I&apos;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&apos;t see this comment before I updated patch, thanks :)</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>911754</commentid>
    <comment_count>7</comment_count>
    <who name="Brent Fulgham">bfulgham</who>
    <bug_when>2013-07-25 13:56:43 -0700</bug_when>
    <thetext>Landed in r153345 (http://trac.webkit.org/changeset/153345).</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>911755</commentid>
    <comment_count>8</comment_count>
    <who name="Brent Fulgham">bfulgham</who>
    <bug_when>2013-07-25 13:57:35 -0700</bug_when>
    <thetext>(In reply to comment #6)
&gt; (In reply to comment #4)
&gt; &gt; I&apos;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.
&gt; 
&gt; Ok, didn&apos;t see this comment before I updated patch, thanks :)

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

Thanks for coming up with this fix.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>911759</commentid>
    <comment_count>9</comment_count>
    <who name="">peavo</who>
    <bug_when>2013-07-25 14:11:37 -0700</bug_when>
    <thetext>(In reply to comment #8)
&gt; (In reply to comment #6)
&gt; &gt; (In reply to comment #4)
&gt; &gt; &gt; I&apos;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.
&gt; &gt; 
&gt; &gt; Ok, didn&apos;t see this comment before I updated patch, thanks :)
&gt; 
&gt; I changed the bug slightly to reflect that we weren&apos;t fixing the build, but were providing a nice, optimized ASM implementation.  Very nice!
&gt; 
&gt; Thanks for coming up with this fix.

Very good, thanks for reviewing ;)</thetext>
  </long_desc>
      
          <attachment
              isobsolete="1"
              ispatch="1"
              isprivate="0"
          >
            <attachid>207453</attachid>
            <date>2013-07-25 06:15:38 -0700</date>
            <delta_ts>2013-07-25 13:50:43 -0700</delta_ts>
            <desc>Patch</desc>
            <filename>bug-119084-20130725151526.patch</filename>
            <type>text/plain</type>
            <size>1489</size>
            <attacher>peavo</attacher>
            
              <data encoding="base64">SW5kZXg6IFNvdXJjZS9XVEYvQ2hhbmdlTG9nCj09PT09PT09PT09PT09PT09PT09PT09PT09PT09
PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT0KLS0tIFNvdXJjZS9XVEYvQ2hh
bmdlTG9nCShyZXZpc2lvbiAxNTMzMjIpCisrKyBTb3VyY2UvV1RGL0NoYW5nZUxvZwkod29ya2lu
ZyBjb3B5KQpAQCAtMSwzICsxLDE1IEBACisyMDEzLTA3LTI1ICBwZWF2b0BvdXRsb29rLmNvbSAg
PHBlYXZvQG91dGxvb2suY29tPgorCisgICAgICAgIFtXaW5dIENvbXBpbGUgZml4LgorICAgICAg
ICBodHRwczovL2J1Z3Mud2Via2l0Lm9yZy9zaG93X2J1Zy5jZ2k/aWQ9MTE5MDg0CisKKyAgICAg
ICAgUmV2aWV3ZWQgYnkgTk9CT0RZIChPT1BTISkuCisKKyAgICAgICAgSW1wbGVtZW50ZWQgZnVu
Y3Rpb24gd2Vha0NvbXBhcmVBbmRTd2FwICh1aW50OCB2ZXJzaW9uKSBmb3IgV2luZG93cy4KKwor
ICAgICAgICAqIHd0Zi9BdG9taWNzLmg6CisgICAgICAgIChXVEY6OndlYWtDb21wYXJlQW5kU3dh
cCk6IEltcGxlbWVudGVkIGZ1bmN0aW9uLgorCiAyMDEzLTA3LTI1ICBSeXVhbiBDaG9pICA8cnl1
YW4uY2hvaUBzYW1zdW5nLmNvbT4KIAogICAgICAgICBVbnJldmlld2VkLCBidWlsZCBmaXggb24g
dGhlIEVGTCBwb3J0LgpJbmRleDogU291cmNlL1dURi93dGYvQXRvbWljcy5oCj09PT09PT09PT09
PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT0K
LS0tIFNvdXJjZS9XVEYvd3RmL0F0b21pY3MuaAkocmV2aXNpb24gMTUzMzIwKQorKysgU291cmNl
L1dURi93dGYvQXRvbWljcy5oCSh3b3JraW5nIGNvcHkpCkBAIC0yNzUsNiArMjc1LDIyIEBAIGlu
bGluZSB2b2lkIG1lbW9yeUJhcnJpZXJCZWZvcmVVbmxvY2soKQogCiAjZW5kaWYKIAorI2lmIE9T
KFdJTkRPV1MpCitpbmxpbmUgYm9vbCB3ZWFrQ29tcGFyZUFuZFN3YXAodWludDhfdCogbG9jYXRp
b24sIHVpbnQ4X3QgZXhwZWN0ZWQsIHVpbnQ4X3QgbmV3VmFsdWUpCit7CisgICAgYm9vbCByZXN1
bHQgPSBmYWxzZTsKKworICAgIF9fYXNtIHsKKyAgICAgICAgbW92IGFsLCBleHBlY3RlZAorICAg
ICAgICBtb3YgZWR4LCBsb2NhdGlvbgorICAgICAgICBtb3YgY2wsIG5ld1ZhbHVlCisgICAgICAg
IGxvY2sgY21weGNoZyBieXRlIHB0cltlZHhdLCBjbAorICAgICAgICBzZXR6IHJlc3VsdAorICAg
IH0KKworICAgIHJldHVybiByZXN1bHQ7Cit9CisjZWxzZQogaW5saW5lIGJvb2wgd2Vha0NvbXBh
cmVBbmRTd2FwKHVpbnQ4X3QqIGxvY2F0aW9uLCB1aW50OF90IGV4cGVjdGVkLCB1aW50OF90IG5l
d1ZhbHVlKQogewogI2lmIEVOQUJMRShDT01QQVJFX0FORF9TV0FQKQpAQCAtMzE1LDYgKzMzMSw3
IEBAIGlubGluZSBib29sIHdlYWtDb21wYXJlQW5kU3dhcCh1aW50OF90KgogICAgIHJldHVybiBm
YWxzZTsKICNlbmRpZgogfQorI2VuZGlmIC8vIE9TKFdJTkRPV1MpCiAKIH0gLy8gbmFtZXNwYWNl
IFdURgogCg==
</data>

          </attachment>
          <attachment
              isobsolete="0"
              ispatch="1"
              isprivate="0"
          >
            <attachid>207483</attachid>
            <date>2013-07-25 13:50:50 -0700</date>
            <delta_ts>2013-07-25 23:54:26 -0700</delta_ts>
            <desc>Patch</desc>
            <filename>bug-119084-20130725225037.patch</filename>
            <type>text/plain</type>
            <size>1406</size>
            <attacher>peavo</attacher>
            
              <data encoding="base64">SW5kZXg6IFNvdXJjZS9XVEYvQ2hhbmdlTG9nCj09PT09PT09PT09PT09PT09PT09PT09PT09PT09
PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT0KLS0tIFNvdXJjZS9XVEYvQ2hh
bmdlTG9nCShyZXZpc2lvbiAxNTMzMzQpCisrKyBTb3VyY2UvV1RGL0NoYW5nZUxvZwkod29ya2lu
ZyBjb3B5KQpAQCAtMSwzICsxLDE1IEBACisyMDEzLTA3LTI1ICBwZWF2b0BvdXRsb29rLmNvbSAg
PHBlYXZvQG91dGxvb2suY29tPgorCisgICAgICAgIFtXaW5dIENvbXBpbGUgZml4LgorICAgICAg
ICBodHRwczovL2J1Z3Mud2Via2l0Lm9yZy9zaG93X2J1Zy5jZ2k/aWQ9MTE5MDg0CisKKyAgICAg
ICAgUmV2aWV3ZWQgYnkgTk9CT0RZIChPT1BTISkuCisKKyAgICAgICAgSW1wbGVtZW50ZWQgZnVu
Y3Rpb24gd2Vha0NvbXBhcmVBbmRTd2FwICh1aW50OCB2ZXJzaW9uKSBmb3IgV2luZG93cy4KKwor
ICAgICAgICAqIHd0Zi9BdG9taWNzLmg6CisgICAgICAgIChXVEY6OndlYWtDb21wYXJlQW5kU3dh
cCk6IEltcGxlbWVudGVkIGZ1bmN0aW9uLgorCiAyMDEzLTA3LTI1ICBBbGxhbiBTYW5kZmVsZCBK
ZW5zZW4gIDxhbGxhbi5qZW5zZW5AZGlnaWEuY29tPgogCiAgICAgICAgIEZpeCB3aW5kb3dzIGJ1
aWxkIGFmdGVyIEZUTCB1cHN0cmVhbQpJbmRleDogU291cmNlL1dURi93dGYvQXRvbWljcy5oCj09
PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09
PT09PT09PT0KLS0tIFNvdXJjZS9XVEYvd3RmL0F0b21pY3MuaAkocmV2aXNpb24gMTUzMzM4KQor
KysgU291cmNlL1dURi93dGYvQXRvbWljcy5oCSh3b3JraW5nIGNvcHkpCkBAIC0yNzgsNyArMjc4
LDE3IEBAIGlubGluZSB2b2lkIG1lbW9yeUJhcnJpZXJCZWZvcmVVbmxvY2soKQogaW5saW5lIGJv
b2wgd2Vha0NvbXBhcmVBbmRTd2FwKHVpbnQ4X3QqIGxvY2F0aW9uLCB1aW50OF90IGV4cGVjdGVk
LCB1aW50OF90IG5ld1ZhbHVlKQogewogI2lmIEVOQUJMRShDT01QQVJFX0FORF9TV0FQKQotI2lm
ICFPUyhXSU5ET1dTKSAmJiAoQ1BVKFg4NikgfHwgQ1BVKFg4Nl82NCkpCisjaWYgT1MoV0lORE9X
UykKKyAgICBib29sIHJlc3VsdCA9IGZhbHNlOworICAgIF9fYXNtIHsKKyAgICAgICAgbW92IGFs
LCBleHBlY3RlZAorICAgICAgICBtb3YgZWR4LCBsb2NhdGlvbgorICAgICAgICBtb3YgY2wsIG5l
d1ZhbHVlCisgICAgICAgIGxvY2sgY21weGNoZyBieXRlIHB0cltlZHhdLCBjbAorICAgICAgICBz
ZXR6IHJlc3VsdAorICAgIH0KKyAgICByZXR1cm4gcmVzdWx0OworI2VsaWYgQ1BVKFg4NikgfHwg
Q1BVKFg4Nl82NCkKICAgICB1bnNpZ25lZCBjaGFyIHJlc3VsdDsKICAgICBhc20gdm9sYXRpbGUo
CiAgICAgICAgICJsb2NrOyBjbXB4Y2hnYiAlMywgJTJcblx0Igo=
</data>

          </attachment>
      

    </bug>

</bugzilla>