Skip to content

Commit 488fa5b

Browse files
authored
Allow disabling function inlining (#1024)
Fixes #1023
1 parent abaf009 commit 488fa5b

File tree

2 files changed

+4
-1
lines changed

2 files changed

+4
-1
lines changed

CHANGELOG.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,8 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
55
and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
66

77
## [Unreleased]
8+
### Fixed
9+
* Fix a bug where the compiler would always generate inline function definitions even if the `inline-functions` compiler option is disabled (#1023)
810

911
## [v0.2.1]
1012
### Changed

src/basilisp/lang/compiler/analyzer.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2651,7 +2651,8 @@ def _invoke_ast(form: Union[llist.PersistentList, ISeq], ctx: AnalyzerContext) -
26512651
phase=CompilerPhase.MACROEXPANSION,
26522652
) from e
26532653
elif (
2654-
not (isinstance(form, IMeta) and _is_no_inline(form))
2654+
ctx.should_inline_functions
2655+
and not (isinstance(form, IMeta) and _is_no_inline(form))
26552656
and fn.var.meta
26562657
and callable(fn.var.meta.get(SYM_INLINE_META_KW))
26572658
):

0 commit comments

Comments
 (0)