1 "Protocol for PrimitiveMethod to be usable in the same ways as CompiledMethod."
3 m@(PrimitiveMethod traits) applyTo: args
5 error: 'The Slate VM currently does not support #applyTo: calls on PrimitiveMethods.'
8 m@(PrimitiveMethod traits) method [m].
10 m@(PrimitiveMethod traits) acceptsAdditionalArguments [False].
11 "Primitives have no *rest parameters."
13 m@(PrimitiveMethod traits) optionalKeywords [#{}].
14 "Primitives may take optionals, but we cannot currently communicate that."
16 m@(PrimitiveMethod traits) arity
17 "Use the fact that all PrimitiveMethods have selectors to determine their
21 m@(PrimitiveMethod traits) literals [#{}].
22 m@(PrimitiveMethod traits) selectors [#{}].
23 m@(PrimitiveMethod traits) code [Nil].
24 m@(PrimitiveMethod traits) sourceTree [Nil].
25 m@(PrimitiveMethod traits) registerCount [m arity].
26 m@(PrimitiveMethod traits) inputVariables [m arity].
27 m@(PrimitiveMethod traits) restVariable [Nil].
28 m@(PrimitiveMethod traits) sourceTree [Nil].
29 m@(PrimitiveMethod traits) heapAllocate [False].
31 m@(PrimitiveMethod traits) definitionLocation
33 'primitive:' ; m index printString
36 m@(PrimitiveMethod traits) allSelectorsSent [#{}].
37 "Answer an empty Collection since PrimitiveMethods obviously don't call any
38 other methods, otherwise they wouldn't be primitive!"
40 m@(PrimitiveMethod traits) allSelectorsSentToArg: _ [#{}].
41 "Answer an empty Collection since PrimitiveMethods obviously don't call any
42 other methods, otherwise they wouldn't be primitive!"
44 m@(PrimitiveMethod traits) allSelectorsSentImplicitly [#{}].
45 "Answer an empty Collection since PrimitiveMethods obviously don't call any
46 other methods, otherwise they wouldn't be primitive!"