Title: [167297] trunk
Revision
167297
Author
commit-qu...@webkit.org
Date
2014-04-14 23:13:17 -0700 (Mon, 14 Apr 2014)

Log Message

Unreviewed, rolling out r167272.
https://bugs.webkit.org/show_bug.cgi?id=131666

Broke multiple tests (Requested by ap on #webkit).

Reverted changeset:

"Function.bind itself is too slow"
https://bugs.webkit.org/show_bug.cgi?id=131636
http://trac.webkit.org/changeset/167272

Modified Paths

Removed Paths

Diff

Modified: trunk/LayoutTests/ChangeLog (167296 => 167297)


--- trunk/LayoutTests/ChangeLog	2014-04-15 05:47:22 UTC (rev 167296)
+++ trunk/LayoutTests/ChangeLog	2014-04-15 06:13:17 UTC (rev 167297)
@@ -1,3 +1,16 @@
+2014-04-14  Commit Queue  <commit-qu...@webkit.org>
+
+        Unreviewed, rolling out r167272.
+        https://bugs.webkit.org/show_bug.cgi?id=131666
+
+        Broke multiple tests (Requested by ap on #webkit).
+
+        Reverted changeset:
+
+        "Function.bind itself is too slow"
+        https://bugs.webkit.org/show_bug.cgi?id=131636
+        http://trac.webkit.org/changeset/167272
+
 2014-04-14  Jon Honeycutt  <jhoneyc...@apple.com>
 
         Assertion failure under FEImage::determineAbsolutePaintRect()

Deleted: trunk/LayoutTests/js/regress/function-bind-create-expected.html (167296 => 167297)


--- trunk/LayoutTests/js/regress/function-bind-create-expected.html	2014-04-15 05:47:22 UTC (rev 167296)
+++ trunk/LayoutTests/js/regress/function-bind-create-expected.html	2014-04-15 06:13:17 UTC (rev 167297)
@@ -1,10 +0,0 @@
-JSRegress/function-bind
-
-On success, you will see a series of "PASS" messages, followed by "TEST COMPLETE".
-
-
-PASS no exception thrown
-PASS successfullyParsed is true
-
-TEST COMPLETE
-

Deleted: trunk/LayoutTests/js/regress/function-bind-create.html (167296 => 167297)


--- trunk/LayoutTests/js/regress/function-bind-create.html	2014-04-15 05:47:22 UTC (rev 167296)
+++ trunk/LayoutTests/js/regress/function-bind-create.html	2014-04-15 06:13:17 UTC (rev 167297)
@@ -1,12 +0,0 @@
-<!DOCTYPE HTML PUBLIC "-//IETF//DTD HTML//EN">
-<html>
-<head>
-<script src=""
-</head>
-<body>
-<script src=""
-<script src=""
-<script src=""
-<script src=""
-</body>
-</html>

Deleted: trunk/LayoutTests/js/regress/script-tests/function-bind-create.js (167296 => 167297)


--- trunk/LayoutTests/js/regress/script-tests/function-bind-create.js	2014-04-15 05:47:22 UTC (rev 167296)
+++ trunk/LayoutTests/js/regress/script-tests/function-bind-create.js	2014-04-15 06:13:17 UTC (rev 167297)
@@ -1,8 +0,0 @@
-var count = 0;
-function test() { return result ^ (count += 3); }
-var result = 0;
-for (var i = 0; i < 100000; i++)
-     result = result ^ (i * test.bind(1,2)()) + 1;
-
-if (result != 509992157)
-    throw "Bad result: " + result;

Modified: trunk/LayoutTests/js/regress/script-tests/function-bind.js (167296 => 167297)


--- trunk/LayoutTests/js/regress/script-tests/function-bind.js	2014-04-15 05:47:22 UTC (rev 167296)
+++ trunk/LayoutTests/js/regress/script-tests/function-bind.js	2014-04-15 06:13:17 UTC (rev 167297)
@@ -6,6 +6,7 @@
 var g1 = foo.bind({}, 1);
 var g2 = foo.bind({}, 1, 2);
 var g3 = foo.bind({}, 1, 2, 3);
+var start = new Date;
 
 var result = 0;
 for (var i = 0; i < 100000; ++i) {
@@ -22,5 +23,6 @@
     result += g3(i, result);
     result |= 0;
 }
+print((new Date - start))
 if (result != 1596499010)
     throw "Bad result: " + result;

Modified: trunk/Source/_javascript_Core/ChangeLog (167296 => 167297)


--- trunk/Source/_javascript_Core/ChangeLog	2014-04-15 05:47:22 UTC (rev 167296)
+++ trunk/Source/_javascript_Core/ChangeLog	2014-04-15 06:13:17 UTC (rev 167297)
@@ -1,3 +1,16 @@
+2014-04-14  Commit Queue  <commit-qu...@webkit.org>
+
+        Unreviewed, rolling out r167272.
+        https://bugs.webkit.org/show_bug.cgi?id=131666
+
+        Broke multiple tests (Requested by ap on #webkit).
+
+        Reverted changeset:
+
+        "Function.bind itself is too slow"
+        https://bugs.webkit.org/show_bug.cgi?id=131636
+        http://trac.webkit.org/changeset/167272
+
 2014-04-14  Geoffrey Garen  <gga...@apple.com>
 
         ASSERT when firing low memory warning

Modified: trunk/Source/_javascript_Core/builtins/Function.prototype.js (167296 => 167297)


--- trunk/Source/_javascript_Core/builtins/Function.prototype.js	2014-04-15 05:47:22 UTC (rev 167296)
+++ trunk/Source/_javascript_Core/builtins/Function.prototype.js	2014-04-15 06:13:17 UTC (rev 167297)
@@ -40,10 +40,9 @@
     if (typeof boundFunction !== "function")
         throw new @TypeError("Cannot bind non-function object.");
     var bindingFunction;
+    var oversizedCall = undefined;
     if (arguments.length <= 1) {
-        bindingFunction = function bindingFunction() {
-            var thisValue = bindingFunction.@boundThisValue;
-            var boundFunction = bindingFunction.@boundFunction;
+        bindingFunction = function () {
             if (@IsConstructor)
                 return new boundFunction(...arguments);
             return boundFunction.@apply(thisValue, arguments);
@@ -52,10 +51,8 @@
         var length = arguments.length;
         switch (length - 1 /* skip thisValue */) {
         case 1: {
-            bindingFunction = function bindingFunction() {
-                var thisValue = bindingFunction.@boundThisValue;
-                var boundFunction = bindingFunction.@boundFunction;
-                var boundParameter = bindingFunction.@boundParameter;
+            var boundParameter = arguments[1];
+            bindingFunction = function () {
                 var argumentLength = arguments.length;
                 if (!argumentLength) {
                     if (@IsConstructor)
@@ -78,24 +75,21 @@
                     return boundFunction.@call(thisValue, boundParameter, arguments[0], arguments[1], arguments[2]);
                 }
                 var completeArguments = [boundParameter, ...arguments];
-                if (!bindingFunction.@boundOversizedCallThunk) {
-                   bindingFunction.@boundOversizedCallThunk = function (isConstruct, boundFunction, thisValue, completeArguments) {
+                if (!oversizedCall) {
+                    oversizedCall = function (isConstruct, boundFunction, thisValue, completeArguments) {
                         if (isConstruct)
                             return new boundFunction(...completeArguments);
                         return boundFunction.@apply(thisValue, completeArguments);
                     }
                 }
-                return bindingFunction.@boundOversizedCallThunk(@IsConstructor, boundFunction, thisValue, completeArguments);
+                return oversizedCall(@IsConstructor, boundFunction, thisValue, completeArguments);
             }
-            bindingFunction.@boundParameter = arguments[1];
             break;
         }
         case 2: {
-            bindingFunction = function bindingFunction() {
-                var thisValue = bindingFunction.@boundThisValue;
-                var boundFunction = bindingFunction.@boundFunction;
-                var boundParameter1 = bindingFunction.@boundParameter1;
-                var boundParameter2 = bindingFunction.@boundParameter2;
+            var boundParameter1 = arguments[1];
+            var boundParameter2 = arguments[2];
+            bindingFunction = function () {
                 if (!arguments.length) {
                     if (@IsConstructor)
                         return new boundFunction(boundParameter1, boundParameter2);
@@ -117,26 +111,22 @@
                     return boundFunction.@call(thisValue, boundParameter1, boundParameter2, arguments[0], arguments[1], arguments[2]);
                 }
                 var completeArguments = [boundParameter1, boundParameter2, ...arguments];
-                if (!bindingFunction.@boundOversizedCallThunk) {
-                    bindingFunction.@boundOversizedCallThunk = function (isConstruct, boundFunction, thisValue, completeArguments) {
+                if (!oversizedCall) {
+                    oversizedCall = function (isConstruct, boundFunction, thisValue, completeArguments) {
                         if (isConstruct)
                             return new boundFunction(...completeArguments);
                         return boundFunction.@apply(thisValue, completeArguments);
                     }
                 }
-                return bindingFunction.@boundOversizedCallThunk(@IsConstructor, boundFunction, thisValue, completeArguments);
+                return oversizedCall(@IsConstructor, boundFunction, thisValue, completeArguments);
             }
-            bindingFunction.@boundParameter1 = arguments[1];
-            bindingFunction.@boundParameter2 = arguments[2];
             break;
         }
         case 3: {
-            bindingFunction = function bindingFunction() {
-                var thisValue = bindingFunction.@boundThisValue;
-                var boundFunction = bindingFunction.@boundFunction;
-                var boundParameter1 = bindingFunction.@boundParameter1;
-                var boundParameter2 = bindingFunction.@boundParameter2;
-                var boundParameter3 = bindingFunction.@boundParameter3;
+            var boundParameter1 = arguments[1];
+            var boundParameter2 = arguments[2];
+            var boundParameter3 = arguments[3];
+            bindingFunction = function () {
                 if (!arguments.length) {
                     if (@IsConstructor)
                         return new boundFunction(boundParameter1, boundParameter2, boundParameter3);
@@ -158,18 +148,15 @@
                     return boundFunction.@call(thisValue, boundParameter1, boundParameter2, boundParameter3, arguments[0], arguments[1], arguments[2]);
                 }
                 var completeArguments = [boundParameter1, boundParameter2, boundParameter3, ...arguments];
-                if (!bindingFunction.@boundOversizedCallThunk) {
-                    bindingFunction.@boundOversizedCallThunk = function (isConstruct, boundFunction, thisValue, completeArguments) {
+                if (!oversizedCall) {
+                    oversizedCall = function (isConstruct, boundFunction, thisValue, completeArguments) {
                         if (isConstruct)
                             return new boundFunction(...completeArguments);
                         return boundFunction.@apply(thisValue, completeArguments);
                     }
                 }
-                return bindingFunction.@boundOversizedCallThunk(@IsConstructor, boundFunction, thisValue, completeArguments);
+                return oversizedCall(@IsConstructor, boundFunction, thisValue, completeArguments);
             }
-            bindingFunction.@boundParameter1 = arguments[1];
-            bindingFunction.@boundParameter2 = arguments[2];
-            bindingFunction.@boundParameter3 = arguments[3];
             break;
         }
         default:
@@ -177,20 +164,18 @@
             for (var i = 1; i < length; i++)
                 boundParameters[i - 1] = arguments[i];
             
-            bindingFunction = function bindingFunction() {
-                var thisValue = bindingFunction.@boundThisValue;
-                var boundFunction = bindingFunction.@boundFunction;
-                var boundParameters = bindingFunction.@boundParameters;
+            bindingFunction = function () {
                 if (!arguments.length) {
                     if (@IsConstructor)
-                        return new boundFunction(...@boundParameters);
+                        return new boundFunction(...boundParameters);
                     return boundFunction.@apply(thisValue, boundParameters);
                 }
                 
                 var completeArguments = [];
-                var boundLength = boundParameters.length;
+                var localBoundParameters = boundParameters;
+                var boundLength = localBoundParameters.length;
                 for (var i = 0; i < boundLength; i++)
-                    completeArguments[i] = boundParameters[i];
+                    completeArguments[i] = localBoundParameters[i];
                 for (var i = 0; i < arguments.length; i++)
                     completeArguments[i + boundLength] = arguments[i];
                 if (@IsConstructor)
@@ -198,10 +183,8 @@
                 else
                     return boundFunction.@apply(thisValue, completeArguments);
             }
-            bindingFunction.@boundParameters = boundParameters;
         }
     }
-    bindingFunction.@boundThisValue = thisValue;
     bindingFunction.@boundFunctionName = this.name;
     bindingFunction.@boundFunction = boundFunction.@boundFunction || boundFunction;
     var boundLength = boundFunction.length - (arguments.length - 1);

Modified: trunk/Source/_javascript_Core/runtime/CommonIdentifiers.h (167296 => 167297)


--- trunk/Source/_javascript_Core/runtime/CommonIdentifiers.h	2014-04-15 05:47:22 UTC (rev 167296)
+++ trunk/Source/_javascript_Core/runtime/CommonIdentifiers.h	2014-04-15 06:13:17 UTC (rev 167297)
@@ -223,13 +223,6 @@
     macro(IsConstructor) \
     macro(boundFunctionName) \
     macro(boundFunctionParameters) \
-    macro(boundThisValue) \
-    macro(boundParameter) \
-    macro(boundParameter1) \
-    macro(boundParameter2) \
-    macro(boundParameter3) \
-    macro(boundParameters) \
-    macro(boundOversizedCallThunk) \
     macro(boundFunction) \
     macro(boundFunctionLength) \
     macro(prototypeForHasInstance) \
_______________________________________________
webkit-changes mailing list
webkit-changes@lists.webkit.org
https://lists.webkit.org/mailman/listinfo/webkit-changes

Reply via email to