@ -239,7 +239,9 @@ Array::Array(llvm::IRBuilder<>& _builder, llvm::Value* _array) :
m_setFunc([this](){ return createArraySetFunc(); }),
m_getFunc([this](){ return createArrayGetFunc(); }),
m_freeFunc([this](){ return createFreeFunc(); })
{}
{
m_builder.CreateStore(llvm::ConstantAggregateZero::get(getType()), m_array);
}
void Array::pop(llvm::Value* _count)
@ -26,9 +26,9 @@ private:
byte* m_memoryData = nullptr;
i256 m_memorySize;
public:
byte* m_memData = nullptr; // FIXME: Remember to free memory
uint64_t m_memSize = 0; // TODO: Init array in LLVM, to allow more optimization
uint64_t m_memCap = 0;
byte* m_memData; // FIXME: Remember to free memory
uint64_t m_memSize;
uint64_t m_memCap;
};