powerlang / egg

Egg Smalltalk
MIT License
14 stars 2 forks source link

Clarify meaning of underprimitives, undermethods and undermessages #11

Open janvrany opened 3 years ago

janvrany commented 3 years ago

What's the difference between underprimitive, undermethod and undermessage, if any?

If there's no difference, call it always the same. Also, we need a list of them together with description of what they're supposed to do. Ideally, this should go to bee-dmr code so one can use "implementors" (or references) to see at least the descriptions of what it is supposed to do.

melkyades commented 3 years ago

Underprimitive and undermethod are two different things: an undermethod is a normal Smalltalk method that has one fixed implementor, so it is statically dispatched (think call ProtoObject>>#class. An underprimitive is not a method, it is a piece of assembly, inlined at message send site. Undermessage (don't know where you read that) might refer to the selectors associated to undermethods, which the JIT needs to know to distinguish normal message sends from statically dispatched ones.