From fb36786c4dcc07a2b6a729a27c491aeb6a7eb293 Mon Sep 17 00:00:00 2001 From: Vincent St-Amour Date: Mon, 16 May 2011 14:58:33 -0400 Subject: [PATCH] Add failing test for nicer reporting of cascades of missed optimizations. --- .../optimizer/close-calls/nested.rkt | 20 +++++++++++++++++++ 1 file changed, 20 insertions(+) create mode 100644 collects/tests/typed-scheme/optimizer/close-calls/nested.rkt diff --git a/collects/tests/typed-scheme/optimizer/close-calls/nested.rkt b/collects/tests/typed-scheme/optimizer/close-calls/nested.rkt new file mode 100644 index 0000000000..4442032273 --- /dev/null +++ b/collects/tests/typed-scheme/optimizer/close-calls/nested.rkt @@ -0,0 +1,20 @@ +#; +( +nested.rkt 15:0 (#%app * (quote 2.0) (#%app * (quote 3.0) (quote 4))) -- binary, args all float-arg-expr, return type not Float -- caused by: 15:19 (quote 4) +nested.rkt 19:0 (#%app * (#%app * (quote 3.0) (quote 4)) (#%app * (quote 3.0) (quote 4))) -- binary, args all float-arg-expr, return type not Float -- caused by: 19:15 (quote 4) 19:39 (quote 4) +24.0 +144.0 + ) + +#lang typed/racket + +;; when a single "bubble" causes missed optimizations to cascade, a single +;; close call should be reported, with the outermost expression being reported +;; but with the innermost flagged as the cause +;; TODO also report number of missed opts, etc. + +(* 2.0 (* 3.0 (ann 4 Integer))) + +;; here, multiple subexpressions are to blame, but a single close call with +;; two causes should be reported +(* (* 3.0 (ann 4 Integer)) (* 3.0 (ann 4 Integer)))