From 0b806ca17ba1a9dc6b5863050090a74e51236745 Mon Sep 17 00:00:00 2001 From: take_cheeze Date: Mon, 2 Sep 2013 00:11:17 +0900 Subject: reduce node size --- include/mruby/compile.h | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) (limited to 'include') diff --git a/include/mruby/compile.h b/include/mruby/compile.h index 0f7cffd08..ed4e9612c 100644 --- a/include/mruby/compile.h +++ b/include/mruby/compile.h @@ -37,8 +37,7 @@ void mrbc_partial_hook(mrb_state *mrb, mrbc_context *c, int (*partial_hook)(stru /* AST node structure */ typedef struct mrb_ast_node { struct mrb_ast_node *car, *cdr; - uint16_t lineno; - char const* filename; + uint16_t lineno, filename; } mrb_ast_node; /* lexer states */ @@ -144,6 +143,10 @@ struct mrb_parser_state { struct mrb_parser_message error_buffer[10]; struct mrb_parser_message warn_buffer[10]; + mrb_sym* filename_table; + size_t filename_table_length; + int current_filename_index; + jmp_buf jmp; }; @@ -152,6 +155,7 @@ void mrb_parser_free(struct mrb_parser_state*); void mrb_parser_parse(struct mrb_parser_state*,mrbc_context*); void mrb_parser_set_filename(struct mrb_parser_state*, char const*); +char const* mrb_parser_get_filename(struct mrb_parser_state*, uint16_t idx); /* utility functions */ #ifdef ENABLE_STDIO -- cgit v1.2.3