Down to to compilation errors. Had to reinstate individual size-class headers.
This commit is contained in:
parent
cae27731b7
commit
00997d3c90
26 changed files with 733 additions and 246 deletions
|
|
@ -14,234 +14,234 @@
|
|||
|
||||
#include "memory/header.h"
|
||||
#include "memory/pointer.h"
|
||||
#include "payloads/cons.h"
|
||||
#include "payloads/exception.h"
|
||||
#include "payloads/free.h"
|
||||
#include "payloads/function.h"
|
||||
#include "payloads/hashtable.h"
|
||||
#include "payloads/integer.h"
|
||||
#include "payloads/keyword.h"
|
||||
#include "payloads/lambda.h"
|
||||
#include "payloads/mutex.h"
|
||||
#include "payloads/namespace.h"
|
||||
#include "payloads/nlambda.h"
|
||||
#include "payloads/read_stream.h"
|
||||
#include "payloads/special.h"
|
||||
#include "payloads/stack.h"
|
||||
#include "payloads/string.h"
|
||||
#include "payloads/symbol.h"
|
||||
#include "payloads/time.h"
|
||||
#include "payloads/vector_pointer.h"
|
||||
#include "payloads/write_stream.h"
|
||||
// #include "payloads/cons.h"
|
||||
// #include "payloads/exception.h"
|
||||
// #include "payloads/free.h"
|
||||
// #include "payloads/function.h"
|
||||
// #include "payloads/hashtable.h"
|
||||
// #include "payloads/integer.h"
|
||||
// #include "payloads/keyword.h"
|
||||
// #include "payloads/lambda.h"
|
||||
// #include "payloads/mutex.h"
|
||||
// #include "payloads/namespace.h"
|
||||
// #include "payloads/nlambda.h"
|
||||
// #include "payloads/read_stream.h"
|
||||
// #include "payloads/special.h"
|
||||
// #include "payloads/stack.h"
|
||||
// #include "payloads/string.h"
|
||||
// #include "payloads/symbol.h"
|
||||
// #include "payloads/time.h"
|
||||
// #include "payloads/vector_pointer.h"
|
||||
// #include "payloads/write_stream.h"
|
||||
|
||||
/**
|
||||
* @brief A paged space object of size class 2, four words total, two words
|
||||
* payload.
|
||||
*
|
||||
*/
|
||||
struct pso2 {
|
||||
struct pso_header header;
|
||||
union {
|
||||
char bytes[16];
|
||||
uint64_t words[2];
|
||||
struct cons_payload cons;
|
||||
struct free_payload free;
|
||||
struct function_payload function;
|
||||
struct integer_payload integer;
|
||||
struct lambda_payload lambda;
|
||||
struct special_payload special;
|
||||
struct stream_payload stream;
|
||||
struct time_payload time;
|
||||
struct vectorp_payload vectorp;
|
||||
} payload;
|
||||
};
|
||||
// /**
|
||||
// * @brief A paged space object of size class 2, four words total, two words
|
||||
// * payload.
|
||||
// *
|
||||
// */
|
||||
// struct pso2 {
|
||||
// struct pso_header header;
|
||||
// union {
|
||||
// char bytes[16];
|
||||
// uint64_t words[2];
|
||||
// struct cons_payload cons;
|
||||
// struct free_payload free;
|
||||
// struct function_payload function;
|
||||
// struct integer_payload integer;
|
||||
// struct lambda_payload lambda;
|
||||
// struct special_payload special;
|
||||
// struct stream_payload stream;
|
||||
// struct time_payload time;
|
||||
// struct vectorp_payload vectorp;
|
||||
// } payload;
|
||||
// };
|
||||
|
||||
/**
|
||||
* @brief A paged space object of size class 3, 8 words total, 6 words
|
||||
* payload.
|
||||
*
|
||||
*/
|
||||
struct pso3 {
|
||||
struct pso_header header;
|
||||
union {
|
||||
char bytes[48];
|
||||
uint64_t words[6];
|
||||
struct exception_payload exception;
|
||||
struct free_payload free;
|
||||
struct mutex_payload mutex;
|
||||
} payload;
|
||||
};
|
||||
// /**
|
||||
// * @brief A paged space object of size class 3, 8 words total, 6 words
|
||||
// * payload.
|
||||
// *
|
||||
// */
|
||||
// struct pso3 {
|
||||
// struct pso_header header;
|
||||
// union {
|
||||
// char bytes[48];
|
||||
// uint64_t words[6];
|
||||
// struct exception_payload exception;
|
||||
// struct free_payload free;
|
||||
// struct mutex_payload mutex;
|
||||
// } payload;
|
||||
// };
|
||||
|
||||
/**
|
||||
* @brief A paged space object of size class 4, 16 words total, 14 words
|
||||
* payload.
|
||||
*
|
||||
*/
|
||||
struct pso4 {
|
||||
struct pso_header header;
|
||||
union {
|
||||
char bytes[112];
|
||||
uint64_t words[14];
|
||||
struct free_payload free;
|
||||
struct stack_frame_payload stack_frame;
|
||||
} payload;
|
||||
};
|
||||
// /**
|
||||
// * @brief A paged space object of size class 4, 16 words total, 14 words
|
||||
// * payload.
|
||||
// *
|
||||
// */
|
||||
// struct pso4 {
|
||||
// struct pso_header header;
|
||||
// union {
|
||||
// char bytes[112];
|
||||
// uint64_t words[14];
|
||||
// struct free_payload free;
|
||||
// struct stack_frame_payload stack_frame;
|
||||
// } payload;
|
||||
// };
|
||||
|
||||
/**
|
||||
* @brief A paged space object of size class 5, 32 words total, 30 words
|
||||
* payload.
|
||||
*
|
||||
*/
|
||||
struct pso5 {
|
||||
struct pso_header header;
|
||||
union {
|
||||
char bytes[240];
|
||||
uint64_t words[30];
|
||||
struct free_payload free;
|
||||
} payload;
|
||||
};
|
||||
// /**
|
||||
// * @brief A paged space object of size class 5, 32 words total, 30 words
|
||||
// * payload.
|
||||
// *
|
||||
// */
|
||||
// struct pso5 {
|
||||
// struct pso_header header;
|
||||
// union {
|
||||
// char bytes[240];
|
||||
// uint64_t words[30];
|
||||
// struct free_payload free;
|
||||
// } payload;
|
||||
// };
|
||||
|
||||
/**
|
||||
* @brief A paged space object of size class 6, 64 words total, 62 words
|
||||
* payload.
|
||||
*
|
||||
*/
|
||||
struct pso6 {
|
||||
struct pso_header header;
|
||||
union {
|
||||
char bytes[496];
|
||||
uint64_t words[62];
|
||||
struct free_payload free;
|
||||
struct hashtable_payload hashtable;
|
||||
struct namespace_payload namespace;
|
||||
} payload;
|
||||
};
|
||||
// /**
|
||||
// * @brief A paged space object of size class 6, 64 words total, 62 words
|
||||
// * payload.
|
||||
// *
|
||||
// */
|
||||
// struct pso6 {
|
||||
// struct pso_header header;
|
||||
// union {
|
||||
// char bytes[496];
|
||||
// uint64_t words[62];
|
||||
// struct free_payload free;
|
||||
// struct hashtable_payload hashtable;
|
||||
// struct namespace_payload namespace;
|
||||
// } payload;
|
||||
// };
|
||||
|
||||
/**
|
||||
* @brief A paged space object of size class 7, 128 words total, 126 words
|
||||
* payload.
|
||||
*
|
||||
*/
|
||||
struct pso7 {
|
||||
struct pso_header header;
|
||||
union {
|
||||
char bytes[1008];
|
||||
uint64_t words[126];
|
||||
struct free_payload free;
|
||||
} payload;
|
||||
};
|
||||
// /**
|
||||
// * @brief A paged space object of size class 7, 128 words total, 126 words
|
||||
// * payload.
|
||||
// *
|
||||
// */
|
||||
// struct pso7 {
|
||||
// struct pso_header header;
|
||||
// union {
|
||||
// char bytes[1008];
|
||||
// uint64_t words[126];
|
||||
// struct free_payload free;
|
||||
// } payload;
|
||||
// };
|
||||
|
||||
/**
|
||||
* @brief A paged space object of size class 8, 256 words total, 254 words
|
||||
* payload.
|
||||
*
|
||||
*/
|
||||
struct pso8 {
|
||||
struct pso_header header;
|
||||
union {
|
||||
char bytes[2032];
|
||||
uint64_t words[254];
|
||||
struct free_payload free;
|
||||
} payload;
|
||||
};
|
||||
// /**
|
||||
// * @brief A paged space object of size class 8, 256 words total, 254 words
|
||||
// * payload.
|
||||
// *
|
||||
// */
|
||||
// struct pso8 {
|
||||
// struct pso_header header;
|
||||
// union {
|
||||
// char bytes[2032];
|
||||
// uint64_t words[254];
|
||||
// struct free_payload free;
|
||||
// } payload;
|
||||
// };
|
||||
|
||||
/**
|
||||
* @brief A paged space object of size class 9, 512 words total, 510 words
|
||||
* payload.
|
||||
*
|
||||
*/
|
||||
struct pso9 {
|
||||
struct pso_header header;
|
||||
union {
|
||||
char bytes[4080];
|
||||
uint64_t words[510];
|
||||
struct free_payload free;
|
||||
} payload;
|
||||
};
|
||||
// /**
|
||||
// * @brief A paged space object of size class 9, 512 words total, 510 words
|
||||
// * payload.
|
||||
// *
|
||||
// */
|
||||
// struct pso9 {
|
||||
// struct pso_header header;
|
||||
// union {
|
||||
// char bytes[4080];
|
||||
// uint64_t words[510];
|
||||
// struct free_payload free;
|
||||
// } payload;
|
||||
// };
|
||||
|
||||
/**
|
||||
* @brief A paged space object of size class a, 1024 words total, 1022 words
|
||||
* payload.
|
||||
*
|
||||
*/
|
||||
struct psoa {
|
||||
struct pso_header header;
|
||||
union {
|
||||
char bytes[8176];
|
||||
uint64_t words[1022];
|
||||
struct free_payload free;
|
||||
} payload;
|
||||
};
|
||||
// /**
|
||||
// * @brief A paged space object of size class a, 1024 words total, 1022 words
|
||||
// * payload.
|
||||
// *
|
||||
// */
|
||||
// struct psoa {
|
||||
// struct pso_header header;
|
||||
// union {
|
||||
// char bytes[8176];
|
||||
// uint64_t words[1022];
|
||||
// struct free_payload free;
|
||||
// } payload;
|
||||
// };
|
||||
|
||||
/**
|
||||
* @brief A paged space object of size class b, 2048 words total, 2046 words
|
||||
* payload.
|
||||
*
|
||||
*/
|
||||
struct psob {
|
||||
struct pso_header header;
|
||||
union {
|
||||
char bytes[16368];
|
||||
uint64_t words[2046];
|
||||
struct free_payload free;
|
||||
} payload;
|
||||
};
|
||||
// /**
|
||||
// * @brief A paged space object of size class b, 2048 words total, 2046 words
|
||||
// * payload.
|
||||
// *
|
||||
// */
|
||||
// struct psob {
|
||||
// struct pso_header header;
|
||||
// union {
|
||||
// char bytes[16368];
|
||||
// uint64_t words[2046];
|
||||
// struct free_payload free;
|
||||
// } payload;
|
||||
// };
|
||||
|
||||
/**
|
||||
* @brief A paged space object of size class c, 4096 words total, 4094 words
|
||||
* payload.
|
||||
*
|
||||
*/
|
||||
struct psoc {
|
||||
struct pso_header header;
|
||||
union {
|
||||
char bytes[32752];
|
||||
uint64_t words[4094];
|
||||
struct free_payload free;
|
||||
} payload;
|
||||
};
|
||||
// /**
|
||||
// * @brief A paged space object of size class c, 4096 words total, 4094 words
|
||||
// * payload.
|
||||
// *
|
||||
// */
|
||||
// struct psoc {
|
||||
// struct pso_header header;
|
||||
// union {
|
||||
// char bytes[32752];
|
||||
// uint64_t words[4094];
|
||||
// struct free_payload free;
|
||||
// } payload;
|
||||
// };
|
||||
|
||||
/**
|
||||
* @brief A paged space object of size class d, 8192 words total, 8190 words
|
||||
* payload.
|
||||
*
|
||||
*/
|
||||
struct psod {
|
||||
struct pso_header header;
|
||||
union {
|
||||
char bytes[65520];
|
||||
uint64_t words[8190];
|
||||
struct free_payload free;
|
||||
} payload;
|
||||
};
|
||||
// /**
|
||||
// * @brief A paged space object of size class d, 8192 words total, 8190 words
|
||||
// * payload.
|
||||
// *
|
||||
// */
|
||||
// struct psod {
|
||||
// struct pso_header header;
|
||||
// union {
|
||||
// char bytes[65520];
|
||||
// uint64_t words[8190];
|
||||
// struct free_payload free;
|
||||
// } payload;
|
||||
// };
|
||||
|
||||
/**
|
||||
* @brief A paged space object of size class e, 16384 words total, 16382 words
|
||||
* payload.
|
||||
*
|
||||
*/
|
||||
struct psoe {
|
||||
struct pso_header header;
|
||||
union {
|
||||
char bytes[131056];
|
||||
uint64_t words[16382];
|
||||
struct free_payload free;
|
||||
} payload;
|
||||
};
|
||||
// /**
|
||||
// * @brief A paged space object of size class e, 16384 words total, 16382 words
|
||||
// * payload.
|
||||
// *
|
||||
// */
|
||||
// struct psoe {
|
||||
// struct pso_header header;
|
||||
// union {
|
||||
// char bytes[131056];
|
||||
// uint64_t words[16382];
|
||||
// struct free_payload free;
|
||||
// } payload;
|
||||
// };
|
||||
|
||||
/**
|
||||
* @brief A paged space object of size class f, 32768 words total, 32766 words
|
||||
* payload.
|
||||
*
|
||||
*/
|
||||
struct psof {
|
||||
struct pso_header header;
|
||||
union {
|
||||
char bytes[262128];
|
||||
uint64_t words[32766];
|
||||
struct free_payload free;
|
||||
} payload;
|
||||
};
|
||||
// /**
|
||||
// * @brief A paged space object of size class f, 32768 words total, 32766 words
|
||||
// * payload.
|
||||
// *
|
||||
// */
|
||||
// struct psof {
|
||||
// struct pso_header header;
|
||||
// union {
|
||||
// char bytes[262128];
|
||||
// uint64_t words[32766];
|
||||
// struct free_payload free;
|
||||
// } payload;
|
||||
// };
|
||||
|
||||
struct pso_pointer allocate( char* tag, uint8_t size_class);
|
||||
|
||||
|
|
|
|||
53
src/c/memory/pso2.h
Normal file
53
src/c/memory/pso2.h
Normal file
|
|
@ -0,0 +1,53 @@
|
|||
/**
|
||||
* memory/pso2.h
|
||||
*
|
||||
* Paged space object of size class 2, four words total, two words payload.
|
||||
*
|
||||
* (c) 2026 Simon Brooke <simon@journeyman.cc>
|
||||
* Licensed under GPL version 2.0, or, at your option, any later version.
|
||||
*/
|
||||
|
||||
#ifndef __psse_memory_pso2_h
|
||||
#define __psse_memory_pso2_h
|
||||
|
||||
#include <stdint.h>
|
||||
|
||||
#include "memory/header.h"
|
||||
#include "payloads/cons.h"
|
||||
#include "payloads/free.h"
|
||||
#include "payloads/function.h"
|
||||
#include "payloads/integer.h"
|
||||
#include "payloads/keyword.h"
|
||||
#include "payloads/lambda.h"
|
||||
#include "payloads/nlambda.h"
|
||||
#include "payloads/read_stream.h"
|
||||
#include "payloads/special.h"
|
||||
#include "payloads/string.h"
|
||||
#include "payloads/symbol.h"
|
||||
#include "payloads/time.h"
|
||||
#include "payloads/vector_pointer.h"
|
||||
#include "payloads/write_stream.h"
|
||||
|
||||
/**
|
||||
* @brief A paged space object of size class 2, four words total, two words
|
||||
* payload.
|
||||
*
|
||||
*/
|
||||
struct pso2 {
|
||||
struct pso_header header;
|
||||
union {
|
||||
char bytes[16];
|
||||
uint64_t words[2];
|
||||
struct cons_payload cons;
|
||||
struct free_payload free;
|
||||
struct function_payload function;
|
||||
struct integer_payload integer;
|
||||
struct lambda_payload lambda;
|
||||
// struct special_payload special;
|
||||
struct stream_payload stream;
|
||||
struct time_payload time;
|
||||
struct vectorp_payload vectorp;
|
||||
} payload;
|
||||
};
|
||||
|
||||
#endif
|
||||
37
src/c/memory/pso3.h
Normal file
37
src/c/memory/pso3.h
Normal file
|
|
@ -0,0 +1,37 @@
|
|||
/**
|
||||
* memory/pso3.h
|
||||
*
|
||||
* Paged space object of size class 3, 8 words total, 6 words payload.
|
||||
*
|
||||
* (c) 2026 Simon Brooke <simon@journeyman.cc>
|
||||
* Licensed under GPL version 2.0, or, at your option, any later version.
|
||||
*/
|
||||
|
||||
#ifndef __psse_memory_pso3_h
|
||||
#define __psse_memory_pso3_h
|
||||
|
||||
#include <stdint.h>
|
||||
|
||||
#include "memory/header.h"
|
||||
#include "payloads/exception.h"
|
||||
#include "payloads/free.h"
|
||||
#include "payloads/mutex.h"
|
||||
|
||||
|
||||
/**
|
||||
* @brief A paged space object of size class 3, 8 words total, 6 words
|
||||
* payload.
|
||||
*
|
||||
*/
|
||||
struct pso3 {
|
||||
struct pso_header header;
|
||||
union {
|
||||
char bytes[48];
|
||||
uint64_t words[6];
|
||||
struct exception_payload exception;
|
||||
struct free_payload free;
|
||||
struct mutex_payload mutex;
|
||||
} payload;
|
||||
};
|
||||
|
||||
#endif
|
||||
34
src/c/memory/pso4.h
Normal file
34
src/c/memory/pso4.h
Normal file
|
|
@ -0,0 +1,34 @@
|
|||
/**
|
||||
* memory/pso4.h
|
||||
*
|
||||
* Paged space object of size class 4, 16 words total, 14 words payload.
|
||||
*
|
||||
* (c) 2026 Simon Brooke <simon@journeyman.cc>
|
||||
* Licensed under GPL version 2.0, or, at your option, any later version.
|
||||
*/
|
||||
|
||||
#ifndef __psse_memory_pso4_h
|
||||
#define __psse_memory_pso4_h
|
||||
|
||||
#include <stdint.h>
|
||||
|
||||
#include "memory/header.h"
|
||||
#include "payloads/free.h"
|
||||
#include "payloads/stack.h"
|
||||
|
||||
/**
|
||||
* @brief A paged space object of size class 4, 16 words total, 14 words
|
||||
* payload.
|
||||
*
|
||||
*/
|
||||
struct pso4 {
|
||||
struct pso_header header;
|
||||
union {
|
||||
char bytes[112];
|
||||
uint64_t words[14];
|
||||
struct free_payload free;
|
||||
struct stack_frame_payload stack_frame;
|
||||
} payload;
|
||||
};
|
||||
|
||||
#endif
|
||||
32
src/c/memory/pso5.h
Normal file
32
src/c/memory/pso5.h
Normal file
|
|
@ -0,0 +1,32 @@
|
|||
/**
|
||||
* memory/pso5.h
|
||||
*
|
||||
* Paged space object of size class 5, 32 words total, 30 words payload.
|
||||
*
|
||||
* (c) 2026 Simon Brooke <simon@journeyman.cc>
|
||||
* Licensed under GPL version 2.0, or, at your option, any later version.
|
||||
*/
|
||||
|
||||
#ifndef __psse_memory_pso5_h
|
||||
#define __psse_memory_pso5_h
|
||||
|
||||
#include <stdint.h>
|
||||
|
||||
#include "memory/header.h"
|
||||
#include "payloads/free.h"
|
||||
|
||||
/**
|
||||
* @brief A paged space object of size class 5, 32 words total, 30 words
|
||||
* payload.
|
||||
*
|
||||
*/
|
||||
struct pso5 {
|
||||
struct pso_header header;
|
||||
union {
|
||||
char bytes[240];
|
||||
uint64_t words[30];
|
||||
struct free_payload free;
|
||||
} payload;
|
||||
};
|
||||
|
||||
#endif
|
||||
32
src/c/memory/pso6.h
Normal file
32
src/c/memory/pso6.h
Normal file
|
|
@ -0,0 +1,32 @@
|
|||
/**
|
||||
* memory/pso6.h
|
||||
*
|
||||
* Paged space object of size class 6, 64 words total, 62 words payload.
|
||||
*
|
||||
* (c) 2026 Simon Brooke <simon@journeyman.cc>
|
||||
* Licensed under GPL version 2.0, or, at your option, any later version.
|
||||
*/
|
||||
|
||||
#ifndef __psse_memory_pso6_h
|
||||
#define __psse_memory_pso6_h
|
||||
|
||||
#include <stdint.h>
|
||||
|
||||
#include "memory/header.h"
|
||||
#include "payloads/free.h"
|
||||
|
||||
/**
|
||||
* @brief A paged space object of size class 6, 64 words total, 62 words
|
||||
* payload.
|
||||
*
|
||||
*/
|
||||
struct pso6 {
|
||||
struct pso_header header;
|
||||
union {
|
||||
char bytes[496];
|
||||
uint64_t words[62];
|
||||
struct free_payload free;
|
||||
} payload;
|
||||
};
|
||||
|
||||
#endif
|
||||
32
src/c/memory/pso7.h
Normal file
32
src/c/memory/pso7.h
Normal file
|
|
@ -0,0 +1,32 @@
|
|||
/**
|
||||
* memory/pso7.h
|
||||
*
|
||||
* Paged space object of size class 7, 128 words total, 126 words payload.
|
||||
*
|
||||
* (c) 2026 Simon Brooke <simon@journeyman.cc>
|
||||
* Licensed under GPL version 2.0, or, at your option, any later version.
|
||||
*/
|
||||
|
||||
#ifndef __psse_memory_pso7_h
|
||||
#define __psse_memory_pso7_h
|
||||
|
||||
#include <stdint.h>
|
||||
|
||||
#include "memory/header.h"
|
||||
#include "payloads/free.h"
|
||||
|
||||
/**
|
||||
* @brief A paged space object of size class 7, 128 words total, 126 words
|
||||
* payload.
|
||||
*
|
||||
*/
|
||||
struct pso7 {
|
||||
struct pso_header header;
|
||||
union {
|
||||
char bytes[1008];
|
||||
uint64_t words[126];
|
||||
struct free_payload free;
|
||||
} payload;
|
||||
};
|
||||
|
||||
#endif
|
||||
32
src/c/memory/pso8.h
Normal file
32
src/c/memory/pso8.h
Normal file
|
|
@ -0,0 +1,32 @@
|
|||
/**
|
||||
* memory/pso8.h
|
||||
*
|
||||
* Paged space object of size class 8, 256 words total, 254 words payload.
|
||||
*
|
||||
* (c) 2026 Simon Brooke <simon@journeyman.cc>
|
||||
* Licensed under GPL version 2.0, or, at your option, any later version.
|
||||
*/
|
||||
|
||||
#ifndef __psse_memory_pso8_h
|
||||
#define __psse_memory_pso8_h
|
||||
|
||||
#include <stdint.h>
|
||||
|
||||
#include "memory/header.h"
|
||||
#include "payloads/free.h"
|
||||
|
||||
/**
|
||||
* @brief A paged space object of size class 8, 256 words total, 254 words
|
||||
* payload.
|
||||
*
|
||||
*/
|
||||
struct pso8 {
|
||||
struct pso_header header;
|
||||
union {
|
||||
char bytes[2032];
|
||||
uint64_t words[254];
|
||||
struct free_payload free;
|
||||
} payload;
|
||||
};
|
||||
|
||||
#endif
|
||||
32
src/c/memory/pso9.h
Normal file
32
src/c/memory/pso9.h
Normal file
|
|
@ -0,0 +1,32 @@
|
|||
/**
|
||||
* memory/pso9.h
|
||||
*
|
||||
* Paged space object of size class 9, 512 words total, 510 words payload.
|
||||
*
|
||||
* (c) 2026 Simon Brooke <simon@journeyman.cc>
|
||||
* Licensed under GPL version 2.0, or, at your option, any later version.
|
||||
*/
|
||||
|
||||
#ifndef __psse_memory_pso9_h
|
||||
#define __psse_memory_pso9_h
|
||||
|
||||
#include <stdint.h>
|
||||
|
||||
#include "memory/header.h"
|
||||
#include "payloads/free.h"
|
||||
|
||||
/**
|
||||
* @brief A paged space object of size class 9, 512 words total, 510 words
|
||||
* payload.
|
||||
*
|
||||
*/
|
||||
struct pso9 {
|
||||
struct pso_header header;
|
||||
union {
|
||||
char bytes[4080];
|
||||
uint64_t words[510];
|
||||
struct free_payload free;
|
||||
} payload;
|
||||
};
|
||||
|
||||
#endif
|
||||
32
src/c/memory/psoa.h
Normal file
32
src/c/memory/psoa.h
Normal file
|
|
@ -0,0 +1,32 @@
|
|||
/**
|
||||
* memory/psoa.h
|
||||
*
|
||||
* Paged space object of size class a, 1024 words total, 1022 words payload.
|
||||
*
|
||||
* (c) 2026 Simon Brooke <simon@journeyman.cc>
|
||||
* Licensed under GPL version 2.0, or, at your option, any later version.
|
||||
*/
|
||||
|
||||
#ifndef __psse_memory_psoa_h
|
||||
#define __psse_memory_psoa_h
|
||||
|
||||
#include <stdint.h>
|
||||
|
||||
#include "memory/header.h"
|
||||
#include "payloads/free.h"
|
||||
|
||||
/**
|
||||
* @brief A paged space object of size class a, 1024 words total, 1022 words
|
||||
* payload.
|
||||
*
|
||||
*/
|
||||
struct psoa {
|
||||
struct pso_header header;
|
||||
union {
|
||||
char bytes[8176];
|
||||
uint64_t words[1022];
|
||||
struct free_payload free;
|
||||
} payload;
|
||||
};
|
||||
|
||||
#endif
|
||||
32
src/c/memory/psob.h
Normal file
32
src/c/memory/psob.h
Normal file
|
|
@ -0,0 +1,32 @@
|
|||
/**
|
||||
* memory/psob.h
|
||||
*
|
||||
* Paged space object of size class b, 2048 words total, 2046 words payload.
|
||||
*
|
||||
* (c) 2026 Simon Brooke <simon@journeyman.cc>
|
||||
* Licensed under GPL version 2.0, or, at your option, any later version.
|
||||
*/
|
||||
|
||||
#ifndef __psse_memory_psob_h
|
||||
#define __psse_memory_psob_h
|
||||
|
||||
#include <stdint.h>
|
||||
|
||||
#include "memory/header.h"
|
||||
#include "payloads/free.h"
|
||||
|
||||
/**
|
||||
* @brief A paged space object of size class b, 2048 words total, 2046 words
|
||||
* payload.
|
||||
*
|
||||
*/
|
||||
struct psob {
|
||||
struct pso_header header;
|
||||
union {
|
||||
char bytes[16368];
|
||||
uint64_t words[2046];
|
||||
struct free_payload free;
|
||||
} payload;
|
||||
};
|
||||
|
||||
#endif
|
||||
32
src/c/memory/psoc.h
Normal file
32
src/c/memory/psoc.h
Normal file
|
|
@ -0,0 +1,32 @@
|
|||
/**
|
||||
* memory/psoc.h
|
||||
*
|
||||
* Paged space object of size class c, 4096 words total, 4094 words payload.
|
||||
*
|
||||
* (c) 2026 Simon Brooke <simon@journeyman.cc>
|
||||
* Licensed under GPL version 2.0, or, at your option, any later version.
|
||||
*/
|
||||
|
||||
#ifndef __psse_memory_psoc_h
|
||||
#define __psse_memory_psoc_h
|
||||
|
||||
#include <stdint.h>
|
||||
|
||||
#include "memory/header.h"
|
||||
#include "payloads/free.h"
|
||||
|
||||
/**
|
||||
* @brief A paged space object of size class c, 4096 words total, 4094 words
|
||||
* payload.
|
||||
*
|
||||
*/
|
||||
struct psoc {
|
||||
struct pso_header header;
|
||||
union {
|
||||
char bytes[32752];
|
||||
uint64_t words[4094];
|
||||
struct free_payload free;
|
||||
} payload;
|
||||
};
|
||||
|
||||
#endif
|
||||
32
src/c/memory/psod.h
Normal file
32
src/c/memory/psod.h
Normal file
|
|
@ -0,0 +1,32 @@
|
|||
/**
|
||||
* memory/psod.h
|
||||
*
|
||||
* Paged space object of size class d, 8192 words total, 8190 words payload.
|
||||
*
|
||||
* (c) 2026 Simon Brooke <simon@journeyman.cc>
|
||||
* Licensed under GPL version 2.0, or, at your option, any later version.
|
||||
*/
|
||||
|
||||
#ifndef __psse_memory_psod_h
|
||||
#define __psse_memory_psod_h
|
||||
|
||||
#include <stdint.h>
|
||||
|
||||
#include "memory/header.h"
|
||||
#include "payloads/free.h"
|
||||
|
||||
/**
|
||||
* @brief A paged space object of size class d, 8192 words total, 8190 words
|
||||
* payload.
|
||||
*
|
||||
*/
|
||||
struct psod {
|
||||
struct pso_header header;
|
||||
union {
|
||||
char bytes[65520];
|
||||
uint64_t words[8190];
|
||||
struct free_payload free;
|
||||
} payload;
|
||||
};
|
||||
|
||||
#endif
|
||||
32
src/c/memory/psoe.h
Normal file
32
src/c/memory/psoe.h
Normal file
|
|
@ -0,0 +1,32 @@
|
|||
/**
|
||||
* memory/psoe.h
|
||||
*
|
||||
* Paged space object of size class e, 16384 words total, 16382 words payload.
|
||||
*
|
||||
* (c) 2026 Simon Brooke <simon@journeyman.cc>
|
||||
* Licensed under GPL version 2.0, or, at your option, any later version.
|
||||
*/
|
||||
|
||||
#ifndef __psse_memory_psoe_h
|
||||
#define __psse_memory_psoe_h
|
||||
|
||||
#include <stdint.h>
|
||||
|
||||
#include "memory/header.h"
|
||||
#include "payloads/free.h"
|
||||
|
||||
/**
|
||||
* @brief A paged space object of size class e, 16384 words total, 16382 words
|
||||
* payload.
|
||||
*
|
||||
*/
|
||||
struct psoe {
|
||||
struct pso_header header;
|
||||
union {
|
||||
char bytes[131056];
|
||||
uint64_t words[16382];
|
||||
struct free_payload free;
|
||||
} payload;
|
||||
};
|
||||
|
||||
#endif
|
||||
32
src/c/memory/psof.h
Normal file
32
src/c/memory/psof.h
Normal file
|
|
@ -0,0 +1,32 @@
|
|||
/**
|
||||
* memory/psof.h
|
||||
*
|
||||
* Paged space object of size class f, 32768 words total, 32766 words payload.
|
||||
*
|
||||
* (c) 2026 Simon Brooke <simon@journeyman.cc>
|
||||
* Licensed under GPL version 2.0, or, at your option, any later version.
|
||||
*/
|
||||
|
||||
#ifndef __psse_memory_psof_h
|
||||
#define __psse_memory_psof_h
|
||||
|
||||
#include <stdint.h>
|
||||
|
||||
#include "memory/header.h"
|
||||
#include "payloads/free.h"
|
||||
|
||||
/**
|
||||
* @brief A paged space object of size class f, 32768 words total, 32766 words
|
||||
* payload.
|
||||
*
|
||||
*/
|
||||
struct psof {
|
||||
struct pso_header header;
|
||||
union {
|
||||
char bytes[262128];
|
||||
uint64_t words[32766];
|
||||
struct free_payload free;
|
||||
} payload;
|
||||
};
|
||||
|
||||
#endif
|
||||
|
|
@ -11,7 +11,7 @@
|
|||
#define __psse_payloads_function_h
|
||||
|
||||
#include "memory/pointer.h"
|
||||
#include "memory/pso.h"
|
||||
#include "memory/pso4.h"
|
||||
|
||||
/**
|
||||
* @brief Tag for an ordinary Lisp function - one whose arguments are pre-evaluated.
|
||||
|
|
@ -41,7 +41,7 @@ struct function_payload {
|
|||
* a cons pointer (representing its result).
|
||||
* \todo check this documentation is current!
|
||||
*/
|
||||
struct pso_pointer ( *executable ) ( struct pso4 *,
|
||||
struct pso_pointer ( *executable ) ( struct pso4*,
|
||||
struct pso_pointer,
|
||||
struct pso_pointer );
|
||||
};
|
||||
|
|
|
|||
|
|
@ -45,11 +45,11 @@
|
|||
* i.e. either an assoc list or a further hashtable.
|
||||
*/
|
||||
struct hashtable_payload {
|
||||
struct cons_pointer hash_fn; /* function for hashing values in this hashtable, or `NIL` to use
|
||||
struct pso_pointer hash_fn; /* function for hashing values in this hashtable, or `NIL` to use
|
||||
the default hashing function */
|
||||
uint32_t n_buckets; /* number of hash buckets */
|
||||
struct cons_pointer buckets[]; /* actual hash buckets, which should be `NIL`
|
||||
struct pso_pointer buckets[]; /* actual hash buckets, which should be `NIL`
|
||||
* or assoc lists or (possibly) further hashtables. */
|
||||
};
|
||||
|
||||
#endif
|
||||
#endif
|
||||
|
|
|
|||
|
|
@ -48,17 +48,17 @@
|
|||
* i.e. either an assoc list or a further namespace.
|
||||
*/
|
||||
struct namespace_payload {
|
||||
struct cons_pointer hash_fn; /* function for hashing values in this namespace, or
|
||||
struct pso_pointer hash_fn; /* function for hashing values in this namespace, or
|
||||
* `NIL` to use the default hashing function */
|
||||
uint32_t n_buckets; /* number of hash buckets */
|
||||
uint32_t unused; /* for word alignment and possible later expansion */
|
||||
struct cons_pointer write_acl; /* it seems to me that it is likely that the
|
||||
struct pso_pointer write_acl; /* it seems to me that it is likely that the
|
||||
* principal difference between a hashtable and a
|
||||
* namespace is that a hashtable has a write ACL
|
||||
* of `NIL`, meaning not writeable by anyone */
|
||||
struct cons_pointer mutex; /* the mutex to lock when modifying this namespace.*/
|
||||
struct cons_pointer buckets[]; /* actual hash buckets, which should be `NIL`
|
||||
struct pso_pointer mutex; /* the mutex to lock when modifying this namespace.*/
|
||||
struct pso_pointer buckets[]; /* actual hash buckets, which should be `NIL`
|
||||
* or assoc lists or (possibly) further hashtables. */
|
||||
};
|
||||
|
||||
#endif
|
||||
#endif
|
||||
|
|
|
|||
|
|
@ -14,6 +14,7 @@
|
|||
|
||||
#include <curl/curl.h>
|
||||
|
||||
#include "io/fopen.h"
|
||||
#include "memory/pointer.h"
|
||||
|
||||
/**
|
||||
|
|
@ -31,7 +32,7 @@ struct stream_payload {
|
|||
/** metadata on the stream (e.g. its file attributes if a file, its HTTP
|
||||
* headers if a URL, etc). Expected to be an association, or nil. Not yet
|
||||
* implemented. */
|
||||
struct cons_pointer meta;
|
||||
struct pso_pointer meta;
|
||||
};
|
||||
|
||||
#endif
|
||||
|
|
|
|||
|
|
@ -11,6 +11,7 @@
|
|||
#define __psse_payloads_special_h
|
||||
|
||||
#include "memory/pointer.h"
|
||||
#include "memory/pso4.h"
|
||||
|
||||
/**
|
||||
* A special form - one whose arguments are not pre-evaluated but passed as
|
||||
|
|
@ -20,25 +21,25 @@
|
|||
#define SPECIALTAG "SFM"
|
||||
#define SPECIALTV 5064275
|
||||
|
||||
/**
|
||||
* @brief Payload of a special form cell.
|
||||
*
|
||||
* Currently identical to the payload of a function cell.
|
||||
* \see function_payload
|
||||
*/
|
||||
struct special_payload {
|
||||
/**
|
||||
* pointer to the source from which the special form was compiled, or NIL
|
||||
* if it is a primitive.
|
||||
*/
|
||||
struct pso_pointer meta;
|
||||
/** pointer to a function which takes a cons pointer (representing
|
||||
* its argument list) and a cons pointer (representing its environment) and a
|
||||
* stack frame (representing the previous stack frame) as arguments and returns
|
||||
* a cons pointer (representing its result). */
|
||||
struct pso_pointer ( *executable ) ( struct pso4 *,
|
||||
struct pso_pointer,
|
||||
struct pso_pointer );
|
||||
};
|
||||
// /**
|
||||
// * @brief Payload of a special form cell.
|
||||
// *
|
||||
// * Currently identical to the payload of a function cell.
|
||||
// * \see function_payload
|
||||
// */
|
||||
// struct special_payload {
|
||||
// /**
|
||||
// * pointer to the source from which the special form was compiled, or NIL
|
||||
// * if it is a primitive.
|
||||
// */
|
||||
// struct pso_pointer meta;
|
||||
// /** pointer to a function which takes a cons pointer (representing
|
||||
// * its argument list) and a cons pointer (representing its environment) and a
|
||||
// * stack frame (representing the previous stack frame) as arguments and returns
|
||||
// * a cons pointer (representing its result). */
|
||||
// struct pso_pointer ( *executable ) ( struct pso4*,
|
||||
// struct pso_pointer,
|
||||
// struct pso_pointer );
|
||||
// };
|
||||
|
||||
#endif
|
||||
|
|
|
|||
|
|
@ -11,6 +11,9 @@
|
|||
#include "memory/pso.h"
|
||||
#include "payloads/stack.h"
|
||||
|
||||
#define STACKTAG "STK"
|
||||
#define STACKTV 4936787
|
||||
|
||||
/**
|
||||
* @brief The maximum depth of stack before we throw an exception.
|
||||
*
|
||||
|
|
|
|||
|
|
@ -13,6 +13,8 @@
|
|||
#define __psse_payloads_stack_h
|
||||
|
||||
#include "memory/pointer.h"
|
||||
#include "memory/pso2.h"
|
||||
#include "memory/pso4.h"
|
||||
|
||||
/*
|
||||
* number of arguments stored in a stack frame
|
||||
|
|
|
|||
|
|
@ -10,6 +10,8 @@
|
|||
#ifndef __psse_payloads_cons_h
|
||||
#define __psse_payloads_cons_h
|
||||
|
||||
#include <stdint.h>
|
||||
|
||||
#include "memory/pointer.h"
|
||||
|
||||
/**
|
||||
|
|
|
|||
|
|
@ -16,6 +16,7 @@
|
|||
* A pointer to an object in vector space.
|
||||
*/
|
||||
#define VECTORPOINTTAG "VSP"
|
||||
#define VECTORPOINTTV 5264214
|
||||
|
||||
/**
|
||||
* @brief payload of a vector pointer cell.
|
||||
|
|
|
|||
|
|
@ -10,6 +10,7 @@
|
|||
#ifndef __psse_payloads_write_stream_h
|
||||
#define __psse_payloads_write_stream_h
|
||||
|
||||
#include "io/fopen.h"
|
||||
#include "memory/pointer.h"
|
||||
|
||||
/**
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue