munificent / craftinginterpreters

Repository for the book "Crafting Interpreters"
http://www.craftinginterpreters.com/
Other
8.43k stars 1.01k forks source link

clox throws an error on the string_equality benchmark #1093

Open ajeetdsouza opened 1 year ago

ajeetdsouza commented 1 year ago

To reproduce:

make clox
./clox test/benchmark/string_equality.lox

Output:

[line 32] Error at 'a4': Too many constants in one chunk.
[line 32] Error at 'a7': Too many constants in one chunk.
[line 32] Error at 'a5': Too many constants in one chunk.
[line 32] Error at 'a7': Too many constants in one chunk.
[line 32] Error at 'a6': Too many constants in one chunk.
[line 32] Error at 'a7': Too many constants in one chunk.
[line 32] Error at 'a7': Too many constants in one chunk.
[line 32] Error at 'a7': Too many constants in one chunk.
[line 32] Error at 'a8': Too many constants in one chunk.
...

The same benchmark works correctly with jlox because it doesn't enforce limits on constants, but it would be great if the benchmark was updated to something that could run on both, so that they could be compared more easily.