feat: raise max method parameters from 10 to 16 with proper error handling

Add MAX_PARAMETERS constant set to 16 and extend VM bytecode instructions CODE_CALL_11 through CODE_CALL_16 to support the new limit. Introduce compile-time error messages when parameter or argument count exceeds 16 in function definitions, method declarations, subscript calls, and regular method calls. Add new native fiber call stubs fn_call9 through fn_call16 and register them in the core initialization. Include comprehensive test coverage for 9-16 parameter functions and methods, plus error tests for exceeding the limit in all contexts.
This commit is contained in:
Bob Nystrom
2013-11-29 23:08:27 +00:00
parent 1b3b50374f
commit 230017a616
10 changed files with 123 additions and 5 deletions
+4
View File
@@ -0,0 +1,4 @@
class Foo {
// 17 parameters.
method(a, b, c, d, e, f, g, h, i, j, k, l, m, n, o, p, q) { "!" } // expect error
}