Branch: refs/heads/topic/etyp/not-null-coercions-fix
Home:
https://github.com/zeek/spicy
Commit: 88c6056d3ce052d866b43a0165bb2a82db2734aa
https://github.com/zeek/spicy/commit/88c6056d3ce052d866b43a0165bb2a82db2734aa
Author: Evan Typanski <
evan.t...@corelight.com>
Date: 2025-09-03 (Wed, 03 Sep 2025)
Changed paths:
M hilti/toolchain/src/compiler/optimizer.cc
Log Message:
-----------
Fix optimizer phases not returning to previous.
Since the outer modified was continuously set to `false` this would
cause incorrect results. The outer `modified` would always be false when
it broke out of phases.
Commit: ccba48a51ef317b2b07e9c8b7d446313187333f9
https://github.com/zeek/spicy/commit/ccba48a51ef317b2b07e9c8b7d446313187333f9
Author: Evan Typanski <
evan.t...@corelight.com>
Date: 2025-09-03 (Wed, 03 Sep 2025)
Changed paths:
M hilti/toolchain/src/compiler/optimizer.cc
Log Message:
-----------
Use the correct form of `deepcopy`.
I let my tab-completed one stay on accident :(
Commit: 438a517e24e6d35a1720eaac39832644434b1854
https://github.com/zeek/spicy/commit/438a517e24e6d35a1720eaac39832644434b1854
Author: Evan Typanski <
evan.t...@corelight.com>
Date: 2025-09-03 (Wed, 03 Sep 2025)
Changed paths:
M hilti/toolchain/include/compiler/detail/optimizer.h
M hilti/toolchain/src/ast/ast-context.cc
M hilti/toolchain/src/compiler/optimizer.cc
M tests/Baseline/hilti.ast.basic-module/debug.log
M tests/Baseline/hilti.ast.imported-id/output
M tests/Baseline/hilti.ast.types/output
M tests/Baseline/hilti.expressions.ctor-replacement/output
Log Message:
-----------
Run all optimizations until convergence.
This is the first step to get the optimizer to play nicely with
coercion. We run resolution/coercion after optimization, but if we want
tho optimizer to play nice with newly-coerced results, we have to run
the optimizer after the coercion as well. This way, changes in coercion
from constant propagation can make other optimizations run.
Commit: 9a880b000cd3987d4a59d9d503b2807b5e4e172e
https://github.com/zeek/spicy/commit/9a880b000cd3987d4a59d9d503b2807b5e4e172e
Author: Evan Typanski <
evan.t...@corelight.com>
Date: 2025-09-03 (Wed, 03 Sep 2025)
Changed paths:
M hilti/toolchain/src/compiler/coercer.cc
M hilti/toolchain/src/compiler/optimizer.cc
M tests/Baseline/spicy.optimization.default-parser-functions/log
M tests/Baseline/spicy.optimization.default-parser-functions/opt.hlt
M tests/Baseline/spicy.optimization.feature_requirements/log
M tests/Baseline/spicy.optimization.feature_requirements/opt.hlt
M tests/Baseline/spicy.optimization.unused-functions/log
M tests/Baseline/spicy.optimization.unused-functions/opt.hlt
M tests/Baseline/spicy.optimization.unused-types/log
M tests/Baseline/spicy.optimization.unused-types/opt.hlt
M tests/Baseline/spicy.rt.debug-trace/.stderr
M tests/Baseline/spicy.types.unit.canonical-ids-with-import/output
M tests/Baseline/spicy.types.unit.canonical-ids/output
Log Message:
-----------
Coerce `Null` to false and optimize it.
Fixes #2150
This does 2 things:
1) Makes Null (and null-like-things, like a strong ref ctor) coerce to
False when coercing to a boolean.
2) Allows the optimizer to work with boolean coercions.
In turn, this lets the optimizer get rid of `if (!Null)` checks that got
constant propagated from a previous optimizer run.
Commit: 68671c1819aa6fb2252fc5532d227adb1d2087d4
https://github.com/zeek/spicy/commit/68671c1819aa6fb2252fc5532d227adb1d2087d4
Author: Evan Typanski <
evan.t...@corelight.com>
Date: 2025-09-03 (Wed, 03 Sep 2025)
Changed paths:
M hilti/toolchain/include/compiler/detail/cfg.h
M hilti/toolchain/src/ast/ast-context.cc
M hilti/toolchain/src/compiler/cfg.cc
M hilti/toolchain/src/compiler/optimizer.cc
Log Message:
-----------
Move CFG printing from optimizer to `ASTContext`.
Compare:
https://github.com/zeek/spicy/compare/095e02fdaa3d...68671c1819aa
To unsubscribe from these emails, change your notification settings at
https://github.com/zeek/spicy/settings/notifications