Branch: refs/heads/topic/etyp/move-last-uses
Home:
https://github.com/zeek/spicy
Commit: 0441af31e9fe93eefc4631b8ef54133aa6cef83f
https://github.com/zeek/spicy/commit/0441af31e9fe93eefc4631b8ef54133aa6cef83f
Author: Evan Typanski <
evan.t...@corelight.com>
Date: 2026-07-21 (Tue, 21 Jul 2026)
Changed paths:
M hilti/runtime/include/util.h
M hilti/toolchain/include/ast/type.h
M hilti/toolchain/include/ast/types/address.h
M hilti/toolchain/include/ast/types/bool.h
M hilti/toolchain/include/ast/types/enum.h
M hilti/toolchain/include/ast/types/integer.h
M hilti/toolchain/include/ast/types/interval.h
M hilti/toolchain/include/ast/types/network.h
M hilti/toolchain/include/ast/types/port.h
M hilti/toolchain/include/ast/types/real.h
M hilti/toolchain/include/ast/types/time.h
M hilti/toolchain/src/compiler/codegen/expressions.cc
M hilti/toolchain/src/compiler/codegen/statements.cc
M hilti/toolchain/src/compiler/optimizer/passes/move-last-uses.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/hilti/optimization/flatten-block.hlt
M tests/hilti/output/optimization/cfg-const-copy-prop.hlt
Log Message:
-----------
Make hilti moves a RT function
This avoids adding C++ semantics to the hilti codegen. Instead, it's just
a runtime helper that moves-or-not.
This also uncovered a "bug" in codegen: switch statements used auto&&,
which could bind to an lvalue, but everything in hilti sees it as an
rvalue. Since we don't really have a good reason to force this as a
forwarding reference, just use `auto` here. Then optimizers can rely
on the reality they see: these are not references.
To unsubscribe from these emails, change your notification settings at
https://github.com/zeek/spicy/settings/notifications