aboutsummaryrefslogtreecommitdiff
path: root/src/lj_obj.h
diff options
context:
space:
mode:
authorMike Pall <mike>2010-01-09 23:59:43 +0100
committerMike Pall <mike>2010-01-09 23:59:43 +0100
commit99d153bef9725db226614558d01df829afafee3c (patch)
treeec5c4778a0ac5e054fc8c3d337381e1d52f626bc /src/lj_obj.h
parent2cc554db0cb37ac3600cccab97c657bb532e3c4e (diff)
downloadluajit-99d153bef9725db226614558d01df829afafee3c.tar.gz
luajit-99d153bef9725db226614558d01df829afafee3c.tar.bz2
luajit-99d153bef9725db226614558d01df829afafee3c.zip
Improve alias analysis of upvalues using a disambiguation hash value.
All upvalue objects hold a disambiguation hash value now. It's built from the parent prototype and the slot number. Different hash values imply the upvalues cannot alias. Same hash values don't imply anything (collision or different closures). Upvalue disambiguation makes use of a reduced hash due to IR contraints.
Diffstat (limited to 'src/lj_obj.h')
-rw-r--r--src/lj_obj.h2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/lj_obj.h b/src/lj_obj.h
index 85d904f3..ecce03ed 100644
--- a/src/lj_obj.h
+++ b/src/lj_obj.h
@@ -397,7 +397,7 @@ typedef struct GCupval {
397 }; 397 };
398 }; 398 };
399 MRef v; /* Points to stack slot (open) or above (closed). */ 399 MRef v; /* Points to stack slot (open) or above (closed). */
400 int32_t unusedv; /* For consistent alignment. */ 400 uint32_t dhash; /* Disambiguation hash: dh1 != dh2 => cannot alias. */
401} GCupval; 401} GCupval;
402 402
403#define uvprev(uv_) (&gcref((uv_)->prev)->uv) 403#define uvprev(uv_) (&gcref((uv_)->prev)->uv)