X-Git-Url: https://www.chiark.greenend.org.uk/ucgi/~mdw/git/sod/blobdiff_plain/d5fdd49e70b734b791eb907706f92da5775e2a8b..refs/heads/mdw/progfmt:/src/method-proto.lisp diff --git a/src/method-proto.lisp b/src/method-proto.lisp index ed15ff2..0a20f39 100644 --- a/src/method-proto.lisp +++ b/src/method-proto.lisp @@ -54,7 +54,7 @@ (defgeneric sod-message-receiver-type (message class) (:documentation "Return the type of the `me' argument in a MESSAGE received by CLASS. - Typically this will just be `CLASS *'.")) + Typically this will just be `CLASS *' or `const CLASS *'.")) (export 'sod-message-applicable-methods) (defgeneric sod-message-applicable-methods (message class) @@ -347,6 +347,15 @@ (defgeneric simple-method-body (method codegen target) (definst convert-to-ilayout (stream :export t) (%class chain-head %expr) + "Expression to convert EXPR to point to its enclosing `ilayout'. + + Given a pointer EXPR which points into a direct instance of CLASS, + specifically to the `ichain' whose head class is CHAIN-HEAD, evaluate the + base address of the enclosing `ilayout' structure. + + The output looks like: + + SOD_ILAYOUT(CLASS, NICK, EXPR)" (format stream "SOD_ILAYOUT(~@<~A, ~_~A, ~_~A~:>)" class (sod-class-nickname chain-head) expr))