chiark / gitweb /
src/method-proto.lisp: Maybe ignore the layout pointer in trampolines.
authorMark Wooding <mdw@distorted.org.uk>
Fri, 9 Aug 2019 19:39:07 +0000 (20:39 +0100)
committerMark Wooding <mdw@distorted.org.uk>
Sat, 10 Aug 2019 14:46:01 +0000 (15:46 +0100)
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
test/test.sod

index 034768a489b325d68c2cb5e4874bb1f55b1723d0..ac662caae63d47c6424027bd6f6522401a024013 100644 (file)
@@ -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*)
index 429e384595212d469dfcdfd92d9cb1bf50912ab9..72febd59e741b8b08ec3c60d21c48d48828b362d 100644 (file)
@@ -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; },