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:
@@ -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
|
||||
}
|
||||
Reference in New Issue
Block a user