Title: [161395] branches/jsCStack/Source/_javascript_Core
- Revision
- 161395
- Author
- [email protected]
- Date
- 2014-01-06 19:52:38 -0800 (Mon, 06 Jan 2014)
Log Message
Finish merging r160292: add more forgotten files.
* tests/stress/fold-typed-array-properties.js: Added.
Modified Paths
Added Paths
Diff
Modified: branches/jsCStack/Source/_javascript_Core/ChangeLog (161394 => 161395)
--- branches/jsCStack/Source/_javascript_Core/ChangeLog 2014-01-07 03:44:31 UTC (rev 161394)
+++ branches/jsCStack/Source/_javascript_Core/ChangeLog 2014-01-07 03:52:38 UTC (rev 161395)
@@ -1,5 +1,11 @@
2014-01-06 Filip Pizlo <[email protected]>
+ Finish merging r160292: add more forgotten files.
+
+ * tests/stress/fold-typed-array-properties.js: Added.
+
+2014-01-06 Filip Pizlo <[email protected]>
+
Finish merging r160292: add forgotten files.
* dfg/DFGStrengthReductionPhase.cpp: Added.
Added: branches/jsCStack/Source/_javascript_Core/tests/stress/fold-typed-array-properties.js (0 => 161395)
--- branches/jsCStack/Source/_javascript_Core/tests/stress/fold-typed-array-properties.js (rev 0)
+++ branches/jsCStack/Source/_javascript_Core/tests/stress/fold-typed-array-properties.js 2014-01-07 03:52:38 UTC (rev 161395)
@@ -0,0 +1,39 @@
+var a = new Int32Array(new ArrayBuffer(100), 4, 1);
+
+if (a.length != 1)
+ throw "Error: bad length: " + a.length;
+if (a.byteOffset != 4)
+ throw "Error: bad offset: " + a.byteOffset;
+if (a.byteLength != 4)
+ throw "Error: bad byte length: " + a.byteLength;
+
+function foo() {
+ if (a.length != 1)
+ throw "Error: bad length: " + a.length;
+ if (a.byteOffset != 4)
+ throw "Error: bad offset: " + a.byteOffset;
+ if (a.byteLength != 4)
+ throw "Error: bad byte length: " + a.byteLength;
+}
+
+for (var i = 0; i < 1000000; ++i)
+ foo();
+
+transferArrayBuffer(a.buffer);
+
+var didThrow = false;
+try {
+ foo();
+} catch (e) {
+ didThrow = true;
+}
+
+if (!didThrow)
+ throw "Should have thrown.";
+
+if (a.length != 0)
+ throw "Error: bad length: " + a.length;
+if (a.byteOffset != 0)
+ throw "Error: bad offset: " + a.byteOffset;
+if (a.byteLength != 0)
+ throw "Error: bad byte length: " + a.byteLength;
_______________________________________________
webkit-changes mailing list
[email protected]
https://lists.webkit.org/mailman/listinfo/webkit-changes