Much more progress, still doesn't compile.

This commit is contained in:
Simon Brooke 2026-03-30 09:35:34 +01:00
parent 1ce9fbda77
commit 60921be3d4
25 changed files with 326 additions and 89 deletions

View file

@ -0,0 +1,13 @@
#import "memory/pointer.h"
#import "memory/pso.h"
#import "payloads/exception.h"
/**
* @param p a pointer to an object.
* @return true if that object is an exception, else false.
*/
bool exceptionp( struct pso_pointer p) {
return (get_tag_value( p) == EXCEPTIONTV);
}

View file

@ -9,6 +9,7 @@
#ifndef __psse_payloads_exception_h
#define __psse_payloads_exception_h
#include <stdbool.h>
#include "memory/pointer.h"
@ -27,5 +28,6 @@ struct exception_payload {
struct pso_pointer cause;
};
bool exceptionp( struct pso_pointer p);
#endif

View file

@ -13,6 +13,7 @@
#define __psse_payloads_stack_h
#include "memory/pointer.h"
#include "memory/pso4.h"
#define STACKTAG "STK"
#define STACKTV 4936787
@ -47,4 +48,6 @@ struct stack_frame_payload {
uint32_t depth;
};
struct pso_pointer fetch_arg( struct pso4 *frame, unsigned int index );
#endif

View file

@ -0,0 +1,18 @@
/**
* payloads/vector_pointer.c
*
* A pointer to an object in vector space.
*
* (c) 2026 Simon Brooke <simon@journeyman.cc>
* Licensed under GPL version 2.0, or, at your option, any later version.
*/
#include <stdbool.h>
#include "memory/pointer.h"
#include "memory/pso.h"
#include "payloads/vector_pointer.h"
bool vectorpointp( struct pso_pointer p) {
return (get_tag_value( p) == VECTORPOINTTV);
}

View file

@ -10,6 +10,8 @@
#ifndef __psse_payloads_vector_pointer_h
#define __psse_payloads_vector_pointer_h
#include <stdbool.h>
#include "memory/pointer.h"
/**
@ -37,4 +39,6 @@ struct vectorp_payload {
void *address;
};
bool vectorpointp( struct pso_pointer p);
#endif