We planned to upgrade GitLab and Mattermost to the latest version this Friday morning (early). You may experience some downtime!

Verified Commit 350d0c92 authored by Camil Staps's avatar Camil Staps 🚀

Add strictness to deserialize (lazy variant) and DV_Ok

parent 64986e36
Pipeline #19916 failed with stages
in 3 minutes and 21 seconds
...@@ -23,10 +23,10 @@ defaultDeserializationSettings :: DeserializationSettings ...@@ -23,10 +23,10 @@ defaultDeserializationSettings :: DeserializationSettings
| DV_IllegalInstruction | DV_IllegalInstruction
| DV_HostHeapFull | DV_HostHeapFull
| DV_Ok a | DV_Ok !a
serialize_for_interpretation :: a !String !*World -> *(!Maybe SerializedGraph, !*World) serialize_for_interpretation :: a !String !*World -> *(!Maybe SerializedGraph, !*World)
deserialize :: !DeserializationSettings !SerializedGraph !String !*World -> *(Maybe a, !*World) deserialize :: !DeserializationSettings !SerializedGraph !String !*World -> *(!Maybe a, !*World)
deserializeStrict :: !DeserializationSettings !SerializedGraph !String !*World deserializeStrict :: !DeserializationSettings !SerializedGraph !String !*World
-> *(!DeserializedValue a, !*World) -> *(!DeserializedValue a, !*World)
get_start_rule_as_expression :: !DeserializationSettings !String !String !*World -> *(Maybe a, !*World) get_start_rule_as_expression :: !DeserializationSettings !String !String !*World -> *(Maybe a, !*World)
......
...@@ -74,7 +74,7 @@ where ...@@ -74,7 +74,7 @@ where
ccall strip_bytecode "sA:VIp" ccall strip_bytecode "sA:VIp"
} }
deserialize :: !DeserializationSettings !SerializedGraph !String !*World -> *(Maybe a, !*World) deserialize :: !DeserializationSettings !SerializedGraph !String !*World -> *(!Maybe a, !*World)
deserialize dsets graph thisexe w = deserialize` False dsets graph thisexe w deserialize dsets graph thisexe w = deserialize` False dsets graph thisexe w
deserializeStrict :: !DeserializationSettings !SerializedGraph !String !*World deserializeStrict :: !DeserializationSettings !SerializedGraph !String !*World
......
...@@ -981,7 +981,7 @@ int copy_to_host_or_garbage_collect(struct interpretation_environment *ie, ...@@ -981,7 +981,7 @@ int copy_to_host_or_garbage_collect(struct interpretation_environment *ie,
BC_WORD *new_heap; BC_WORD *new_heap;
if (hyperstrict_if_requested && ie->options.hyperstrict) { if (hyperstrict_if_requested && ie->options.hyperstrict) {
*target=ie->host->host_hp_ptr; *target=ie->host->host_hp_ptr;
ie->host->host_hp_ptr[0]=(BC_WORD)&e__ABC_PInterpreter__dDV__Ok+IF_MACH_O_ELSE(16,8)+2; ie->host->host_hp_ptr[0]=(BC_WORD)&e__ABC_PInterpreter__kDV__Ok+2;
new_heap=COPY_TO_HOST(ie->host->clean_ie,&ie->host->host_hp_ptr[2],(BC_WORD**)&ie->host->host_hp_ptr[1],node,0); new_heap=COPY_TO_HOST(ie->host->clean_ie,&ie->host->host_hp_ptr[2],(BC_WORD**)&ie->host->host_hp_ptr[1],node,0);
} else { } else {
new_heap=COPY_TO_HOST(ie->host->clean_ie,ie->host->host_hp_ptr,target,node,0); new_heap=COPY_TO_HOST(ie->host->clean_ie,ie->host->host_hp_ptr,target,node,0);
......
...@@ -51,7 +51,7 @@ extern void *e__ABC_PInterpreter__dDV__Halt; ...@@ -51,7 +51,7 @@ extern void *e__ABC_PInterpreter__dDV__Halt;
extern void *e__ABC_PInterpreter__dDV__IllegalInstruction; extern void *e__ABC_PInterpreter__dDV__IllegalInstruction;
extern void *e__ABC_PInterpreter__dDV__SegmentationFault; extern void *e__ABC_PInterpreter__dDV__SegmentationFault;
extern void *e__ABC_PInterpreter__dDV__HostHeapFull; extern void *e__ABC_PInterpreter__dDV__HostHeapFull;
extern void *e__ABC_PInterpreter__dDV__Ok; extern void *e__ABC_PInterpreter__kDV__Ok;
extern void **interpret_error; extern void **interpret_error;
#endif #endif
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment