summaryrefslogtreecommitdiff
path: root/src/bytecode.c
diff options
context:
space:
mode:
authorAdrian Thurston <thurston@colm.net>2018-05-14 23:04:03 -0400
committerAdrian Thurston <thurston@colm.net>2018-05-14 23:04:03 -0400
commitc923930f14224b5b46ddc7e95352247e698bcfe8 (patch)
tree615477f30b5902509c61fa7f56747389ead4d5fd /src/bytecode.c
parent5ac9c1fa04224dd1860b6cbd8fb22df63d800f01 (diff)
downloadcolm-c923930f14224b5b46ddc7e95352247e698bcfe8.tar.gz
init stop_id when a parser is constructed
removed the setting of the stop_id from the parse_frag call
Diffstat (limited to 'src/bytecode.c')
-rw-r--r--src/bytecode.c10
1 files changed, 6 insertions, 4 deletions
diff --git a/src/bytecode.c b/src/bytecode.c
index 1c449521..ed2a464b 100644
--- a/src/bytecode.c
+++ b/src/bytecode.c
@@ -431,7 +431,7 @@ static tree_t *construct_arg0( program_t *prg, int argc, const char **argv, cons
static list_t *construct_argv( program_t *prg, int argc, const char **argv, const int *argl )
{
- list_t *list = (list_t*)colm_construct_generic( prg, prg->rtd->argv_generic_id );
+ list_t *list = (list_t*)colm_construct_generic( prg, prg->rtd->argv_generic_id, 0 );
int i;
for ( i = 1; i < argc; i++ ) {
size_t len = argl != 0 ? argl[i] : strlen(argv[i]);
@@ -454,7 +454,7 @@ static list_t *construct_stds( program_t *prg )
{
make_stdout( prg );
- list_t *list = (list_t*)colm_construct_generic( prg, prg->rtd->stds_generic_id );
+ list_t *list = (list_t*)colm_construct_generic( prg, prg->rtd->stds_generic_id, 0 );
struct_t *strct = colm_struct_new_size( prg, 16 );
strct->id = prg->rtd->stds_el_id;
@@ -2932,11 +2932,13 @@ again:
}
case IN_CONS_GENERIC: {
half_t generic_id;
+ half_t stop_id;
read_half( generic_id );
+ read_half( stop_id );
- debug( prg, REALM_BYTECODE, "IN_CONS_GENERIC %hd\n", generic_id );
+ debug( prg, REALM_BYTECODE, "IN_CONS_GENERIC %hd %hd\n", generic_id, stop_id );
- struct_t *gen = colm_construct_generic( prg, generic_id );
+ struct_t *gen = colm_construct_generic( prg, generic_id, stop_id );
vm_push_struct( gen );
break;
}