Branch: refs/heads/topic/etyp/not-null-coercions-fix
Home:
https://github.com/zeek/spicy
Commit: 9a7545e842bc274f7a0f65fab128757eda7e1324
https://github.com/zeek/spicy/commit/9a7545e842bc274f7a0f65fab128757eda7e1324
Author: Evan Typanski <
evan.t...@corelight.com>
Date: 2025-08-27 (Wed, 27 Aug 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: 88364017bf05b1070668cc6bcc5b438c893250bb
https://github.com/zeek/spicy/commit/88364017bf05b1070668cc6bcc5b438c893250bb
Author: Evan Typanski <
evan.t...@corelight.com>
Date: 2025-08-27 (Wed, 27 Aug 2025)
Changed paths:
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
Log Message:
-----------
Fold `Null` coercions to bool to false.
Fixes #2150
There are cases that `Null` gets used as a reference value, then gets
coerced into a bool. Code will set the reference if a feature flag is
set, but none gets set. This means that we can constant-propagate into
`if` statements, leaving with `if ( ! Null )` - which isn't correct, but
the semantics are correct. Since `Null` would roughly be falsey, just
fold a coercion to a bool from `Null`-like things to `False`.
Commit: ee88bcfbeefd3a9ef46d9a2591ad2d545fe72400
https://github.com/zeek/spicy/commit/ee88bcfbeefd3a9ef46d9a2591ad2d545fe72400
Author: Evan Typanski <
evan.t...@corelight.com>
Date: 2025-08-27 (Wed, 27 Aug 2025)
Changed paths:
M hilti/toolchain/include/ast/expressions/coerced.h
M hilti/toolchain/include/compiler/detail/optimizer.h
M hilti/toolchain/src/ast/ast-context.cc
M hilti/toolchain/src/ast/visitor.cc
M hilti/toolchain/src/compiler/coercer.cc
M hilti/toolchain/src/compiler/optimizer.cc
M hilti/toolchain/src/compiler/resolver.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.cfg.assign/output
M tests/Baseline/hilti.cfg.dead-write-shadowed/output
M tests/Baseline/hilti.cfg.empty/output
M tests/Baseline/hilti.cfg.for/output
M tests/Baseline/hilti.cfg.if/output
M tests/Baseline/hilti.cfg.return/output
M tests/Baseline/hilti.cfg.simple-statements/output
M tests/Baseline/hilti.cfg.switch/output
M tests/Baseline/hilti.cfg.try/output
M tests/Baseline/hilti.cfg.unreachable-return/output
M tests/Baseline/hilti.cfg.while/output
M tests/Baseline/hilti.expressions.ctor-replacement/output
M tests/Baseline/spicy.optimization.default-parser-functions/log
M tests/Baseline/spicy.optimization.feature_requirements/log
M tests/Baseline/spicy.optimization.unused-functions/log
M tests/Baseline/spicy.optimization.unused-types/log
M tests/Baseline/spicy.types.unit.canonical-ids-with-import/output
M tests/Baseline/spicy.types.unit.canonical-ids/output
Log Message:
-----------
Start moving to coercer.
Compare:
https://github.com/zeek/spicy/compare/63f0f87e8c94...ee88bcfbeefd
To unsubscribe from these emails, change your notification settings at
https://github.com/zeek/spicy/settings/notifications