Skip to content

Commit

Permalink
Folds arguments of SmallInt primitives
Browse files Browse the repository at this point in the history
Issue: #17
Issue: #92
  • Loading branch information
0x7CFE committed Jul 5, 2016
1 parent d74c752 commit 31ff87f
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/TypeAnalyzer.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1012,8 +1012,8 @@ void TypeAnalyzer::doPrimitive(const InstructionNode& instruction) {
case primitive::smallIntEqual:
case primitive::smallIntLess:
{
const Type& self = m_context[*instruction.getArgument(0)];
const Type& arg = m_context[*instruction.getArgument(1)];
const Type& self = m_context[*instruction.getArgument(0)].fold();
const Type& arg = m_context[*instruction.getArgument(1)].fold();
static const Type smallInt(globals.smallIntClass, Type::tkMonotype);

if (isSmallInteger(self.getValue()) && isSmallInteger(arg.getValue())) {
Expand Down

0 comments on commit 31ff87f

Please sign in to comment.