From e304c0d0235b2d036026b9c8274e4e59a2be8221 Mon Sep 17 00:00:00 2001 From: Benjamin Bannier Date: Mon, 3 Jul 2023 18:17:55 +0200 Subject: [PATCH] Revert "Store numerical offset in units instead of iterator for position." This reverts commit 755437a17c1f80f1345dfb28877a308435ce85e1. # Conflicts: # tests/Baseline/spicy.optimization.feature_requirements/noopt.hlt # tests/Baseline/spicy.optimization.feature_requirements/opt.hlt (cherry picked from commit 0a918e3d1236b7ab962ee1d1c364c1da1ee400c4) --- .../toolchain/src/compiler/codegen/codegen.cc | 9 +- .../src/compiler/codegen/parser-builder.cc | 26 +--- .../src/compiler/codegen/unit-builder.cc | 9 +- .../log | 6 +- .../noopt.hlt | 46 +++--- .../log | 10 +- .../noopt.hlt | 100 ++++++------- .../opt.hlt | 6 +- .../spicy.optimization.unused-functions/log | 10 +- .../noopt.hlt | 72 +++++----- .../spicy.optimization.unused-types/log | 18 +-- .../spicy.optimization.unused-types/noopt.hlt | 134 +++++++++--------- .../output | 8 +- .../spicy.types.unit.canonical-ids/output | 16 +-- 14 files changed, 229 insertions(+), 241 deletions(-) diff --git a/spicy/toolchain/src/compiler/codegen/codegen.cc b/spicy/toolchain/src/compiler/codegen/codegen.cc index 07315a3c2..83ba50bd4 100644 --- a/spicy/toolchain/src/compiler/codegen/codegen.cc +++ b/spicy/toolchain/src/compiler/codegen/codegen.cc @@ -201,12 +201,13 @@ struct VisitorPass2 : public hilti::visitor::PreOrder { } result_t operator()(const operator_::unit::Offset& n, position_t p) { - replaceNode(&p, builder::member(n.op0(), ID("__offset"))); + auto begin = builder::memberCall(builder::deref(builder::member(n.op0(), ID("__begin"))), "offset", {}); + auto cur = builder::memberCall(builder::deref(builder::member(n.op0(), ID("__position"))), "offset", {}); + replaceNode(&p, builder::grouping(builder::difference(cur, begin))); } result_t operator()(const operator_::unit::Position& n, position_t p) { - replaceNode(&p, builder::sum(builder::deref(builder::member(n.op0(), "__begin")), - builder::member(n.op0(), "__offset"))); + replaceNode(&p, builder::member(n.op0(), ID("__position"))); } result_t operator()(const operator_::unit::Input& n, position_t p) { @@ -221,7 +222,7 @@ struct VisitorPass2 : public hilti::visitor::PreOrder { result_t operator()(const operator_::unit::Find& n, position_t p) { auto begin = builder::deref(builder::member(n.op0(), ID("__begin"))); - auto end = builder::sum(begin, builder::member(n.op0(), ID("__offset"))); + auto end = builder::deref(builder::member(n.op0(), ID("__position"))); auto needle = argument(n.op2(), 0); auto direction = argument(n.op2(), 1, builder::id("spicy::Direction::Forward")); auto i = argument(n.op2(), 2, builder::null()); diff --git a/spicy/toolchain/src/compiler/codegen/parser-builder.cc b/spicy/toolchain/src/compiler/codegen/parser-builder.cc index d2f361102..f122f9c8e 100644 --- a/spicy/toolchain/src/compiler/codegen/parser-builder.cc +++ b/spicy/toolchain/src/compiler/codegen/parser-builder.cc @@ -626,9 +626,7 @@ struct ProductionVisitor std::optional pre_container_offset; if ( field && field->isContainer() ) { pre_container_offset = - builder()->addTmp("pre_container_offset", - builder::sum(builder::deref(builder::member(state().self, "__begin")), - builder::member(state().self, "__offset"))); + builder()->addTmp("pre_container_offset", builder::member(state().self, "__position")); } if ( field && field->convertExpression() ) { @@ -722,13 +720,8 @@ struct ProductionVisitor // elements inside e.g., this unit's fields hooks. Temporarily restore the previously stored offset. std::optional prev; if ( pre_container_offset ) { - prev = builder()->addTmp("prev", builder::sum(builder::deref(builder::member(state().self, "__begin")), - builder::member(state().self, "__offset"))); - builder()->addAssign(builder::member(state().self, "__offset"), - builder::cast(builder::difference(*pre_container_offset, - builder::deref( - builder::member(state().self, "__begin"))), - type::UnsignedInteger(64))); + prev = builder()->addTmp("prev", builder::member(state().self, "__position")); + builder()->addAssign(builder::member(state().self, "__position"), *pre_container_offset); } @@ -809,10 +802,7 @@ struct ProductionVisitor popState(); if ( prev ) - builder()->addAssign(builder::member(state().self, "__offset"), - builder::cast(builder::difference(*prev, builder::deref(builder::member(state().self, - "__begin"))), - type::UnsignedInteger(64))); + builder()->addAssign(builder::member(state().self, "__position"), *prev); if ( field->condition() ) popBuilder(); @@ -2271,7 +2261,7 @@ void ParserBuilder::initializeUnit(const Location& l) { guardFeatureCode(unit, {"uses_random_access"}, [&]() { // Save the current input offset for the raw access methods. builder()->addAssign(builder::member(state().self, ID("__begin")), builder::begin(state().cur)); - builder()->addAssign(builder::member(state().self, ID("__offset")), builder::integer(0)); + builder()->addAssign(builder::member(state().self, ID("__position")), builder::begin(state().cur)); }); beforeHook(); @@ -2431,11 +2421,7 @@ void ParserBuilder::afterHook() { void ParserBuilder::saveParsePosition() { const auto& unit = state().unit.get(); guardFeatureCode(unit, {"uses_random_access"}, [&]() { - builder()->addAssign(builder::member(state().self, ID("__offset")), - builder::difference(builder::memberCall(builder::begin(state().cur), "offset", {}), - builder::memberCall(builder::deref( - builder::member(state().self, "__begin")), - "offset", {}))); + builder()->addAssign(builder::member(state().self, ID("__position")), builder::begin(state().cur)); }); } diff --git a/spicy/toolchain/src/compiler/codegen/unit-builder.cc b/spicy/toolchain/src/compiler/codegen/unit-builder.cc index 5947c9ee1..ec269206e 100644 --- a/spicy/toolchain/src/compiler/codegen/unit-builder.cc +++ b/spicy/toolchain/src/compiler/codegen/unit-builder.cc @@ -171,7 +171,7 @@ Type CodeGen::compileUnit(const type::Unit& unit, bool declare_only) { add_hook("0x25_init", {}); add_hook("0x25_done", {}); - add_hook("0x25_error", {builder::parameter("__except", type::String())}); + add_hook("0x25_error", { builder::parameter("__except", type::String()) }); add_hook("0x25_print", {}); add_hook("0x25_finally", {}); @@ -202,7 +202,7 @@ Type CodeGen::compileUnit(const type::Unit& unit, bool declare_only) { auto attr_random_access = Attribute("&needed-by-feature", builder::string("uses_random_access")); auto f1 = hilti::declaration::Field(ID("__begin"), hilti::type::Optional(hilti::type::stream::Iterator()), AttributeSet({Attribute("&internal"), attr_random_access})); - auto f2 = hilti::declaration::Field(ID("__offset"), hilti::type::UnsignedInteger(64), + auto f2 = hilti::declaration::Field(ID("__position"), hilti::type::Optional(hilti::type::stream::Iterator()), AttributeSet({Attribute("&internal"), attr_random_access})); auto f3 = hilti::declaration::Field(ID("__position_update"), hilti::type::Optional(hilti::type::stream::Iterator()), AttributeSet({Attribute("&internal"), attr_random_access})); @@ -343,8 +343,9 @@ Type CodeGen::compileUnit(const type::Unit& unit, bool declare_only) { _pb.builder()->addAssign(builder::id(ID(*unit.id(), "__parser")), parser); _pb.builder()->addExpression( - builder::call("spicy_rt::registerParser", {builder::id(ID(*unit.id(), "__parser")), builder::scope(), - builder::strong_reference(unit)})); + builder::call("spicy_rt::registerParser", + {builder::id(ID(*unit.id(), "__parser")), builder::scope(), + builder::strong_reference(unit)})); }); auto block = _pb.popBuilder()->block(); diff --git a/tests/Baseline/spicy.optimization.default-parser-functions/log b/tests/Baseline/spicy.optimization.default-parser-functions/log index dbc802dcb..ef59a28c0 100644 --- a/tests/Baseline/spicy.optimization.default-parser-functions/log +++ b/tests/Baseline/spicy.optimization.default-parser-functions/log @@ -153,18 +153,18 @@ [debug/optimizer] removing field for unused method foo::__register_foo_P2::::parse3 [debug/optimizer] removing unused member 'foo::P0::__begin' [debug/optimizer] removing unused member 'foo::P0::__filters' -[debug/optimizer] removing unused member 'foo::P0::__offset' [debug/optimizer] removing unused member 'foo::P0::__parser' +[debug/optimizer] removing unused member 'foo::P0::__position' [debug/optimizer] removing unused member 'foo::P0::__position_update' [debug/optimizer] removing unused member 'foo::P0::__sink' [debug/optimizer] removing unused member 'foo::P1::__begin' [debug/optimizer] removing unused member 'foo::P1::__filters' -[debug/optimizer] removing unused member 'foo::P1::__offset' +[debug/optimizer] removing unused member 'foo::P1::__position' [debug/optimizer] removing unused member 'foo::P1::__position_update' [debug/optimizer] removing unused member 'foo::P1::__sink' [debug/optimizer] removing unused member 'foo::P2::__begin' [debug/optimizer] removing unused member 'foo::P2::__filters' -[debug/optimizer] removing unused member 'foo::P2::__offset' +[debug/optimizer] removing unused member 'foo::P2::__position' [debug/optimizer] removing unused member 'foo::P2::__position_update' [debug/optimizer] removing unused member 'foo::P2::__sink' [debug/optimizer] removing unused member 'spicy_rt::Sink::connect_mime_type' diff --git a/tests/Baseline/spicy.optimization.default-parser-functions/noopt.hlt b/tests/Baseline/spicy.optimization.default-parser-functions/noopt.hlt index b5383da9b..223477e24 100644 --- a/tests/Baseline/spicy.optimization.default-parser-functions/noopt.hlt +++ b/tests/Baseline/spicy.optimization.default-parser-functions/noopt.hlt @@ -6,7 +6,7 @@ import hilti; type P0 = struct { optional> __begin &internal &needed-by-feature="uses_random_access"; - uint<64> __offset &internal &needed-by-feature="uses_random_access"; + optional> __position &internal &needed-by-feature="uses_random_access"; optional> __position_update &internal &needed-by-feature="uses_random_access"; spicy_rt::Parser __parser &static &internal &needed-by-feature="supports_filters" &needed-by-feature="supports_sinks"; spicy_rt::SinkState __sink &internal &needed-by-feature="supports_sinks"; @@ -32,7 +32,7 @@ type P0 = struct { } &on-heap; public type P1 = struct { optional> __begin &internal &needed-by-feature="uses_random_access"; - uint<64> __offset &internal &needed-by-feature="uses_random_access"; + optional> __position &internal &needed-by-feature="uses_random_access"; optional> __position_update &internal &needed-by-feature="uses_random_access"; spicy_rt::Parser __parser &static &internal &needed-by-feature="supports_filters" &always-emit; spicy_rt::SinkState __sink &internal &needed-by-feature="supports_sinks"; @@ -60,7 +60,7 @@ public type P2 = struct { uint<8> x &optional; uint<8> y &optional; optional> __begin &internal &needed-by-feature="uses_random_access"; - uint<64> __offset &internal &needed-by-feature="uses_random_access"; + optional> __position &internal &needed-by-feature="uses_random_access"; optional> __position_update &internal &needed-by-feature="uses_random_access"; spicy_rt::Parser __parser &static &internal &needed-by-feature="supports_filters" &always-emit; spicy_rt::SinkState __sink &internal &needed-by-feature="supports_sinks"; @@ -115,7 +115,7 @@ method method tuple, int<64>, iterator, optional, int<64>, iterator, optional, int<64>, iterator, optional, int<64>, iterator, optional> __result; if ( __feat%foo__P0%uses_random_access ) - (*self).__offset = begin(__cur).offset() - (*(*self).__begin).offset(); + (*self).__position = begin(__cur); (*self).__error = __error; @@ -249,7 +249,7 @@ method extern method view foo::P0::parse1(inout value_ref data, # End parsing production: Unit: foo_P0 -> if ( __feat%foo__P0%uses_random_access ) - (*unit).__offset = begin(ncur).offset() - (*(*unit).__begin).offset(); + (*unit).__position = begin(ncur); if ( error ) @@ -273,7 +273,7 @@ method extern method view foo::P0::parse3(inout value_ref if ( __feat%foo__P0%uses_random_access ) - (*unit).__offset = begin(ncur).offset() - (*(*unit).__begin).offset(); + (*unit).__position = begin(ncur); if ( error ) @@ -295,7 +295,7 @@ method extern method view foo::P0::parse2(inout value_ref unit, inou # End parsing production: Unit: foo_P0 -> if ( __feat%foo__P0%uses_random_access ) - (*unit).__offset = begin(ncur).offset() - (*(*unit).__begin).offset(); + (*unit).__position = begin(ncur); if ( error ) @@ -325,7 +325,7 @@ method method tuple, int<64>, iterator, optional, int<64>, iterator, optional, int<64>, iterator, optional, int<64>, iterator, optional> __result; if ( __feat%foo__P1%uses_random_access ) - (*self).__offset = begin(__cur).offset() - (*(*self).__begin).offset(); + (*self).__position = begin(__cur); (*self).__error = __error; @@ -459,7 +459,7 @@ method extern method view foo::P1::parse1(inout value_ref data, # End parsing production: Unit: foo_P1 -> if ( __feat%foo__P1%uses_random_access ) - (*unit).__offset = begin(ncur).offset() - (*(*unit).__begin).offset(); + (*unit).__position = begin(ncur); if ( error ) @@ -483,7 +483,7 @@ method extern method view foo::P1::parse3(inout value_ref if ( __feat%foo__P1%uses_random_access ) - (*unit).__offset = begin(ncur).offset() - (*(*unit).__begin).offset(); + (*unit).__position = begin(ncur); if ( error ) @@ -505,7 +505,7 @@ method extern method view foo::P1::parse2(inout value_ref unit, inou # End parsing production: Unit: foo_P1 -> if ( __feat%foo__P1%uses_random_access ) - (*unit).__offset = begin(ncur).offset() - (*(*unit).__begin).offset(); + (*unit).__position = begin(ncur); if ( error ) @@ -537,7 +537,7 @@ method method tuple, int<64>, iterator, optional, int<64>, iterator, optional, int<64>, iterator, optional/default-parser-functions.spicy:18:8" @@ -688,11 +688,11 @@ method method tuple, int<64>, iterator, optional foo::P2::parse1(inout value_ref data, # End parsing production: Unit: foo_P2 -> x y if ( __feat%foo__P2%uses_random_access ) - (*unit).__offset = begin(ncur).offset() - (*(*unit).__begin).offset(); + (*unit).__position = begin(ncur); if ( error ) @@ -757,7 +757,7 @@ method extern method view foo::P2::parse3(inout value_ref x y if ( __feat%foo__P2%uses_random_access ) - (*unit).__offset = begin(ncur).offset() - (*(*unit).__begin).offset(); + (*unit).__position = begin(ncur); if ( error ) @@ -779,7 +779,7 @@ method extern method view foo::P2::parse2(inout value_ref unit, inou # End parsing production: Unit: foo_P2 -> x y if ( __feat%foo__P2%uses_random_access ) - (*unit).__offset = begin(ncur).offset() - (*(*unit).__begin).offset(); + (*unit).__position = begin(ncur); if ( error ) diff --git a/tests/Baseline/spicy.optimization.feature_requirements/log b/tests/Baseline/spicy.optimization.feature_requirements/log index ad26515e8..76a776520 100644 --- a/tests/Baseline/spicy.optimization.feature_requirements/log +++ b/tests/Baseline/spicy.optimization.feature_requirements/log @@ -325,29 +325,29 @@ [debug/optimizer] removing unused member 'foo::X1::__sink' [debug/optimizer] removing unused member 'foo::X2::__begin' [debug/optimizer] removing unused member 'foo::X2::__filters' -[debug/optimizer] removing unused member 'foo::X2::__offset' [debug/optimizer] removing unused member 'foo::X2::__parser' +[debug/optimizer] removing unused member 'foo::X2::__position' [debug/optimizer] removing unused member 'foo::X2::__position_update' [debug/optimizer] removing unused member 'foo::X2::__sink' [debug/optimizer] removing unused member 'foo::X3::__begin' [debug/optimizer] removing unused member 'foo::X3::__filters' [debug/optimizer] removing unused member 'foo::X3::__forward' -[debug/optimizer] removing unused member 'foo::X3::__offset' [debug/optimizer] removing unused member 'foo::X3::__parser' +[debug/optimizer] removing unused member 'foo::X3::__position' [debug/optimizer] removing unused member 'foo::X3::__position_update' [debug/optimizer] removing unused member 'foo::X3::__sink' [debug/optimizer] removing unused member 'foo::X4::__begin' [debug/optimizer] removing unused member 'foo::X4::__filters' -[debug/optimizer] removing unused member 'foo::X4::__offset' +[debug/optimizer] removing unused member 'foo::X4::__position' [debug/optimizer] removing unused member 'foo::X4::__position_update' [debug/optimizer] removing unused member 'foo::X4::__sink' [debug/optimizer] removing unused member 'foo::X5::__begin' -[debug/optimizer] removing unused member 'foo::X5::__offset' +[debug/optimizer] removing unused member 'foo::X5::__position' [debug/optimizer] removing unused member 'foo::X5::__position_update' [debug/optimizer] removing unused member 'foo::X5::__sink' [debug/optimizer] removing unused member 'foo::X6::__begin' [debug/optimizer] removing unused member 'foo::X6::__filters' -[debug/optimizer] removing unused member 'foo::X6::__offset' +[debug/optimizer] removing unused member 'foo::X6::__position' [debug/optimizer] removing unused member 'foo::X6::__position_update' [debug/optimizer] removing unused member 'spicy_rt::Sink::connect_mime_type' [debug/optimizer] removing unused member 'spicy_rt::Sink::connect_mime_type' diff --git a/tests/Baseline/spicy.optimization.feature_requirements/noopt.hlt b/tests/Baseline/spicy.optimization.feature_requirements/noopt.hlt index 8be588bdc..0647e49a0 100644 --- a/tests/Baseline/spicy.optimization.feature_requirements/noopt.hlt +++ b/tests/Baseline/spicy.optimization.feature_requirements/noopt.hlt @@ -6,7 +6,7 @@ import hilti; type X0 = struct { optional> __begin &internal &needed-by-feature="uses_random_access"; - uint<64> __offset &internal &needed-by-feature="uses_random_access"; + optional> __position &internal &needed-by-feature="uses_random_access"; optional> __position_update &internal &needed-by-feature="uses_random_access"; spicy_rt::Parser __parser &static &internal &needed-by-feature="supports_filters" &needed-by-feature="supports_sinks"; spicy_rt::SinkState __sink &internal &needed-by-feature="supports_sinks"; @@ -32,7 +32,7 @@ type X0 = struct { } &on-heap; type X1 = struct { optional> __begin &internal &needed-by-feature="uses_random_access"; - uint<64> __offset &internal &needed-by-feature="uses_random_access"; + optional> __position &internal &needed-by-feature="uses_random_access"; optional> __position_update &internal &needed-by-feature="uses_random_access"; spicy_rt::Parser __parser &static &internal &needed-by-feature="supports_filters" &needed-by-feature="supports_sinks"; spicy_rt::SinkState __sink &internal &needed-by-feature="supports_sinks"; @@ -58,7 +58,7 @@ type X1 = struct { } &on-heap; type X2 = struct { optional> __begin &internal &needed-by-feature="uses_random_access"; - uint<64> __offset &internal &needed-by-feature="uses_random_access"; + optional> __position &internal &needed-by-feature="uses_random_access"; optional> __position_update &internal &needed-by-feature="uses_random_access"; spicy_rt::Parser __parser &static &internal &needed-by-feature="supports_filters" &needed-by-feature="supports_sinks"; spicy_rt::SinkState __sink &internal &needed-by-feature="supports_sinks"; @@ -84,7 +84,7 @@ type X2 = struct { } &on-heap; type X3 = struct { optional> __begin &internal &needed-by-feature="uses_random_access"; - uint<64> __offset &internal &needed-by-feature="uses_random_access"; + optional> __position &internal &needed-by-feature="uses_random_access"; optional> __position_update &internal &needed-by-feature="uses_random_access"; spicy_rt::Parser __parser &static &internal &needed-by-feature="supports_filters" &needed-by-feature="supports_sinks" &needed-by-feature="is_filter"; spicy_rt::SinkState __sink &internal &needed-by-feature="supports_sinks"; @@ -111,7 +111,7 @@ type X3 = struct { } &on-heap; type X4 = struct { optional> __begin &internal &needed-by-feature="uses_random_access"; - uint<64> __offset &internal &needed-by-feature="uses_random_access"; + optional> __position &internal &needed-by-feature="uses_random_access"; optional> __position_update &internal &needed-by-feature="uses_random_access"; spicy_rt::Parser __parser &static &internal &needed-by-feature="supports_filters" &needed-by-feature="supports_sinks" &needed-by-feature="is_filter"; spicy_rt::SinkState __sink &internal &needed-by-feature="supports_sinks"; @@ -138,7 +138,7 @@ type X4 = struct { } &on-heap; public type X5 = struct { optional> __begin &internal &needed-by-feature="uses_random_access"; - uint<64> __offset &internal &needed-by-feature="uses_random_access"; + optional> __position &internal &needed-by-feature="uses_random_access"; optional> __position_update &internal &needed-by-feature="uses_random_access"; spicy_rt::Parser __parser &static &internal &needed-by-feature="supports_filters" &always-emit; spicy_rt::SinkState __sink &internal &needed-by-feature="supports_sinks"; @@ -165,7 +165,7 @@ public type X5 = struct { type X6 = struct { strong_ref data &default=new spicy_rt::Sink() &internal &needed-by-feature="supports_sinks"; optional> __begin &internal &needed-by-feature="uses_random_access"; - uint<64> __offset &internal &needed-by-feature="uses_random_access"; + optional> __position &internal &needed-by-feature="uses_random_access"; optional> __position_update &internal &needed-by-feature="uses_random_access"; spicy_rt::Parser __parser &static &internal &needed-by-feature="supports_filters" &needed-by-feature="supports_sinks"; spicy_rt::SinkState __sink &internal &needed-by-feature="supports_sinks"; @@ -227,7 +227,7 @@ const bool __feat%foo__X6%supports_sinks = True; const bool __feat%foo__X6%synchronization = True; method hook void foo::X0::__on_0x25_init() { - self.__offset; + ((*self.__position).offset() - (*self.__begin).offset()); } method method tuple, int<64>, iterator, optional> foo::X0::__parse_stage1(inout value_ref __data, copy view __cur, copy bool __trim, copy int<64> __lah, copy iterator __lahe, copy optional __error) { @@ -242,7 +242,7 @@ method method tuple, int<64>, iterator, optional, int<64>, iterator, optional, int<64>, iterator, optional, int<64>, iterator, optional> __result; if ( __feat%foo__X0%uses_random_access ) - (*self).__offset = begin(__cur).offset() - (*(*self).__begin).offset(); + (*self).__position = begin(__cur); (*self).__error = __error; @@ -376,7 +376,7 @@ method extern method view foo::X0::parse1(inout value_ref data, # End parsing production: Unit: foo_X0 -> if ( __feat%foo__X0%uses_random_access ) - (*unit).__offset = begin(ncur).offset() - (*(*unit).__begin).offset(); + (*unit).__position = begin(ncur); if ( error ) @@ -400,7 +400,7 @@ method extern method view foo::X0::parse3(inout value_ref if ( __feat%foo__X0%uses_random_access ) - (*unit).__offset = begin(ncur).offset() - (*(*unit).__begin).offset(); + (*unit).__position = begin(ncur); if ( error ) @@ -422,7 +422,7 @@ method extern method view foo::X0::parse2(inout value_ref unit, inou # End parsing production: Unit: foo_X0 -> if ( __feat%foo__X0%uses_random_access ) - (*unit).__offset = begin(ncur).offset() - (*(*unit).__begin).offset(); + (*unit).__position = begin(ncur); if ( error ) @@ -456,7 +456,7 @@ method method tuple, int<64>, iterator, optional, int<64>, iterator, optional, int<64>, iterator, optional, int<64>, iterator, optional> __result; if ( __feat%foo__X1%uses_random_access ) - (*self).__offset = begin(__cur).offset() - (*(*self).__begin).offset(); + (*self).__position = begin(__cur); (*self).__error = __error; @@ -590,7 +590,7 @@ method extern method view foo::X1::parse1(inout value_ref data, # End parsing production: Unit: foo_X1 -> if ( __feat%foo__X1%uses_random_access ) - (*unit).__offset = begin(ncur).offset() - (*(*unit).__begin).offset(); + (*unit).__position = begin(ncur); if ( error ) @@ -614,7 +614,7 @@ method extern method view foo::X1::parse3(inout value_ref if ( __feat%foo__X1%uses_random_access ) - (*unit).__offset = begin(ncur).offset() - (*(*unit).__begin).offset(); + (*unit).__position = begin(ncur); if ( error ) @@ -636,7 +636,7 @@ method extern method view foo::X1::parse2(inout value_ref unit, inou # End parsing production: Unit: foo_X1 -> if ( __feat%foo__X1%uses_random_access ) - (*unit).__offset = begin(ncur).offset() - (*(*unit).__begin).offset(); + (*unit).__position = begin(ncur); if ( error ) @@ -666,7 +666,7 @@ method method tuple, int<64>, iterator, optional, int<64>, iterator, optional, int<64>, iterator, optional, int<64>, iterator, optional> __result; if ( __feat%foo__X2%uses_random_access ) - (*self).__offset = begin(__cur).offset() - (*(*self).__begin).offset(); + (*self).__position = begin(__cur); (*self).__error = __error; @@ -800,7 +800,7 @@ method extern method view foo::X2::parse1(inout value_ref data, # End parsing production: Unit: foo_X2 -> if ( __feat%foo__X2%uses_random_access ) - (*unit).__offset = begin(ncur).offset() - (*(*unit).__begin).offset(); + (*unit).__position = begin(ncur); if ( error ) @@ -824,7 +824,7 @@ method extern method view foo::X2::parse3(inout value_ref if ( __feat%foo__X2%uses_random_access ) - (*unit).__offset = begin(ncur).offset() - (*(*unit).__begin).offset(); + (*unit).__position = begin(ncur); if ( error ) @@ -846,7 +846,7 @@ method extern method view foo::X2::parse2(inout value_ref unit, inou # End parsing production: Unit: foo_X2 -> if ( __feat%foo__X2%uses_random_access ) - (*unit).__offset = begin(ncur).offset() - (*(*unit).__begin).offset(); + (*unit).__position = begin(ncur); if ( error ) @@ -876,7 +876,7 @@ method method tuple, int<64>, iterator, optional, int<64>, iterator, optional, int<64>, iterator, optional, int<64>, iterator, optional> __result; if ( __feat%foo__X3%uses_random_access ) - (*self).__offset = begin(__cur).offset() - (*(*self).__begin).offset(); + (*self).__position = begin(__cur); (*self).__error = __error; @@ -1018,7 +1018,7 @@ method extern method view foo::X3::parse1(inout value_ref data, # End parsing production: Unit: foo_X3 -> if ( __feat%foo__X3%uses_random_access ) - (*unit).__offset = begin(ncur).offset() - (*(*unit).__begin).offset(); + (*unit).__position = begin(ncur); if ( error ) @@ -1042,7 +1042,7 @@ method extern method view foo::X3::parse3(inout value_ref if ( __feat%foo__X3%uses_random_access ) - (*unit).__offset = begin(ncur).offset() - (*(*unit).__begin).offset(); + (*unit).__position = begin(ncur); if ( error ) @@ -1064,7 +1064,7 @@ method extern method view foo::X3::parse2(inout value_ref unit, inou # End parsing production: Unit: foo_X3 -> if ( __feat%foo__X3%uses_random_access ) - (*unit).__offset = begin(ncur).offset() - (*(*unit).__begin).offset(); + (*unit).__position = begin(ncur); if ( error ) @@ -1094,7 +1094,7 @@ method method tuple, int<64>, iterator, optional, int<64>, iterator, optional, int<64>, iterator, optional, int<64>, iterator, optional> __result; if ( __feat%foo__X4%uses_random_access ) - (*self).__offset = begin(__cur).offset() - (*(*self).__begin).offset(); + (*self).__position = begin(__cur); (*self).__error = __error; @@ -1236,7 +1236,7 @@ method extern method view foo::X4::parse1(inout value_ref data, # End parsing production: Unit: foo_X4 -> if ( __feat%foo__X4%uses_random_access ) - (*unit).__offset = begin(ncur).offset() - (*(*unit).__begin).offset(); + (*unit).__position = begin(ncur); if ( error ) @@ -1260,7 +1260,7 @@ method extern method view foo::X4::parse3(inout value_ref if ( __feat%foo__X4%uses_random_access ) - (*unit).__offset = begin(ncur).offset() - (*(*unit).__begin).offset(); + (*unit).__position = begin(ncur); if ( error ) @@ -1282,7 +1282,7 @@ method extern method view foo::X4::parse2(inout value_ref unit, inou # End parsing production: Unit: foo_X4 -> if ( __feat%foo__X4%uses_random_access ) - (*unit).__offset = begin(ncur).offset() - (*(*unit).__begin).offset(); + (*unit).__position = begin(ncur); if ( error ) @@ -1316,7 +1316,7 @@ method method tuple, int<64>, iterator, optional, int<64>, iterator, optional, int<64>, iterator, optional, int<64>, iterator, optional> __result; if ( __feat%foo__X5%uses_random_access ) - (*self).__offset = begin(__cur).offset() - (*(*self).__begin).offset(); + (*self).__position = begin(__cur); (*self).__error = __error; @@ -1450,7 +1450,7 @@ method extern method view foo::X5::parse1(inout value_ref data, # End parsing production: Unit: foo_X5 -> if ( __feat%foo__X5%uses_random_access ) - (*unit).__offset = begin(ncur).offset() - (*(*unit).__begin).offset(); + (*unit).__position = begin(ncur); if ( error ) @@ -1474,7 +1474,7 @@ method extern method view foo::X5::parse3(inout value_ref if ( __feat%foo__X5%uses_random_access ) - (*unit).__offset = begin(ncur).offset() - (*(*unit).__begin).offset(); + (*unit).__position = begin(ncur); if ( error ) @@ -1496,7 +1496,7 @@ method extern method view foo::X5::parse2(inout value_ref unit, inou # End parsing production: Unit: foo_X5 -> if ( __feat%foo__X5%uses_random_access ) - (*unit).__offset = begin(ncur).offset() - (*(*unit).__begin).offset(); + (*unit).__position = begin(ncur); if ( error ) @@ -1526,7 +1526,7 @@ method method tuple, int<64>, iterator, optional, int<64>, iterator, optional, int<64>, iterator, optional, int<64>, iterator, optional> __result; if ( __feat%foo__X6%uses_random_access ) - (*self).__offset = begin(__cur).offset() - (*(*self).__begin).offset(); + (*self).__position = begin(__cur); (*self).__error = __error; @@ -1662,7 +1662,7 @@ method extern method view foo::X6::parse1(inout value_ref data, # End parsing production: Unit: foo_X6 -> if ( __feat%foo__X6%uses_random_access ) - (*unit).__offset = begin(ncur).offset() - (*(*unit).__begin).offset(); + (*unit).__position = begin(ncur); if ( error ) @@ -1686,7 +1686,7 @@ method extern method view foo::X6::parse3(inout value_ref if ( __feat%foo__X6%uses_random_access ) - (*unit).__offset = begin(ncur).offset() - (*(*unit).__begin).offset(); + (*unit).__position = begin(ncur); if ( error ) @@ -1708,7 +1708,7 @@ method extern method view foo::X6::parse2(inout value_ref unit, inou # End parsing production: Unit: foo_X6 -> if ( __feat%foo__X6%uses_random_access ) - (*unit).__offset = begin(ncur).offset() - (*(*unit).__begin).offset(); + (*unit).__position = begin(ncur); if ( error ) diff --git a/tests/Baseline/spicy.optimization.feature_requirements/opt.hlt b/tests/Baseline/spicy.optimization.feature_requirements/opt.hlt index 74f84d900..c03f7e6c4 100644 --- a/tests/Baseline/spicy.optimization.feature_requirements/opt.hlt +++ b/tests/Baseline/spicy.optimization.feature_requirements/opt.hlt @@ -8,7 +8,7 @@ import hilti; # - uses_random_access type X0 = struct { optional> __begin &internal &needed-by-feature="uses_random_access"; - uint<64> __offset &internal &needed-by-feature="uses_random_access"; + optional> __position &internal &needed-by-feature="uses_random_access"; optional> __position_update &internal &needed-by-feature="uses_random_access"; optional __error &always-emit &internal; hook void __on_0x25_init() ; @@ -17,7 +17,7 @@ type X0 = struct { # - uses_random_access type X1 = struct { optional> __begin &internal &needed-by-feature="uses_random_access"; - uint<64> __offset &internal &needed-by-feature="uses_random_access"; + optional> __position &internal &needed-by-feature="uses_random_access"; optional> __position_update &internal &needed-by-feature="uses_random_access"; optional __error &always-emit &internal; hook void __on_0x25_init() ; @@ -99,7 +99,7 @@ const bool __feat%foo__X6%supports_sinks = True; const bool __feat%foo__X6%synchronization = False; method hook void foo::X0::__on_0x25_init() { - self.__offset; + ((*self.__position).offset() - (*self.__begin).offset()); } init function void __register_foo_X0() { diff --git a/tests/Baseline/spicy.optimization.unused-functions/log b/tests/Baseline/spicy.optimization.unused-functions/log index 65f0ee56c..1d173feb8 100644 --- a/tests/Baseline/spicy.optimization.unused-functions/log +++ b/tests/Baseline/spicy.optimization.unused-functions/log @@ -241,31 +241,31 @@ [debug/optimizer] removing field for unused method foo::__register_foo_D::::parse3 [debug/optimizer] removing unused member 'foo::A::__begin' [debug/optimizer] removing unused member 'foo::A::__filters' -[debug/optimizer] removing unused member 'foo::A::__offset' [debug/optimizer] removing unused member 'foo::A::__parser' +[debug/optimizer] removing unused member 'foo::A::__position' [debug/optimizer] removing unused member 'foo::A::__position_update' [debug/optimizer] removing unused member 'foo::A::__sink' [debug/optimizer] removing unused member 'foo::B::__begin' [debug/optimizer] removing unused member 'foo::B::__filters' -[debug/optimizer] removing unused member 'foo::B::__offset' +[debug/optimizer] removing unused member 'foo::B::__position' [debug/optimizer] removing unused member 'foo::B::__position_update' [debug/optimizer] removing unused member 'foo::B::__sink' [debug/optimizer] removing unused member 'foo::C::__begin' [debug/optimizer] removing unused member 'foo::C::__filters' -[debug/optimizer] removing unused member 'foo::C::__offset' [debug/optimizer] removing unused member 'foo::C::__parser' +[debug/optimizer] removing unused member 'foo::C::__position' [debug/optimizer] removing unused member 'foo::C::__position_update' [debug/optimizer] removing unused member 'foo::C::__sink' [debug/optimizer] removing unused member 'foo::D::__begin' [debug/optimizer] removing unused member 'foo::D::__filters' -[debug/optimizer] removing unused member 'foo::D::__offset' +[debug/optimizer] removing unused member 'foo::D::__position' [debug/optimizer] removing unused member 'foo::D::__position_update' [debug/optimizer] removing unused member 'foo::D::__sink' [debug/optimizer] removing unused member 'foo::F::__begin' [debug/optimizer] removing unused member 'foo::F::__filters' [debug/optimizer] removing unused member 'foo::F::__forward' -[debug/optimizer] removing unused member 'foo::F::__offset' [debug/optimizer] removing unused member 'foo::F::__parser' +[debug/optimizer] removing unused member 'foo::F::__position' [debug/optimizer] removing unused member 'foo::F::__position_update' [debug/optimizer] removing unused member 'foo::F::__sink' [debug/optimizer] removing unused member 'spicy_rt::Sink::connect_mime_type' diff --git a/tests/Baseline/spicy.optimization.unused-functions/noopt.hlt b/tests/Baseline/spicy.optimization.unused-functions/noopt.hlt index 68a0cc516..a7d5959eb 100644 --- a/tests/Baseline/spicy.optimization.unused-functions/noopt.hlt +++ b/tests/Baseline/spicy.optimization.unused-functions/noopt.hlt @@ -6,7 +6,7 @@ import hilti; type A = struct { optional> __begin &internal &needed-by-feature="uses_random_access"; - uint<64> __offset &internal &needed-by-feature="uses_random_access"; + optional> __position &internal &needed-by-feature="uses_random_access"; optional> __position_update &internal &needed-by-feature="uses_random_access"; spicy_rt::Parser __parser &static &internal &needed-by-feature="supports_filters" &needed-by-feature="supports_sinks"; spicy_rt::SinkState __sink &internal &needed-by-feature="supports_sinks"; @@ -32,7 +32,7 @@ type A = struct { } &on-heap; public type B = struct { optional> __begin &internal &needed-by-feature="uses_random_access"; - uint<64> __offset &internal &needed-by-feature="uses_random_access"; + optional> __position &internal &needed-by-feature="uses_random_access"; optional> __position_update &internal &needed-by-feature="uses_random_access"; spicy_rt::Parser __parser &static &internal &needed-by-feature="supports_filters" &always-emit; spicy_rt::SinkState __sink &internal &needed-by-feature="supports_sinks"; @@ -58,7 +58,7 @@ public type B = struct { } &on-heap; type C = struct { optional> __begin &internal &needed-by-feature="uses_random_access"; - uint<64> __offset &internal &needed-by-feature="uses_random_access"; + optional> __position &internal &needed-by-feature="uses_random_access"; optional> __position_update &internal &needed-by-feature="uses_random_access"; spicy_rt::Parser __parser &static &internal &needed-by-feature="supports_filters" &needed-by-feature="supports_sinks"; spicy_rt::SinkState __sink &internal &needed-by-feature="supports_sinks"; @@ -85,7 +85,7 @@ type C = struct { public type D = struct { value_ref anon &optional &no-emit; optional> __begin &internal &needed-by-feature="uses_random_access"; - uint<64> __offset &internal &needed-by-feature="uses_random_access"; + optional> __position &internal &needed-by-feature="uses_random_access"; optional> __position_update &internal &needed-by-feature="uses_random_access"; spicy_rt::Parser __parser &static &internal &needed-by-feature="supports_filters" &always-emit; spicy_rt::SinkState __sink &internal &needed-by-feature="supports_sinks"; @@ -111,7 +111,7 @@ public type D = struct { } &on-heap; type F = struct { optional> __begin &internal &needed-by-feature="uses_random_access"; - uint<64> __offset &internal &needed-by-feature="uses_random_access"; + optional> __position &internal &needed-by-feature="uses_random_access"; optional> __position_update &internal &needed-by-feature="uses_random_access"; spicy_rt::Parser __parser &static &internal &needed-by-feature="supports_filters" &needed-by-feature="supports_sinks" &needed-by-feature="is_filter"; spicy_rt::SinkState __sink &internal &needed-by-feature="supports_sinks"; @@ -181,7 +181,7 @@ method method tuple, int<64>, iterator, optional, int<64>, iterator, optional, int<64>, iterator, optional, int<64>, iterator, optional> __result; if ( __feat%foo__A%uses_random_access ) - (*self).__offset = begin(__cur).offset() - (*(*self).__begin).offset(); + (*self).__position = begin(__cur); (*self).__error = __error; @@ -315,7 +315,7 @@ method extern method view foo::A::parse1(inout value_ref data, o # End parsing production: Unit: foo_A -> if ( __feat%foo__A%uses_random_access ) - (*unit).__offset = begin(ncur).offset() - (*(*unit).__begin).offset(); + (*unit).__position = begin(ncur); if ( error ) @@ -339,7 +339,7 @@ method extern method view foo::A::parse3(inout value_ref if ( __feat%foo__A%uses_random_access ) - (*unit).__offset = begin(ncur).offset() - (*(*unit).__begin).offset(); + (*unit).__position = begin(ncur); if ( error ) @@ -361,7 +361,7 @@ method extern method view foo::A::parse2(inout value_ref unit, inout # End parsing production: Unit: foo_A -> if ( __feat%foo__A%uses_random_access ) - (*unit).__offset = begin(ncur).offset() - (*(*unit).__begin).offset(); + (*unit).__position = begin(ncur); if ( error ) @@ -391,7 +391,7 @@ method method tuple, int<64>, iterator, optional, int<64>, iterator, optional, int<64>, iterator, optional, int<64>, iterator, optional> __result; if ( __feat%foo__B%uses_random_access ) - (*self).__offset = begin(__cur).offset() - (*(*self).__begin).offset(); + (*self).__position = begin(__cur); (*self).__error = __error; @@ -525,7 +525,7 @@ method extern method view foo::B::parse1(inout value_ref data, o # End parsing production: Unit: foo_B -> if ( __feat%foo__B%uses_random_access ) - (*unit).__offset = begin(ncur).offset() - (*(*unit).__begin).offset(); + (*unit).__position = begin(ncur); if ( error ) @@ -549,7 +549,7 @@ method extern method view foo::B::parse3(inout value_ref if ( __feat%foo__B%uses_random_access ) - (*unit).__offset = begin(ncur).offset() - (*(*unit).__begin).offset(); + (*unit).__position = begin(ncur); if ( error ) @@ -571,7 +571,7 @@ method extern method view foo::B::parse2(inout value_ref unit, inout # End parsing production: Unit: foo_B -> if ( __feat%foo__B%uses_random_access ) - (*unit).__offset = begin(ncur).offset() - (*(*unit).__begin).offset(); + (*unit).__position = begin(ncur); if ( error ) @@ -597,7 +597,7 @@ method method tuple, int<64>, iterator, optional, int<64>, iterator, optional, int<64>, iterator, optional, int<64>, iterator, optional> __result; if ( __feat%foo__C%uses_random_access ) - (*self).__offset = begin(__cur).offset() - (*(*self).__begin).offset(); + (*self).__position = begin(__cur); (*self).__error = __error; @@ -731,7 +731,7 @@ method extern method view foo::C::parse1(inout value_ref data, o # End parsing production: Unit: foo_C -> if ( __feat%foo__C%uses_random_access ) - (*unit).__offset = begin(ncur).offset() - (*(*unit).__begin).offset(); + (*unit).__position = begin(ncur); if ( error ) @@ -755,7 +755,7 @@ method extern method view foo::C::parse3(inout value_ref if ( __feat%foo__C%uses_random_access ) - (*unit).__offset = begin(ncur).offset() - (*(*unit).__begin).offset(); + (*unit).__position = begin(ncur); if ( error ) @@ -777,7 +777,7 @@ method extern method view foo::C::parse2(inout value_ref unit, inout # End parsing production: Unit: foo_C -> if ( __feat%foo__C%uses_random_access ) - (*unit).__offset = begin(ncur).offset() - (*(*unit).__begin).offset(); + (*unit).__position = begin(ncur); if ( error ) @@ -807,7 +807,7 @@ method method tuple, int<64>, iterator, optional, int<64>, iterator, optional, int<64>, iterator, optional if ( __feat%foo__D%uses_random_access ) - (*self).__offset = begin(__cur).offset() - (*(*self).__begin).offset(); + (*self).__position = begin(__cur); if ( __feat%foo__D%uses_random_access ) - (*self).__offset = begin(__cur).offset() - (*(*self).__begin).offset(); + (*self).__position = begin(__cur); (*self).__error = __error; @@ -952,7 +952,7 @@ method extern method view foo::D::parse1(inout value_ref data, o # End parsing production: Unit: foo_D -> foo_C_2 if ( __feat%foo__D%uses_random_access ) - (*unit).__offset = begin(ncur).offset() - (*(*unit).__begin).offset(); + (*unit).__position = begin(ncur); if ( error ) @@ -976,7 +976,7 @@ method extern method view foo::D::parse3(inout value_ref foo_C_2 if ( __feat%foo__D%uses_random_access ) - (*unit).__offset = begin(ncur).offset() - (*(*unit).__begin).offset(); + (*unit).__position = begin(ncur); if ( error ) @@ -998,7 +998,7 @@ method extern method view foo::D::parse2(inout value_ref unit, inout # End parsing production: Unit: foo_D -> foo_C_2 if ( __feat%foo__D%uses_random_access ) - (*unit).__offset = begin(ncur).offset() - (*(*unit).__begin).offset(); + (*unit).__position = begin(ncur); if ( error ) @@ -1024,7 +1024,7 @@ method method tuple, int<64>, iterator, optional, int<64>, iterator, optional, int<64>, iterator, optional, int<64>, iterator, optional> __result; if ( __feat%foo__F%uses_random_access ) - (*self).__offset = begin(__cur).offset() - (*(*self).__begin).offset(); + (*self).__position = begin(__cur); (*self).__error = __error; @@ -1166,7 +1166,7 @@ method extern method view foo::F::parse1(inout value_ref data, o # End parsing production: Unit: foo_F -> if ( __feat%foo__F%uses_random_access ) - (*unit).__offset = begin(ncur).offset() - (*(*unit).__begin).offset(); + (*unit).__position = begin(ncur); if ( error ) @@ -1190,7 +1190,7 @@ method extern method view foo::F::parse3(inout value_ref if ( __feat%foo__F%uses_random_access ) - (*unit).__offset = begin(ncur).offset() - (*(*unit).__begin).offset(); + (*unit).__position = begin(ncur); if ( error ) @@ -1212,7 +1212,7 @@ method extern method view foo::F::parse2(inout value_ref unit, inout # End parsing production: Unit: foo_F -> if ( __feat%foo__F%uses_random_access ) - (*unit).__offset = begin(ncur).offset() - (*(*unit).__begin).offset(); + (*unit).__position = begin(ncur); if ( error ) diff --git a/tests/Baseline/spicy.optimization.unused-types/log b/tests/Baseline/spicy.optimization.unused-types/log index d8756a032..c060fc291 100644 --- a/tests/Baseline/spicy.optimization.unused-types/log +++ b/tests/Baseline/spicy.optimization.unused-types/log @@ -414,53 +414,53 @@ [debug/optimizer] removing field for unused method foo::__register_foo_Pub3::::parse3 [debug/optimizer] removing unused member 'foo::Priv10::__begin' [debug/optimizer] removing unused member 'foo::Priv10::__filters' -[debug/optimizer] removing unused member 'foo::Priv10::__offset' +[debug/optimizer] removing unused member 'foo::Priv10::__position' [debug/optimizer] removing unused member 'foo::Priv10::__position_update' [debug/optimizer] removing unused member 'foo::Priv10::__sink' [debug/optimizer] removing unused member 'foo::Priv1::__begin' [debug/optimizer] removing unused member 'foo::Priv1::__filters' -[debug/optimizer] removing unused member 'foo::Priv1::__offset' [debug/optimizer] removing unused member 'foo::Priv1::__parser' +[debug/optimizer] removing unused member 'foo::Priv1::__position' [debug/optimizer] removing unused member 'foo::Priv1::__position_update' [debug/optimizer] removing unused member 'foo::Priv1::__sink' [debug/optimizer] removing unused member 'foo::Priv2::__begin' [debug/optimizer] removing unused member 'foo::Priv2::__filters' -[debug/optimizer] removing unused member 'foo::Priv2::__offset' [debug/optimizer] removing unused member 'foo::Priv2::__parser' +[debug/optimizer] removing unused member 'foo::Priv2::__position' [debug/optimizer] removing unused member 'foo::Priv2::__position_update' [debug/optimizer] removing unused member 'foo::Priv2::__sink' [debug/optimizer] removing unused member 'foo::Priv3::__begin' [debug/optimizer] removing unused member 'foo::Priv3::__filters' -[debug/optimizer] removing unused member 'foo::Priv3::__offset' [debug/optimizer] removing unused member 'foo::Priv3::__parser' +[debug/optimizer] removing unused member 'foo::Priv3::__position' [debug/optimizer] removing unused member 'foo::Priv3::__position_update' [debug/optimizer] removing unused member 'foo::Priv3::__sink' [debug/optimizer] removing unused member 'foo::Priv4::__begin' [debug/optimizer] removing unused member 'foo::Priv4::__filters' -[debug/optimizer] removing unused member 'foo::Priv4::__offset' [debug/optimizer] removing unused member 'foo::Priv4::__parser' +[debug/optimizer] removing unused member 'foo::Priv4::__position' [debug/optimizer] removing unused member 'foo::Priv4::__position_update' [debug/optimizer] removing unused member 'foo::Priv4::__sink' [debug/optimizer] removing unused member 'foo::Priv5::__begin' [debug/optimizer] removing unused member 'foo::Priv5::__filters' -[debug/optimizer] removing unused member 'foo::Priv5::__offset' [debug/optimizer] removing unused member 'foo::Priv5::__parser' +[debug/optimizer] removing unused member 'foo::Priv5::__position' [debug/optimizer] removing unused member 'foo::Priv5::__position_update' [debug/optimizer] removing unused member 'foo::Priv5::__sink' [debug/optimizer] removing unused member 'foo::Priv6::__begin' [debug/optimizer] removing unused member 'foo::Priv6::__filters' -[debug/optimizer] removing unused member 'foo::Priv6::__offset' [debug/optimizer] removing unused member 'foo::Priv6::__parser' +[debug/optimizer] removing unused member 'foo::Priv6::__position' [debug/optimizer] removing unused member 'foo::Priv6::__position_update' [debug/optimizer] removing unused member 'foo::Priv6::__sink' [debug/optimizer] removing unused member 'foo::Pub2::__begin' [debug/optimizer] removing unused member 'foo::Pub2::__filters' -[debug/optimizer] removing unused member 'foo::Pub2::__offset' +[debug/optimizer] removing unused member 'foo::Pub2::__position' [debug/optimizer] removing unused member 'foo::Pub2::__position_update' [debug/optimizer] removing unused member 'foo::Pub2::__sink' [debug/optimizer] removing unused member 'foo::Pub3::__begin' [debug/optimizer] removing unused member 'foo::Pub3::__filters' -[debug/optimizer] removing unused member 'foo::Pub3::__offset' +[debug/optimizer] removing unused member 'foo::Pub3::__position' [debug/optimizer] removing unused member 'foo::Pub3::__position_update' [debug/optimizer] removing unused member 'foo::Pub3::__sink' [debug/optimizer] removing unused member 'spicy_rt::Sink::connect_mime_type' diff --git a/tests/Baseline/spicy.optimization.unused-types/noopt.hlt b/tests/Baseline/spicy.optimization.unused-types/noopt.hlt index 4fdb5957d..ca0226cbd 100644 --- a/tests/Baseline/spicy.optimization.unused-types/noopt.hlt +++ b/tests/Baseline/spicy.optimization.unused-types/noopt.hlt @@ -6,7 +6,7 @@ import hilti; type Priv1 = struct { optional> __begin &internal &needed-by-feature="uses_random_access"; - uint<64> __offset &internal &needed-by-feature="uses_random_access"; + optional> __position &internal &needed-by-feature="uses_random_access"; optional> __position_update &internal &needed-by-feature="uses_random_access"; spicy_rt::Parser __parser &static &internal &needed-by-feature="supports_filters" &needed-by-feature="supports_sinks"; spicy_rt::SinkState __sink &internal &needed-by-feature="supports_sinks"; @@ -32,7 +32,7 @@ type Priv1 = struct { } &on-heap; public type Pub2 = struct { optional> __begin &internal &needed-by-feature="uses_random_access"; - uint<64> __offset &internal &needed-by-feature="uses_random_access"; + optional> __position &internal &needed-by-feature="uses_random_access"; optional> __position_update &internal &needed-by-feature="uses_random_access"; spicy_rt::Parser __parser &static &internal &needed-by-feature="supports_filters" &always-emit; spicy_rt::SinkState __sink &internal &needed-by-feature="supports_sinks"; @@ -58,7 +58,7 @@ public type Pub2 = struct { } &on-heap; type Priv2 = struct { optional> __begin &internal &needed-by-feature="uses_random_access"; - uint<64> __offset &internal &needed-by-feature="uses_random_access"; + optional> __position &internal &needed-by-feature="uses_random_access"; optional> __position_update &internal &needed-by-feature="uses_random_access"; spicy_rt::Parser __parser &static &internal &needed-by-feature="supports_filters" &needed-by-feature="supports_sinks"; spicy_rt::SinkState __sink &internal &needed-by-feature="supports_sinks"; @@ -84,7 +84,7 @@ type Priv2 = struct { } &on-heap; type Priv3 = struct { optional> __begin &internal &needed-by-feature="uses_random_access"; - uint<64> __offset &internal &needed-by-feature="uses_random_access"; + optional> __position &internal &needed-by-feature="uses_random_access"; optional> __position_update &internal &needed-by-feature="uses_random_access"; spicy_rt::Parser __parser &static &internal &needed-by-feature="supports_filters" &needed-by-feature="supports_sinks"; spicy_rt::SinkState __sink &internal &needed-by-feature="supports_sinks"; @@ -112,7 +112,7 @@ type Priv4 = struct { value_ref anon &optional &no-emit; value_ref x &optional; optional> __begin &internal &needed-by-feature="uses_random_access"; - uint<64> __offset &internal &needed-by-feature="uses_random_access"; + optional> __position &internal &needed-by-feature="uses_random_access"; optional> __position_update &internal &needed-by-feature="uses_random_access"; spicy_rt::Parser __parser &static &internal &needed-by-feature="supports_filters" &needed-by-feature="supports_sinks"; spicy_rt::SinkState __sink &internal &needed-by-feature="supports_sinks"; @@ -139,7 +139,7 @@ type Priv4 = struct { } &on-heap; type Priv5 = struct { optional> __begin &internal &needed-by-feature="uses_random_access"; - uint<64> __offset &internal &needed-by-feature="uses_random_access"; + optional> __position &internal &needed-by-feature="uses_random_access"; optional> __position_update &internal &needed-by-feature="uses_random_access"; spicy_rt::Parser __parser &static &internal &needed-by-feature="supports_filters" &needed-by-feature="supports_sinks"; spicy_rt::SinkState __sink &internal &needed-by-feature="supports_sinks"; @@ -165,7 +165,7 @@ type Priv5 = struct { } &on-heap; type Priv6 = struct { optional> __begin &internal &needed-by-feature="uses_random_access"; - uint<64> __offset &internal &needed-by-feature="uses_random_access"; + optional> __position &internal &needed-by-feature="uses_random_access"; optional> __position_update &internal &needed-by-feature="uses_random_access"; spicy_rt::Parser __parser &static &internal &needed-by-feature="supports_filters" &needed-by-feature="supports_sinks"; spicy_rt::SinkState __sink &internal &needed-by-feature="supports_sinks"; @@ -193,7 +193,7 @@ public type Pub3 = struct { value_ref anon_2 &optional &no-emit; value_ref x &optional; optional> __begin &internal &needed-by-feature="uses_random_access"; - uint<64> __offset &internal &needed-by-feature="uses_random_access"; + optional> __position &internal &needed-by-feature="uses_random_access"; optional> __position_update &internal &needed-by-feature="uses_random_access"; spicy_rt::Parser __parser &static &internal &needed-by-feature="supports_filters" &always-emit; spicy_rt::SinkState __sink &internal &needed-by-feature="supports_sinks"; @@ -226,7 +226,7 @@ public type Priv10 = struct { Priv8 en &default=Priv8::A; Priv9 em; optional> __begin &internal &needed-by-feature="uses_random_access"; - uint<64> __offset &internal &needed-by-feature="uses_random_access"; + optional> __position &internal &needed-by-feature="uses_random_access"; optional> __position_update &internal &needed-by-feature="uses_random_access"; spicy_rt::Parser __parser &static &internal &needed-by-feature="supports_filters" &always-emit; spicy_rt::SinkState __sink &internal &needed-by-feature="supports_sinks"; @@ -314,7 +314,7 @@ method method tuple, int<64>, iterator, optional, int<64>, iterator, optional, int<64>, iterator, optional, int<64>, iterator, optional> __result; if ( __feat%foo__Priv1%uses_random_access ) - (*self).__offset = begin(__cur).offset() - (*(*self).__begin).offset(); + (*self).__position = begin(__cur); (*self).__error = __error; @@ -448,7 +448,7 @@ method extern method view foo::Priv1::parse1(inout value_ref dat # End parsing production: Unit: foo_Priv1 -> if ( __feat%foo__Priv1%uses_random_access ) - (*unit).__offset = begin(ncur).offset() - (*(*unit).__begin).offset(); + (*unit).__position = begin(ncur); if ( error ) @@ -472,7 +472,7 @@ method extern method view foo::Priv1::parse3(inout value_ref if ( __feat%foo__Priv1%uses_random_access ) - (*unit).__offset = begin(ncur).offset() - (*(*unit).__begin).offset(); + (*unit).__position = begin(ncur); if ( error ) @@ -494,7 +494,7 @@ method extern method view foo::Priv1::parse2(inout value_ref unit # End parsing production: Unit: foo_Priv1 -> if ( __feat%foo__Priv1%uses_random_access ) - (*unit).__offset = begin(ncur).offset() - (*(*unit).__begin).offset(); + (*unit).__position = begin(ncur); if ( error ) @@ -524,7 +524,7 @@ method method tuple, int<64>, iterator, optional, int<64>, iterator, optional, int<64>, iterator, optional, int<64>, iterator, optional> __result; if ( __feat%foo__Pub2%uses_random_access ) - (*self).__offset = begin(__cur).offset() - (*(*self).__begin).offset(); + (*self).__position = begin(__cur); (*self).__error = __error; @@ -658,7 +658,7 @@ method extern method view foo::Pub2::parse1(inout value_ref data # End parsing production: Unit: foo_Pub2 -> if ( __feat%foo__Pub2%uses_random_access ) - (*unit).__offset = begin(ncur).offset() - (*(*unit).__begin).offset(); + (*unit).__position = begin(ncur); if ( error ) @@ -682,7 +682,7 @@ method extern method view foo::Pub2::parse3(inout value_ref if ( __feat%foo__Pub2%uses_random_access ) - (*unit).__offset = begin(ncur).offset() - (*(*unit).__begin).offset(); + (*unit).__position = begin(ncur); if ( error ) @@ -704,7 +704,7 @@ method extern method view foo::Pub2::parse2(inout value_ref unit, # End parsing production: Unit: foo_Pub2 -> if ( __feat%foo__Pub2%uses_random_access ) - (*unit).__offset = begin(ncur).offset() - (*(*unit).__begin).offset(); + (*unit).__position = begin(ncur); if ( error ) @@ -730,7 +730,7 @@ method method tuple, int<64>, iterator, optional, int<64>, iterator, optional, int<64>, iterator, optional, int<64>, iterator, optional> __result; if ( __feat%foo__Priv2%uses_random_access ) - (*self).__offset = begin(__cur).offset() - (*(*self).__begin).offset(); + (*self).__position = begin(__cur); (*self).__error = __error; @@ -864,7 +864,7 @@ method extern method view foo::Priv2::parse1(inout value_ref dat # End parsing production: Unit: foo_Priv2 -> if ( __feat%foo__Priv2%uses_random_access ) - (*unit).__offset = begin(ncur).offset() - (*(*unit).__begin).offset(); + (*unit).__position = begin(ncur); if ( error ) @@ -888,7 +888,7 @@ method extern method view foo::Priv2::parse3(inout value_ref if ( __feat%foo__Priv2%uses_random_access ) - (*unit).__offset = begin(ncur).offset() - (*(*unit).__begin).offset(); + (*unit).__position = begin(ncur); if ( error ) @@ -910,7 +910,7 @@ method extern method view foo::Priv2::parse2(inout value_ref unit # End parsing production: Unit: foo_Priv2 -> if ( __feat%foo__Priv2%uses_random_access ) - (*unit).__offset = begin(ncur).offset() - (*(*unit).__begin).offset(); + (*unit).__position = begin(ncur); if ( error ) @@ -940,7 +940,7 @@ method method tuple, int<64>, iterator, optional, int<64>, iterator, optional, int<64>, iterator, optional, int<64>, iterator, optional> __result; if ( __feat%foo__Priv3%uses_random_access ) - (*self).__offset = begin(__cur).offset() - (*(*self).__begin).offset(); + (*self).__position = begin(__cur); (*self).__error = __error; @@ -1074,7 +1074,7 @@ method extern method view foo::Priv3::parse1(inout value_ref dat # End parsing production: Unit: foo_Priv3 -> if ( __feat%foo__Priv3%uses_random_access ) - (*unit).__offset = begin(ncur).offset() - (*(*unit).__begin).offset(); + (*unit).__position = begin(ncur); if ( error ) @@ -1098,7 +1098,7 @@ method extern method view foo::Priv3::parse3(inout value_ref if ( __feat%foo__Priv3%uses_random_access ) - (*unit).__offset = begin(ncur).offset() - (*(*unit).__begin).offset(); + (*unit).__position = begin(ncur); if ( error ) @@ -1120,7 +1120,7 @@ method extern method view foo::Priv3::parse2(inout value_ref unit # End parsing production: Unit: foo_Priv3 -> if ( __feat%foo__Priv3%uses_random_access ) - (*unit).__offset = begin(ncur).offset() - (*(*unit).__begin).offset(); + (*unit).__position = begin(ncur); if ( error ) @@ -1150,7 +1150,7 @@ method method tuple, int<64>, iterator, optional, int<64>, iterator, optional, int<64>, iterator, optional if ( __feat%foo__Priv4%uses_random_access ) - (*self).__offset = begin(__cur).offset() - (*(*self).__begin).offset(); + (*self).__position = begin(__cur); # "<...>/unused-types.spicy:20:14" @@ -1277,11 +1277,11 @@ method method tuple, int<64>, iterator, optional foo::Priv4::parse1(inout value_ref dat # End parsing production: Unit: foo_Priv4 -> foo_Priv2_2 foo_Priv3_2 if ( __feat%foo__Priv4%uses_random_access ) - (*unit).__offset = begin(ncur).offset() - (*(*unit).__begin).offset(); + (*unit).__position = begin(ncur); if ( error ) @@ -1346,7 +1346,7 @@ method extern method view foo::Priv4::parse3(inout value_ref foo_Priv2_2 foo_Priv3_2 if ( __feat%foo__Priv4%uses_random_access ) - (*unit).__offset = begin(ncur).offset() - (*(*unit).__begin).offset(); + (*unit).__position = begin(ncur); if ( error ) @@ -1368,7 +1368,7 @@ method extern method view foo::Priv4::parse2(inout value_ref unit # End parsing production: Unit: foo_Priv4 -> foo_Priv2_2 foo_Priv3_2 if ( __feat%foo__Priv4%uses_random_access ) - (*unit).__offset = begin(ncur).offset() - (*(*unit).__begin).offset(); + (*unit).__position = begin(ncur); if ( error ) @@ -1398,7 +1398,7 @@ method method tuple, int<64>, iterator, optional, int<64>, iterator, optional, int<64>, iterator, optional, int<64>, iterator, optional> __result; if ( __feat%foo__Priv5%uses_random_access ) - (*self).__offset = begin(__cur).offset() - (*(*self).__begin).offset(); + (*self).__position = begin(__cur); (*self).__error = __error; @@ -1532,7 +1532,7 @@ method extern method view foo::Priv5::parse1(inout value_ref dat # End parsing production: Unit: foo_Priv5 -> if ( __feat%foo__Priv5%uses_random_access ) - (*unit).__offset = begin(ncur).offset() - (*(*unit).__begin).offset(); + (*unit).__position = begin(ncur); if ( error ) @@ -1556,7 +1556,7 @@ method extern method view foo::Priv5::parse3(inout value_ref if ( __feat%foo__Priv5%uses_random_access ) - (*unit).__offset = begin(ncur).offset() - (*(*unit).__begin).offset(); + (*unit).__position = begin(ncur); if ( error ) @@ -1578,7 +1578,7 @@ method extern method view foo::Priv5::parse2(inout value_ref unit # End parsing production: Unit: foo_Priv5 -> if ( __feat%foo__Priv5%uses_random_access ) - (*unit).__offset = begin(ncur).offset() - (*(*unit).__begin).offset(); + (*unit).__position = begin(ncur); if ( error ) @@ -1608,7 +1608,7 @@ method method tuple, int<64>, iterator, optional, int<64>, iterator, optional, int<64>, iterator, optional, int<64>, iterator, optional> __result; if ( __feat%foo__Priv6%uses_random_access ) - (*self).__offset = begin(__cur).offset() - (*(*self).__begin).offset(); + (*self).__position = begin(__cur); (*self).__error = __error; @@ -1742,7 +1742,7 @@ method extern method view foo::Priv6::parse1(inout value_ref dat # End parsing production: Unit: foo_Priv6 -> if ( __feat%foo__Priv6%uses_random_access ) - (*unit).__offset = begin(ncur).offset() - (*(*unit).__begin).offset(); + (*unit).__position = begin(ncur); if ( error ) @@ -1766,7 +1766,7 @@ method extern method view foo::Priv6::parse3(inout value_ref if ( __feat%foo__Priv6%uses_random_access ) - (*unit).__offset = begin(ncur).offset() - (*(*unit).__begin).offset(); + (*unit).__position = begin(ncur); if ( error ) @@ -1788,7 +1788,7 @@ method extern method view foo::Priv6::parse2(inout value_ref unit # End parsing production: Unit: foo_Priv6 -> if ( __feat%foo__Priv6%uses_random_access ) - (*unit).__offset = begin(ncur).offset() - (*(*unit).__begin).offset(); + (*unit).__position = begin(ncur); if ( error ) @@ -1818,7 +1818,7 @@ method method tuple, int<64>, iterator, optional, int<64>, iterator, optional, int<64>, iterator, optional if ( __feat%foo__Pub3%uses_random_access ) - (*self).__offset = begin(__cur).offset() - (*(*self).__begin).offset(); + (*self).__position = begin(__cur); # "<...>/unused-types.spicy:28:14" @@ -1945,11 +1945,11 @@ method method tuple, int<64>, iterator, optional foo::Pub3::parse1(inout value_ref data # End parsing production: Unit: foo_Pub3 -> foo_Priv5_2 foo_Priv6_2 if ( __feat%foo__Pub3%uses_random_access ) - (*unit).__offset = begin(ncur).offset() - (*(*unit).__begin).offset(); + (*unit).__position = begin(ncur); if ( error ) @@ -2014,7 +2014,7 @@ method extern method view foo::Pub3::parse3(inout value_ref foo_Priv5_2 foo_Priv6_2 if ( __feat%foo__Pub3%uses_random_access ) - (*unit).__offset = begin(ncur).offset() - (*(*unit).__begin).offset(); + (*unit).__position = begin(ncur); if ( error ) @@ -2036,7 +2036,7 @@ method extern method view foo::Pub3::parse2(inout value_ref unit, # End parsing production: Unit: foo_Pub3 -> foo_Priv5_2 foo_Priv6_2 if ( __feat%foo__Pub3%uses_random_access ) - (*unit).__offset = begin(ncur).offset() - (*(*unit).__begin).offset(); + (*unit).__position = begin(ncur); if ( error ) @@ -2062,7 +2062,7 @@ method method tuple, int<64>, iterator, optional, int<64>, iterator, optional, int<64>, iterator, optional, int<64>, iterator, optional> __result; if ( __feat%foo__Priv10%uses_random_access ) - (*self).__offset = begin(__cur).offset() - (*(*self).__begin).offset(); + (*self).__position = begin(__cur); (*self).__error = __error; @@ -2196,7 +2196,7 @@ method extern method view foo::Priv10::parse1(inout value_ref da # End parsing production: Unit: foo_Priv10 -> if ( __feat%foo__Priv10%uses_random_access ) - (*unit).__offset = begin(ncur).offset() - (*(*unit).__begin).offset(); + (*unit).__position = begin(ncur); if ( error ) @@ -2220,7 +2220,7 @@ method extern method view foo::Priv10::parse3(inout value_ref if ( __feat%foo__Priv10%uses_random_access ) - (*unit).__offset = begin(ncur).offset() - (*(*unit).__begin).offset(); + (*unit).__position = begin(ncur); if ( error ) @@ -2242,7 +2242,7 @@ method extern method view foo::Priv10::parse2(inout value_ref un # End parsing production: Unit: foo_Priv10 -> if ( __feat%foo__Priv10%uses_random_access ) - (*unit).__offset = begin(ncur).offset() - (*(*unit).__begin).offset(); + (*unit).__position = begin(ncur); if ( error ) diff --git a/tests/Baseline/spicy.types.unit.canonical-ids-with-import/output b/tests/Baseline/spicy.types.unit.canonical-ids-with-import/output index 85979af74..2e4450c7a 100644 --- a/tests/Baseline/spicy.types.unit.canonical-ids-with-import/output +++ b/tests/Baseline/spicy.types.unit.canonical-ids-with-import/output @@ -273,7 +273,7 @@ [debug/ast-declarations] - Parameter "seq" (a::X::__on_0x25_undelivered::seq) [debug/ast-declarations] - Parameter "data" (a::X::__on_0x25_undelivered::data) [debug/ast-declarations] - Field "__begin" (a::X::__begin) -[debug/ast-declarations] - Field "__offset" (a::X::__offset) +[debug/ast-declarations] - Field "__position" (a::X::__position) [debug/ast-declarations] - Field "__position_update" (a::X::__position_update) [debug/ast-declarations] - Field "__parser" (a::X::__parser) [debug/ast-declarations] - Field "__sink" (a::X::__sink) @@ -399,7 +399,7 @@ [debug/ast-declarations] - Parameter "seq" (a::X::__on_0x25_undelivered::seq) [debug/ast-declarations] - Parameter "data" (a::X::__on_0x25_undelivered::data) [debug/ast-declarations] - Field "__begin" (a::X::__begin) -[debug/ast-declarations] - Field "__offset" (a::X::__offset) +[debug/ast-declarations] - Field "__position" (a::X::__position) [debug/ast-declarations] - Field "__position_update" (a::X::__position_update) [debug/ast-declarations] - Field "__parser" (a::X::__parser) [debug/ast-declarations] - Field "__sink" (a::X::__sink) @@ -507,7 +507,7 @@ [debug/ast-declarations] - Parameter "seq" (a::X::__on_0x25_undelivered::seq) [debug/ast-declarations] - Parameter "data" (a::X::__on_0x25_undelivered::data) [debug/ast-declarations] - Field "__begin" (a::X::__begin) -[debug/ast-declarations] - Field "__offset" (a::X::__offset) +[debug/ast-declarations] - Field "__position" (a::X::__position) [debug/ast-declarations] - Field "__position_update" (a::X::__position_update) [debug/ast-declarations] - Field "__parser" (a::X::__parser) [debug/ast-declarations] - Field "__sink" (a::X::__sink) @@ -567,7 +567,7 @@ [debug/ast-declarations] - Parameter "seq" (a::X::__on_0x25_undelivered::seq) [debug/ast-declarations] - Parameter "data" (a::X::__on_0x25_undelivered::data) [debug/ast-declarations] - Field "__begin" (a::X::__begin) -[debug/ast-declarations] - Field "__offset" (a::X::__offset) +[debug/ast-declarations] - Field "__position" (a::X::__position) [debug/ast-declarations] - Field "__position_update" (a::X::__position_update) [debug/ast-declarations] - Field "__parser" (a::X::__parser) [debug/ast-declarations] - Field "__sink" (a::X::__sink) diff --git a/tests/Baseline/spicy.types.unit.canonical-ids/output b/tests/Baseline/spicy.types.unit.canonical-ids/output index 046e29e27..a50882464 100644 --- a/tests/Baseline/spicy.types.unit.canonical-ids/output +++ b/tests/Baseline/spicy.types.unit.canonical-ids/output @@ -270,7 +270,7 @@ [debug/ast-declarations] - Parameter "seq" (DNS::Label::__on_0x25_undelivered::seq) [debug/ast-declarations] - Parameter "data" (DNS::Label::__on_0x25_undelivered::data) [debug/ast-declarations] - Field "__begin" (DNS::Label::__begin) -[debug/ast-declarations] - Field "__offset" (DNS::Label::__offset) +[debug/ast-declarations] - Field "__position" (DNS::Label::__position) [debug/ast-declarations] - Field "__position_update" (DNS::Label::__position_update) [debug/ast-declarations] - Field "__parser" (DNS::Label::__parser) [debug/ast-declarations] - Field "__sink" (DNS::Label::__sink) @@ -331,7 +331,7 @@ [debug/ast-declarations] - Parameter "seq" (DNS::Pointer::__on_0x25_undelivered::seq) [debug/ast-declarations] - Parameter "data" (DNS::Pointer::__on_0x25_undelivered::data) [debug/ast-declarations] - Field "__begin" (DNS::Pointer::__begin) -[debug/ast-declarations] - Field "__offset" (DNS::Pointer::__offset) +[debug/ast-declarations] - Field "__position" (DNS::Pointer::__position) [debug/ast-declarations] - Field "__position_update" (DNS::Pointer::__position_update) [debug/ast-declarations] - Field "__parser" (DNS::Pointer::__parser) [debug/ast-declarations] - Field "__sink" (DNS::Pointer::__sink) @@ -458,7 +458,7 @@ [debug/ast-declarations] - Parameter "seq" (DNS::Label::__on_0x25_undelivered::seq) [debug/ast-declarations] - Parameter "data" (DNS::Label::__on_0x25_undelivered::data) [debug/ast-declarations] - Field "__begin" (DNS::Label::__begin) -[debug/ast-declarations] - Field "__offset" (DNS::Label::__offset) +[debug/ast-declarations] - Field "__position" (DNS::Label::__position) [debug/ast-declarations] - Field "__position_update" (DNS::Label::__position_update) [debug/ast-declarations] - Field "__parser" (DNS::Label::__parser) [debug/ast-declarations] - Field "__sink" (DNS::Label::__sink) @@ -566,7 +566,7 @@ [debug/ast-declarations] - Parameter "seq" (DNS::Label::__on_0x25_undelivered::seq) [debug/ast-declarations] - Parameter "data" (DNS::Label::__on_0x25_undelivered::data) [debug/ast-declarations] - Field "__begin" (DNS::Label::__begin) -[debug/ast-declarations] - Field "__offset" (DNS::Label::__offset) +[debug/ast-declarations] - Field "__position" (DNS::Label::__position) [debug/ast-declarations] - Field "__position_update" (DNS::Label::__position_update) [debug/ast-declarations] - Field "__parser" (DNS::Label::__parser) [debug/ast-declarations] - Field "__sink" (DNS::Label::__sink) @@ -626,7 +626,7 @@ [debug/ast-declarations] - Parameter "seq" (DNS::Label::__on_0x25_undelivered::seq) [debug/ast-declarations] - Parameter "data" (DNS::Label::__on_0x25_undelivered::data) [debug/ast-declarations] - Field "__begin" (DNS::Label::__begin) -[debug/ast-declarations] - Field "__offset" (DNS::Label::__offset) +[debug/ast-declarations] - Field "__position" (DNS::Label::__position) [debug/ast-declarations] - Field "__position_update" (DNS::Label::__position_update) [debug/ast-declarations] - Field "__parser" (DNS::Label::__parser) [debug/ast-declarations] - Field "__sink" (DNS::Label::__sink) @@ -751,7 +751,7 @@ [debug/ast-declarations] - Parameter "seq" (DNS::Pointer::__on_0x25_undelivered::seq) [debug/ast-declarations] - Parameter "data" (DNS::Pointer::__on_0x25_undelivered::data) [debug/ast-declarations] - Field "__begin" (DNS::Pointer::__begin) -[debug/ast-declarations] - Field "__offset" (DNS::Pointer::__offset) +[debug/ast-declarations] - Field "__position" (DNS::Pointer::__position) [debug/ast-declarations] - Field "__position_update" (DNS::Pointer::__position_update) [debug/ast-declarations] - Field "__parser" (DNS::Pointer::__parser) [debug/ast-declarations] - Field "__sink" (DNS::Pointer::__sink) @@ -859,7 +859,7 @@ [debug/ast-declarations] - Parameter "seq" (DNS::Pointer::__on_0x25_undelivered::seq) [debug/ast-declarations] - Parameter "data" (DNS::Pointer::__on_0x25_undelivered::data) [debug/ast-declarations] - Field "__begin" (DNS::Pointer::__begin) -[debug/ast-declarations] - Field "__offset" (DNS::Pointer::__offset) +[debug/ast-declarations] - Field "__position" (DNS::Pointer::__position) [debug/ast-declarations] - Field "__position_update" (DNS::Pointer::__position_update) [debug/ast-declarations] - Field "__parser" (DNS::Pointer::__parser) [debug/ast-declarations] - Field "__sink" (DNS::Pointer::__sink) @@ -919,7 +919,7 @@ [debug/ast-declarations] - Parameter "seq" (DNS::Pointer::__on_0x25_undelivered::seq) [debug/ast-declarations] - Parameter "data" (DNS::Pointer::__on_0x25_undelivered::data) [debug/ast-declarations] - Field "__begin" (DNS::Pointer::__begin) -[debug/ast-declarations] - Field "__offset" (DNS::Pointer::__offset) +[debug/ast-declarations] - Field "__position" (DNS::Pointer::__position) [debug/ast-declarations] - Field "__position_update" (DNS::Pointer::__position_update) [debug/ast-declarations] - Field "__parser" (DNS::Pointer::__parser) [debug/ast-declarations] - Field "__sink" (DNS::Pointer::__sink)