|
@ -1509,7 +1509,7 @@ static void print_as_utf8(struct context* ctx) { |
|
|
ink_pop(ctx); |
|
|
ink_pop(ctx); |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|
static int get_type_by_name(struct context* ctx, const char* name) { |
|
|
|
|
|
|
|
|
int get_type_by_name(struct context* ctx, const char* name) { |
|
|
int i; |
|
|
int i; |
|
|
for(i = 0; i < ctx->types_top; ++i) { |
|
|
for(i = 0; i < ctx->types_top; ++i) { |
|
|
if(strcmp(ctx->types[i].name, name) == 0) { |
|
|
if(strcmp(ctx->types[i].name, name) == 0) { |
|
@ -1570,12 +1570,6 @@ static struct ink_collection_list gc_noop() { |
|
|
|
|
|
|
|
|
#ifndef NOARRAYLIB |
|
|
#ifndef NOARRAYLIB |
|
|
|
|
|
|
|
|
struct ink_array { |
|
|
|
|
|
int top; |
|
|
|
|
|
int capacity; |
|
|
|
|
|
struct elem* elements; |
|
|
|
|
|
}; |
|
|
|
|
|
|
|
|
|
|
|
static void collect_array(struct context* ctx, void* array) { |
|
|
static void collect_array(struct context* ctx, void* array) { |
|
|
struct ink_array* ary; |
|
|
struct ink_array* ary; |
|
|
ary = array; |
|
|
ary = array; |
|
@ -1613,7 +1607,7 @@ static void push_array_stack_delim(struct context* ctx) { |
|
|
ink_push(ctx, e); |
|
|
ink_push(ctx, e); |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|
static void array_push(struct context* ctx, struct ink_routine* currentRoutine, struct ink_array* ary, struct elem value) { |
|
|
|
|
|
|
|
|
void array_push(struct context* ctx, struct ink_routine* currentRoutine, struct ink_array* ary, struct elem value) { |
|
|
if(ary->elements == NULL) { |
|
|
if(ary->elements == NULL) { |
|
|
ary->elements = ctx->malloc(sizeof(struct elem) * 8); |
|
|
ary->elements = ctx->malloc(sizeof(struct elem) * 8); |
|
|
ary->top = 0; |
|
|
ary->top = 0; |
|
|