From 30eb3c686a1bb2cea791798324c2eea08ffc341d Mon Sep 17 00:00:00 2001 Message-Id: <30eb3c686a1bb2cea791798324c2eea08ffc341d.1719136964.git.mdw@distorted.org.uk> From: Mark Wooding Date: Fri, 9 Aug 2019 20:39:07 +0100 Subject: [PATCH] src/method-proto.lisp: Maybe ignore the layout pointer in trampolines. Organization: Straylight/Edgeware From: Mark Wooding If the last trampoline is meant to invoke the delegation kernel, and the kernel is for an aggregating message with no methods, then it probably won't care about the layout pointer when it synthesizes its behaviour. This results in an annoying compiler warning, which we can placate. I originally considered doing this in `invoke-delegation-chain', precisely in the case where the kernel is being included, but it's not like we're being especially precise about other uses of `SOD__IGNORE', so I've done the simpler thing instead. --- src/method-proto.lisp | 1 + test/test.sod | 1 + 2 files changed, 2 insertions(+) diff --git a/src/method-proto.lisp b/src/method-proto.lisp index 034768a..ac662ca 100644 --- a/src/method-proto.lisp +++ b/src/method-proto.lisp @@ -484,6 +484,7 @@ (defun make-trampoline (codegen super body) :pointer :null))) (codegen-push codegen) (ensure-ilayout-var codegen super) + (deliver-call codegen :void "SOD__IGNORE" "sod__obj") (when (keyword-message-p message) (if (eq *keyword-struct-disposition* :null) (deliver-call codegen :void "SOD__IGNORE" *sod-key-pointer*) diff --git a/test/test.sod b/test/test.sod index 429e384..72febd5 100644 --- a/test/test.sod +++ b/test/test.sod @@ -167,6 +167,7 @@ class T1Base: SodObject { [combination = sum] int asum(); [combination = and] int aand(); [combination = max] int amax(); + [role = around] int base.asum() { return (CALL_NEXT_METHOD); } [combination = custom, empty = { sod_ret = 0; }, -- [mdw]