<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN"
"http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head><meta http-equiv="content-type" content="text/html; charset=utf-8" />
<title>[287383] trunk/Source/bmalloc</title>
</head>
<body>

<style type="text/css"><!--
#msg dl.meta { border: 1px #006 solid; background: #369; padding: 6px; color: #fff; }
#msg dl.meta dt { float: left; width: 6em; font-weight: bold; }
#msg dt:after { content:':';}
#msg dl, #msg dt, #msg ul, #msg li, #header, #footer, #logmsg { font-family: verdana,arial,helvetica,sans-serif; font-size: 10pt;  }
#msg dl a { font-weight: bold}
#msg dl a:link    { color:#fc3; }
#msg dl a:active  { color:#ff0; }
#msg dl a:visited { color:#cc6; }
h3 { font-family: verdana,arial,helvetica,sans-serif; font-size: 10pt; font-weight: bold; }
#msg pre { overflow: auto; background: #ffc; border: 1px #fa0 solid; padding: 6px; }
#logmsg { background: #ffc; border: 1px #fa0 solid; padding: 1em 1em 0 1em; }
#logmsg p, #logmsg pre, #logmsg blockquote { margin: 0 0 1em 0; }
#logmsg p, #logmsg li, #logmsg dt, #logmsg dd { line-height: 14pt; }
#logmsg h1, #logmsg h2, #logmsg h3, #logmsg h4, #logmsg h5, #logmsg h6 { margin: .5em 0; }
#logmsg h1:first-child, #logmsg h2:first-child, #logmsg h3:first-child, #logmsg h4:first-child, #logmsg h5:first-child, #logmsg h6:first-child { margin-top: 0; }
#logmsg ul, #logmsg ol { padding: 0; list-style-position: inside; margin: 0 0 0 1em; }
#logmsg ul { text-indent: -1em; padding-left: 1em; }#logmsg ol { text-indent: -1.5em; padding-left: 1.5em; }
#logmsg > ul, #logmsg > ol { margin: 0 0 1em 0; }
#logmsg pre { background: #eee; padding: 1em; }
#logmsg blockquote { border: 1px solid #fa0; border-left-width: 10px; padding: 1em 1em 0 1em; background: white;}
#logmsg dl { margin: 0; }
#logmsg dt { font-weight: bold; }
#logmsg dd { margin: 0; padding: 0 0 0.5em 0; }
#logmsg dd:before { content:'\00bb';}
#logmsg table { border-spacing: 0px; border-collapse: collapse; border-top: 4px solid #fa0; border-bottom: 1px solid #fa0; background: #fff; }
#logmsg table th { text-align: left; font-weight: normal; padding: 0.2em 0.5em; border-top: 1px dotted #fa0; }
#logmsg table td { text-align: right; border-top: 1px dotted #fa0; padding: 0.2em 0.5em; }
#logmsg table thead th { text-align: center; border-bottom: 1px solid #fa0; }
#logmsg table th.Corner { text-align: left; }
#logmsg hr { border: none 0; border-top: 2px dashed #fa0; height: 1px; }
#header, #footer { color: #fff; background: #636; border: 1px #300 solid; padding: 6px; }
#patch { width: 100%; }
#patch h4 {font-family: verdana,arial,helvetica,sans-serif;font-size:10pt;padding:8px;background:#369;color:#fff;margin:0;}
#patch .propset h4, #patch .binary h4 {margin:0;}
#patch pre {padding:0;line-height:1.2em;margin:0;}
#patch .diff {width:100%;background:#eee;padding: 0 0 10px 0;overflow:auto;}
#patch .propset .diff, #patch .binary .diff  {padding:10px 0;}
#patch span {display:block;padding:0 10px;}
#patch .modfile, #patch .addfile, #patch .delfile, #patch .propset, #patch .binary, #patch .copfile {border:1px solid #ccc;margin:10px 0;}
#patch ins {background:#dfd;text-decoration:none;display:block;padding:0 10px;}
#patch del {background:#fdd;text-decoration:none;display:block;padding:0 10px;}
#patch .lines, .info {color:#888;background:#fff;}
--></style>
<div id="msg">
<dl class="meta">
<dt>Revision</dt> <dd><a href="http://trac.webkit.org/projects/webkit/changeset/287383">287383</a></dd>
<dt>Author</dt> <dd>ysuzuki@apple.com</dd>
<dt>Date</dt> <dd>2021-12-22 20:04:25 -0800 (Wed, 22 Dec 2021)</dd>
</dl>

<h3>Log Message</h3>
<pre>[libpas] Make pas_heap_type constant
https://bugs.webkit.org/show_bug.cgi?id=234486

Reviewed by Filip Pizlo.

Currently, pas_heap_type data is placed in __DATA segment since it is not constant.
But they are actually a constant value, so we should put them in __DATA_CONST segment.

Still, we can have mutable type information if we want: we can const-cast the type
in each derived pas_heap_type's functions (and we should define these types with non
constant way). But currently, we have no such a type.

* bmalloc/IsoHeap.h:
(bmalloc::api::IsoHeap::provideHeap):
* bmalloc/bmalloc.cpp:
(bmalloc::api::mallocOutOfLine):
* libpas/src/libpas/bmalloc_heap.c:
* libpas/src/libpas/bmalloc_heap_innards.h:
* libpas/src/libpas/bmalloc_heap_ref.h:
* libpas/src/libpas/bmalloc_type.c:
(bmalloc_type_dump):
(bmalloc_type_as_heap_type_dump):
* libpas/src/libpas/bmalloc_type.h:
(bmalloc_type_size):
(bmalloc_type_alignment):
(bmalloc_type_name):
(bmalloc_type_as_heap_type_get_type_size):
(bmalloc_type_as_heap_type_get_type_alignment):
* libpas/src/libpas/iso_heap.c:
(iso_heap_ref_construct):
(iso_primitive_heap_ref_construct):
* libpas/src/libpas/iso_heap_ref.h:
* libpas/src/libpas/jit_heap_config.c:
(jit_type_dump):
* libpas/src/libpas/jit_heap_config.h:
(jit_type_size):
(jit_type_alignment):
* libpas/src/libpas/pas_heap.h:
* libpas/src/libpas/pas_heap_config.h:
* libpas/src/libpas/pas_heap_ref_prefix.h:
* libpas/src/libpas/pas_large_heap.c:
(allocate_impl):
(pas_large_heap_try_shrink):
* libpas/src/libpas/pas_simple_type.c:
(pas_simple_type_as_heap_type_dump):
* libpas/src/libpas/pas_simple_type.h:
(pas_simple_type_get_key_data):
(pas_simple_type_create_with_key_data):
(pas_simple_type_as_heap_type_get_type_size):
(pas_simple_type_as_heap_type_get_type_alignment):
* libpas/src/libpas/pas_try_allocate.h:
(pas_try_allocate_impl_casual_case):
* libpas/src/libpas/pas_try_allocate_array.h:
* libpas/src/libpas/pas_try_allocate_common.h:
(pas_try_allocate_common_impl_slow):
* libpas/src/libpas/pas_try_allocate_intrinsic.h:
* libpas/src/libpas/pas_try_reallocate.h:
(pas_try_reallocate_array_by_count):
* libpas/src/test/ExpendableMemoryTests.cpp:
* libpas/src/test/IsoHeapChaosTests.cpp:
(std::addAllTests):
* libpas/src/test/ThingyAndUtilityHeapAllocationTests.cpp:
(std::createIsolatedHeapRef):</pre>

<h3>Modified Paths</h3>
<ul>
<li><a href="#trunkSourcebmallocChangeLog">trunk/Source/bmalloc/ChangeLog</a></li>
<li><a href="#trunkSourcebmallocbmallocIsoHeaph">trunk/Source/bmalloc/bmalloc/IsoHeap.h</a></li>
<li><a href="#trunkSourcebmallocbmallocbmalloccpp">trunk/Source/bmalloc/bmalloc/bmalloc.cpp</a></li>
<li><a href="#trunkSourcebmalloclibpassrclibpasbmalloc_heapc">trunk/Source/bmalloc/libpas/src/libpas/bmalloc_heap.c</a></li>
<li><a href="#trunkSourcebmalloclibpassrclibpasbmalloc_heap_innardsh">trunk/Source/bmalloc/libpas/src/libpas/bmalloc_heap_innards.h</a></li>
<li><a href="#trunkSourcebmalloclibpassrclibpasbmalloc_heap_refh">trunk/Source/bmalloc/libpas/src/libpas/bmalloc_heap_ref.h</a></li>
<li><a href="#trunkSourcebmalloclibpassrclibpasbmalloc_typec">trunk/Source/bmalloc/libpas/src/libpas/bmalloc_type.c</a></li>
<li><a href="#trunkSourcebmalloclibpassrclibpasbmalloc_typeh">trunk/Source/bmalloc/libpas/src/libpas/bmalloc_type.h</a></li>
<li><a href="#trunkSourcebmalloclibpassrclibpasiso_heapc">trunk/Source/bmalloc/libpas/src/libpas/iso_heap.c</a></li>
<li><a href="#trunkSourcebmalloclibpassrclibpasiso_heap_refh">trunk/Source/bmalloc/libpas/src/libpas/iso_heap_ref.h</a></li>
<li><a href="#trunkSourcebmalloclibpassrclibpasjit_heap_configc">trunk/Source/bmalloc/libpas/src/libpas/jit_heap_config.c</a></li>
<li><a href="#trunkSourcebmalloclibpassrclibpasjit_heap_configh">trunk/Source/bmalloc/libpas/src/libpas/jit_heap_config.h</a></li>
<li><a href="#trunkSourcebmalloclibpassrclibpaspas_heaph">trunk/Source/bmalloc/libpas/src/libpas/pas_heap.h</a></li>
<li><a href="#trunkSourcebmalloclibpassrclibpaspas_heap_configh">trunk/Source/bmalloc/libpas/src/libpas/pas_heap_config.h</a></li>
<li><a href="#trunkSourcebmalloclibpassrclibpaspas_heap_ref_prefixh">trunk/Source/bmalloc/libpas/src/libpas/pas_heap_ref_prefix.h</a></li>
<li><a href="#trunkSourcebmalloclibpassrclibpaspas_large_heapc">trunk/Source/bmalloc/libpas/src/libpas/pas_large_heap.c</a></li>
<li><a href="#trunkSourcebmalloclibpassrclibpaspas_simple_typec">trunk/Source/bmalloc/libpas/src/libpas/pas_simple_type.c</a></li>
<li><a href="#trunkSourcebmalloclibpassrclibpaspas_simple_typeh">trunk/Source/bmalloc/libpas/src/libpas/pas_simple_type.h</a></li>
<li><a href="#trunkSourcebmalloclibpassrclibpaspas_try_allocateh">trunk/Source/bmalloc/libpas/src/libpas/pas_try_allocate.h</a></li>
<li><a href="#trunkSourcebmalloclibpassrclibpaspas_try_allocate_arrayh">trunk/Source/bmalloc/libpas/src/libpas/pas_try_allocate_array.h</a></li>
<li><a href="#trunkSourcebmalloclibpassrclibpaspas_try_allocate_commonh">trunk/Source/bmalloc/libpas/src/libpas/pas_try_allocate_common.h</a></li>
<li><a href="#trunkSourcebmalloclibpassrclibpaspas_try_allocate_intrinsich">trunk/Source/bmalloc/libpas/src/libpas/pas_try_allocate_intrinsic.h</a></li>
<li><a href="#trunkSourcebmalloclibpassrclibpaspas_try_reallocateh">trunk/Source/bmalloc/libpas/src/libpas/pas_try_reallocate.h</a></li>
<li><a href="#trunkSourcebmalloclibpassrctestExpendableMemoryTestscpp">trunk/Source/bmalloc/libpas/src/test/ExpendableMemoryTests.cpp</a></li>
<li><a href="#trunkSourcebmalloclibpassrctestIsoHeapChaosTestscpp">trunk/Source/bmalloc/libpas/src/test/IsoHeapChaosTests.cpp</a></li>
<li><a href="#trunkSourcebmalloclibpassrctestThingyAndUtilityHeapAllocationTestscpp">trunk/Source/bmalloc/libpas/src/test/ThingyAndUtilityHeapAllocationTests.cpp</a></li>
</ul>

</div>
<div id="patch">
<h3>Diff</h3>
<a id="trunkSourcebmallocChangeLog"></a>
<div class="modfile"><h4>Modified: trunk/Source/bmalloc/ChangeLog (287382 => 287383)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/bmalloc/ChangeLog   2021-12-23 03:10:16 UTC (rev 287382)
+++ trunk/Source/bmalloc/ChangeLog      2021-12-23 04:04:25 UTC (rev 287383)
</span><span class="lines">@@ -1,3 +1,69 @@
</span><ins>+2021-12-22  Yusuke Suzuki  <ysuzuki@apple.com>
+
+        [libpas] Make pas_heap_type constant
+        https://bugs.webkit.org/show_bug.cgi?id=234486
+
+        Reviewed by Filip Pizlo.
+
+        Currently, pas_heap_type data is placed in __DATA segment since it is not constant.
+        But they are actually a constant value, so we should put them in __DATA_CONST segment.
+
+        Still, we can have mutable type information if we want: we can const-cast the type
+        in each derived pas_heap_type's functions (and we should define these types with non
+        constant way). But currently, we have no such a type.
+
+        * bmalloc/IsoHeap.h:
+        (bmalloc::api::IsoHeap::provideHeap):
+        * bmalloc/bmalloc.cpp:
+        (bmalloc::api::mallocOutOfLine):
+        * libpas/src/libpas/bmalloc_heap.c:
+        * libpas/src/libpas/bmalloc_heap_innards.h:
+        * libpas/src/libpas/bmalloc_heap_ref.h:
+        * libpas/src/libpas/bmalloc_type.c:
+        (bmalloc_type_dump):
+        (bmalloc_type_as_heap_type_dump):
+        * libpas/src/libpas/bmalloc_type.h:
+        (bmalloc_type_size):
+        (bmalloc_type_alignment):
+        (bmalloc_type_name):
+        (bmalloc_type_as_heap_type_get_type_size):
+        (bmalloc_type_as_heap_type_get_type_alignment):
+        * libpas/src/libpas/iso_heap.c:
+        (iso_heap_ref_construct):
+        (iso_primitive_heap_ref_construct):
+        * libpas/src/libpas/iso_heap_ref.h:
+        * libpas/src/libpas/jit_heap_config.c:
+        (jit_type_dump):
+        * libpas/src/libpas/jit_heap_config.h:
+        (jit_type_size):
+        (jit_type_alignment):
+        * libpas/src/libpas/pas_heap.h:
+        * libpas/src/libpas/pas_heap_config.h:
+        * libpas/src/libpas/pas_heap_ref_prefix.h:
+        * libpas/src/libpas/pas_large_heap.c:
+        (allocate_impl):
+        (pas_large_heap_try_shrink):
+        * libpas/src/libpas/pas_simple_type.c:
+        (pas_simple_type_as_heap_type_dump):
+        * libpas/src/libpas/pas_simple_type.h:
+        (pas_simple_type_get_key_data):
+        (pas_simple_type_create_with_key_data):
+        (pas_simple_type_as_heap_type_get_type_size):
+        (pas_simple_type_as_heap_type_get_type_alignment):
+        * libpas/src/libpas/pas_try_allocate.h:
+        (pas_try_allocate_impl_casual_case):
+        * libpas/src/libpas/pas_try_allocate_array.h:
+        * libpas/src/libpas/pas_try_allocate_common.h:
+        (pas_try_allocate_common_impl_slow):
+        * libpas/src/libpas/pas_try_allocate_intrinsic.h:
+        * libpas/src/libpas/pas_try_reallocate.h:
+        (pas_try_reallocate_array_by_count):
+        * libpas/src/test/ExpendableMemoryTests.cpp:
+        * libpas/src/test/IsoHeapChaosTests.cpp:
+        (std::addAllTests):
+        * libpas/src/test/ThingyAndUtilityHeapAllocationTests.cpp:
+        (std::createIsolatedHeapRef):
+
</ins><span class="cx"> 2021-12-19  Yusuke Suzuki  <ysuzuki@apple.com>
</span><span class="cx"> 
</span><span class="cx">         [libpas] Add macros to disable bmalloc core so that libpas can be enabled on 64-bit watchOS
</span></span></pre></div>
<a id="trunkSourcebmallocbmallocIsoHeaph"></a>
<div class="modfile"><h4>Modified: trunk/Source/bmalloc/bmalloc/IsoHeap.h (287382 => 287383)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/bmalloc/bmalloc/IsoHeap.h   2021-12-23 03:10:16 UTC (rev 287382)
+++ trunk/Source/bmalloc/bmalloc/IsoHeap.h      2021-12-23 04:04:25 UTC (rev 287383)
</span><span class="lines">@@ -91,7 +91,7 @@
</span><span class="cx"> 
</span><span class="cx">     static pas_heap_ref& provideHeap()
</span><span class="cx">     {
</span><del>-        static bmalloc_type type = BMALLOC_TYPE_INITIALIZER(sizeof(LibPasBmallocHeapType), alignof(LibPasBmallocHeapType), __PRETTY_FUNCTION__);
</del><ins>+        static const bmalloc_type type = BMALLOC_TYPE_INITIALIZER(sizeof(LibPasBmallocHeapType), alignof(LibPasBmallocHeapType), __PRETTY_FUNCTION__);
</ins><span class="cx">         static pas_heap_ref heap = BMALLOC_HEAP_REF_INITIALIZER(&type);
</span><span class="cx">         return heap;
</span><span class="cx">     }
</span></span></pre></div>
<a id="trunkSourcebmallocbmallocbmalloccpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/bmalloc/bmalloc/bmalloc.cpp (287382 => 287383)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/bmalloc/bmalloc/bmalloc.cpp 2021-12-23 03:10:16 UTC (rev 287382)
+++ trunk/Source/bmalloc/bmalloc/bmalloc.cpp    2021-12-23 04:04:25 UTC (rev 287383)
</span><span class="lines">@@ -40,8 +40,8 @@
</span><span class="cx"> 
</span><span class="cx"> #if BUSE(LIBPAS)
</span><span class="cx"> namespace {
</span><del>-bmalloc_type primitiveGigacageType = BMALLOC_TYPE_INITIALIZER(1, 1, "Primitive Gigacage");
-bmalloc_type jsValueGigacageType = BMALLOC_TYPE_INITIALIZER(1, 1, "JSValue Gigacage");
</del><ins>+static const bmalloc_type primitiveGigacageType = BMALLOC_TYPE_INITIALIZER(1, 1, "Primitive Gigacage");
+static const bmalloc_type jsValueGigacageType = BMALLOC_TYPE_INITIALIZER(1, 1, "JSValue Gigacage");
</ins><span class="cx"> } // anonymous namespace
</span><span class="cx"> 
</span><span class="cx"> pas_primitive_heap_ref gigacageHeaps[Gigacage::NumberOfKinds] = {
</span></span></pre></div>
<a id="trunkSourcebmalloclibpassrclibpasbmalloc_heapc"></a>
<div class="modfile"><h4>Modified: trunk/Source/bmalloc/libpas/src/libpas/bmalloc_heap.c (287382 => 287383)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/bmalloc/libpas/src/libpas/bmalloc_heap.c    2021-12-23 03:10:16 UTC (rev 287382)
+++ trunk/Source/bmalloc/libpas/src/libpas/bmalloc_heap.c       2021-12-23 04:04:25 UTC (rev 287383)
</span><span class="lines">@@ -38,7 +38,7 @@
</span><span class="cx"> 
</span><span class="cx"> PAS_BEGIN_EXTERN_C;
</span><span class="cx"> 
</span><del>-bmalloc_type bmalloc_common_primitive_type = BMALLOC_TYPE_INITIALIZER(1, 1, "Common Primitive");
</del><ins>+const bmalloc_type bmalloc_common_primitive_type = BMALLOC_TYPE_INITIALIZER(1, 1, "Common Primitive");
</ins><span class="cx"> 
</span><span class="cx"> pas_intrinsic_heap_support bmalloc_common_primitive_heap_support =
</span><span class="cx">     PAS_INTRINSIC_HEAP_SUPPORT_INITIALIZER;
</span></span></pre></div>
<a id="trunkSourcebmalloclibpassrclibpasbmalloc_heap_innardsh"></a>
<div class="modfile"><h4>Modified: trunk/Source/bmalloc/libpas/src/libpas/bmalloc_heap_innards.h (287382 => 287383)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/bmalloc/libpas/src/libpas/bmalloc_heap_innards.h    2021-12-23 03:10:16 UTC (rev 287382)
+++ trunk/Source/bmalloc/libpas/src/libpas/bmalloc_heap_innards.h       2021-12-23 04:04:25 UTC (rev 287383)
</span><span class="lines">@@ -37,7 +37,7 @@
</span><span class="cx"> 
</span><span class="cx"> PAS_BEGIN_EXTERN_C;
</span><span class="cx"> 
</span><del>-PAS_API extern bmalloc_type bmalloc_common_primitive_type;
</del><ins>+PAS_API extern const bmalloc_type bmalloc_common_primitive_type;
</ins><span class="cx"> PAS_API extern pas_heap bmalloc_common_primitive_heap;
</span><span class="cx"> PAS_API extern pas_intrinsic_heap_support bmalloc_common_primitive_heap_support;
</span><span class="cx"> PAS_API extern pas_allocator_counts bmalloc_allocator_counts;
</span></span></pre></div>
<a id="trunkSourcebmalloclibpassrclibpasbmalloc_heap_refh"></a>
<div class="modfile"><h4>Modified: trunk/Source/bmalloc/libpas/src/libpas/bmalloc_heap_ref.h (287382 => 287383)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/bmalloc/libpas/src/libpas/bmalloc_heap_ref.h        2021-12-23 03:10:16 UTC (rev 287382)
+++ trunk/Source/bmalloc/libpas/src/libpas/bmalloc_heap_ref.h   2021-12-23 04:04:25 UTC (rev 287383)
</span><span class="lines">@@ -33,7 +33,7 @@
</span><span class="cx"> 
</span><span class="cx"> #define BMALLOC_HEAP_REF_INITIALIZER(passed_type) \
</span><span class="cx">     ((pas_heap_ref){ \
</span><del>-         .type = (pas_heap_type*)(passed_type), \
</del><ins>+         .type = (const pas_heap_type*)(passed_type), \
</ins><span class="cx">          .heap = NULL, \
</span><span class="cx">          .allocator_index = 0 \
</span><span class="cx">      })
</span></span></pre></div>
<a id="trunkSourcebmalloclibpassrclibpasbmalloc_typec"></a>
<div class="modfile"><h4>Modified: trunk/Source/bmalloc/libpas/src/libpas/bmalloc_type.c (287382 => 287383)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/bmalloc/libpas/src/libpas/bmalloc_type.c    2021-12-23 03:10:16 UTC (rev 287382)
+++ trunk/Source/bmalloc/libpas/src/libpas/bmalloc_type.c       2021-12-23 04:04:25 UTC (rev 287383)
</span><span class="lines">@@ -102,7 +102,7 @@
</span><span class="cx">     pas_stream_printf(stream, "%s", name);
</span><span class="cx"> }
</span><span class="cx"> 
</span><del>-void bmalloc_type_dump(bmalloc_type* type, pas_stream* stream)
</del><ins>+void bmalloc_type_dump(const bmalloc_type* type, pas_stream* stream)
</ins><span class="cx"> {
</span><span class="cx">     pas_stream_printf(
</span><span class="cx">         stream, "Size = %zu, Alignment = %zu, Type = ",
</span><span class="lines">@@ -111,9 +111,9 @@
</span><span class="cx">     bmalloc_type_name_dump(stream, bmalloc_type_name(type));
</span><span class="cx"> }
</span><span class="cx"> 
</span><del>-void bmalloc_type_as_heap_type_dump(pas_heap_type* type, pas_stream* stream)
</del><ins>+void bmalloc_type_as_heap_type_dump(const pas_heap_type* type, pas_stream* stream)
</ins><span class="cx"> {
</span><del>-    bmalloc_type_dump((bmalloc_type*)type, stream);
</del><ins>+    bmalloc_type_dump((const bmalloc_type*)type, stream);
</ins><span class="cx"> }
</span><span class="cx"> 
</span><span class="cx"> #endif /* LIBPAS_ENABLED */
</span></span></pre></div>
<a id="trunkSourcebmalloclibpassrclibpasbmalloc_typeh"></a>
<div class="modfile"><h4>Modified: trunk/Source/bmalloc/libpas/src/libpas/bmalloc_type.h (287382 => 287383)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/bmalloc/libpas/src/libpas/bmalloc_type.h    2021-12-23 03:10:16 UTC (rev 287382)
+++ trunk/Source/bmalloc/libpas/src/libpas/bmalloc_type.h       2021-12-23 04:04:25 UTC (rev 287383)
</span><span class="lines">@@ -48,17 +48,17 @@
</span><span class="cx"> 
</span><span class="cx"> /* It's a bit better to use these getters instead of accessing the type struct directly because we want to be
</span><span class="cx">    able to change the shape of the struct. */
</span><del>-static inline size_t bmalloc_type_size(bmalloc_type* type)
</del><ins>+static inline size_t bmalloc_type_size(const bmalloc_type* type)
</ins><span class="cx"> {
</span><span class="cx">     return type->size;
</span><span class="cx"> }
</span><span class="cx"> 
</span><del>-static inline size_t bmalloc_type_alignment(bmalloc_type* type)
</del><ins>+static inline size_t bmalloc_type_alignment(const bmalloc_type* type)
</ins><span class="cx"> {
</span><span class="cx">     return type->alignment;
</span><span class="cx"> }
</span><span class="cx"> 
</span><del>-static inline const char* bmalloc_type_name(bmalloc_type* type)
</del><ins>+static inline const char* bmalloc_type_name(const bmalloc_type* type)
</ins><span class="cx"> {
</span><span class="cx">     return type->name;
</span><span class="cx"> }
</span><span class="lines">@@ -68,19 +68,19 @@
</span><span class="cx"> PAS_API bool bmalloc_type_try_name_dump(pas_stream* stream, const char* name);
</span><span class="cx"> PAS_API void bmalloc_type_name_dump(pas_stream* stream, const char* name);
</span><span class="cx"> 
</span><del>-PAS_API void bmalloc_type_dump(bmalloc_type* type, pas_stream* stream);
</del><ins>+PAS_API void bmalloc_type_dump(const bmalloc_type* type, pas_stream* stream);
</ins><span class="cx"> 
</span><del>-static inline size_t bmalloc_type_as_heap_type_get_type_size(pas_heap_type* type)
</del><ins>+static inline size_t bmalloc_type_as_heap_type_get_type_size(const pas_heap_type* type)
</ins><span class="cx"> {
</span><del>-    return bmalloc_type_size((bmalloc_type*)type);
</del><ins>+    return bmalloc_type_size((const bmalloc_type*)type);
</ins><span class="cx"> }
</span><span class="cx"> 
</span><del>-static inline size_t bmalloc_type_as_heap_type_get_type_alignment(pas_heap_type* type)
</del><ins>+static inline size_t bmalloc_type_as_heap_type_get_type_alignment(const pas_heap_type* type)
</ins><span class="cx"> {
</span><del>-    return bmalloc_type_alignment((bmalloc_type*)type);
</del><ins>+    return bmalloc_type_alignment((const bmalloc_type*)type);
</ins><span class="cx"> }
</span><span class="cx"> 
</span><del>-PAS_API void bmalloc_type_as_heap_type_dump(pas_heap_type* type, pas_stream* stream);
</del><ins>+PAS_API void bmalloc_type_as_heap_type_dump(const pas_heap_type* type, pas_stream* stream);
</ins><span class="cx"> 
</span><span class="cx"> PAS_END_EXTERN_C;
</span><span class="cx"> 
</span></span></pre></div>
<a id="trunkSourcebmalloclibpassrclibpasiso_heapc"></a>
<div class="modfile"><h4>Modified: trunk/Source/bmalloc/libpas/src/libpas/iso_heap.c (287382 => 287383)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/bmalloc/libpas/src/libpas/iso_heap.c        2021-12-23 03:10:16 UTC (rev 287382)
+++ trunk/Source/bmalloc/libpas/src/libpas/iso_heap.c   2021-12-23 04:04:25 UTC (rev 287383)
</span><span class="lines">@@ -144,7 +144,7 @@
</span><span class="cx"> void iso_heap_ref_construct(pas_heap_ref* heap_ref,
</span><span class="cx">                             pas_simple_type type)
</span><span class="cx"> {
</span><del>-    heap_ref->type = (pas_heap_type*)type;
</del><ins>+    heap_ref->type = (const pas_heap_type*)type;
</ins><span class="cx">     heap_ref->heap = NULL;
</span><span class="cx">     heap_ref->allocator_index = 0;
</span><span class="cx"> }
</span><span class="lines">@@ -204,7 +204,7 @@
</span><span class="cx"> {
</span><span class="cx">     PAS_ASSERT(pas_simple_type_size(type) == 1);
</span><span class="cx">     PAS_ASSERT(pas_simple_type_alignment(type) == 1);
</span><del>-    heap_ref->base.type = (pas_heap_type*)type;
</del><ins>+    heap_ref->base.type = (const pas_heap_type*)type;
</ins><span class="cx">     heap_ref->base.heap = NULL;
</span><span class="cx">     heap_ref->base.allocator_index = 0;
</span><span class="cx">     heap_ref->cached_index = UINT_MAX;
</span></span></pre></div>
<a id="trunkSourcebmalloclibpassrclibpasiso_heap_refh"></a>
<div class="modfile"><h4>Modified: trunk/Source/bmalloc/libpas/src/libpas/iso_heap_ref.h (287382 => 287383)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/bmalloc/libpas/src/libpas/iso_heap_ref.h    2021-12-23 03:10:16 UTC (rev 287382)
+++ trunk/Source/bmalloc/libpas/src/libpas/iso_heap_ref.h       2021-12-23 04:04:25 UTC (rev 287383)
</span><span class="lines">@@ -36,7 +36,7 @@
</span><span class="cx"> 
</span><span class="cx"> #define ISO_HEAP_REF_INITIALIZER_WITH_ALIGNMENT(type_size, alignment) \
</span><span class="cx">     ((pas_heap_ref){ \
</span><del>-         .type = (pas_heap_type*)PAS_SIMPLE_TYPE_CREATE((type_size), (alignment)), \
</del><ins>+         .type = (const pas_heap_type*)PAS_SIMPLE_TYPE_CREATE((type_size), (alignment)), \
</ins><span class="cx">          .heap = NULL, \
</span><span class="cx">          ISO_HEAP_REF_INITIALIZER_TLC_PART \
</span><span class="cx">      })
</span></span></pre></div>
<a id="trunkSourcebmalloclibpassrclibpasjit_heap_configc"></a>
<div class="modfile"><h4>Modified: trunk/Source/bmalloc/libpas/src/libpas/jit_heap_config.c (287382 => 287383)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/bmalloc/libpas/src/libpas/jit_heap_config.c 2021-12-23 03:10:16 UTC (rev 287382)
+++ trunk/Source/bmalloc/libpas/src/libpas/jit_heap_config.c    2021-12-23 04:04:25 UTC (rev 287383)
</span><span class="lines">@@ -45,7 +45,7 @@
</span><span class="cx"> 
</span><span class="cx"> PAS_BEGIN_EXTERN_C;
</span><span class="cx"> 
</span><del>-void jit_type_dump(pas_heap_type* type, pas_stream* stream)
</del><ins>+void jit_type_dump(const pas_heap_type* type, pas_stream* stream)
</ins><span class="cx"> {
</span><span class="cx">     PAS_ASSERT(!type);
</span><span class="cx">     pas_stream_printf(stream, "JIT");
</span></span></pre></div>
<a id="trunkSourcebmalloclibpassrclibpasjit_heap_configh"></a>
<div class="modfile"><h4>Modified: trunk/Source/bmalloc/libpas/src/libpas/jit_heap_config.h (287382 => 287383)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/bmalloc/libpas/src/libpas/jit_heap_config.h 2021-12-23 03:10:16 UTC (rev 287382)
+++ trunk/Source/bmalloc/libpas/src/libpas/jit_heap_config.h    2021-12-23 04:04:25 UTC (rev 287383)
</span><span class="lines">@@ -51,18 +51,18 @@
</span><span class="cx"> 
</span><span class="cx"> PAS_API void jit_heap_config_activate(void);
</span><span class="cx"> 
</span><del>-static PAS_ALWAYS_INLINE size_t jit_type_size(pas_heap_type* type)
</del><ins>+static PAS_ALWAYS_INLINE size_t jit_type_size(const pas_heap_type* type)
</ins><span class="cx"> {
</span><span class="cx">     PAS_TESTING_ASSERT(!type);
</span><span class="cx">     return 1;
</span><span class="cx"> }
</span><del>-static PAS_ALWAYS_INLINE size_t jit_type_alignment(pas_heap_type* type)
</del><ins>+static PAS_ALWAYS_INLINE size_t jit_type_alignment(const pas_heap_type* type)
</ins><span class="cx"> {
</span><span class="cx">     PAS_TESTING_ASSERT(!type);
</span><span class="cx">     return 1;
</span><span class="cx"> }
</span><span class="cx"> 
</span><del>-PAS_API void jit_type_dump(pas_heap_type* type, pas_stream* stream);
</del><ins>+PAS_API void jit_type_dump(const pas_heap_type* type, pas_stream* stream);
</ins><span class="cx"> 
</span><span class="cx"> PAS_API pas_page_base* jit_page_header_for_boundary_remote(pas_enumerator* enumerator, void* boundary);
</span><span class="cx"> 
</span></span></pre></div>
<a id="trunkSourcebmalloclibpassrclibpaspas_heaph"></a>
<div class="modfile"><h4>Modified: trunk/Source/bmalloc/libpas/src/libpas/pas_heap.h (287382 => 287383)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/bmalloc/libpas/src/libpas/pas_heap.h        2021-12-23 03:10:16 UTC (rev 287382)
+++ trunk/Source/bmalloc/libpas/src/libpas/pas_heap.h   2021-12-23 04:04:25 UTC (rev 287383)
</span><span class="lines">@@ -45,7 +45,7 @@
</span><span class="cx"> struct pas_heap {
</span><span class="cx">     pas_segregated_heap segregated_heap;
</span><span class="cx">     pas_large_heap large_heap;
</span><del>-    pas_heap_type* type;
</del><ins>+    const pas_heap_type* type;
</ins><span class="cx">     pas_heap_ref* heap_ref;
</span><span class="cx">     pas_compact_heap_ptr next_heap;
</span><span class="cx">     pas_heap_config_kind config_kind : 6;
</span></span></pre></div>
<a id="trunkSourcebmalloclibpassrclibpaspas_heap_configh"></a>
<div class="modfile"><h4>Modified: trunk/Source/bmalloc/libpas/src/libpas/pas_heap_config.h (287382 => 287383)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/bmalloc/libpas/src/libpas/pas_heap_config.h 2021-12-23 03:10:16 UTC (rev 287382)
+++ trunk/Source/bmalloc/libpas/src/libpas/pas_heap_config.h    2021-12-23 04:04:25 UTC (rev 287383)
</span><span class="lines">@@ -63,9 +63,9 @@
</span><span class="cx"> 
</span><span class="cx"> typedef void (*pas_heap_config_activate_callback)(void);
</span><span class="cx"> 
</span><del>-typedef size_t (*pas_heap_config_get_type_size)(pas_heap_type*);
-typedef size_t (*pas_heap_config_get_type_alignment)(pas_heap_type*);
-typedef void (*pas_heap_config_dump_type)(pas_heap_type*, pas_stream* stream);
</del><ins>+typedef size_t (*pas_heap_config_get_type_size)(const pas_heap_type*);
+typedef size_t (*pas_heap_config_get_type_alignment)(const pas_heap_type*);
+typedef void (*pas_heap_config_dump_type)(const pas_heap_type*, pas_stream* stream);
</ins><span class="cx"> typedef pas_fast_megapage_kind (*pas_heap_config_fast_megapage_kind_func)(uintptr_t begin);
</span><span class="cx"> typedef pas_page_base* (*pas_heap_config_page_header_func)(uintptr_t begin);
</span><span class="cx"> typedef pas_aligned_allocation_result (*pas_heap_config_aligned_allocator)(
</span></span></pre></div>
<a id="trunkSourcebmalloclibpassrclibpaspas_heap_ref_prefixh"></a>
<div class="modfile"><h4>Modified: trunk/Source/bmalloc/libpas/src/libpas/pas_heap_ref_prefix.h (287382 => 287383)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/bmalloc/libpas/src/libpas/pas_heap_ref_prefix.h     2021-12-23 03:10:16 UTC (rev 287382)
+++ trunk/Source/bmalloc/libpas/src/libpas/pas_heap_ref_prefix.h        2021-12-23 04:04:25 UTC (rev 287383)
</span><span class="lines">@@ -33,7 +33,7 @@
</span><span class="cx"> typedef struct __pas_heap __pas_heap;
</span><span class="cx"> 
</span><span class="cx"> struct __pas_heap_ref {
</span><del>-    __pas_heap_type* type;
</del><ins>+    const __pas_heap_type* type;
</ins><span class="cx">     __pas_heap* heap; /* initialize to NULL */
</span><span class="cx">     unsigned allocator_index; /* initialize to 0 */
</span><span class="cx"> };
</span></span></pre></div>
<a id="trunkSourcebmalloclibpassrclibpaspas_large_heapc"></a>
<div class="modfile"><h4>Modified: trunk/Source/bmalloc/libpas/src/libpas/pas_large_heap.c (287382 => 287383)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/bmalloc/libpas/src/libpas/pas_large_heap.c  2021-12-23 03:10:16 UTC (rev 287382)
+++ trunk/Source/bmalloc/libpas/src/libpas/pas_large_heap.c     2021-12-23 04:04:25 UTC (rev 287383)
</span><span class="lines">@@ -97,7 +97,7 @@
</span><span class="cx">     static const bool verbose = false;
</span><span class="cx">     
</span><span class="cx">     pas_allocation_result result;
</span><del>-    pas_heap_type* type;
</del><ins>+    const pas_heap_type* type;
</ins><span class="cx">     pas_large_free_heap_config config;
</span><span class="cx">     aligned_allocator_data data;
</span><span class="cx">     
</span><span class="lines">@@ -227,7 +227,7 @@
</span><span class="cx">     pas_large_map_entry map_entry;
</span><span class="cx">     pas_large_free_heap_config config;
</span><span class="cx">     pas_large_heap* heap;
</span><del>-    pas_heap_type* type;
</del><ins>+    const pas_heap_type* type;
</ins><span class="cx">     size_t alignment;
</span><span class="cx"> 
</span><span class="cx">     pas_heap_lock_assert_held();
</span></span></pre></div>
<a id="trunkSourcebmalloclibpassrclibpaspas_simple_typec"></a>
<div class="modfile"><h4>Modified: trunk/Source/bmalloc/libpas/src/libpas/pas_simple_type.c (287382 => 287383)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/bmalloc/libpas/src/libpas/pas_simple_type.c 2021-12-23 03:10:16 UTC (rev 287382)
+++ trunk/Source/bmalloc/libpas/src/libpas/pas_simple_type.c    2021-12-23 04:04:25 UTC (rev 287383)
</span><span class="lines">@@ -41,7 +41,7 @@
</span><span class="cx">         pas_stream_printf(stream, ", Key = %p", pas_simple_type_key(type));
</span><span class="cx"> }
</span><span class="cx"> 
</span><del>-void pas_simple_type_as_heap_type_dump(pas_heap_type* type, pas_stream* stream)
</del><ins>+void pas_simple_type_as_heap_type_dump(const pas_heap_type* type, pas_stream* stream)
</ins><span class="cx"> {
</span><span class="cx">     pas_simple_type_dump((pas_simple_type)type, stream);
</span><span class="cx"> }
</span></span></pre></div>
<a id="trunkSourcebmalloclibpassrclibpaspas_simple_typeh"></a>
<div class="modfile"><h4>Modified: trunk/Source/bmalloc/libpas/src/libpas/pas_simple_type.h (287382 => 287383)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/bmalloc/libpas/src/libpas/pas_simple_type.h 2021-12-23 03:10:16 UTC (rev 287382)
+++ trunk/Source/bmalloc/libpas/src/libpas/pas_simple_type.h    2021-12-23 04:04:25 UTC (rev 287383)
</span><span class="lines">@@ -73,10 +73,10 @@
</span><span class="cx">     return type >> PAS_SIMPLE_TYPE_DATA_BIT;
</span><span class="cx"> }
</span><span class="cx"> 
</span><del>-static inline pas_simple_type_with_key_data* pas_simple_type_get_key_data(pas_simple_type type)
</del><ins>+static inline const pas_simple_type_with_key_data* pas_simple_type_get_key_data(pas_simple_type type)
</ins><span class="cx"> {
</span><span class="cx">     PAS_ASSERT(pas_simple_type_has_key(type));
</span><del>-    return (pas_simple_type_with_key_data*)(type & PAS_SIMPLE_TYPE_DATA_PTR_MASK);
</del><ins>+    return (const pas_simple_type_with_key_data*)(type & PAS_SIMPLE_TYPE_DATA_PTR_MASK);
</ins><span class="cx"> }
</span><span class="cx"> 
</span><span class="cx"> static inline pas_simple_type pas_simple_type_unwrap(pas_simple_type type)
</span><span class="lines">@@ -118,7 +118,7 @@
</span><span class="cx"> }
</span><span class="cx"> 
</span><span class="cx"> static inline pas_simple_type pas_simple_type_create_with_key_data(
</span><del>-    pas_simple_type_with_key_data* data)
</del><ins>+    const pas_simple_type_with_key_data* data)
</ins><span class="cx"> {
</span><span class="cx">     pas_simple_type result;
</span><span class="cx">     
</span><span class="lines">@@ -132,17 +132,17 @@
</span><span class="cx"> 
</span><span class="cx"> PAS_API void pas_simple_type_dump(pas_simple_type type, pas_stream* stream);
</span><span class="cx"> 
</span><del>-static inline size_t pas_simple_type_as_heap_type_get_type_size(pas_heap_type* type)
</del><ins>+static inline size_t pas_simple_type_as_heap_type_get_type_size(const pas_heap_type* type)
</ins><span class="cx"> {
</span><span class="cx">     return pas_simple_type_size((pas_simple_type)type);
</span><span class="cx"> }
</span><span class="cx"> 
</span><del>-static inline size_t pas_simple_type_as_heap_type_get_type_alignment(pas_heap_type* type)
</del><ins>+static inline size_t pas_simple_type_as_heap_type_get_type_alignment(const pas_heap_type* type)
</ins><span class="cx"> {
</span><span class="cx">     return pas_simple_type_alignment((pas_simple_type)type);
</span><span class="cx"> }
</span><span class="cx"> 
</span><del>-PAS_API void pas_simple_type_as_heap_type_dump(pas_heap_type* type, pas_stream* stream);
</del><ins>+PAS_API void pas_simple_type_as_heap_type_dump(const pas_heap_type* type, pas_stream* stream);
</ins><span class="cx"> 
</span><span class="cx"> PAS_END_EXTERN_C;
</span><span class="cx"> 
</span></span></pre></div>
<a id="trunkSourcebmalloclibpassrclibpaspas_try_allocateh"></a>
<div class="modfile"><h4>Modified: trunk/Source/bmalloc/libpas/src/libpas/pas_try_allocate.h (287382 => 287383)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/bmalloc/libpas/src/libpas/pas_try_allocate.h        2021-12-23 03:10:16 UTC (rev 287382)
+++ trunk/Source/bmalloc/libpas/src/libpas/pas_try_allocate.h   2021-12-23 04:04:25 UTC (rev 287383)
</span><span class="lines">@@ -53,7 +53,7 @@
</span><span class="cx">                                   pas_heap_config config,
</span><span class="cx">                                   pas_try_allocate_common try_allocate_common)
</span><span class="cx"> {
</span><del>-    pas_heap_type* type;
</del><ins>+    const pas_heap_type* type;
</ins><span class="cx">     size_t type_size;
</span><span class="cx">     pas_local_allocator_result allocator;
</span><span class="cx">     unsigned allocator_index;
</span></span></pre></div>
<a id="trunkSourcebmalloclibpassrclibpaspas_try_allocate_arrayh"></a>
<div class="modfile"><h4>Modified: trunk/Source/bmalloc/libpas/src/libpas/pas_try_allocate_array.h (287382 => 287383)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/bmalloc/libpas/src/libpas/pas_try_allocate_array.h  2021-12-23 03:10:16 UTC (rev 287382)
+++ trunk/Source/bmalloc/libpas/src/libpas/pas_try_allocate_array.h     2021-12-23 04:04:25 UTC (rev 287383)
</span><span class="lines">@@ -200,7 +200,7 @@
</span><span class="cx">     static PAS_ALWAYS_INLINE pas_allocation_result name ## _by_count( \
</span><span class="cx">         pas_heap_ref* heap_ref, size_t count, size_t alignment) \
</span><span class="cx">     { \
</span><del>-        pas_heap_type* type; \
</del><ins>+        const pas_heap_type* type; \
</ins><span class="cx">         size_t type_size; \
</span><span class="cx">         size_t size; \
</span><span class="cx">         \
</span></span></pre></div>
<a id="trunkSourcebmalloclibpassrclibpaspas_try_allocate_commonh"></a>
<div class="modfile"><h4>Modified: trunk/Source/bmalloc/libpas/src/libpas/pas_try_allocate_common.h (287382 => 287383)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/bmalloc/libpas/src/libpas/pas_try_allocate_common.h 2021-12-23 03:10:16 UTC (rev 287382)
+++ trunk/Source/bmalloc/libpas/src/libpas/pas_try_allocate_common.h    2021-12-23 04:04:25 UTC (rev 287383)
</span><span class="lines">@@ -107,7 +107,7 @@
</span><span class="cx">     pas_baseline_allocator_result baseline_allocator_result;
</span><span class="cx">     pas_allocation_result result;
</span><span class="cx">     pas_heap* heap;
</span><del>-    pas_heap_type* type;
</del><ins>+    const pas_heap_type* type;
</ins><span class="cx">     pas_segregated_size_directory* directory;
</span><span class="cx">     unsigned* cached_index;
</span><span class="cx"> 
</span></span></pre></div>
<a id="trunkSourcebmalloclibpassrclibpaspas_try_allocate_intrinsich"></a>
<div class="modfile"><h4>Modified: trunk/Source/bmalloc/libpas/src/libpas/pas_try_allocate_intrinsic.h (287382 => 287383)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/bmalloc/libpas/src/libpas/pas_try_allocate_intrinsic.h      2021-12-23 03:10:16 UTC (rev 287382)
+++ trunk/Source/bmalloc/libpas/src/libpas/pas_try_allocate_intrinsic.h 2021-12-23 04:04:25 UTC (rev 287383)
</span><span class="lines">@@ -67,7 +67,7 @@
</span><span class="cx">             .index = 0, \
</span><span class="cx">             .table_state = pas_heap_table_state_uninitialized, \
</span><span class="cx">         }, \
</span><del>-        .type = (pas_heap_type*)(primitive_type), \
</del><ins>+        .type = (const pas_heap_type*)(primitive_type), \
</ins><span class="cx">         .heap_ref = NULL, \
</span><span class="cx">         .next_heap = PAS_COMPACT_PTR_INITIALIZER, \
</span><span class="cx">         .config_kind = (passed_config).kind, \
</span></span></pre></div>
<a id="trunkSourcebmalloclibpassrclibpaspas_try_reallocateh"></a>
<div class="modfile"><h4>Modified: trunk/Source/bmalloc/libpas/src/libpas/pas_try_reallocate.h (287382 => 287383)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/bmalloc/libpas/src/libpas/pas_try_reallocate.h      2021-12-23 03:10:16 UTC (rev 287382)
+++ trunk/Source/bmalloc/libpas/src/libpas/pas_try_reallocate.h 2021-12-23 04:04:25 UTC (rev 287383)
</span><span class="lines">@@ -515,7 +515,7 @@
</span><span class="cx">     pas_reallocate_heap_teleport_rule teleport_rule,
</span><span class="cx">     pas_reallocate_free_mode free_mode)
</span><span class="cx"> {
</span><del>-    pas_heap_type* type;
</del><ins>+    const pas_heap_type* type;
</ins><span class="cx">     size_t type_size;
</span><span class="cx">     size_t new_size;
</span><span class="cx">     
</span></span></pre></div>
<a id="trunkSourcebmalloclibpassrctestExpendableMemoryTestscpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/bmalloc/libpas/src/test/ExpendableMemoryTests.cpp (287382 => 287383)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/bmalloc/libpas/src/test/ExpendableMemoryTests.cpp   2021-12-23 03:10:16 UTC (rev 287382)
+++ trunk/Source/bmalloc/libpas/src/test/ExpendableMemoryTests.cpp      2021-12-23 04:04:25 UTC (rev 287383)
</span><span class="lines">@@ -38,7 +38,7 @@
</span><span class="cx"> 
</span><span class="cx"> namespace {
</span><span class="cx"> 
</span><del>-bmalloc_type theType = BMALLOC_TYPE_INITIALIZER(42, 2, "foo");
</del><ins>+static const bmalloc_type theType = BMALLOC_TYPE_INITIALIZER(42, 2, "foo");
</ins><span class="cx"> pas_heap_ref theHeap = BMALLOC_HEAP_REF_INITIALIZER(&theType);
</span><span class="cx"> 
</span><span class="cx"> void testPayloadImpl(pas_heap_ref& heap, bool firstRun)
</span></span></pre></div>
<a id="trunkSourcebmalloclibpassrctestIsoHeapChaosTestscpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/bmalloc/libpas/src/test/IsoHeapChaosTests.cpp (287382 => 287383)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/bmalloc/libpas/src/test/IsoHeapChaosTests.cpp       2021-12-23 03:10:16 UTC (rev 287382)
+++ trunk/Source/bmalloc/libpas/src/test/IsoHeapChaosTests.cpp  2021-12-23 04:04:25 UTC (rev 287383)
</span><span class="lines">@@ -90,7 +90,6 @@
</span><span class="cx"> }
</span><span class="cx"> 
</span><span class="cx"> #if PAS_ENABLE_BMALLOC
</span><del>-bmalloc_type gigacageType;
</del><span class="cx"> pas_primitive_heap_ref gigacageHeapRef;
</span><span class="cx"> 
</span><span class="cx"> void* gigacageAllocate(size_t size)
</span><span class="lines">@@ -1135,7 +1134,7 @@
</span><span class="cx">         TestScope iso(
</span><span class="cx">             "bmalloc-gigacage",
</span><span class="cx">             [] () {
</span><del>-                gigacageType = BMALLOC_TYPE_INITIALIZER(1, 1, "Gigacage");
</del><ins>+                static const bmalloc_type gigacageType = BMALLOC_TYPE_INITIALIZER(1, 1, "Gigacage");
</ins><span class="cx">                 gigacageHeapRef = BMALLOC_AUXILIARY_HEAP_REF_INITIALIZER(&gigacageType);
</span><span class="cx"> 
</span><span class="cx">                 size_t reservationSize = 1000000000;
</span></span></pre></div>
<a id="trunkSourcebmalloclibpassrctestThingyAndUtilityHeapAllocationTestscpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/bmalloc/libpas/src/test/ThingyAndUtilityHeapAllocationTests.cpp (287382 => 287383)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/bmalloc/libpas/src/test/ThingyAndUtilityHeapAllocationTests.cpp     2021-12-23 03:10:16 UTC (rev 287382)
+++ trunk/Source/bmalloc/libpas/src/test/ThingyAndUtilityHeapAllocationTests.cpp        2021-12-23 04:04:25 UTC (rev 287383)
</span><span class="lines">@@ -379,7 +379,7 @@
</span><span class="cx"> pas_heap_ref* createIsolatedHeapRef(size_t size, size_t alignment)
</span><span class="cx"> {
</span><span class="cx">     pas_heap_ref* heapRef = new pas_heap_ref;
</span><del>-    heapRef->type = reinterpret_cast<pas_heap_type*>(PAS_SIMPLE_TYPE_CREATE(size, alignment));
</del><ins>+    heapRef->type = reinterpret_cast<const pas_heap_type*>(PAS_SIMPLE_TYPE_CREATE(size, alignment));
</ins><span class="cx">     heapRef->heap = nullptr;
</span><span class="cx"> #if TLC
</span><span class="cx">     heapRef->allocator_index = 0;
</span></span></pre>
</div>
</div>

</body>
</html>