Still in progress. Nothing workds.

This commit is contained in:
Simon Brooke 2026-04-21 14:43:09 +01:00
parent aa5b34368e
commit ef59563e25
14 changed files with 206 additions and 180 deletions

View file

@ -23,6 +23,8 @@
* @brief allocate an exception object, and, if successful, return a pointer
* to it.
*
* (exception message meta cause)
*
* Throwing an exception while generating an exception is meaningless. If
* allocation fails utterly (i.e. out of heap, out of page space) this will
* have to return `nil`, which might give rise to hard to trace bugs. But
@ -34,10 +36,13 @@
* or `nil`
* @param cause the exception that caused this exception to be `thrown`.
*/
struct pso_pointer make_exception( struct pso_pointer message,
struct pso_pointer frame,
struct pso_pointer meta,
struct pso_pointer cause ) {
struct pso_pointer make_exception( struct pso_pointer frame_pointer) {
struct pso4* frame = pointer_to_pso4( frame_pointer);
struct pso_pointer message = fetch_arg(frame, 0);
struct pso_pointer previous = frame->payload.stack_frame.previous;
struct pso_pointer meta = fetch_arg( frame, 1);
struct pso_pointer cause = fetch_arg( frame, 2);
struct pso_pointer result =
allocate( pointer_to_pso4( frame ), EXCEPTIONTAG, 3 );