Title: [249959] trunk
- Revision
- 249959
- Author
- [email protected]
- Date
- 2019-09-17 09:32:11 -0700 (Tue, 17 Sep 2019)
Log Message
CheckArray on DirectArguments/ScopedArguments does not filter out slow put array storage
https://bugs.webkit.org/show_bug.cgi?id=201853
<rdar://problem/53805461>
Reviewed by Yusuke Suzuki.
JSTests:
* stress/direct-arguments-check-array-filter-type.js: Added.
(foo):
Source/_javascript_Core:
We were claiming CheckArray for ScopedArguments/DirectArguments was filtering
out SlowPutArrayStorage. It does no such thing. We just check that the object
is either ScopedArguments/DirectArguments.
* dfg/DFGArrayMode.h:
(JSC::DFG::ArrayMode::arrayModesThatPassFiltering const):
(JSC::DFG::ArrayMode::arrayModesWithIndexingShapes const):
(JSC::DFG::ArrayMode::arrayModesWithIndexingShape const): Deleted.
Modified Paths
Added Paths
Diff
Modified: trunk/JSTests/ChangeLog (249958 => 249959)
--- trunk/JSTests/ChangeLog 2019-09-17 16:25:35 UTC (rev 249958)
+++ trunk/JSTests/ChangeLog 2019-09-17 16:32:11 UTC (rev 249959)
@@ -1,3 +1,14 @@
+2019-09-17 Saam Barati <[email protected]>
+
+ CheckArray on DirectArguments/ScopedArguments does not filter out slow put array storage
+ https://bugs.webkit.org/show_bug.cgi?id=201853
+ <rdar://problem/53805461>
+
+ Reviewed by Yusuke Suzuki.
+
+ * stress/direct-arguments-check-array-filter-type.js: Added.
+ (foo):
+
2019-09-16 Tadeu Zagallo <[email protected]>
Wasm StreamingParser should validate that number of functions matches number of declarations
Added: trunk/JSTests/stress/direct-arguments-check-array-filter-type.js (0 => 249959)
--- trunk/JSTests/stress/direct-arguments-check-array-filter-type.js (rev 0)
+++ trunk/JSTests/stress/direct-arguments-check-array-filter-type.js 2019-09-17 16:32:11 UTC (rev 249959)
@@ -0,0 +1,12 @@
+//@ runDefault("--jitPolicyScale=0", "--useRandomizingFuzzerAgent=1", "--validateAbstractInterpreterState=1", "--validateAbstractInterpreterStateProbability=1.0", "--useConcurrentJIT=0")
+
+function foo(a0, a1) {
+ Function.__defineSetter__(0, ()=>{});
+ Object.freeze(arguments);
+ for (let i = 0; i < 3; i++) {}
+ arguments[0];
+ const x = 0;
+ const y = 0;
+}
+
+foo();
Modified: trunk/Source/_javascript_Core/ChangeLog (249958 => 249959)
--- trunk/Source/_javascript_Core/ChangeLog 2019-09-17 16:25:35 UTC (rev 249958)
+++ trunk/Source/_javascript_Core/ChangeLog 2019-09-17 16:32:11 UTC (rev 249959)
@@ -1,3 +1,20 @@
+2019-09-17 Saam Barati <[email protected]>
+
+ CheckArray on DirectArguments/ScopedArguments does not filter out slow put array storage
+ https://bugs.webkit.org/show_bug.cgi?id=201853
+ <rdar://problem/53805461>
+
+ Reviewed by Yusuke Suzuki.
+
+ We were claiming CheckArray for ScopedArguments/DirectArguments was filtering
+ out SlowPutArrayStorage. It does no such thing. We just check that the object
+ is either ScopedArguments/DirectArguments.
+
+ * dfg/DFGArrayMode.h:
+ (JSC::DFG::ArrayMode::arrayModesThatPassFiltering const):
+ (JSC::DFG::ArrayMode::arrayModesWithIndexingShapes const):
+ (JSC::DFG::ArrayMode::arrayModesWithIndexingShape const): Deleted.
+
2019-09-16 Tadeu Zagallo <[email protected]>
Wasm StreamingParser should validate that number of functions matches number of declarations
Modified: trunk/Source/_javascript_Core/dfg/DFGArrayMode.h (249958 => 249959)
--- trunk/Source/_javascript_Core/dfg/DFGArrayMode.h 2019-09-17 16:25:35 UTC (rev 249958)
+++ trunk/Source/_javascript_Core/dfg/DFGArrayMode.h 2019-09-17 16:32:11 UTC (rev 249959)
@@ -430,21 +430,21 @@
case Array::Generic:
return ALL_ARRAY_MODES;
case Array::Int32:
- result = arrayModesWithIndexingShape(Int32Shape);
+ result = arrayModesWithIndexingShapes(Int32Shape);
break;
case Array::Double:
- result = arrayModesWithIndexingShape(DoubleShape);
+ result = arrayModesWithIndexingShapes(DoubleShape);
break;
case Array::Contiguous:
- result = arrayModesWithIndexingShape(ContiguousShape);
+ result = arrayModesWithIndexingShapes(ContiguousShape);
break;
case Array::ArrayStorage:
- return arrayModesWithIndexingShape(ArrayStorageShape);
+ return arrayModesWithIndexingShapes(ArrayStorageShape);
case Array::SlowPutArrayStorage:
return arrayModesWithIndexingShapes(SlowPutArrayStorageShape, ArrayStorageShape);
case Array::DirectArguments:
case Array::ScopedArguments:
- return arrayModesWithIndexingShapes(ArrayStorageShape, NonArray);
+ return arrayModesWithIndexingShapes(ArrayStorageShape, SlowPutArrayStorageShape, NonArray);
case Array::Int8Array:
return Int8ArrayMode;
case Array::Int16Array:
@@ -512,7 +512,7 @@
u.asWord = word;
}
- ArrayModes arrayModesWithIndexingShape(IndexingType shape) const
+ ArrayModes arrayModesWithIndexingShapes(IndexingType shape) const
{
switch (arrayClass()) {
case Array::NonArray:
@@ -537,10 +537,11 @@
}
}
- ArrayModes arrayModesWithIndexingShapes(IndexingType shape1, IndexingType shape2) const
+ template <typename... Args>
+ ArrayModes arrayModesWithIndexingShapes(IndexingType shape1, Args... args) const
{
- ArrayModes arrayMode1 = arrayModesWithIndexingShape(shape1);
- ArrayModes arrayMode2 = arrayModesWithIndexingShape(shape2);
+ ArrayModes arrayMode1 = arrayModesWithIndexingShapes(shape1);
+ ArrayModes arrayMode2 = arrayModesWithIndexingShapes(args...);
return arrayMode1 | arrayMode2;
}
_______________________________________________
webkit-changes mailing list
[email protected]
https://lists.webkit.org/mailman/listinfo/webkit-changes