[zeek/spicy] bbaf51: Enable `--strict-public-api` by default when gener...

0 views
Skip to first unread message

Robin Sommer

unread,
Feb 24, 2026, 12:17:22 PMFeb 24
to spicy-...@zeek.org
Branch: refs/heads/topic/robin/misc-opt
Home: https://github.com/zeek/spicy
Commit: bbaf51b217adeb007b9c0a459a0a7c4563c6760a
https://github.com/zeek/spicy/commit/bbaf51b217adeb007b9c0a459a0a7c4563c6760a
Author: Robin Sommer <ro...@corelight.com>
Date: 2026-02-24 (Tue, 24 Feb 2026)

Changed paths:
M hilti/toolchain/src/compiler/driver.cc

Log Message:
-----------
Enable `--strict-public-api` by default when generating prototypes.


Commit: 2fcd68d2bd11818280a0bc95a80074f1571e5739
https://github.com/zeek/spicy/commit/2fcd68d2bd11818280a0bc95a80074f1571e5739
Author: Robin Sommer <ro...@corelight.com>
Date: 2026-02-24 (Tue, 24 Feb 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: 90b36883488d340944d23672bafd0857568e4566
https://github.com/zeek/spicy/commit/90b36883488d340944d23672bafd0857568e4566
Author: Robin Sommer <ro...@corelight.com>
Date: 2026-02-24 (Tue, 24 Feb 2026)

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

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


Commit: 27917345d57934cda0107b031c1b23ceb16b1647
https://github.com/zeek/spicy/commit/27917345d57934cda0107b031c1b23ceb16b1647
Author: Robin Sommer <ro...@corelight.com>
Date: 2026-02-24 (Tue, 24 Feb 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: dbaaa58330f43d139073b2583a24f715d64001c1
https://github.com/zeek/spicy/commit/dbaaa58330f43d139073b2583a24f715d64001c1
Author: Robin Sommer <ro...@corelight.com>
Date: 2026-02-24 (Tue, 24 Feb 2026)

Changed paths:
M hilti/toolchain/src/compiler/optimizer/passes/remove-unused-params.cc
M tests/Baseline/hilti.optimization.unreachable-code/log
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-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/remove-method-params.hlt
M tests/spicy/optimization/error-push-pop.spicy
M tests/spicy/optimization/offset_vs_random-access.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: d4430af343d7961f382da892878be3d5e886b739
https://github.com/zeek/spicy/commit/d4430af343d7961f382da892878be3d5e886b739
Author: Robin Sommer <ro...@corelight.com>
Date: 2026-02-24 (Tue, 24 Feb 2026)

Changed paths:
M hilti/toolchain/src/compiler/optimizer/passes/propagate-function-returns.cc
M tests/hilti/output/optimization/no-propagate-returns.hlt

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


Commit: 47f6c50ff5b3ad8a1cd202037ac8c5321c574ae3
https://github.com/zeek/spicy/commit/47f6c50ff5b3ad8a1cd202037ac8c5321c574ae3
Author: Robin Sommer <ro...@corelight.com>
Date: 2026-02-24 (Tue, 24 Feb 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
M tests/Baseline/hilti.optimization.unreachable-code/log
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/hilti.optimization.unused_function/log
M tests/Baseline/hilti.optimization.unused_function/opt.hlt
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
A tests/hilti/optimization/unused-methods.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/bbaf51b217ad%5E...47f6c50ff5b3

To unsubscribe from these emails, change your notification settings at https://github.com/zeek/spicy/settings/notifications
Reply all
Reply to author
Forward
0 new messages