Skip to content

Commit 81b1c57

Browse files
committed
Remove type check from get list item null register
1 parent d2b38f2 commit 81b1c57

File tree

1 file changed

+1
-1
lines changed
  • src/engine/internal/llvm/instructions

1 file changed

+1
-1
lines changed

src/engine/internal/llvm/instructions/lists.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -231,7 +231,7 @@ LLVMInstruction *Lists::buildGetListItem(LLVMInstruction *ins)
231231
llvm::Value *index = m_utils.castValue(arg.second, arg.first);
232232
llvm::Value *inRange = m_builder.CreateAnd(m_builder.CreateFCmpOGE(index, min), m_builder.CreateFCmpOLT(index, size));
233233

234-
LLVMConstantRegister nullReg(listType == Compiler::StaticType::Unknown ? Compiler::StaticType::Number : listType, Value());
234+
LLVMConstantRegister nullReg(listType, Value());
235235
llvm::Value *null = m_utils.createValue(static_cast<LLVMRegister *>(&nullReg));
236236

237237
index = m_builder.CreateFPToUI(index, m_builder.getInt64Ty());

0 commit comments

Comments
 (0)