<!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" />
<title>[167272] trunk</title>
</head>
<body>

<style type="text/css"><!--
#msg dl.meta { border: 1px #006 solid; background: #369; padding: 6px; color: #fff; }
#msg dl.meta dt { float: left; width: 6em; font-weight: bold; }
#msg dt:after { content:':';}
#msg dl, #msg dt, #msg ul, #msg li, #header, #footer, #logmsg { 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 #fa0 solid; padding: 6px; }
#logmsg { background: #ffc; border: 1px #fa0 solid; padding: 1em 1em 0 1em; }
#logmsg p, #logmsg pre, #logmsg blockquote { margin: 0 0 1em 0; }
#logmsg p, #logmsg li, #logmsg dt, #logmsg dd { line-height: 14pt; }
#logmsg h1, #logmsg h2, #logmsg h3, #logmsg h4, #logmsg h5, #logmsg h6 { margin: .5em 0; }
#logmsg h1:first-child, #logmsg h2:first-child, #logmsg h3:first-child, #logmsg h4:first-child, #logmsg h5:first-child, #logmsg h6:first-child { margin-top: 0; }
#logmsg ul, #logmsg ol { padding: 0; list-style-position: inside; margin: 0 0 0 1em; }
#logmsg ul { text-indent: -1em; padding-left: 1em; }#logmsg ol { text-indent: -1.5em; padding-left: 1.5em; }
#logmsg > ul, #logmsg > ol { margin: 0 0 1em 0; }
#logmsg pre { background: #eee; padding: 1em; }
#logmsg blockquote { border: 1px solid #fa0; border-left-width: 10px; padding: 1em 1em 0 1em; background: white;}
#logmsg dl { margin: 0; }
#logmsg dt { font-weight: bold; }
#logmsg dd { margin: 0; padding: 0 0 0.5em 0; }
#logmsg dd:before { content:'\00bb';}
#logmsg table { border-spacing: 0px; border-collapse: collapse; border-top: 4px solid #fa0; border-bottom: 1px solid #fa0; background: #fff; }
#logmsg table th { text-align: left; font-weight: normal; padding: 0.2em 0.5em; border-top: 1px dotted #fa0; }
#logmsg table td { text-align: right; border-top: 1px dotted #fa0; padding: 0.2em 0.5em; }
#logmsg table thead th { text-align: center; border-bottom: 1px solid #fa0; }
#logmsg table th.Corner { text-align: left; }
#logmsg hr { border: none 0; border-top: 2px dashed #fa0; height: 1px; }
#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>
<div id="msg">
<dl class="meta">
<dt>Revision</dt> <dd><a href="http://trac.webkit.org/projects/webkit/changeset/167272">167272</a></dd>
<dt>Author</dt> <dd>oliver@apple.com</dd>
<dt>Date</dt> <dd>2014-04-14 15:05:44 -0700 (Mon, 14 Apr 2014)</dd>
</dl>

<h3>Log Message</h3>
<pre>Function.bind itself is too slow
https://bugs.webkit.org/show_bug.cgi?id=131636

Reviewed by Geoffrey Garen.

Source/JavaScriptCore:
Rather than forcing creation of an activation, we now store
bound function properties directly on the returned closure.
This is necessary to deal with code that creates many function
bindings, but does not call them very often.

This is a 60% speed up in the included js/regress test.

* builtins/BuiltinExecutables.cpp:
(JSC::BuiltinExecutables::createBuiltinExecutable):
* builtins/Function.prototype.js:
(bind.bindingFunction):
(bind.else.switch.case.1.bindingFunction.bindingFunction.bindingFunction.boundOversizedCallThunk):
(bind.else.switch.case.1.bindingFunction):
(bind.else.switch.case.2.bindingFunction.bindingFunction.bindingFunction.boundOversizedCallThunk):
(bind.else.switch.case.2.bindingFunction):
(bind.else.switch.case.3.bindingFunction.bindingFunction.bindingFunction.boundOversizedCallThunk):
(bind.else.switch.case.3.bindingFunction):
(bind.else.switch.bindingFunction):
(bind):
(bind.else.switch.case.1.bindingFunction.oversizedCall): Deleted.
(bind.else.switch.case.2.bindingFunction.oversizedCall): Deleted.
(bind.else.switch.case.3.bindingFunction.oversizedCall): Deleted.
* runtime/CommonIdentifiers.h:

LayoutTests:
New test, and fix bogus log in old one

* js/regress/function-bind-create-expected.html: Added.
* js/regress/function-bind-create.html: Added.
* js/regress/script-tests/function-bind-create.js: Added.
(test):
* js/regress/script-tests/function-bind.js:</pre>

<h3>Modified Paths</h3>
<ul>
<li><a href="#trunkLayoutTestsChangeLog">trunk/LayoutTests/ChangeLog</a></li>
<li><a href="#trunkLayoutTestsjsregressscripttestsfunctionbindjs">trunk/LayoutTests/js/regress/script-tests/function-bind.js</a></li>
<li><a href="#trunkSourceJavaScriptCoreChangeLog">trunk/Source/JavaScriptCore/ChangeLog</a></li>
<li><a href="#trunkSourceJavaScriptCorebuiltinsFunctionprototypejs">trunk/Source/JavaScriptCore/builtins/Function.prototype.js</a></li>
<li><a href="#trunkSourceJavaScriptCoreruntimeCommonIdentifiersh">trunk/Source/JavaScriptCore/runtime/CommonIdentifiers.h</a></li>
</ul>

<h3>Added Paths</h3>
<ul>
<li><a href="#trunkLayoutTestsjsregressfunctionbindcreateexpectedhtml">trunk/LayoutTests/js/regress/function-bind-create-expected.html</a></li>
<li><a href="#trunkLayoutTestsjsregressfunctionbindcreatehtml">trunk/LayoutTests/js/regress/function-bind-create.html</a></li>
<li><a href="#trunkLayoutTestsjsregressscripttestsfunctionbindcreatejs">trunk/LayoutTests/js/regress/script-tests/function-bind-create.js</a></li>
</ul>

</div>
<div id="patch">
<h3>Diff</h3>
<a id="trunkLayoutTestsChangeLog"></a>
<div class="modfile"><h4>Modified: trunk/LayoutTests/ChangeLog (167271 => 167272)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/ChangeLog        2014-04-14 21:51:17 UTC (rev 167271)
+++ trunk/LayoutTests/ChangeLog        2014-04-14 22:05:44 UTC (rev 167272)
</span><span class="lines">@@ -1,3 +1,18 @@
</span><ins>+2014-04-14  Oliver Hunt  &lt;oliver@apple.com&gt;
+
+        Function.bind itself is too slow
+        https://bugs.webkit.org/show_bug.cgi?id=131636
+
+        Reviewed by Geoffrey Garen.
+
+        New test, and fix bogus log in old one
+
+        * js/regress/function-bind-create-expected.html: Added.
+        * js/regress/function-bind-create.html: Added.
+        * js/regress/script-tests/function-bind-create.js: Added.
+        (test):
+        * js/regress/script-tests/function-bind.js:
+
</ins><span class="cx"> 2014-04-14  Brian J. Burg  &lt;burg@cs.washington.edu&gt;
</span><span class="cx"> 
</span><span class="cx">         Web Replay: memoize fallback time values for document.lastModified
</span></span></pre></div>
<a id="trunkLayoutTestsjsregressfunctionbindcreateexpectedhtml"></a>
<div class="addfile"><h4>Added: trunk/LayoutTests/js/regress/function-bind-create-expected.html (0 => 167272)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/js/regress/function-bind-create-expected.html                                (rev 0)
+++ trunk/LayoutTests/js/regress/function-bind-create-expected.html        2014-04-14 22:05:44 UTC (rev 167272)
</span><span class="lines">@@ -0,0 +1,10 @@
</span><ins>+JSRegress/function-bind
+
+On success, you will see a series of &quot;PASS&quot; messages, followed by &quot;TEST COMPLETE&quot;.
+
+
+PASS no exception thrown
+PASS successfullyParsed is true
+
+TEST COMPLETE
+
</ins></span></pre></div>
<a id="trunkLayoutTestsjsregressfunctionbindcreatehtml"></a>
<div class="addfile"><h4>Added: trunk/LayoutTests/js/regress/function-bind-create.html (0 => 167272)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/js/regress/function-bind-create.html                                (rev 0)
+++ trunk/LayoutTests/js/regress/function-bind-create.html        2014-04-14 22:05:44 UTC (rev 167272)
</span><span class="lines">@@ -0,0 +1,12 @@
</span><ins>+&lt;!DOCTYPE HTML PUBLIC &quot;-//IETF//DTD HTML//EN&quot;&gt;
+&lt;html&gt;
+&lt;head&gt;
+&lt;script src=&quot;../../resources/js-test-pre.js&quot;&gt;&lt;/script&gt;
+&lt;/head&gt;
+&lt;body&gt;
+&lt;script src=&quot;../../resources/regress-pre.js&quot;&gt;&lt;/script&gt;
+&lt;script src=&quot;script-tests/function-bind.js&quot;&gt;&lt;/script&gt;
+&lt;script src=&quot;../../resources/regress-post.js&quot;&gt;&lt;/script&gt;
+&lt;script src=&quot;../../resources/js-test-post.js&quot;&gt;&lt;/script&gt;
+&lt;/body&gt;
+&lt;/html&gt;
</ins></span></pre></div>
<a id="trunkLayoutTestsjsregressscripttestsfunctionbindcreatejs"></a>
<div class="addfile"><h4>Added: trunk/LayoutTests/js/regress/script-tests/function-bind-create.js (0 => 167272)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/js/regress/script-tests/function-bind-create.js                                (rev 0)
+++ trunk/LayoutTests/js/regress/script-tests/function-bind-create.js        2014-04-14 22:05:44 UTC (rev 167272)
</span><span class="lines">@@ -0,0 +1,8 @@
</span><ins>+var count = 0;
+function test() { return result ^ (count += 3); }
+var result = 0;
+for (var i = 0; i &lt; 100000; i++)
+     result = result ^ (i * test.bind(1,2)()) + 1;
+
+if (result != 509992157)
+    throw &quot;Bad result: &quot; + result;
</ins></span></pre></div>
<a id="trunkLayoutTestsjsregressscripttestsfunctionbindjs"></a>
<div class="modfile"><h4>Modified: trunk/LayoutTests/js/regress/script-tests/function-bind.js (167271 => 167272)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/js/regress/script-tests/function-bind.js        2014-04-14 21:51:17 UTC (rev 167271)
+++ trunk/LayoutTests/js/regress/script-tests/function-bind.js        2014-04-14 22:05:44 UTC (rev 167272)
</span><span class="lines">@@ -6,7 +6,6 @@
</span><span class="cx"> var g1 = foo.bind({}, 1);
</span><span class="cx"> var g2 = foo.bind({}, 1, 2);
</span><span class="cx"> var g3 = foo.bind({}, 1, 2, 3);
</span><del>-var start = new Date;
</del><span class="cx"> 
</span><span class="cx"> var result = 0;
</span><span class="cx"> for (var i = 0; i &lt; 100000; ++i) {
</span><span class="lines">@@ -23,6 +22,5 @@
</span><span class="cx">     result += g3(i, result);
</span><span class="cx">     result |= 0;
</span><span class="cx"> }
</span><del>-print((new Date - start))
</del><span class="cx"> if (result != 1596499010)
</span><span class="cx">     throw &quot;Bad result: &quot; + result;
</span></span></pre></div>
<a id="trunkSourceJavaScriptCoreChangeLog"></a>
<div class="modfile"><h4>Modified: trunk/Source/JavaScriptCore/ChangeLog (167271 => 167272)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/JavaScriptCore/ChangeLog        2014-04-14 21:51:17 UTC (rev 167271)
+++ trunk/Source/JavaScriptCore/ChangeLog        2014-04-14 22:05:44 UTC (rev 167272)
</span><span class="lines">@@ -1,3 +1,34 @@
</span><ins>+2014-04-14  Oliver Hunt  &lt;oliver@apple.com&gt;
+
+        Function.bind itself is too slow
+        https://bugs.webkit.org/show_bug.cgi?id=131636
+
+        Reviewed by Geoffrey Garen.
+
+        Rather than forcing creation of an activation, we now store
+        bound function properties directly on the returned closure.
+        This is necessary to deal with code that creates many function
+        bindings, but does not call them very often.
+
+        This is a 60% speed up in the included js/regress test.
+
+        * builtins/BuiltinExecutables.cpp:
+        (JSC::BuiltinExecutables::createBuiltinExecutable):
+        * builtins/Function.prototype.js:
+        (bind.bindingFunction):
+        (bind.else.switch.case.1.bindingFunction.bindingFunction.bindingFunction.boundOversizedCallThunk):
+        (bind.else.switch.case.1.bindingFunction):
+        (bind.else.switch.case.2.bindingFunction.bindingFunction.bindingFunction.boundOversizedCallThunk):
+        (bind.else.switch.case.2.bindingFunction):
+        (bind.else.switch.case.3.bindingFunction.bindingFunction.bindingFunction.boundOversizedCallThunk):
+        (bind.else.switch.case.3.bindingFunction):
+        (bind.else.switch.bindingFunction):
+        (bind):
+        (bind.else.switch.case.1.bindingFunction.oversizedCall): Deleted.
+        (bind.else.switch.case.2.bindingFunction.oversizedCall): Deleted.
+        (bind.else.switch.case.3.bindingFunction.oversizedCall): Deleted.
+        * runtime/CommonIdentifiers.h:
+
</ins><span class="cx"> 2014-04-14  Julien Brianceau  &lt;jbriance@cisco.com&gt;
</span><span class="cx"> 
</span><span class="cx">         [sh4] Allow use of SubImmediates in LLINT.
</span></span></pre></div>
<a id="trunkSourceJavaScriptCorebuiltinsFunctionprototypejs"></a>
<div class="modfile"><h4>Modified: trunk/Source/JavaScriptCore/builtins/Function.prototype.js (167271 => 167272)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/JavaScriptCore/builtins/Function.prototype.js        2014-04-14 21:51:17 UTC (rev 167271)
+++ trunk/Source/JavaScriptCore/builtins/Function.prototype.js        2014-04-14 22:05:44 UTC (rev 167272)
</span><span class="lines">@@ -40,9 +40,10 @@
</span><span class="cx">     if (typeof boundFunction !== &quot;function&quot;)
</span><span class="cx">         throw new @TypeError(&quot;Cannot bind non-function object.&quot;);
</span><span class="cx">     var bindingFunction;
</span><del>-    var oversizedCall = undefined;
</del><span class="cx">     if (arguments.length &lt;= 1) {
</span><del>-        bindingFunction = function () {
</del><ins>+        bindingFunction = function bindingFunction() {
+            var thisValue = bindingFunction.@boundThisValue;
+            var boundFunction = bindingFunction.@boundFunction;
</ins><span class="cx">             if (@IsConstructor)
</span><span class="cx">                 return new boundFunction(...arguments);
</span><span class="cx">             return boundFunction.@apply(thisValue, arguments);
</span><span class="lines">@@ -51,8 +52,10 @@
</span><span class="cx">         var length = arguments.length;
</span><span class="cx">         switch (length - 1 /* skip thisValue */) {
</span><span class="cx">         case 1: {
</span><del>-            var boundParameter = arguments[1];
-            bindingFunction = function () {
</del><ins>+            bindingFunction = function bindingFunction() {
+                var thisValue = bindingFunction.@boundThisValue;
+                var boundFunction = bindingFunction.@boundFunction;
+                var boundParameter = bindingFunction.@boundParameter;
</ins><span class="cx">                 var argumentLength = arguments.length;
</span><span class="cx">                 if (!argumentLength) {
</span><span class="cx">                     if (@IsConstructor)
</span><span class="lines">@@ -75,21 +78,24 @@
</span><span class="cx">                     return boundFunction.@call(thisValue, boundParameter, arguments[0], arguments[1], arguments[2]);
</span><span class="cx">                 }
</span><span class="cx">                 var completeArguments = [boundParameter, ...arguments];
</span><del>-                if (!oversizedCall) {
-                    oversizedCall = function (isConstruct, boundFunction, thisValue, completeArguments) {
</del><ins>+                if (!bindingFunction.@boundOversizedCallThunk) {
+                   bindingFunction.@boundOversizedCallThunk = function (isConstruct, boundFunction, thisValue, completeArguments) {
</ins><span class="cx">                         if (isConstruct)
</span><span class="cx">                             return new boundFunction(...completeArguments);
</span><span class="cx">                         return boundFunction.@apply(thisValue, completeArguments);
</span><span class="cx">                     }
</span><span class="cx">                 }
</span><del>-                return oversizedCall(@IsConstructor, boundFunction, thisValue, completeArguments);
</del><ins>+                return bindingFunction.@boundOversizedCallThunk(@IsConstructor, boundFunction, thisValue, completeArguments);
</ins><span class="cx">             }
</span><ins>+            bindingFunction.@boundParameter = arguments[1];
</ins><span class="cx">             break;
</span><span class="cx">         }
</span><span class="cx">         case 2: {
</span><del>-            var boundParameter1 = arguments[1];
-            var boundParameter2 = arguments[2];
-            bindingFunction = function () {
</del><ins>+            bindingFunction = function bindingFunction() {
+                var thisValue = bindingFunction.@boundThisValue;
+                var boundFunction = bindingFunction.@boundFunction;
+                var boundParameter1 = bindingFunction.@boundParameter1;
+                var boundParameter2 = bindingFunction.@boundParameter2;
</ins><span class="cx">                 if (!arguments.length) {
</span><span class="cx">                     if (@IsConstructor)
</span><span class="cx">                         return new boundFunction(boundParameter1, boundParameter2);
</span><span class="lines">@@ -111,22 +117,26 @@
</span><span class="cx">                     return boundFunction.@call(thisValue, boundParameter1, boundParameter2, arguments[0], arguments[1], arguments[2]);
</span><span class="cx">                 }
</span><span class="cx">                 var completeArguments = [boundParameter1, boundParameter2, ...arguments];
</span><del>-                if (!oversizedCall) {
-                    oversizedCall = function (isConstruct, boundFunction, thisValue, completeArguments) {
</del><ins>+                if (!bindingFunction.@boundOversizedCallThunk) {
+                    bindingFunction.@boundOversizedCallThunk = function (isConstruct, boundFunction, thisValue, completeArguments) {
</ins><span class="cx">                         if (isConstruct)
</span><span class="cx">                             return new boundFunction(...completeArguments);
</span><span class="cx">                         return boundFunction.@apply(thisValue, completeArguments);
</span><span class="cx">                     }
</span><span class="cx">                 }
</span><del>-                return oversizedCall(@IsConstructor, boundFunction, thisValue, completeArguments);
</del><ins>+                return bindingFunction.@boundOversizedCallThunk(@IsConstructor, boundFunction, thisValue, completeArguments);
</ins><span class="cx">             }
</span><ins>+            bindingFunction.@boundParameter1 = arguments[1];
+            bindingFunction.@boundParameter2 = arguments[2];
</ins><span class="cx">             break;
</span><span class="cx">         }
</span><span class="cx">         case 3: {
</span><del>-            var boundParameter1 = arguments[1];
-            var boundParameter2 = arguments[2];
-            var boundParameter3 = arguments[3];
-            bindingFunction = function () {
</del><ins>+            bindingFunction = function bindingFunction() {
+                var thisValue = bindingFunction.@boundThisValue;
+                var boundFunction = bindingFunction.@boundFunction;
+                var boundParameter1 = bindingFunction.@boundParameter1;
+                var boundParameter2 = bindingFunction.@boundParameter2;
+                var boundParameter3 = bindingFunction.@boundParameter3;
</ins><span class="cx">                 if (!arguments.length) {
</span><span class="cx">                     if (@IsConstructor)
</span><span class="cx">                         return new boundFunction(boundParameter1, boundParameter2, boundParameter3);
</span><span class="lines">@@ -148,15 +158,18 @@
</span><span class="cx">                     return boundFunction.@call(thisValue, boundParameter1, boundParameter2, boundParameter3, arguments[0], arguments[1], arguments[2]);
</span><span class="cx">                 }
</span><span class="cx">                 var completeArguments = [boundParameter1, boundParameter2, boundParameter3, ...arguments];
</span><del>-                if (!oversizedCall) {
-                    oversizedCall = function (isConstruct, boundFunction, thisValue, completeArguments) {
</del><ins>+                if (!bindingFunction.@boundOversizedCallThunk) {
+                    bindingFunction.@boundOversizedCallThunk = function (isConstruct, boundFunction, thisValue, completeArguments) {
</ins><span class="cx">                         if (isConstruct)
</span><span class="cx">                             return new boundFunction(...completeArguments);
</span><span class="cx">                         return boundFunction.@apply(thisValue, completeArguments);
</span><span class="cx">                     }
</span><span class="cx">                 }
</span><del>-                return oversizedCall(@IsConstructor, boundFunction, thisValue, completeArguments);
</del><ins>+                return bindingFunction.@boundOversizedCallThunk(@IsConstructor, boundFunction, thisValue, completeArguments);
</ins><span class="cx">             }
</span><ins>+            bindingFunction.@boundParameter1 = arguments[1];
+            bindingFunction.@boundParameter2 = arguments[2];
+            bindingFunction.@boundParameter3 = arguments[3];
</ins><span class="cx">             break;
</span><span class="cx">         }
</span><span class="cx">         default:
</span><span class="lines">@@ -164,18 +177,20 @@
</span><span class="cx">             for (var i = 1; i &lt; length; i++)
</span><span class="cx">                 boundParameters[i - 1] = arguments[i];
</span><span class="cx">             
</span><del>-            bindingFunction = function () {
</del><ins>+            bindingFunction = function bindingFunction() {
+                var thisValue = bindingFunction.@boundThisValue;
+                var boundFunction = bindingFunction.@boundFunction;
+                var boundParameters = bindingFunction.@boundParameters;
</ins><span class="cx">                 if (!arguments.length) {
</span><span class="cx">                     if (@IsConstructor)
</span><del>-                        return new boundFunction(...boundParameters);
</del><ins>+                        return new boundFunction(...@boundParameters);
</ins><span class="cx">                     return boundFunction.@apply(thisValue, boundParameters);
</span><span class="cx">                 }
</span><span class="cx">                 
</span><span class="cx">                 var completeArguments = [];
</span><del>-                var localBoundParameters = boundParameters;
-                var boundLength = localBoundParameters.length;
</del><ins>+                var boundLength = boundParameters.length;
</ins><span class="cx">                 for (var i = 0; i &lt; boundLength; i++)
</span><del>-                    completeArguments[i] = localBoundParameters[i];
</del><ins>+                    completeArguments[i] = boundParameters[i];
</ins><span class="cx">                 for (var i = 0; i &lt; arguments.length; i++)
</span><span class="cx">                     completeArguments[i + boundLength] = arguments[i];
</span><span class="cx">                 if (@IsConstructor)
</span><span class="lines">@@ -183,8 +198,10 @@
</span><span class="cx">                 else
</span><span class="cx">                     return boundFunction.@apply(thisValue, completeArguments);
</span><span class="cx">             }
</span><ins>+            bindingFunction.@boundParameters = boundParameters;
</ins><span class="cx">         }
</span><span class="cx">     }
</span><ins>+    bindingFunction.@boundThisValue = thisValue;
</ins><span class="cx">     bindingFunction.@boundFunctionName = this.name;
</span><span class="cx">     bindingFunction.@boundFunction = boundFunction.@boundFunction || boundFunction;
</span><span class="cx">     var boundLength = boundFunction.length - (arguments.length - 1);
</span></span></pre></div>
<a id="trunkSourceJavaScriptCoreruntimeCommonIdentifiersh"></a>
<div class="modfile"><h4>Modified: trunk/Source/JavaScriptCore/runtime/CommonIdentifiers.h (167271 => 167272)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/JavaScriptCore/runtime/CommonIdentifiers.h        2014-04-14 21:51:17 UTC (rev 167271)
+++ trunk/Source/JavaScriptCore/runtime/CommonIdentifiers.h        2014-04-14 22:05:44 UTC (rev 167272)
</span><span class="lines">@@ -223,6 +223,13 @@
</span><span class="cx">     macro(IsConstructor) \
</span><span class="cx">     macro(boundFunctionName) \
</span><span class="cx">     macro(boundFunctionParameters) \
</span><ins>+    macro(boundThisValue) \
+    macro(boundParameter) \
+    macro(boundParameter1) \
+    macro(boundParameter2) \
+    macro(boundParameter3) \
+    macro(boundParameters) \
+    macro(boundOversizedCallThunk) \
</ins><span class="cx">     macro(boundFunction) \
</span><span class="cx">     macro(boundFunctionLength) \
</span><span class="cx">     macro(prototypeForHasInstance) \
</span></span></pre>
</div>
</div>

</body>
</html>