diff options
author | Roberto Ierusalimschy <roberto@inf.puc-rio.br> | 2000-03-29 17:19:20 -0300 |
---|---|---|
committer | Roberto Ierusalimschy <roberto@inf.puc-rio.br> | 2000-03-29 17:19:20 -0300 |
commit | a69356e9e0a7525b1cebadc928a0efcce8c39b46 (patch) | |
tree | c676ee2997c699d3e0b036323ecbafa7ea0d786f /lref.c | |
parent | b53dc0c4853c56694dda727793e5f6188de39dd8 (diff) | |
download | lua-a69356e9e0a7525b1cebadc928a0efcce8c39b46.tar.gz lua-a69356e9e0a7525b1cebadc928a0efcce8c39b46.tar.bz2 lua-a69356e9e0a7525b1cebadc928a0efcce8c39b46.zip |
no more special cases for closures with 0 upvalues (performance is the same,
memory use a little higher, code much simpler).
Diffstat (limited to 'lref.c')
-rw-r--r-- | lref.c | 6 |
1 files changed, 2 insertions, 4 deletions
@@ -1,5 +1,5 @@ | |||
1 | /* | 1 | /* |
2 | ** $Id: lref.c,v 1.9 2000/03/10 18:37:44 roberto Exp roberto $ | 2 | ** $Id: lref.c,v 1.10 2000/03/27 20:10:21 roberto Exp roberto $ |
3 | ** reference mechanism | 3 | ** reference mechanism |
4 | ** See Copyright Notice in lua.h | 4 | ** See Copyright Notice in lua.h |
5 | */ | 5 | */ |
@@ -88,9 +88,7 @@ static int ismarked (const TObject *o) { | |||
88 | return o->value.a->marked; | 88 | return o->value.a->marked; |
89 | case TAG_LCLOSURE: case TAG_CCLOSURE: | 89 | case TAG_LCLOSURE: case TAG_CCLOSURE: |
90 | return o->value.cl->marked; | 90 | return o->value.cl->marked; |
91 | case TAG_LPROTO: | 91 | default: /* number */ |
92 | return o->value.tf->marked; | ||
93 | default: /* number or cproto */ | ||
94 | return 1; | 92 | return 1; |
95 | } | 93 | } |
96 | } | 94 | } |