ref: 442b8d27a1ef17c3127a4ca58f2df62523243270
parent: cb5af5f1ce6b4a99795ae200b345bc6ac4421a90
author: Tor Andersson <[email protected]>
date: Sat Jan 18 10:04:12 EST 2014
Rename AST free-list.
--- a/jsparse.c
+++ b/jsparse.c
@@ -39,8 +39,8 @@
node->number = 0;
node->string = NULL;
- node->next = J->ast;
- J->ast = node;
+ node->gcnext = J->gcast;
+ J->gcast = node;
return node;
}
@@ -61,13 +61,13 @@
void jsP_freeparse(js_State *J)
{
- js_Ast *node = J->ast;
+ js_Ast *node = J->gcast;
while (node) {
- js_Ast *next = node->next;
+ js_Ast *next = node->gcnext;
free(node);
node = next;
}
- J->ast = NULL;
+ J->gcast = NULL;
}
/* Lookahead */
--- a/jsparse.h
+++ b/jsparse.h
@@ -120,7 +120,7 @@
js_Ast *a, *b, *c, *d;
double number;
const char *string;
- js_Ast *next; /* next in alloc list */
+ js_Ast *gcnext; /* next in alloc list */
};
js_Ast *jsP_parse(js_State *J, const char *filename, const char *source);
void jsP_optimize(js_State *J, js_Ast *prog);
--- a/jsstate.h
+++ b/jsstate.h
@@ -26,7 +26,7 @@
int lookahead;
const char *text;
double number;
- js_Ast *ast; /* list of allocated nodes to free after parsing */
+ js_Ast *gcast; /* list of allocated nodes to free after parsing */
/* compiler */
js_Function *fun; /* list of allocated functions to free on errors */