diff options
author | Mike Pall <mike> | 2010-01-09 23:59:43 +0100 |
---|---|---|
committer | Mike Pall <mike> | 2010-01-09 23:59:43 +0100 |
commit | 99d153bef9725db226614558d01df829afafee3c (patch) | |
tree | ec5c4778a0ac5e054fc8c3d337381e1d52f626bc /lib | |
parent | 2cc554db0cb37ac3600cccab97c657bb532e3c4e (diff) | |
download | luajit-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 'lib')
-rw-r--r-- | lib/dump.lua | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/lib/dump.lua b/lib/dump.lua index 41feff44..00f59977 100644 --- a/lib/dump.lua +++ b/lib/dump.lua | |||
@@ -397,6 +397,8 @@ local function dump_ir(tr, dumpsnap, dumpreg) | |||
397 | local litn = litname[op] | 397 | local litn = litname[op] |
398 | if litn and litn[op2] then | 398 | if litn and litn[op2] then |
399 | out:write(" ", litn[op2]) | 399 | out:write(" ", litn[op2]) |
400 | elseif op == "UREFO " or op == "UREFC " then | ||
401 | out:write(format(" #%-3d", shr(op2, 8))) | ||
400 | else | 402 | else |
401 | out:write(format(" #%-3d", op2)) | 403 | out:write(format(" #%-3d", op2)) |
402 | end | 404 | end |