summaryrefslogtreecommitdiff
path: root/6/asm.h
diff options
context:
space:
mode:
authorOri Bernstein <ori@eigenstate.org>2015-09-25 00:04:27 -0700
committerOri Bernstein <ori@eigenstate.org>2015-09-25 00:04:27 -0700
commitb1481c67d3e7709020bdb3a107602ab6ac80624f (patch)
tree760efa2193ca8206eab9516bf6fb80a866f6a64f /6/asm.h
parent2c078158d4d8207ac978f4f86e8f3e18e47793eb (diff)
downloadmc-b1481c67d3e7709020bdb3a107602ab6ac80624f.tar.gz
Refer to captured vars through env ptr
The other half to populate an env pointer isn't there, so we haven't enabled this.
Diffstat (limited to '6/asm.h')
-rw-r--r--6/asm.h4
1 files changed, 3 insertions, 1 deletions
diff --git a/6/asm.h b/6/asm.h
index 8f558bc..3f59700 100644
--- a/6/asm.h
+++ b/6/asm.h
@@ -135,7 +135,8 @@ struct Func {
Node **args; /* argument list */
size_t nargs; /* number of args, including hidden ones */
- Htab *stkoff; /* Loc* -> int stackoff map */
+ Htab *stkoff; /* Loc* -> int stkoff map */
+ Htab *envoff; /* Loc* -> int envoff map */
size_t stksz; /* stack size */
Node *ret; /* return value */
@@ -169,6 +170,7 @@ struct Isel {
Htab *spillslots; /* reg id => int stkoff */
Htab *reglocs; /* decl id => Loc *reg */
Htab *stkoff; /* decl id => int stkoff */
+ Htab *envoff; /* decl id => int envoff */
Htab *globls; /* decl id => char *globlname */
/* increased when we spill */