Skip to content

Commit 067d904

Browse files
committed
Serialize/deserialize boolification spec. Now we get an NQP executable that basically works.
1 parent 96892f6 commit 067d904

File tree

1 file changed

+14
-0
lines changed

1 file changed

+14
-0
lines changed

src/6model/serialization.c

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -611,6 +611,13 @@ static void serialize_stable(PARROT_INTERP, SerializationWriter *writer, PMC *st
611611
/* Mode flags. */
612612
write_int_func(interp, writer, st->mode_flags);
613613

614+
/* Boolification spec. */
615+
write_int_func(interp, writer, st->boolification_spec != NULL);
616+
if (st->boolification_spec) {
617+
write_int_func(interp, writer, st->boolification_spec->mode);
618+
write_ref_func(interp, writer, st->boolification_spec->method);
619+
}
620+
614621
/* XXX More to do here. */
615622
printf("WARNING: STable serialization not yet fully implemented\n");
616623

@@ -1320,6 +1327,13 @@ static void deserialize_stable(PARROT_INTERP, SerializationReader *reader, INTVA
13201327

13211328
/* Mode flags. */
13221329
st->mode_flags = read_int_func(interp, reader);
1330+
1331+
/* Boolification spec. */
1332+
if (read_int_func(interp, reader)) {
1333+
st->boolification_spec = mem_sys_allocate(sizeof(BoolificationSpec));
1334+
st->boolification_spec->mode = read_int_func(interp, reader);
1335+
st->boolification_spec->method = read_ref_func(interp, reader);
1336+
}
13231337

13241338
/* XXX More to do here. */
13251339
printf("WARNING: STable deserialization not yet fully implemented\n");

0 commit comments

Comments
 (0)