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 034768a..ac662ca 100644 (file)
                                           :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 429e384..72febd5 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; },