]> gitweb.factorcode.org Git - factor.git/commitdiff
Merge branch 'master' into feature-vm-prepare-image-reserved-fields
authornomennescio <nomennescio@factorcode.org>
Thu, 10 Feb 2022 22:54:07 +0000 (23:54 +0100)
committernomennescio <nomennescio@factorcode.org>
Thu, 10 Feb 2022 22:54:07 +0000 (23:54 +0100)
* master:
  Revert "specialized-arrays: removing unnecessary >pprint-sequence"
  calendar: change the behavior of 1 months time+
  documents: fix tests for each-doc-line rename
  specialized-arrays: removing unnecessary >pprint-sequence
  uuid: adding uuid-urn word
  io.directories.unix: switch to readdir(3) since readdir_r(3) is deprecated
  ui.tools: setting current directory to "resource:"
  vm: os-macosx.mm don't changeCurrentDirectoryPath

vm/image.cpp
vm/image.hpp

index 571cfa0d27e03e61cd62014454431df60bf6f4d9..1eb6448d67119a8e333a4cbc5b7d33659a35bd70 100644 (file)
@@ -255,6 +255,8 @@ void factor_vm::load_image(vm_parameters* p) {
   if (h.version != image_version)
     fatal_error("Bad image: version number check failed", h.version);
 
+  if (!h.version4_escape) h.data_size=h.escaped_data_size, h.escaped_data_size=0;
+
   load_data_heap(file, &h, p);
   load_code_heap(file, &h, p);
 
index 8e5d94a68addcf85e1caf6c55ce4322d31332ad0..8006e328fb10be18a5a7adeeb9c16bfc2e4ada57 100644 (file)
@@ -15,14 +15,14 @@ struct image_header {
   cell version;
   // base address of data heap when image was saved
   cell data_relocation_base;
-  // size of heap
-  cell data_size;
+  // size of data heap
+  union { cell data_size; cell version4_escape; };
   // base address of code heap when image was saved
   cell code_relocation_base;
   // size of code heap
   cell code_size;
 
-  cell reserved_1;
+  union { cell reserved_1; cell escaped_data_size; };
   cell reserved_2;
   cell reserved_3;
   cell reserved_4;