<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN"
"http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head><meta http-equiv="content-type" content="text/html; charset=utf-8" /><style type="text/css"><!--
#msg dl { border: 1px #006 solid; background: #369; padding: 6px; color: #fff; }
#msg dt { float: left; width: 6em; font-weight: bold; }
#msg dt:after { content:':';}
#msg dl, #msg dt, #msg ul, #msg li, #header, #footer { font-family: verdana,arial,helvetica,sans-serif; font-size: 10pt;  }
#msg dl a { font-weight: bold}
#msg dl a:link    { color:#fc3; }
#msg dl a:active  { color:#ff0; }
#msg dl a:visited { color:#cc6; }
h3 { font-family: verdana,arial,helvetica,sans-serif; font-size: 10pt; font-weight: bold; }
#msg pre { overflow: auto; background: #ffc; border: 1px #fc0 solid; padding: 6px; }
#msg ul, pre { overflow: auto; }
#header, #footer { color: #fff; background: #636; border: 1px #300 solid; padding: 6px; }
#patch { width: 100%; }
#patch h4 {font-family: verdana,arial,helvetica,sans-serif;font-size:10pt;padding:8px;background:#369;color:#fff;margin:0;}
#patch .propset h4, #patch .binary h4 {margin:0;}
#patch pre {padding:0;line-height:1.2em;margin:0;}
#patch .diff {width:100%;background:#eee;padding: 0 0 10px 0;overflow:auto;}
#patch .propset .diff, #patch .binary .diff  {padding:10px 0;}
#patch span {display:block;padding:0 10px;}
#patch .modfile, #patch .addfile, #patch .delfile, #patch .propset, #patch .binary, #patch .copfile {border:1px solid #ccc;margin:10px 0;}
#patch ins {background:#dfd;text-decoration:none;display:block;padding:0 10px;}
#patch del {background:#fdd;text-decoration:none;display:block;padding:0 10px;}
#patch .lines, .info {color:#888;background:#fff;}
--></style>
<title>[23960] trunk</title>
</head>
<body>

<div id="msg">
<dl>
<dt>Revision</dt> <dd><a href="http://trac.webkit.org/projects/webkit/changeset/23960">23960</a></dd>
<dt>Author</dt> <dd>weinig</dd>
<dt>Date</dt> <dd>2007-07-03 15:37:15 -0700 (Tue, 03 Jul 2007)</dd>
</dl>

<h3>Log Message</h3>
<pre>JavaScriptCore:

        Reviewed by Darin.

        Eleventh round of fixes for implicit 64-32 bit conversion errors.
        &lt;rdar://problem/5292262&gt;

        - Fixes a real bug where where we were setting long long and unsigned long long
          values to a long field.

        * bindings/objc/objc_utility.mm:
        (KJS::Bindings::convertValueToObjcValue):

LayoutTests:

        Reviewed by Darin.

        Eleventh round of fixes for implicit 64-32 bit conversion errors.
        &lt;rdar://problem/5292262&gt;

        * fast/objc: Added.
        * fast/objc/longlongTest-expected.txt: Added.
        * fast/objc/longlongTest.html: Added.</pre>

<h3>Modified Paths</h3>
<ul>
<li><a href="#trunkJavaScriptCoreChangeLog">trunk/JavaScriptCore/ChangeLog</a></li>
<li><a href="#trunkJavaScriptCorebindingsobjcobjc_utilitymm">trunk/JavaScriptCore/bindings/objc/objc_utility.mm</a></li>
<li><a href="#trunkLayoutTestsChangeLog">trunk/LayoutTests/ChangeLog</a></li>
</ul>

<h3>Added Paths</h3>
<ul>
<li>trunk/LayoutTests/fast/objc/</li>
<li><a href="#trunkLayoutTestsfastobjclonglongTestexpectedtxt">trunk/LayoutTests/fast/objc/longlongTest-expected.txt</a></li>
<li><a href="#trunkLayoutTestsfastobjclonglongTesthtml">trunk/LayoutTests/fast/objc/longlongTest.html</a></li>
</ul>

</div>
<div id="patch">
<h3>Diff</h3>
<a id="trunkJavaScriptCoreChangeLog"></a>
<div class="modfile"><h4>Modified: trunk/JavaScriptCore/ChangeLog (23959 => 23960)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/JavaScriptCore/ChangeLog        2007-07-03 22:11:06 UTC (rev 23959)
+++ trunk/JavaScriptCore/ChangeLog        2007-07-03 22:37:15 UTC (rev 23960)
</span><span class="lines">@@ -1,5 +1,18 @@
</span><span class="cx"> 2007-07-03  Sam Weinig  &lt;sam@webkit.org&gt;
</span><span class="cx"> 
</span><ins>+        Reviewed by Darin.
+
+        Eleventh round of fixes for implicit 64-32 bit conversion errors.
+        &lt;rdar://problem/5292262&gt;
+
+        - Fixes a real bug where where we were setting long long and unsigned long long
+          values to a long field.
+
+        * bindings/objc/objc_utility.mm:
+        (KJS::Bindings::convertValueToObjcValue):
+
+2007-07-03  Sam Weinig  &lt;sam@webkit.org&gt;
+
</ins><span class="cx">         Reviewed by Brady Eidson.
</span><span class="cx"> 
</span><span class="cx">         Tenth round of fixes for implicit 64-32 bit conversion errors.
</span></span></pre></div>
<a id="trunkJavaScriptCorebindingsobjcobjc_utilitymm"></a>
<div class="modfile"><h4>Modified: trunk/JavaScriptCore/bindings/objc/objc_utility.mm (23959 => 23960)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/JavaScriptCore/bindings/objc/objc_utility.mm        2007-07-03 22:11:06 UTC (rev 23959)
+++ trunk/JavaScriptCore/bindings/objc/objc_utility.mm        2007-07-03 22:37:15 UTC (rev 23960)
</span><span class="lines">@@ -172,7 +172,7 @@
</span><span class="cx">             break;
</span><span class="cx">         case ObjcLongLongType:
</span><span class="cx">         case ObjcUnsignedLongLongType:
</span><del>-            result.longValue = (long long)d;
</del><ins>+            result.longLongValue = (long long)d;
</ins><span class="cx">             break;
</span><span class="cx">         case ObjcFloatType:
</span><span class="cx">             result.floatValue = (float)d;
</span></span></pre></div>
<a id="trunkLayoutTestsChangeLog"></a>
<div class="modfile"><h4>Modified: trunk/LayoutTests/ChangeLog (23959 => 23960)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/ChangeLog        2007-07-03 22:11:06 UTC (rev 23959)
+++ trunk/LayoutTests/ChangeLog        2007-07-03 22:37:15 UTC (rev 23960)
</span><span class="lines">@@ -1,3 +1,14 @@
</span><ins>+2007-07-03  Sam Weinig  &lt;sam@webkit.org&gt;
+
+        Reviewed by Darin.
+
+        Eleventh round of fixes for implicit 64-32 bit conversion errors.
+        &lt;rdar://problem/5292262&gt;
+
+        * fast/objc: Added.
+        * fast/objc/longlongTest-expected.txt: Added.
+        * fast/objc/longlongTest.html: Added.
+
</ins><span class="cx"> 2007-07-03  Anders Carlsson  &lt;andersca@apple.com&gt;
</span><span class="cx"> 
</span><span class="cx">         Reviewed by Darin.
</span></span></pre></div>
<a id="trunkLayoutTestsfastobjclonglongTestexpectedtxt"></a>
<div class="addfile"><h4>Added: trunk/LayoutTests/fast/objc/longlongTest-expected.txt (0 => 23960)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/fast/objc/longlongTest-expected.txt                                (rev 0)
+++ trunk/LayoutTests/fast/objc/longlongTest-expected.txt        2007-07-03 22:37:15 UTC (rev 23960)
</span><span class="lines">@@ -0,0 +1,15 @@
</span><ins>+PASS Test LongLong: result is 0 as expected!
+PASS Test LongLong: result is 1 as expected!
+PASS Test LongLong: result is -1 as expected!
+PASS Test LongLong: result is -9223372036854776000 as expected!
+PASS Test LongLong: result is -9223372036854776000 as expected!
+PASS Test LongLong: result is -9223372036854776000 as expected!
+PASS Test LongLong: result is -9223372036854776000 as expected!
+PASS Test UnsignedLongLong: result is 0 as expected!
+PASS Test UnsignedLongLong: result is 1 as expected!
+PASS Test UnsignedLongLong: result is 18446744073709552000 as expected!
+PASS Test UnsignedLongLong: result is 9223372036854776000 as expected!
+PASS Test UnsignedLongLong: result is 9223372036854776000 as expected!
+PASS Test UnsignedLongLong: result is 9223372036854776000 as expected!
+PASS Test UnsignedLongLong: result is 9223372036854776000 as expected!
+
</ins></span></pre></div>
<a id="trunkLayoutTestsfastobjclonglongTesthtml"></a>
<div class="addfile"><h4>Added: trunk/LayoutTests/fast/objc/longlongTest.html (0 => 23960)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/fast/objc/longlongTest.html                                (rev 0)
+++ trunk/LayoutTests/fast/objc/longlongTest.html        2007-07-03 22:37:15 UTC (rev 23960)
</span><span class="lines">@@ -0,0 +1,59 @@
</span><ins>+&lt;!DOCTYPE html&gt;
+&lt;html&gt;
+    &lt;head&gt;
+        &lt;script type=&quot;text/javascript&quot; charset=&quot;utf-8&quot;&gt;
+            function log(msg)
+            {
+                document.getElementById('console').innerHTML += msg + &quot;\n&quot;
+            }
+
+            function testLongLong(num, expected)
+            {
+                var result = layoutTestController.objCLongLongRoundTrip(num);
+                if (result == expected)
+                    log(&quot;PASS Test LongLong: result is &quot; + result + &quot; as expected!&quot;);
+                else
+                    log(&quot;FAIL Test LongLong: result is &quot; + result + &quot;, should be &quot; + expected);
+            }
+
+            function testUnsignedLongLong(num, expected)
+            {
+                var result = layoutTestController.objCUnsignedLongLongRoundTrip(num);
+                if (result == expected)
+                    log(&quot;PASS Test UnsignedLongLong: result is &quot; + result + &quot; as expected!&quot;);
+                else
+                    log(&quot;FAIL Test UnsignedLongLong: result is &quot; + result + &quot;, should be &quot; + expected);
+            }
+
+            function test()
+            {
+                if (!window.layoutTestController) {
+                    log(&quot;This test can only be run under DumpRenderTree.&quot;);
+                    return;
+                }
+
+                layoutTestController.dumpAsText();
+    
+                testLongLong(0, 0);
+                testLongLong(1, 1);
+                testLongLong(-1, -1);
+                testLongLong(9223372036854776001, -9223372036854776000);
+                testLongLong(-9223372036854776001, -9223372036854776000);
+                testLongLong(Number.POSITIVE_INFINITY, -9223372036854776000);
+                testLongLong(Number.NEGATIVE_INFINITY, -9223372036854776000);
+
+                testUnsignedLongLong(0, 0);
+                testUnsignedLongLong(1, 1);
+                testUnsignedLongLong(-1, 18446744073709552000);
+                testUnsignedLongLong(9223372036854776001, 9223372036854776000);
+                testUnsignedLongLong(-9223372036854776001, 9223372036854776000);
+                testUnsignedLongLong(Number.POSITIVE_INFINITY, 9223372036854776000);
+                testUnsignedLongLong(Number.NEGATIVE_INFINITY, 9223372036854776000);
+
+            }
+        &lt;/script&gt;
+    &lt;/head&gt;
+    &lt;body onload=&quot;test();&quot;&gt;
+        &lt;pre id=&quot;console&quot;&gt;&lt;/pre&gt;
+    &lt;/body&gt;
+&lt;/html&gt;
</ins></span></pre>
</div>
</div>

</body>
</html>