pharo-vm icon indicating copy to clipboard operation
pharo-vm copied to clipboard

Get info about the primitive table

Open PalumboN opened this issue 1 year ago • 2 comments

Sometimes some Pharo developers have doubts about the primitives (about the number, the name, and what it does).

Now I'm suggesting exploring the code of the initializePrimitiveTable method in the interpreter class.

Would be nice to have this information directly in the image, or at least in the wiki (I could not find it if it already exists). So they do not have to download the repo, install the code and blah blah to get the info.

This info could be generated from the initializePrimitiveTable method. And we can add the comment in the primitive method (if it exists), for example:

primitiveExecuteMethodArgsArray
	"receiver, argsArray, then method are on top of stack.  Execute method against
	 receiver and args.  Allow for up to two extra arguments (e.g. for mirror primitives).
	 Set primitiveFunctionPointer because no cache lookup has been done for the
	 method, and hence primitiveFunctionPointer is stale."

PalumboN avatar Feb 15 '24 15:02 PalumboN

+1

jordanmontt avatar Feb 15 '24 15:02 jordanmontt

+1

astares avatar Feb 15 '24 20:02 astares