Closed PalumboN closed 5 months ago
VM: https://github.com/pharo-project/pharo-vm/pull/763/
Support meta-compilation of primitives with variadic args (multiargs):
Using the pragma like this:
<numberOfArguments: #(0 1)>
Druid will compile a generator with the pattern:
s1 := self methodNumArgs. s1 = 0 ifTrue: [ ... ] s2 := self methodNumArgs. s2 = 1 ifTrue: [ ... ] ^ 0
And also leave the entry in the primitiveTable without arguments (-1 at the end).
-1
In this PR I also:
<argumentCountCheck>
Some related tests are broken, I'll check them.
Tests are fixed (or most of them). We need to merge VM: https://github.com/pharo-project/pharo-vm/pull/763 before.
VM: https://github.com/pharo-project/pharo-vm/pull/763/
Support meta-compilation of primitives with variadic args (multiargs):
Using the pragma like this:
Druid will compile a generator with the pattern:
And also leave the entry in the primitiveTable without arguments (
-1
at the end).In this PR I also:
<argumentCountCheck>
customization -> we can have the same behaviour with these changes