Still doesn't compile, but I think excellent progress.

This commit is contained in:
Simon Brooke 2026-04-28 11:54:15 +01:00
parent dbeb99759a
commit aac4669a3d
34 changed files with 1128 additions and 673 deletions

View file

@ -0,0 +1,43 @@
/**
* privileged_keywords.c
*
* Post Scarcity Soctware Environment
*
* Keywords essential to the operation of the system. I'm not certain that
* there's any necessity to have privileged keywords, but as these are
* keywords that will be used exceedingly frequently, we might as well
* make them cheap to access.
*
* Copyright (c): 27 Apr 2026 Simon Brooke <simon@journeyman.cc>
* Licensed under GPL version 2.0, or, at your option, any later version.
*/
#include "environment/privileged_keywords.h"
#include "memory/node.h"
#include "memory/pointer.h"
#include "memory/pso.h"
#include "payloads/cons.h"
#include "ops/string_ops.h"
/**
* location metadata for exceptions (and possibly location in other contexts).
*/
struct pso_pointer privileged_keyword_location;
/**
* name metadata for compiled functions.
*/
struct pso_pointer privileged_keyword_name;
#define load_and_lock(var,val)var = lock_object(c_string_to_lisp_keyword(nil, val))
struct pso_pointer initialise_privileged_keywords( struct pso_pointer env){
load_and_lock(privileged_keyword_location, PK_LOCATION);
load_and_lock( privileged_keyword_name, PK_NAME);
}