diff --git a/auxil/gen-zam b/auxil/gen-zam index ed44de9c43..21ba218d2e 160000 --- a/auxil/gen-zam +++ b/auxil/gen-zam @@ -1 +1 @@ -Subproject commit ed44de9c43ad84fbcf42176719b7a985f538cc4d +Subproject commit 21ba218d2ed7ec27ef009897e9c83576106a85ae diff --git a/src/script_opt/ZAM/AM-Opt.cc b/src/script_opt/ZAM/AM-Opt.cc index 3ee2eb2d19..697235018a 100644 --- a/src/script_opt/ZAM/AM-Opt.cc +++ b/src/script_opt/ZAM/AM-Opt.cc @@ -303,7 +303,7 @@ bool ZAMCompiler::PruneUnused() { if ( assignmentless_op.count(inst->op) == 0 ) reporter->InternalError("inconsistency in re-flavoring instruction with side effects"); - inst->op_type = assignmentless_op_type[inst->op]; + inst->op_type = assignmentless_op_class[inst->op]; inst->op = assignmentless_op[inst->op]; inst->v1 = inst->v2; diff --git a/src/script_opt/ZAM/OPs/README.txt b/src/script_opt/ZAM/OPs/README.txt index bc1e42a0d5..adc2ef4a7e 100644 --- a/src/script_opt/ZAM/OPs/README.txt +++ b/src/script_opt/ZAM/OPs/README.txt @@ -145,6 +145,16 @@ # all of possible values not explicitly listed (used in # conjunction with eval-type - see below) # +# op-types similar to op-type, but lists a type for each operand +# (including assignment target) +# +# Note that these types collectively apply to each instance of +# an operation, whereas listing multiple "op-type" types +# iterates through those one-at-a-time in turn (and generally +# the point is that the each type applies to *all* operands, +# rather than a per-operand list). Given that, the two are +# incompatible. +# # eval specifies a block of C++ code used to evaluation the # execution of the instruction. The block begins with the # remainder of the "eval" line and continues until either a diff --git a/src/script_opt/ZAM/ZInst.h b/src/script_opt/ZAM/ZInst.h index 4c62523e85..19db6d75ef 100644 --- a/src/script_opt/ZAM/ZInst.h +++ b/src/script_opt/ZAM/ZInst.h @@ -551,8 +551,8 @@ extern std::unordered_map> assignment_flav // value is superfluous. extern std::unordered_map assignmentless_op; -// Maps flavorful assignments to what op-type their non-assignment +// Maps flavorful assignments to what operand class their non-assignment // counterpart uses. -extern std::unordered_map assignmentless_op_type; +extern std::unordered_map assignmentless_op_class; } // namespace zeek::detail diff --git a/src/script_opt/ZAM/ZOp.cc b/src/script_opt/ZAM/ZOp.cc index 161276f2cc..d91ad8b713 100644 --- a/src/script_opt/ZAM/ZOp.cc +++ b/src/script_opt/ZAM/ZOp.cc @@ -57,7 +57,7 @@ bool op_side_effects[] = { std::unordered_map> assignment_flavor; std::unordered_map assignmentless_op; -std::unordered_map assignmentless_op_type; +std::unordered_map assignmentless_op_class; ZOp AssignmentFlavor(ZOp orig, TypeTag tag, bool strict) { static bool did_init = false;