Title: [258540] trunk/Source/_javascript_Core
Revision
258540
Author
[email protected]
Date
2020-03-16 22:22:41 -0700 (Mon, 16 Mar 2020)

Log Message

[JSC] JSMapIterator and JSSetIterator are CellType
https://bugs.webkit.org/show_bug.cgi?id=209168
<rdar://problem/59705631>

Reviewed by Saam Barati.

They are JSCell, not JSObject since they are not used as a user-observable set/map iterators in JSC.
However, their JSType is ObjectType. They should use CellType instead.

* runtime/JSMapIterator.h:
* runtime/JSSetIterator.h:

Modified Paths

Diff

Modified: trunk/Source/_javascript_Core/ChangeLog (258539 => 258540)


--- trunk/Source/_javascript_Core/ChangeLog	2020-03-17 05:09:56 UTC (rev 258539)
+++ trunk/Source/_javascript_Core/ChangeLog	2020-03-17 05:22:41 UTC (rev 258540)
@@ -1,3 +1,17 @@
+2020-03-16  Yusuke Suzuki  <[email protected]>
+
+        [JSC] JSMapIterator and JSSetIterator are CellType
+        https://bugs.webkit.org/show_bug.cgi?id=209168
+        <rdar://problem/59705631>
+
+        Reviewed by Saam Barati.
+
+        They are JSCell, not JSObject since they are not used as a user-observable set/map iterators in JSC.
+        However, their JSType is ObjectType. They should use CellType instead.
+
+        * runtime/JSMapIterator.h:
+        * runtime/JSSetIterator.h:
+
 2020-03-16  Keith Miller  <[email protected]>
 
         _javascript_ identifier grammar supports unescaped astral symbols, but JSC doesn’t

Modified: trunk/Source/_javascript_Core/runtime/JSMapIterator.h (258539 => 258540)


--- trunk/Source/_javascript_Core/runtime/JSMapIterator.h	2020-03-17 05:09:56 UTC (rev 258539)
+++ trunk/Source/_javascript_Core/runtime/JSMapIterator.h	2020-03-17 05:22:41 UTC (rev 258540)
@@ -32,6 +32,8 @@
 namespace JSC {
 
 // Now, it is only used for serialization.
+// FIXME: We should use JSInternalFieldObjectImpl to implement real JSMapIterator used in JSC.
+// Currently, JSC is using final objects to implement MapIterator.
 class JSMapIterator final : public JSCell {
     typedef HashMapBucket<HashMapBucketDataKeyValue> HashMapBucketType;
 public:
@@ -47,7 +49,7 @@
 
     static Structure* createStructure(VM& vm, JSGlobalObject* globalObject, JSValue prototype)
     {
-        return Structure::create(vm, globalObject, prototype, TypeInfo(ObjectType, StructureFlags), info());
+        return Structure::create(vm, globalObject, prototype, TypeInfo(CellType, StructureFlags), info());
     }
 
     static JSMapIterator* create(VM& vm, Structure* structure, JSMap* iteratedObject, IterationKind kind)

Modified: trunk/Source/_javascript_Core/runtime/JSSetIterator.h (258539 => 258540)


--- trunk/Source/_javascript_Core/runtime/JSSetIterator.h	2020-03-17 05:09:56 UTC (rev 258539)
+++ trunk/Source/_javascript_Core/runtime/JSSetIterator.h	2020-03-17 05:22:41 UTC (rev 258540)
@@ -32,6 +32,8 @@
 namespace JSC {
 
 // Now, it is only used for serialization.
+// FIXME: We should use JSInternalFieldObjectImpl to implement real JSSetIterator used in JSC.
+// Currently, JSC is using final objects to implement SetIterator.
 class JSSetIterator final : public JSCell {
     typedef HashMapBucket<HashMapBucketDataKey> HashMapBucketType;
 public:
@@ -47,7 +49,7 @@
 
     static Structure* createStructure(VM& vm, JSGlobalObject* globalObject, JSValue prototype)
     {
-        return Structure::create(vm, globalObject, prototype, TypeInfo(ObjectType, StructureFlags), info());
+        return Structure::create(vm, globalObject, prototype, TypeInfo(CellType, StructureFlags), info());
     }
 
     static JSSetIterator* create(VM& vm, Structure* structure, JSSet* iteratedObject, IterationKind kind)
_______________________________________________
webkit-changes mailing list
[email protected]
https://lists.webkit.org/mailman/listinfo/webkit-changes

Reply via email to