|
Post Scarcity
A prototype for a post scarcity programming environment
|
#include <math.h>#include <stdint.h>#include <stdlib.h>#include <string.h>#include <stdio.h>#include <wchar.h>#include <wctype.h>#include "memory/conspage.h"#include "memory/consspaceobject.h"#include "debug.h"#include "memory/hashmap.h"#include "memory/stack.h"#include "memory/vectorspace.h"#include "ops/intern.h"Go to the source code of this file.
Functions | |
| void | free_vso (struct cons_pointer pointer) |
| for vector space pointers, free the actual vector-space object. | |
| struct cons_pointer | make_vec_pointer (struct vector_space_object *address, uint32_t tag) |
Make a cons_space_object which points to the vector_space_object with this tag at this address. | |
| struct cons_pointer | make_vso (uint32_t tag, uint64_t payload_size) |
Allocate a vector space object with this payload_size and tag, and return a cons_pointer which points to an object whigh points to it. | |
| void free_vso | ( | struct cons_pointer | pointer | ) |
for vector space pointers, free the actual vector-space object.
Dangerous!
Definition at line 123 of file vectorspace.c.
References DEBUG_ALLOC, debug_printf(), free_hashmap(), free_stack_frame(), get_stack_frame(), HASHTV, vector_space_object::header, cons_space_object::payload, pointer2cell, STACKFRAMETV, and vector_space_header::tag.
Referenced by free_cell().
| struct cons_pointer make_vec_pointer | ( | struct vector_space_object * | address, |
| uint32_t | tag | ||
| ) |
Make a cons_space_object which points to the vector_space_object with this tag at this address.
@address the address of the vector_space_object to point to. @tag the vector-space tag of the particular type of vector-space object, NOT VECTORPOINTTV.
Definition at line 42 of file vectorspace.c.
References allocate_cell(), DEBUG_ALLOC, debug_dump_object(), debug_print(), debug_printf(), cons_space_object::payload, pointer2cell, cons_space_object::tag, and VECTORPOINTTV.
Referenced by make_vso().
| struct cons_pointer make_vso | ( | uint32_t | tag, |
| uint64_t | payload_size | ||
| ) |
Allocate a vector space object with this payload_size and tag, and return a cons_pointer which points to an object whigh points to it.
@tag the vector-space tag of the particular type of vector-space object, NOT VECTORPOINTTAG. @payload_size the size of the payload required, in bytes.
Definition at line 75 of file vectorspace.c.
References DEBUG_ALLOC, debug_dump_object(), debug_print(), debug_printf(), vector_space_object::header, make_vec_pointer(), NIL, vector_space_object::payload, pointer2cell, vector_space_header::size, vector_space_header::tag, and vector_space_header::vecp.
Referenced by make_empty_frame(), and make_hashmap().