Diff
Modified: trunk/LayoutTests/ChangeLog (200427 => 200428)
--- trunk/LayoutTests/ChangeLog 2016-05-04 20:32:06 UTC (rev 200427)
+++ trunk/LayoutTests/ChangeLog 2016-05-04 20:49:26 UTC (rev 200428)
@@ -1,5 +1,17 @@
2016-05-04 Keith Miller <[email protected]>
+ Corrections to r200422
+ https://bugs.webkit.org/show_bug.cgi?id=157351
+
+ Reviewed by Joseph Pecoraro.
+
+ Test case had some code changed that was not intended.
+
+ * js/regress/script-tests/deltablue-for-of.js:
+ (deltaBlue):
+
+2016-05-04 Keith Miller <[email protected]>
+
Unreviewed, reland r200149 since the rollout had inconclusive PLT AB testing results.
2016-05-04 Joseph Pecoraro <[email protected]>
Modified: trunk/LayoutTests/js/regress/script-tests/deltablue-for-of.js (200427 => 200428)
--- trunk/LayoutTests/js/regress/script-tests/deltablue-for-of.js 2016-05-04 20:32:06 UTC (rev 200427)
+++ trunk/LayoutTests/js/regress/script-tests/deltablue-for-of.js 2016-05-04 20:49:26 UTC (rev 200428)
@@ -862,9 +862,9 @@
var planner = null;
function deltaBlue() {
- chainTest(100);
- projectionTest(100);
+ chainTest(50);
+ projectionTest(50);
}
-//for (var i = 0; i < 100; ++i)
-// deltaBlue();
+for (var i = 0; i < 100; ++i)
+ deltaBlue();
Modified: trunk/Source/_javascript_Core/ChangeLog (200427 => 200428)
--- trunk/Source/_javascript_Core/ChangeLog 2016-05-04 20:32:06 UTC (rev 200427)
+++ trunk/Source/_javascript_Core/ChangeLog 2016-05-04 20:49:26 UTC (rev 200428)
@@ -1,5 +1,32 @@
2016-05-04 Keith Miller <[email protected]>
+ Corrections to r200422
+ https://bugs.webkit.org/show_bug.cgi?id=157351
+
+ Reviewed by Joseph Pecoraro.
+
+ Fix some typos in various files. Also, make separate error messages
+ for the this value being undefined vs null in the ArrayIteratorprototype
+ next function and add test.
+
+ * Scripts/builtins/builtins_model.py:
+ * builtins/ArrayIteratorPrototype.js:
+ (next):
+ (arrayIteratorValueNext):
+ (arrayIteratorKeyNext):
+ (arrayIteratorKeyValueNext):
+ * builtins/ArrayPrototype.js:
+ (keys):
+ (entries):
+ * builtins/TypedArrayPrototype.js:
+ * runtime/JSGlobalObject.cpp:
+ (JSC::JSGlobalObject::init): Deleted.
+ * tests/stress/array-iterators-next-error-messages.js: Added.
+ (assert):
+ (catch):
+
+2016-05-04 Keith Miller <[email protected]>
+
Unreviewed, reland r200149 since the rollout had inconclusive PLT AB testing results.
2016-05-04 Mark Lam <[email protected]>
Modified: trunk/Source/_javascript_Core/Scripts/builtins/builtins_model.py (200427 => 200428)
--- trunk/Source/_javascript_Core/Scripts/builtins/builtins_model.py 2016-05-04 20:32:06 UTC (rev 200427)
+++ trunk/Source/_javascript_Core/Scripts/builtins/builtins_model.py 2016-05-04 20:49:26 UTC (rev 200428)
@@ -40,11 +40,11 @@
},
}
-functionHeadRegExp = re.compile(r"(?:@[\w|=]+\s*\n)*(?:function)\s+\w+\s*\(.*?\)", re.MULTILINE | re.DOTALL)
+functionHeadRegExp = re.compile(r"(?:@[\w|=]+\s*\n)*function\s+\w+\s*\(.*?\)", re.MULTILINE | re.DOTALL)
functionIntrinsicRegExp = re.compile(r"^@intrinsic=(\w+)\s*\n", re.MULTILINE | re.DOTALL)
functionIsConstructorRegExp = re.compile(r"^@constructor", re.MULTILINE | re.DOTALL)
-functionNameRegExp = re.compile(r"(?:function)\s+(\w+)\s*\(", re.MULTILINE | re.DOTALL)
-functionParameterFinder = re.compile(r"^(?:function)\s+(?:\w+)\s*\(((?:\s*\w+)?\s*(?:\s*,\s*\w+)*)?\s*\)", re.MULTILINE | re.DOTALL)
+functionNameRegExp = re.compile(r"function\s+(\w+)\s*\(", re.MULTILINE | re.DOTALL)
+functionParameterFinder = re.compile(r"^function\s+(?:\w+)\s*\(((?:\s*\w+)?\s*(?:\s*,\s*\w+)*)?\s*\)", re.MULTILINE | re.DOTALL)
multilineCommentRegExp = re.compile(r"\/\*.*?\*\/", re.MULTILINE | re.DOTALL)
singleLineCommentRegExp = re.compile(r"\/\/.*?\n", re.MULTILINE | re.DOTALL)
Modified: trunk/Source/_javascript_Core/builtins/ArrayIteratorPrototype.js (200427 => 200428)
--- trunk/Source/_javascript_Core/builtins/ArrayIteratorPrototype.js 2016-05-04 20:32:06 UTC (rev 200427)
+++ trunk/Source/_javascript_Core/builtins/ArrayIteratorPrototype.js 2016-05-04 20:49:26 UTC (rev 200428)
@@ -1,6 +1,6 @@
/*
* Copyright (C) 2015 Yusuke Suzuki <[email protected]>.
- * Copyright (C) 2016a Apple Inc. All rights reserved.
+ * Copyright (C) 2016 Apple Inc. All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions
@@ -28,12 +28,15 @@
{
"use strict";
- if (this == null)
- throw @TypeError("%ArrayIteratorPrototype%.next requires that |this| not be null or undefined");
+ if (this == null) {
+ if (this === null)
+ throw new @TypeError("%ArrayIteratorPrototype%.next requires that |this| not be null");
+ throw new @TypeError("%ArrayIteratorPrototype%.next requires that |this| not be undefined");
+ }
let next = this.@arrayIteratorNext;
if (next === @undefined)
- throw @TypeError("%ArrayIteratorPrototype%.next requires that |this| be an Array Iterator instance");
+ throw new @TypeError("%ArrayIteratorPrototype%.next requires that |this| be an Array Iterator instance");
return next.@call(this);
}
@@ -42,7 +45,7 @@
{
"use strict";
var done = true;
- var value = @undefined;
+ var value;
var array = this.@iteratedObject;
if (!this.@arrayIteratorIsDone) {
@@ -64,7 +67,7 @@
{
"use strict";
var done = true;
- var value = @undefined;
+ var value;
var array = this.@iteratedObject;
if (!this.@arrayIteratorIsDone) {
@@ -86,7 +89,7 @@
{
"use strict";
var done = true;
- var value = @undefined;
+ var value;
var array = this.@iteratedObject;
if (!this.@arrayIteratorIsDone) {
Modified: trunk/Source/_javascript_Core/builtins/ArrayPrototype.js (200427 => 200428)
--- trunk/Source/_javascript_Core/builtins/ArrayPrototype.js 2016-05-04 20:32:06 UTC (rev 200427)
+++ trunk/Source/_javascript_Core/builtins/ArrayPrototype.js 2016-05-04 20:49:26 UTC (rev 200428)
@@ -50,7 +50,7 @@
if (this == null) {
if (this === null)
throw new @TypeError("Array.prototype.keys requires that |this| not be null");
- throw new @TypeError("Array.prototype.keys requires that |this| not be null");
+ throw new @TypeError("Array.prototype.keys requires that |this| not be undefined");
}
return new @createArrayIterator(@Object(this), @arrayIteratorKeyNext);
@@ -62,7 +62,7 @@
if (this == null) {
if (this === null)
throw new @TypeError("Array.prototype.entries requires that |this| not be null");
- throw new @TypeError("Array.prototype.entries requires that |this| not be null");
+ throw new @TypeError("Array.prototype.entries requires that |this| not be undefined");
}
return new @createArrayIterator(@Object(this), @arrayIteratorKeyValueNext);
Modified: trunk/Source/_javascript_Core/builtins/TypedArrayPrototype.js (200427 => 200428)
--- trunk/Source/_javascript_Core/builtins/TypedArrayPrototype.js 2016-05-04 20:32:06 UTC (rev 200427)
+++ trunk/Source/_javascript_Core/builtins/TypedArrayPrototype.js 2016-05-04 20:49:26 UTC (rev 200428)
@@ -23,7 +23,7 @@
* OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*/
-// Note that the intrisic @typedArrayLength checks the that the argument passed is a typed array
+// Note that the intrisic @typedArrayLength checks that the argument passed is a typed array
// and throws if it is not.
function values()
Modified: trunk/Source/_javascript_Core/runtime/JSGlobalObject.cpp (200427 => 200428)
--- trunk/Source/_javascript_Core/runtime/JSGlobalObject.cpp 2016-05-04 20:32:06 UTC (rev 200427)
+++ trunk/Source/_javascript_Core/runtime/JSGlobalObject.cpp 2016-05-04 20:49:26 UTC (rev 200428)
@@ -567,7 +567,6 @@
JSFunction* privateFuncArrayIteratorKeyNext = JSFunction::createBuiltinFunction(vm, arrayIteratorPrototypeArrayIteratorKeyNextCodeGenerator(vm), this);
JSFunction* privateFuncArrayIteratorKeyValueNext = JSFunction::createBuiltinFunction(vm, arrayIteratorPrototypeArrayIteratorKeyValueNextCodeGenerator(vm), this);
-
JSObject* regExpProtoFlagsGetterObject = getGetterById(exec, m_regExpPrototype.get(), vm.propertyNames->flags);
JSObject* regExpProtoGlobalGetterObject = getGetterById(exec, m_regExpPrototype.get(), vm.propertyNames->global);
m_regExpProtoGlobalGetter.set(vm, this, regExpProtoGlobalGetterObject);
Added: trunk/Source/_javascript_Core/tests/stress/array-iterators-next-error-messages.js (0 => 200428)
--- trunk/Source/_javascript_Core/tests/stress/array-iterators-next-error-messages.js (rev 0)
+++ trunk/Source/_javascript_Core/tests/stress/array-iterators-next-error-messages.js 2016-05-04 20:49:26 UTC (rev 200428)
@@ -0,0 +1,18 @@
+function assert(a, b) {
+ if (a != b)
+ throw new Error("assertion failed");
+}
+
+next = [].values().next;
+
+try {
+ next.call(null);
+} catch(e) {
+ assert(e, "TypeError: %ArrayIteratorPrototype%.next requires that |this| not be null");
+}
+
+try {
+ next.call(undefined);
+} catch(e) {
+ assert(e, "TypeError: %ArrayIteratorPrototype%.next requires that |this| not be undefined");
+}