diff --git a/src/compiler.cpp b/src/compiler.cpp index 43bb7227d1..3eae963504 100644 --- a/src/compiler.cpp +++ b/src/compiler.cpp @@ -1904,13 +1904,14 @@ trySteal(Context* c, Site* site, Value* thief, Value* victim, unsigned size, success = true; } else { success = save(c, site, victim, size, stack, locals); - if ((not success) - and available(c, size, typeMask, registerMask, frameIndex)) - { - move(c, stack, locals, size, victim, site, - allocateSite(c, typeMask, registerMask, frameIndex)); - success = true; - } + } + + if ((not success) + and available(c, size, typeMask, registerMask, frameIndex)) + { + move(c, stack, locals, size, victim, site, + allocateSite(c, typeMask, registerMask, frameIndex)); + success = true; } thief->thief = false; @@ -4802,6 +4803,12 @@ class MyCompiler: public Compiler { clobber->footprint = 0; } + if (index > 0 and local[-1].footprint == 2) { + Local* clobber = local - 1; + clobber->value = 0; + clobber->footprint = 0; + } + if (DebugFrame) { fprintf(stderr, "store local %p of footprint %d at %d\n", local->value, footprint, index);