Primitive

fun Primitive(argCount: Int, vararg flags: Primitive.Flag)

Construct a new Primitive. The first argument is the number of arguments with which the primitive expects to be invoked, and the remaining arguments are flags. The name of the primitive is implicit in the name of the class that it's an instance of, by stripping off the "P_" prefix.

Note that it's essential that this method, invoked during static initialization of each Primitive subclass, install this new instance into this primitive's PrimitiveHolder in holdersByClassName.

Parameters

argCount

The number of arguments the primitive expects. The value -1 is used by the special primitive P_PushConstant to indicate it may have any number of arguments. However, note that that primitive cannot be used explicitly in Avail code.

flags

The flags that describe how the Interpreter and L2Generator should deal with this primitive.