p2  0.0
 All Data Structures Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
internal.c
Go to the documentation of this file.
1 
5 #include <stdio.h>
6 #include <stdlib.h>
7 #include <stdarg.h>
8 #include <errno.h>
9 #include "p2.h"
10 #include "internal.h"
11 #include "table.h"
12 #include "gc.h"
13 
20 #ifdef P2
21 PN PN_use, PN_no;
22 #endif
24 
25 PN potion_allocate(Potion *P, PN cl, PN self, PN len) {
26  struct PNData *obj = PN_ALLOC_N(PN_TUSER, struct PNData, PN_INT(len));
27  obj->siz = len;
28  return (PN)obj;
29 }
30 
31 static void potion_init(Potion *P) {
32  PN vtable, obj_vt, num_vt;
33  P->lobby = potion_type_new(P, PN_TLOBBY, 0); // named Lobby resp. P2
34  vtable = potion_type_new(P, PN_TVTABLE, P->lobby); // named Mixin
35  obj_vt = potion_type_new(P, PN_TOBJECT, P->lobby);
36  num_vt = potion_type_new(P, PN_TNUMBER, obj_vt);
37  potion_type_new(P, PN_TDOUBLE, num_vt);
38  potion_type_new(P, PN_TINTEGER, num_vt);
39  potion_type_new(P, PN_TNIL, obj_vt); // named NilKind resp. Undef
40  potion_type_new(P, PN_TBOOLEAN, obj_vt);
41  potion_type_new(P, PN_TSTRING, obj_vt);
42  potion_type_new(P, PN_TTABLE, obj_vt);
43  potion_type_new(P, PN_TCLOSURE, obj_vt);
44  potion_type_new(P, PN_TTUPLE, obj_vt);
45  potion_type_new(P, PN_TFILE, obj_vt);
46  potion_type_new(P, PN_TSTATE, obj_vt); // named Potion
47  potion_type_new(P, PN_TSOURCE, obj_vt);
48  potion_type_new(P, PN_TBYTES, obj_vt);
49  potion_type_new(P, PN_TPROTO, obj_vt);
50  potion_type_new(P, PN_TWEAK, obj_vt);
51  potion_type_new(P, PN_TLICK, obj_vt);
52  potion_type_new(P, PN_TERROR, obj_vt);
53  potion_type_new(P, PN_TCONT, obj_vt);
54 
56  PN_STR0 = PN_STRN("", 0);
57  PN_add = PN_STRN("+", 1);
58  PN_sub = PN_STRN("-", 1);
59  PN_mult = PN_STRN("*", 1);
60  PN_div = PN_STRN("/", 1);
61  PN_rem = PN_STRN("%", 1);
62  PN_bitn = PN_STRN("~", 1);
63  PN_bitl = PN_STRN("<<", 2);
64  PN_bitr = PN_STRN(">>", 2);
65  PN_if = PN_STRN("if", 2);
66  PN_def = PN_STRN("def", 3);
67  PN_cmp = PN_STRN("cmp", 3);
68 #ifdef P2
69  PN_no = PN_STRN("no", 2);
70  PN_use = PN_STRN("use", 3);
71 #endif
72  PN_call = PN_STRN("call", 4);
73  PN_else = PN_STRN("else", 4);
74  PN_loop = PN_STRN("loop", 4);
75  PN_self = PN_STRN("self", 4);
76  PN_name = PN_STRN("name", 4);
77  PN_size = PN_STRN("size", 4);
78  PN_break = PN_STRN("break", 5);
79  PN_class = PN_STRN("class", 5);
80  PN_elsif = PN_STRN("elsif", 5);
81  PN_print = PN_STRN("print", 5);
82  PN_while = PN_STRN("while", 5);
83  PN_length = PN_STRN("length", 6);
84  PN_return = PN_STRN("return", 6);
85  PN_string = PN_STRN("string", 6);
86  PN_lookup = PN_STRN("lookup", 6);
87  PN_number = PN_STRN("number", 6);
88  PN_extern = PN_STRN("extern", 6);
89  PN_compile = PN_STRN("compile", 7);
90  PN_integer = PN_STRN("integer", 7);
91  PN_allocate = PN_STRN("allocate", 8);
92  PN_continue = PN_STRN("continue", 8);
93  PN_delegated = PN_STRN("delegated", 9);
94 
96  potion_def_method(P, 0, vtable, PN_def, PN_FUNC(potion_def_method, "name=S,block=&"));
99 
100  potion_vm_init(P);
104 #ifndef DISABLE_CALLCC
105  potion_cont_init(P);
106 #endif
108  potion_num_init(P);
109  potion_str_init(P);
112  potion_lick_init(P);
114 #ifndef SANDBOX
115  potion_file_init(P);
117 #endif
118 
119  pn_filenames = PN_TUP0();
120 
121  GC_PROTECT(P);
122 }
123 
124 Potion *potion_create(void *sp) {
125  Potion *P = potion_gc_boot(sp); //zeros P
126  P->vt = PN_TSTATE;
127  P->uniq = (PNUniq)potion_rand_int();
128  PN_FLEX_NEW(P->vts, PN_TFLEX, PNFlex, TYPE_BATCH_SIZE);
129  PN_FLEX_SIZE(P->vts) = PN_TYPE_ID(PN_TUSER) + 1;
130  P->prec = PN_PREC;
131  P->fileno = -1;
132  //P->flags = (Potion_Flags)EXEC_VM;
133  potion_init(P);
134  return P;
135 }
136 
139 }
140 
141 PN potion_delegated(Potion *P, PN closure, PN self) {
142  PNType t = PN_FLEX_SIZE(P->vts) + PN_TNIL;
143  PN_FLEX_NEEDS(1, P->vts, PN_TFLEX, PNFlex, TYPE_BATCH_SIZE);
144  return potion_type_new(P, t, self);
145 }
146 
147 PN potion_call(Potion *P, PN cl, PN_SIZE argc, PN * volatile argv) {
148  vPN(Closure) c = PN_CLOSURE(cl);
149  switch (argc) {
150  case 0:
151  return c->method(P, cl, cl);
152  case 1:
153  return c->method(P, cl, argv[0]);
154  case 2:
155  return c->method(P, cl, argv[0], argv[1]);
156  case 3:
157  return c->method(P, cl, argv[0], argv[1], argv[2]);
158  case 4:
159  return c->method(P, cl, argv[0], argv[1], argv[2], argv[3]);
160  case 5:
161  return c->method(P, cl, argv[0], argv[1], argv[2], argv[3], argv[4]);
162  case 6:
163  return c->method(P, cl, argv[0], argv[1], argv[2], argv[3], argv[4],
164  argv[5]);
165  case 7:
166  return c->method(P, cl, argv[0], argv[1], argv[2], argv[3], argv[4],
167  argv[5], argv[6]);
168  case 8:
169  return c->method(P, cl, argv[0], argv[1], argv[2], argv[3], argv[4],
170  argv[5], argv[6], argv[7]);
171  case 9:
172  return c->method(P, cl, argv[0], argv[1], argv[2], argv[3], argv[4],
173  argv[5], argv[6], argv[7], argv[8]);
174  case 10:
175  return c->method(P, cl, argv[0], argv[1], argv[2], argv[3], argv[4],
176  argv[5], argv[6], argv[7], argv[8], argv[9]);
177  case 11:
178  return c->method(P, cl, argv[0], argv[1], argv[2], argv[3], argv[4],
179  argv[5], argv[6], argv[7], argv[8], argv[9], argv[10]);
180  case 12:
181  return c->method(P, cl, argv[0], argv[1], argv[2], argv[3], argv[4],
182  argv[5], argv[6], argv[7], argv[8], argv[9], argv[10], argv[11]);
183  case 13:
184  return c->method(P, cl, argv[0], argv[1], argv[2], argv[3], argv[4],
185  argv[5], argv[6], argv[7], argv[8], argv[9], argv[10], argv[11],
186  argv[12]);
187  case 14:
188  return c->method(P, cl, argv[0], argv[1], argv[2], argv[3], argv[4],
189  argv[5], argv[6], argv[7], argv[8], argv[9], argv[10], argv[11],
190  argv[12], argv[13]);
191  case 15:
192  return c->method(P, cl, argv[0], argv[1], argv[2], argv[3], argv[4],
193  argv[5], argv[6], argv[7], argv[8], argv[9], argv[10], argv[11],
194  argv[12], argv[13], argv[14]);
195  }
196  return PN_NIL; // TODO: error "too many arguments"
197 }
198 
200  return potion_type(obj);
201 }
202 
207  switch (type) {
208  case PN_TNIL: return 'n'; //0 nil? (unused)
209  case PN_TNUMBER: return 'N'; //1 Number = Integer or Double
210  case PN_TBOOLEAN: return 'B'; //2 Boolean (unused)
211  case PN_TINTEGER: return 'I'; //3
212  case PN_TDOUBLE: return 'D'; //4
213  case PN_TSTRING: return 'S'; //5 String
214  case PN_TWEAK: return 0; //6 (illegal)
215  case PN_TCLOSURE: return '&'; //7
216  case PN_TTUPLE: return 'u'; //8 (used)
217  case PN_TSTATE: return 's'; //9
218  case PN_TFILE: return 'F'; //10
219  case PN_TOBJECT: return 'o'; //11 any (used)
220  case PN_TVTABLE: return 't'; //12 type (unused)
221  case PN_TSOURCE: return 'a'; //13 ast or code (used in source_compile)
222  case PN_TBYTES: return 'b'; //14 aio (used)
223  case PN_TPROTO: return 'P'; //15
224  case PN_TLOBBY: return 'l'; //16
225  case PN_TTABLE: return 'T'; //17 (used)
226  case PN_TLICK: return 'k'; //18
227  case PN_TFLEX: return 'f'; //19
228  case PN_TSTRINGS: return 'x'; //20
229  case PN_TERROR: return 'r'; //21
230  case PN_TCONT: return 'c'; //22
231  case PN_TUSER: return 'm'; //23 generated mixins (unused)
232  default: return 'm'; //23++
233  }
234 }
235 
236 PN potion_error(Potion *P, PN msg, long lineno, long charno, PN excerpt) {
237  struct PNError *e = PN_ALLOC(PN_TERROR, struct PNError);
238  e->message = msg;
239  e->line = PN_NUM(lineno);
240  e->chr = PN_NUM(charno);
241  e->excerpt = excerpt;
242  return (PN)e;
243 }
244 
246  vPN(Error) e = (struct PNError *)self;
247  if (e->excerpt == PN_NIL)
248  return potion_str_format(P, "** %s\n", PN_STR_PTR(e->message));
249  return potion_str_format(P, "** %s\n"
250  "** Where: (line %ld, character %ld) %s\n", PN_STR_PTR(e->message),
251  PN_INT(e->line), PN_INT(e->chr), PN_STR_PTR(e->excerpt));
252 }
253 
255  PN err_vt = PN_VTABLE(PN_TERROR);
256  potion_method(err_vt, "string", potion_error_string, 0);
257 }
258 
259 PN potion_io_error(Potion *P, const char *msg) {
260  return potion_error(P, potion_str_format(P, "Error %s: %s", msg, strerror(errno)),
261  0, 0, 0);
262 }
263 
264 static inline char *potion_type_name(Potion *P, PN obj) {
265  obj = potion_fwd(obj);
266  return PN_IS_PTR(obj)
268  : PN_IS_NIL(obj) ? "NilKind"
269  : PN_IS_INT(obj) ? "Integer"
270  : "Boolean";
271 }
272 
274  return potion_error(P, potion_str_format(P, "Invalid type %s", potion_type_name(P, obj)),
275  0, 0, 0);
276 }
277 PN potion_type_error_want(Potion *P, const char *param, PN obj, const char *type) {
278  return potion_error(P, potion_str_format(P, "Invalid type %s for %s, expected %s",
279  potion_type_name(P, obj), param, type),
280  0, 0, 0);
281 }
282 
283 #define PN_EXIT_ERROR 1
284 #define PN_EXIT_FATAL 2
285 
286 void potion_fatal(char *message) {
287  fprintf(stderr, "** %s\n", message);
288  exit(PN_EXIT_FATAL);
289 }
290 
291 // TODO: syntax errors should be collected and emitted at the end of the
292 // full compilation
293 void potion_syntax_error(Potion *P, struct PNSource *t, const char *fmt, ...) {
294  va_list args;
295  PN out = potion_bytes(P, 36);
296  ((struct PNBytes * volatile)out)->len = 0;
297  va_start(args, fmt);
298  pn_printf(P, out, fmt, args);
299  va_end(args);
300  fprintf(stderr, "** Syntax error: %s at \"%s\", line %d\n", PN_STR_PTR(out),
301  AS_STR(t->line), t->loc.lineno);
302  exit(PN_EXIT_FATAL);
303 }
304 
306  potion_fatal("Couldn't allocate memory.");
307 }
308 
309 // say
310 void potion_p(Potion *P, PN x) {
312  printf("\n");
313 }
314 
315 void potion_esp(void **esp) {
316  PN x;
317  *esp = (void *)&x;
318 }
319 
320 #ifdef DEBUG
321 void potion_dump(Potion *P, PN data) {
322  PN pd = potion_send(data, PN_string);
323  PN pt = potion_send(PN_VTABLE(PN_TYPE(data)), PN_string);
324  char *d = pd ? PN_STR_PTR(pd) : NIL_NAME;
325  char *t = pt ? PN_STR_PTR(pt) : NILKIND_NAME;
326  printf("%s (%s)\n", d, t);
327 }
328 #define pdump(data) potion_dump(P, data)
329 
330 void potion_dump_stack(Potion *P) {
331  long n;
332  PN *end, *ebp, *start = P->mem->cstack;
333  struct PNMemory *M = P->mem;
334  POTION_ESP(&end);
335  POTION_EBP(&ebp);
336 #if POTION_STACK_DIR > 0
337  n = end - start;
338 #else
339  n = start - end + 1;
340  start = end;
341  end = M->cstack;
342 #endif
343 
344  printf("-- dumping %ld stack from %p to %p --\n", n, start, end);
345  printf(" ebp = %p, *ebp = 0x%lx\n", ebp, *ebp);
346  while (n--) {
347  vPN(Object) o = (struct PNObject*)*start;
348  printf(" stack(%ld) = %p: 0x%lx", n, start, *start);
349  if (IS_GC_PROTECTED(*start))
350  printf(" vt=%x prot", PN_TYPE(o));
351  else if (IN_BIRTH_REGION(*start))
352  printf(" vt=%x birth", PN_TYPE(o));
353  else if (IN_OLDER_REGION(*start))
354  printf(" vt=%x OLD", PN_TYPE(o));
355 
356  if (*start == 0)
357  printf(" nil\n");
358  else if (*start & 1)
359  printf(" %ld INT\n", PN_INT(*start));
360  else if (*start & 2)
361  printf(" %s BOOL\n", *start == 2 ? "false" : "true");
362  else
363  printf(" \n");
364  start++;
365  }
366 }
367 #endif
PN PN_compile
Definition: internal.c:14
PN PN_loop
Definition: internal.c:14
PN potion_delegated(Potion *P, PN closure, PN self)
Definition: internal.c:141
static void potion_init(Potion *P)
Definition: internal.c:31
#define PN_FLEX_NEW(N, V, T, S)
Definition: internal.h:35
PN potion_bytes(Potion *, size_t)
Definition: string.c:342
PN potion_def_method(Potion *P, PN closure, PN self, PN key, PN method)
define a method for a class
Definition: objmodel.c:351
PN PN_extern
Definition: internal.c:19
void potion_destroy(Potion *P)
Definition: internal.c:137
PN PN_return
Definition: internal.c:14
PN line
PNString of src line.
Definition: potion.h:447
#define PN_FLEX_NEEDS(X, N, V, T, S)
Definition: internal.h:40
byte strings are raw character data, volatile, may be appended/changed.
Definition: potion.h:347
void potion_table_init(Potion *)
Definition: table.c:824
#define PN_TSTATE
Definition: potion.h:116
#define PN_TSTRING
Definition: potion.h:112
#define PN_TCLOSURE
Definition: potion.h:114
unsigned long potion_rand_int(void)
generates a random number on [0,0xffffffff]-interval
Definition: mt19937ar.c:138
PN pn_filenames
Definition: internal.c:23
#define PN_ALLOC_N(V, T, C)
Definition: internal.h:13
PN PN_lookup
Definition: internal.c:14
#define PN_CLOSURE(x)
Definition: potion.h:225
PN PN_elsif
Definition: internal.c:14
#define PN_TUSER
Definition: potion.h:130
#define NIL_NAME
Definition: potion.h:149
PN PN_allocate
common method names in GC protected area
Definition: internal.c:14
PN potion_error_string(Potion *P, PN cl, PN self)
Definition: internal.c:245
struct to wrap arbitrary data that we may want to allocate from Potion.
Definition: potion.h:326
#define PN_EXIT_FATAL
Definition: internal.c:284
PN PN_cmp
Definition: internal.c:18
#define PN_TLICK
Definition: potion.h:125
PN PN_bitn
Definition: internal.c:17
void potion_lobby_init(Potion *P)
Definition: objmodel.c:704
#define potion_method(RCV, MSG, FN, SIG)
Definition: potion.h:789
void potion_cont_init(Potion *P)
Definition: callcc.c:169
#define PN_TFILE
Definition: potion.h:117
#define AS_STR(x)
Definition: potion.h:249
#define IN_BIRTH_REGION(p)
Definition: gc.h:52
#define PN_TCONT
Definition: potion.h:129
non-API GC internals
void potion_num_init(Potion *P)
Definition: number.c:439
#define PN_TNIL
Definition: potion.h:107
unsigned int PNUniq
Definition: potion.h:79
unsigned int PNType
Definition: potion.h:79
#define GC_PROTECT(P)
Definition: internal.h:137
PN PN_break
Definition: internal.c:14
static PN potion_fwd(PN)
the potion type is the 't' in the vtable tuple (m,t)
Definition: potion.h:570
#define TYPE_BATCH_SIZE
Definition: internal.h:33
struct PNMemory * mem
allocator/gc
Definition: potion.h:660
#define PN_TINTEGER
Definition: potion.h:111
char potion_type_char(PNType type)
valid signature types syntax.y: arg-type = ('s' | 'S' | 'n' | 'N' | 'b' | 'B' | 'k' | 't' | 'o' | 'O'...
Definition: internal.c:206
PN PN_integer
Definition: internal.c:19
PN_SIZE fileno
currently parsed file
Definition: potion.h:669
PN PN_add
Definition: internal.c:17
#define PN_TTUPLE
Definition: potion.h:115
PN excerpt
Definition: potion.h:502
PN PN_string
Definition: internal.c:14
void potion_file_init(Potion *P)
set Env global
Definition: file.c:189
#define PN_TFLEX
Definition: potion.h:126
#define PN_TBYTES
Definition: potion.h:121
#define PN_INT(x)
Definition: potion.h:214
#define PN_NUM(i)
Definition: potion.h:213
static char * potion_type_name(Potion *P, PN obj)
Definition: internal.c:264
void * cstack
machine stack start
Definition: potion.h:685
unsigned int PN_SIZE
Definition: potion.h:79
void potion_primitive_init(Potion *)
Definition: primitive.c:90
PN message
Definition: potion.h:500
standard objects act like C structs the fields are defined by the type and it's a fixed size...
Definition: potion.h:304
#define PN_IS_NIL(v)
Definition: potion.h:169
Potion * potion_gc_boot(void *sp)
Definition: gc.c:658
#define PN_TVTABLE
Definition: potion.h:119
int prec
double precision
Definition: potion.h:662
PN lobby
root namespace
Definition: potion.h:657
PN PN_size
Definition: internal.c:18
#define PN_TYPE_ID(t)
Definition: potion.h:135
#define PN_TOBJECT
Definition: potion.h:118
#define PN_TSOURCE
Definition: potion.h:120
void potion_lick_init(Potion *P)
Definition: lick.c:68
PN potion_io_error(Potion *P, const char *msg)
Definition: internal.c:259
#define M
Definition: mt19937ar.c:53
the garbage collector
Definition: potion.h:676
#define PN_TDOUBLE
Definition: potion.h:110
#define PN_FLEX_SIZE(N)
Definition: potion.h:240
PN potion_type_error(Potion *P, PN obj)
Definition: internal.c:273
PN PN_sub
Definition: internal.c:17
void potion_syntax_error(Potion *P, struct PNSource *t, const char *fmt,...)
Definition: internal.c:293
#define IN_OLDER_REGION(p)
Definition: gc.h:55
#define PN_TBOOLEAN
Definition: potion.h:109
#define PN_TWEAK
Definition: potion.h:113
PN_SIZE siz
Definition: potion.h:328
void potion_object_init(Potion *P)
Definition: objmodel.c:669
#define POTION_ESP(p)
Definition: internal.h:115
PN PN_mult
Definition: internal.c:17
PN potion_error(Potion *P, PN msg, long lineno, long charno, PN excerpt)
Definition: internal.c:236
non-API internal parts
PN PN_if
Definition: internal.c:14
PNFlex *volatile vts
built in types
Definition: potion.h:658
an error, including a description, file location, a brief excerpt.
Definition: potion.h:497
#define PN_IS_PTR(v)
Definition: potion.h:168
#define PN_TLOBBY
Definition: potion.h:123
PN potion_str_format(Potion *, const char *,...) __attribute__((format(printf
#define NILKIND_NAME
Definition: potion.h:150
void potion_esp(void **esp)
Definition: internal.c:315
PN chr
Definition: potion.h:501
PN potion_type_new(Potion *P, PNType t, PN self)
create a non-user type, derived from self
Definition: objmodel.c:212
#define PN_TSTRINGS
Definition: potion.h:127
Potion * potion_create(void *sp)
the potion API
Definition: internal.c:124
PN potion_call(Potion *P, PN cl, PN_SIZE argc, PN *volatile argv)
Definition: internal.c:147
PN line
Definition: potion.h:501
PN PN_call
Definition: internal.c:14
PN potion_allocate(Potion *P, PN cl, PN self, PN len)
Definition: internal.c:25
PN PN_delegated
Definition: internal.c:14
the global interpreter state P. currently singleton (not threads yet)
Definition: potion.h:653
#define PN_ALLOC(V, T)
Definition: internal.h:12
PN PN_div
Definition: internal.c:17
PN PN_def
Definition: internal.c:14
PN_SIZE pn_printf(Potion *, PN, const char *,...) __attribute__((format(printf
PN PN_while
Definition: internal.c:14
PNType potion_kind_of(PN obj)
Definition: internal.c:199
void potion_loader_init(Potion *P)
Definition: load.c:225
PN PN_class
Definition: internal.c:14
#define PN_TYPE(x)
Definition: potion.h:133
#define PN_TPROTO
Definition: potion.h:122
void potion_error_init(Potion *P)
Definition: internal.c:254
The p2 API.
PN PN_print
Definition: internal.c:14
#define PN_IS_INT(v)
Definition: potion.h:171
void potion_str_init(Potion *)
Definition: string.c:491
#define IS_GC_PROTECTED(p)
Definition: gc.h:49
void potion_str_hash_init(Potion *)
Definition: string.c:487
static PNType potion_type(PN obj)
either immediate (NUM,BOOL,NIL) or a fwd
Definition: potion.h:532
the central table type, based on core/khash.h
PN PN_number
Definition: internal.c:18
void potion_compiler_init(Potion *P)
Definition: compile.c:1424
PN potion_lookup(Potion *P, PN closure, PN self, PN key)
used in bind and def_method
Definition: objmodel.c:396
#define potion_send(RCV, MSG, ARGS...)
method caches (more great stuff from ian piumarta)
Definition: potion.h:781
PN potion_type_error_want(Potion *P, const char *param, PN obj, const char *type)
Definition: internal.c:277
#define PN_STRN(x, l)
Definition: potion.h:220
void potion_source_init(Potion *P)
Definition: ast.c:157
void potion_p(Potion *P, PN x)
Definition: internal.c:310
PN PN_bitl
Definition: internal.c:17
#define PN_TTABLE
Definition: potion.h:124
void potion_allocation_error(void)
Definition: internal.c:305
#define vPN(t)
Definition: buffile.c:34
volatile _PN PN
Definition: potion.h:81
PN PN_STR0
Definition: internal.c:18
PNType lineno
Definition: potion.h:444
#define PN_NIL
Definition: potion.h:139
PN PN_name
Definition: internal.c:18
#define PN_TNUMBER
Definition: potion.h:108
#define POTION_EBP(p)
Definition: internal.h:118
#define PN_FUNC(f, s)
Definition: potion.h:228
PN PN_else
Definition: internal.c:14
#define PN_TERROR
Definition: potion.h:128
struct PNSource::@1 loc
bitfield of fileno and lineno
PN PN_self
Definition: internal.c:14
PN PN_bitr
Definition: internal.c:17
void potion_vm_init(Potion *)
Definition: vm.c:129
void potion_fatal(char *message)
Definition: internal.c:286
const u8 args
Definition: compile.c:31
void potion_dump_stack(Potion *)
#define PN_STR_PTR(x)
Definition: potion.h:222
PN PN_continue
Definition: internal.c:14
#define PN_TUP0()
Definition: potion.h:270
#define PN_VTABLE(t)
Definition: potion.h:136
PN PN_rem
Definition: internal.c:17
PN PN_length
Definition: internal.c:18
void potion_gc_release(Potion *P)
Definition: gc.c:691
#define PN_PREC
Definition: potion.h:217