// Create load from object field ValueBuilder BlockBuilder::createLoad(ValueBuilder thisValue, FieldPtr field) { llvm::Value* offset = offsetField(thisValue, field); llvm::Value* loadInst = new llvm::LoadInst(offset, "", m_block); return ValueBuilder(*this, loadInst, field->getFieldType()); }
// Create store in object field ValueBuilder BlockBuilder::createStore(ValueBuilder thisValue, FieldPtr field, ValueBuilder value) { llvm::Value* offset = offsetField(thisValue, field); new llvm::StoreInst(value.getValue(), offset, "", m_block); return ValueBuilder(*this, value.getValue(), field->getFieldType()); }