diff options
Diffstat (limited to 'MLKInterpreter.m')
-rw-r--r-- | MLKInterpreter.m | 11 |
1 files changed, 10 insertions, 1 deletions
diff --git a/MLKInterpreter.m b/MLKInterpreter.m index cfb70a9..ad472b9 100644 --- a/MLKInterpreter.m +++ b/MLKInterpreter.m @@ -178,7 +178,16 @@ static MLKSymbol *MULTIPLE_VALUE_CALL; NSLog (@"; EVAL: %@", MLKPrintToString(program)); #endif // TRACE_EVAL - if (!program || [program isKindOfClass:[MLKSymbol class]]) + if (MLKFixnumP (program)) + { + // Fixnums evaluate to themselves. + // + // We need to get this case out of the way as early as possible, + // as we're going to repeatedly send messages to `program' after + // this point. + RETURN_VALUE (program); + } + else if (!program || [program isKindOfClass:[MLKSymbol class]]) { if (mode == compile_time_too_mode) { |