[zeek/spicy] 013b60: Extend printer to always output functions' calling...

0 views
Skip to first unread message

Robin Sommer

unread,
Mar 3, 2026, 4:49:03 AM (10 days ago) Mar 3
to spicy-...@zeek.org
Branch: refs/heads/topic/robin/misc-opt
Home: https://github.com/zeek/spicy
Commit: 013b60543fe4e40797077065ad06cb093625d45e
https://github.com/zeek/spicy/commit/013b60543fe4e40797077065ad06cb093625d45e
Author: Robin Sommer <ro...@corelight.com>
Date: 2026-03-03 (Tue, 03 Mar 2026)

Changed paths:
M hilti/toolchain/src/compiler/printer.cc
M tests/Baseline/spicy.optimization.default-parser-functions/log
M tests/Baseline/spicy.optimization.default-parser-functions/noopt.hlt
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/noopt.hlt
M tests/Baseline/spicy.optimization.feature_requirements/opt.hlt
M tests/Baseline/spicy.optimization.unused-functions/log
M tests/Baseline/spicy.optimization.unused-functions/noopt.hlt
M tests/Baseline/spicy.optimization.unused-functions/opt.hlt
M tests/Baseline/spicy.optimization.unused-types/log
M tests/Baseline/spicy.optimization.unused-types/noopt.hlt
M tests/Baseline/spicy.optimization.unused-types/opt.hlt

Log Message:
-----------
Extend printer to always output functions' calling conventions.

This was missing for some function types, so that one wasn't able to
see what their calling convention was.


Commit: 0b5f3ffac5028aa26a2f031ba1643e7e28b37303
https://github.com/zeek/spicy/commit/0b5f3ffac5028aa26a2f031ba1643e7e28b37303
Author: Robin Sommer <ro...@corelight.com>
Date: 2026-03-03 (Tue, 03 Mar 2026)

Changed paths:
M hilti/toolchain/src/compiler/codegen/expressions.cc

Log Message:
-----------
Codegen fix for wrong qualification of non-extern struct members.


Commit: d7bb94eb4cbd78f723b08e926a5f9fda273b98c2
https://github.com/zeek/spicy/commit/d7bb94eb4cbd78f723b08e926a5f9fda273b98c2
Author: Robin Sommer <ro...@corelight.com>
Date: 2026-03-03 (Tue, 03 Mar 2026)

Changed paths:
M hilti/toolchain/include/compiler/detail/optimizer/optimizer.h
M hilti/toolchain/include/compiler/detail/optimizer/pass.h
M hilti/toolchain/src/compiler/optimizer/passes/remove-unused-fields.cc

Log Message:
-----------
Add optimizer helpers to determine if AST entities can be modified.

These honor ``--no-strict-public-api` as well as various attributes
and other AST properties.

Also port the `remove-unused-fields` pass over to use one of them,
more to come.


Commit: dafc666e5bca99d5619fa322879cdd577de3cefd
https://github.com/zeek/spicy/commit/dafc666e5bca99d5619fa322879cdd577de3cefd
Author: Robin Sommer <ro...@corelight.com>
Date: 2026-03-03 (Tue, 03 Mar 2026)

Changed paths:
M hilti/toolchain/src/compiler/optimizer/passes/remove-unused-params.cc
M tests/Baseline/hilti.optimization.unreachable-code/noopt.hlt
M tests/Baseline/hilti.optimization.unreachable-code/opt.hlt
M tests/Baseline/hilti.optimization.unused-struct-fields/output
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-types/log
M tests/Baseline/spicy.optimization.unused-types/opt.hlt
M tests/hilti/optimization/unreachable-code.hlt
M tests/hilti/optimization/unused-struct-fields.hlt
M tests/hilti/output/optimization/remove-method-params.hlt
M tests/spicy/optimization/error-push-pop.spicy
M tests/spicy/optimization/offset_vs_random-access.spicy
M tests/spicy/optimization/unused-functions.spicy
M tests/spicy/optimization/unused-types.spicy
M tests/spicy/types/regexp/parse-ctor-captures.spicy
M tests/spicy/types/unit/external-hook.spicy
M tests/spicy/types/unit/switch-shared-id.spicy

Log Message:
-----------
Let the `remove-unused-params` pass honor `--no-strict-public-api`.


Commit: ae4b22d40e98013628dca73d92ee472aa0b30a14
https://github.com/zeek/spicy/commit/ae4b22d40e98013628dca73d92ee472aa0b30a14
Author: Robin Sommer <ro...@corelight.com>
Date: 2026-03-03 (Tue, 03 Mar 2026)

Changed paths:
M hilti/toolchain/src/compiler/optimizer/passes/propagate-function-returns.cc
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/hilti/output/optimization/no-propagate-returns.hlt

Log Message:
-----------
Let the `propagate-function-returns` pass honor `--no-strict-public-api`.


Commit: e5a7950f37da5b68dd2ff73d83d19063a8ae7528
https://github.com/zeek/spicy/commit/e5a7950f37da5b68dd2ff73d83d19063a8ae7528
Author: Robin Sommer <ro...@corelight.com>
Date: 2026-03-03 (Tue, 03 Mar 2026)

Changed paths:
M hilti/toolchain/src/compiler/optimizer/passes/dead-code-static.cc
M tests/Baseline/hilti.optimization.peephole-default-void/opt.hlt
M tests/Baseline/hilti.optimization.peephole-try-catch/opt.hlt
A tests/Baseline/hilti.optimization.unused-methods/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-functions/opt.hlt
M tests/Baseline/spicy.optimization.unused-types/log
M tests/Baseline/spicy.optimization.unused-types/opt.hlt
M tests/hilti/codegen/struct-parameter-passing.hlt
M tests/hilti/hiltic/cc/enum-prototype.hlt
M tests/hilti/optimization/flatten-block.hlt
M tests/hilti/optimization/peephole-default-void.hlt
M tests/hilti/optimization/peephole-try-catch.hlt
A tests/hilti/optimization/unused-methods.hlt
M tests/hilti/optimization/unused_function.hlt
M tests/hilti/types/struct/static-method-extern.hlt

Log Message:
-----------
Let the `dead-code-static` pass honor `--no-strict-public-api`.

There were also a couple of places either not quite working as
intended or not (any longer) needed, so tweaking things a bit. Also
adding one extension for removing not needed member functions.


Compare: https://github.com/zeek/spicy/compare/e7e6e9c24d8a...e5a7950f37da

To unsubscribe from these emails, change your notification settings at https://github.com/zeek/spicy/settings/notifications

Robin Sommer

unread,
Mar 3, 2026, 9:53:04 AM (10 days ago) Mar 3
to spicy-...@zeek.org
Branch: refs/heads/main
Commit: 1e67cb69cf97f25f46649a58a0f54a0e8de13069
https://github.com/zeek/spicy/commit/1e67cb69cf97f25f46649a58a0f54a0e8de13069
Commit: 38f4d8b16b05045de64aa5057cdde1b19f79fc09
https://github.com/zeek/spicy/commit/38f4d8b16b05045de64aa5057cdde1b19f79fc09
Author: Robin Sommer <ro...@corelight.com>
Date: 2026-03-03 (Tue, 03 Mar 2026)

Changed paths:
M hilti/toolchain/src/compiler/optimizer/passes/remove-unused-fields.cc

Log Message:
-----------
Fix change tracking in `remove-unused-fields` pass.

This is necessary with the recent `replaceNode()` changes.


Commit: 1fef601730c315ddbf8770c3539e8842d0ab448c
https://github.com/zeek/spicy/commit/1fef601730c315ddbf8770c3539e8842d0ab448c
Author: Robin Sommer <ro...@corelight.com>
Date: 2026-03-03 (Tue, 03 Mar 2026)

Changed paths:
M CHANGES
M VERSION
M hilti/toolchain/include/compiler/detail/optimizer/optimizer.h
M hilti/toolchain/include/compiler/detail/optimizer/pass.h
M hilti/toolchain/src/compiler/codegen/expressions.cc
M hilti/toolchain/src/compiler/optimizer/passes/dead-code-static.cc
M hilti/toolchain/src/compiler/optimizer/passes/propagate-function-returns.cc
M hilti/toolchain/src/compiler/optimizer/passes/remove-unused-fields.cc
M hilti/toolchain/src/compiler/optimizer/passes/remove-unused-params.cc
M hilti/toolchain/src/compiler/printer.cc
M tests/Baseline/hilti.optimization.peephole-default-void/opt.hlt
M tests/Baseline/hilti.optimization.peephole-try-catch/opt.hlt
M tests/Baseline/hilti.optimization.unreachable-code/noopt.hlt
M tests/Baseline/hilti.optimization.unreachable-code/opt.hlt
A tests/Baseline/hilti.optimization.unused-methods/output
M tests/Baseline/hilti.optimization.unused-struct-fields/output
M tests/Baseline/spicy.optimization.default-parser-functions/log
M tests/Baseline/spicy.optimization.default-parser-functions/noopt.hlt
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/noopt.hlt
M tests/Baseline/spicy.optimization.feature_requirements/opt.hlt
M tests/Baseline/spicy.optimization.unused-functions/log
M tests/Baseline/spicy.optimization.unused-functions/noopt.hlt
M tests/Baseline/spicy.optimization.unused-functions/opt.hlt
M tests/Baseline/spicy.optimization.unused-types/log
M tests/Baseline/spicy.optimization.unused-types/noopt.hlt
M tests/Baseline/spicy.optimization.unused-types/opt.hlt
M tests/hilti/codegen/struct-parameter-passing.hlt
M tests/hilti/hiltic/cc/enum-prototype.hlt
M tests/hilti/optimization/flatten-block.hlt
M tests/hilti/optimization/peephole-default-void.hlt
M tests/hilti/optimization/peephole-try-catch.hlt
M tests/hilti/optimization/unreachable-code.hlt
A tests/hilti/optimization/unused-methods.hlt
M tests/hilti/optimization/unused-struct-fields.hlt
M tests/hilti/optimization/unused_function.hlt
M tests/hilti/output/optimization/no-propagate-returns.hlt
M tests/hilti/output/optimization/remove-method-params.hlt
M tests/hilti/types/struct/static-method-extern.hlt
M tests/spicy/optimization/error-push-pop.spicy
M tests/spicy/optimization/offset_vs_random-access.spicy
M tests/spicy/optimization/unused-functions.spicy
M tests/spicy/optimization/unused-types.spicy
M tests/spicy/types/regexp/parse-ctor-captures.spicy
M tests/spicy/types/unit/external-hook.spicy
M tests/spicy/types/unit/switch-shared-id.spicy

Log Message:
-----------
Merge remote-tracking branch 'origin/topic/robin/misc-opt'

* origin/topic/robin/misc-opt:
Fix change tracking in `remove-unused-fields` pass.
Let the `dead-code-static` pass honor `--no-strict-public-api`.
Let the `propagate-function-returns` pass honor `--no-strict-public-api`.
Let the `remove-unused-params` pass honor `--no-strict-public-api`.
Add optimizer helpers to determine if AST entities can be modified.
Codegen fix for wrong qualification of non-extern struct members.
Extend printer to always output functions' calling conventions.


Compare: https://github.com/zeek/spicy/compare/4e0dee9c428f...1fef601730c3
Reply all
Reply to author
Forward
0 new messages