Allow more than 256 methods and constants.

Class symbol tables now grow on demand, and the relevant
instructions take 16-bit arguments. There's a small perf hit
for this, but only a few percent, which is good.
This commit is contained in:
Bob Nystrom
2014-01-04 11:08:31 -08:00
parent f82a034b57
commit 870f3b8b93
18 changed files with 10589 additions and 420 deletions
-3
View File
@@ -60,9 +60,6 @@
// extra spaces added to handle arity, and another byte to terminate the string.
#define MAX_METHOD_SIGNATURE (MAX_METHOD_NAME + MAX_PARAMETERS + 1)
// TODO: Don't hardcode this.
#define MAX_SYMBOLS 256
// Assertions are used to validate program invariants. They indicate things the
// program expects to be true about its internal state during execution. If an
// assertion fails, there is a bug in Wren.