From aa0b8b15d98e5d35648465da3104b1a9df3846fb Mon Sep 17 00:00:00 2001 From: "Peter S. Housel" Date: Sun, 23 Nov 2014 22:51:41 -0800 Subject: [PATCH] dfmc-optimization: Warn when inline-only inlining fails * sources/dfmc/optimization/check.dylan (check-optimized-reference on <&function>, check-optimized-reference on <&cache-header-engine-node>): Emit a warning when an IEP has to be constructed for a function declared as inline-only. --- sources/dfmc/optimization/check.dylan | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/sources/dfmc/optimization/check.dylan b/sources/dfmc/optimization/check.dylan index 1280bd03ab..ad46b8fb91 100644 --- a/sources/dfmc/optimization/check.dylan +++ b/sources/dfmc/optimization/check.dylan @@ -59,6 +59,10 @@ define method check-optimized-reference (c :: , ref :: , f :: <&function>, check-forward-refs? :: ) => () if (model-compile-stage-only?(f) | inlined-inline-only-function?(f)) + note(, + source-location: dfm-source-location(c), + context-id: dfm-context-id(c), + inline-only-function: f); let copy = find-inline-copy(current-compilation-record(), f); reference-value(ref) := copy end; @@ -77,6 +81,10 @@ define method check-optimized-reference // format-out(">>> check-optimized-reference CHEN (%=) %= %= %=\n", object-class(c), c, ref, e); let f :: <&generic-function> = ^cache-header-engine-node-parent(e); if (model-compile-stage-only?(f) | inlined-inline-only-function?(f)) + note(, + source-location: dfm-source-location(c), + context-id: dfm-context-id(c), + inline-only-function: f); let copy = find-inline-copy(current-compilation-record(), f); ^cache-header-engine-node-parent(e) := copy; end;