File tree Expand file tree Collapse file tree 4 files changed +17
-2
lines changed Expand file tree Collapse file tree 4 files changed +17
-2
lines changed Original file line number Diff line number Diff line change @@ -198,7 +198,7 @@ void java_lang_String::compute_offsets() {
198198#if INCLUDE_CDS
199199void java_lang_String::serialize_offsets (SerializeClosure* f) {
200200 STRING_FIELDS_DO (FIELD_SERIALIZE_OFFSET);
201- f->do_u4 ((u4*) &initialized);
201+ f->do_bool ( &initialized);
202202}
203203#endif
204204
@@ -1566,7 +1566,7 @@ void java_lang_Class::compute_offsets() {
15661566
15671567#if INCLUDE_CDS
15681568void java_lang_Class::serialize_offsets (SerializeClosure* f) {
1569- f->do_u4 ((u4*) &offsets_computed);
1569+ f->do_bool ( &offsets_computed);
15701570 f->do_u4 ((u4*)&_init_lock_offset);
15711571
15721572 CLASS_FIELDS_DO (FIELD_SERIALIZE_OFFSET);
Original file line number Diff line number Diff line change @@ -322,6 +322,9 @@ class SerializeClosure : public Closure {
322322 // Read/write the 32-bit unsigned integer pointed to by p.
323323 virtual void do_u4 (u4* p) = 0;
324324
325+ // Read/write the bool pointed to by p.
326+ virtual void do_bool (bool * p) = 0;
327+
325328 // Read/write the region specified.
326329 virtual void do_region (u_char* start, size_t size) = 0;
327330
Original file line number Diff line number Diff line change @@ -1935,6 +1935,11 @@ void ReadClosure::do_u4(u4* p) {
19351935 *p = (u4)(uintx (obj));
19361936}
19371937
1938+ void ReadClosure::do_bool (bool * p) {
1939+ intptr_t obj = nextPtr ();
1940+ *p = (bool )(uintx (obj));
1941+ }
1942+
19381943void ReadClosure::do_tag (int tag) {
19391944 int old_tag;
19401945 old_tag = (int )(intptr_t )nextPtr ();
Original file line number Diff line number Diff line change @@ -125,6 +125,11 @@ class WriteClosure : public SerializeClosure {
125125 do_ptr (&ptr);
126126 }
127127
128+ void do_bool (bool *p) {
129+ void * ptr = (void *)(uintx (*p));
130+ do_ptr (&ptr);
131+ }
132+
128133 void do_tag (int tag) {
129134 _dump_region->append_intptr_t ((intptr_t )tag);
130135 }
@@ -154,6 +159,8 @@ class ReadClosure : public SerializeClosure {
154159
155160 void do_u4 (u4* p);
156161
162+ void do_bool (bool *p);
163+
157164 void do_tag (int tag);
158165
159166 void do_oop (oop *p);
You can’t perform that action at this time.
0 commit comments