diff options
author | Adrian Thurston <thurston@complang.org> | 2015-03-29 19:27:34 -0400 |
---|---|---|
committer | Adrian Thurston <thurston@complang.org> | 2015-03-29 19:27:34 -0400 |
commit | 2d8123e782deb1f4d9a3412b37eacc545fb8053e (patch) | |
tree | f3a87b11084bccd1a4afdcf96af00c265c69f09d /src/iter.c | |
parent | 49b347705e29596edb6e091b855e021601e854c5 (diff) | |
download | colm-2d8123e782deb1f4d9a3412b37eacc545fb8053e.tar.gz |
use contiguous space on caller stack for args
This change will allow us to remove the complicated contiguous computation and
instruction before a call. It simplifies the call procedure and will also make
stack unwinding simpler.
Diffstat (limited to 'src/iter.c')
-rw-r--r-- | src/iter.c | 8 |
1 files changed, 6 insertions, 2 deletions
@@ -267,7 +267,6 @@ void userIterDestroy( Program *prg, Tree ***psp, UserIter *uiter ) vm_popn( uiter->yieldSize ); vm_popn( sizeof(UserIter) / sizeof(Word) ); - vm_popn( argSize ); uiter->type = 0; @@ -289,9 +288,14 @@ void userIterDestroy2( Program *prg, Tree ***psp, UserIter *uiter ) vm_popn( uiter->yieldSize ); vm_popn( sizeof(UserIter) / sizeof(Word) ); - vm_popn( argSize ); + + /* Contiguous push. */ vm_pop_tree(); + /* The IN_PREP_ARGS stack data. */ + vm_popn( argSize ); + vm_pop_value(); + uiter->type = 0; *psp = sp; |