Skip to content

Commit

Permalink
Fixes primitives inference
Browse files Browse the repository at this point in the history
Issue: #17
Issue: #92
  • Loading branch information
0x7CFE committed Jul 25, 2016
1 parent 33f4452 commit fc6d1dd
Showing 1 changed file with 11 additions and 4 deletions.
15 changes: 11 additions & 4 deletions src/TypeAnalyzer.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -977,15 +977,22 @@ void TypeAnalyzer::doPrimitive(const InstructionNode& instruction) {
}

case primitive::arrayAt:
case primitive::arrayAtPut:
case primitive::stringAt:
case primitive::stringAtPut:
case primitive::bulkReplace:
primitiveResult = Type(Type::tkPolytype);
break;

// FIXME actually this is primitive for ByteArray>>basicAt:
case primitive::stringAt:
primitiveResult = Type(globals.smallIntClass, Type::tkMonotype);
break;

case primitive::arrayAtPut:
case primitive::stringAtPut:
primitiveResult = m_context[*instruction.getArgument(1)];
break;

case primitive::cloneByteObject:
primitiveResult = m_context[*instruction.getArgument(0)];
primitiveResult = m_context[*instruction.getArgument(1)];
break;

case primitive::blockInvoke: {
Expand Down

0 comments on commit fc6d1dd

Please sign in to comment.