Title: [274400] trunk/Source/_javascript_Core
Revision
274400
Author
[email protected]
Date
2021-03-14 11:46:15 -0700 (Sun, 14 Mar 2021)

Log Message

GCSegmentedArray's size() and isEmpty() methods should be const.
https://bugs.webkit.org/show_bug.cgi?id=223156

Reviewed by Keith Miller.

* heap/GCSegmentedArray.h:
* heap/GCSegmentedArrayInlines.h:
(JSC::GCSegmentedArray<T>::isEmpty const):
(JSC::GCSegmentedArray<T>::size const):
(JSC::GCSegmentedArray<T>::isEmpty): Deleted.
(JSC::GCSegmentedArray<T>::size): Deleted.

Modified Paths

Diff

Modified: trunk/Source/_javascript_Core/ChangeLog (274399 => 274400)


--- trunk/Source/_javascript_Core/ChangeLog	2021-03-14 18:19:00 UTC (rev 274399)
+++ trunk/Source/_javascript_Core/ChangeLog	2021-03-14 18:46:15 UTC (rev 274400)
@@ -1,3 +1,17 @@
+2021-03-14  Mark Lam  <[email protected]>
+
+        GCSegmentedArray's size() and isEmpty() methods should be const.
+        https://bugs.webkit.org/show_bug.cgi?id=223156
+
+        Reviewed by Keith Miller.
+
+        * heap/GCSegmentedArray.h:
+        * heap/GCSegmentedArrayInlines.h:
+        (JSC::GCSegmentedArray<T>::isEmpty const):
+        (JSC::GCSegmentedArray<T>::size const):
+        (JSC::GCSegmentedArray<T>::isEmpty): Deleted.
+        (JSC::GCSegmentedArray<T>::size): Deleted.
+
 2021-03-14  Yusuke Suzuki  <[email protected]>
 
         [JSC] wasm atomic wait offset is not index

Modified: trunk/Source/_javascript_Core/heap/GCSegmentedArray.h (274399 => 274400)


--- trunk/Source/_javascript_Core/heap/GCSegmentedArray.h	2021-03-14 18:19:00 UTC (rev 274399)
+++ trunk/Source/_javascript_Core/heap/GCSegmentedArray.h	2021-03-14 18:46:15 UTC (rev 274400)
@@ -1,5 +1,5 @@
 /*
- * Copyright (C) 2014-2019 Apple Inc. All rights reserved.
+ * Copyright (C) 2014-2021 Apple Inc. All rights reserved.
  *
  * Redistribution and use in source and binary forms, with or without
  * modification, are permitted provided that the following conditions
@@ -81,8 +81,8 @@
     const T removeLast();
     bool refill();
     
-    size_t size();
-    bool isEmpty();
+    size_t size() const;
+    bool isEmpty() const;
 
     void fillVector(Vector<T>&);
     void clear();

Modified: trunk/Source/_javascript_Core/heap/GCSegmentedArrayInlines.h (274399 => 274400)


--- trunk/Source/_javascript_Core/heap/GCSegmentedArrayInlines.h	2021-03-14 18:19:00 UTC (rev 274399)
+++ trunk/Source/_javascript_Core/heap/GCSegmentedArrayInlines.h	2021-03-14 18:46:15 UTC (rev 274400)
@@ -1,5 +1,5 @@
 /*
- * Copyright (C) 2014 Apple Inc. All rights reserved.
+ * Copyright (C) 2014-2021 Apple Inc. All rights reserved.
  *
  * Redistribution and use in source and binary forms, with or without
  * modification, are permitted provided that the following conditions
@@ -207,7 +207,7 @@
 }
 
 template <typename T>
-inline bool GCSegmentedArray<T>::isEmpty()
+inline bool GCSegmentedArray<T>::isEmpty() const
 {
     // This happens to be safe to call concurrently. It's important to preserve that capability.
     if (m_top)
@@ -218,7 +218,7 @@
 }
 
 template <typename T>
-inline size_t GCSegmentedArray<T>::size()
+inline size_t GCSegmentedArray<T>::size() const
 {
     return m_top + s_segmentCapacity * (m_numberOfSegments - 1);
 }
_______________________________________________
webkit-changes mailing list
[email protected]
https://lists.webkit.org/mailman/listinfo/webkit-changes

Reply via email to