diff --git a/include/avian/codegen/compiler.h b/include/avian/codegen/compiler.h index acf58f7029..4c3d2bcf1c 100644 --- a/include/avian/codegen/compiler.h +++ b/include/avian/codegen/compiler.h @@ -95,7 +95,7 @@ class Compiler { virtual void initLocal(unsigned size, unsigned index, ir::Type type) = 0; virtual void initLocalsFromLogicalIp(unsigned logicalIp) = 0; - virtual void storeLocal(unsigned footprint, ir::Value* src, unsigned index) + virtual void storeLocal(ir::Value* src, unsigned index) = 0; virtual ir::Value* loadLocal(ir::Type type, unsigned index) = 0; virtual void saveLocals() = 0; diff --git a/src/codegen/compiler.cpp b/src/codegen/compiler.cpp index fc79d4b6b5..4d6d52e1c5 100644 --- a/src/codegen/compiler.cpp +++ b/src/codegen/compiler.cpp @@ -2534,10 +2534,9 @@ class MyCompiler: public Compiler { linkLocals(&c, e->locals(), newLocals); } - virtual void storeLocal(unsigned footprint, ir::Value* src, unsigned index) + virtual void storeLocal(ir::Value* src, unsigned index) { - assert(&c, typeFootprint(src->type) == footprint); - compiler::storeLocal(&c, footprint, static_cast(src), index, true); + compiler::storeLocal(&c, typeFootprint(&c, src->type), static_cast(src), index, true); } virtual ir::Value* loadLocal(ir::Type type, unsigned index) diff --git a/src/compile.cpp b/src/compile.cpp index d35d936a39..197b5607e4 100644 --- a/src/compile.cpp +++ b/src/compile.cpp @@ -1295,8 +1295,8 @@ void storeLocal(Context* context, || value->type.flavor() == ir::Type::Address)) // TODO Temporary hack for Subroutine test!!! || value->type.flavor() == ir::Type::Integer); - context->compiler->storeLocal - (footprint, value, translateLocalIndex(context, footprint, index)); + context->compiler->storeLocal(value, + translateLocalIndex(context, footprint, index)); } avian::util::FixedAllocator* codeAllocator(MyThread* t);