Much more progress, still doesn't compile.
This commit is contained in:
parent
1ce9fbda77
commit
60921be3d4
25 changed files with 326 additions and 89 deletions
13
src/c/payloads/exception.c
Normal file
13
src/c/payloads/exception.c
Normal 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);
|
||||
}
|
||||
|
|
@ -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
|
||||
|
|
|
|||
|
|
@ -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
|
||||
|
|
|
|||
18
src/c/payloads/vector_pointer.c
Normal file
18
src/c/payloads/vector_pointer.c
Normal 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);
|
||||
}
|
||||
|
|
@ -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
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue