From abbf3e40b388f5bbda08eeb580c82b32b9039569 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Per=20=C3=96stlund?= Date: Thu, 15 Jun 2023 00:34:31 +0200 Subject: [PATCH] Partially revert #10820 (#10842) - Temporarily disable inlining of normal functions when splitting record bindings, since it causes issues at the moment. --- OMCompiler/Compiler/NFFrontEnd/NFInline.mo | 1 + .../flattening/modelica/scodeinst/Makefile | 2 +- .../openmodelica/visualization/Surfaces.mos | 60 +++++++++---------- 3 files changed, 32 insertions(+), 31 deletions(-) diff --git a/OMCompiler/Compiler/NFFrontEnd/NFInline.mo b/OMCompiler/Compiler/NFFrontEnd/NFInline.mo index 45515e3b321..a326d4eb008 100644 --- a/OMCompiler/Compiler/NFFrontEnd/NFInline.mo +++ b/OMCompiler/Compiler/NFFrontEnd/NFInline.mo @@ -120,6 +120,7 @@ algorithm // Normal function case Call.TYPED_CALL(fn = fn as Function.FUNCTION(inputs = inputs, outputs = outputs, locals = locals), arguments = args) + guard not forceInline algorithm body := Function.getBody(fn); diff --git a/testsuite/flattening/modelica/scodeinst/Makefile b/testsuite/flattening/modelica/scodeinst/Makefile index 5604688b962..57e1fba3a74 100644 --- a/testsuite/flattening/modelica/scodeinst/Makefile +++ b/testsuite/flattening/modelica/scodeinst/Makefile @@ -753,7 +753,6 @@ ImpureCall1.mo \ Inline1.mo \ Inline2.mo \ Inline3.mo \ -Inline4.mo \ InnerOuter1.mo \ InnerOuter2.mo \ InnerOuter3.mo \ @@ -1160,6 +1159,7 @@ sts.mos \ # test that currently fail. Move up when fixed. # Run make testfailing FAILINGTESTFILES=\ +Inline4.mo \ ProtectedMod4.mo \ CevalFuncRecord3.mo \ CevalFuncRecord4.mo \ diff --git a/testsuite/openmodelica/visualization/Surfaces.mos b/testsuite/openmodelica/visualization/Surfaces.mos index 55b5dc377aa..b320a0dba06 100644 --- a/testsuite/openmodelica/visualization/Surfaces.mos +++ b/testsuite/openmodelica/visualization/Surfaces.mos @@ -649,36 +649,6 @@ getErrorString(); // 0.0 // // -// world.surface -// -// world.surface.R.T[1,1] -// world.surface.R.T[1,2] -// world.surface.R.T[1,3] -// world.surface.R.T[2,1] -// world.surface.R.T[2,2] -// world.surface.R.T[2,3] -// world.surface.R.T[3,1] -// world.surface.R.T[3,2] -// world.surface.R.T[3,3] -// -// -// 0.0 -// 0.0 -// 0.0 -// -// 2 -// 2 -// false -// false -// -// 215.0 -// 215.0 -// 215.0 -// -// 0.0 -// 0.0 -// -// // surface // // 1.0 @@ -888,6 +858,36 @@ getErrorString(); // // 0.0 // +// +// world.surface +// +// 1.0 +// 6.123233995736766e-17 +// -6.123233995736766e-17 +// 6.123233995736766e-17 +// -1.0 +// 0.0 +// -6.123233995736766e-17 +// -3.749399456654644e-33 +// -1.0 +// +// +// 0.0 +// 0.0 +// 0.0 +// +// 2 +// 2 +// false +// false +// +// 215.0 +// 215.0 +// 215.0 +// +// 0.0 +// 0.0 +// // " // "" // endResult