mirror of
https://github.com/zeek/zeek.git
synced 2025-10-02 06:38:20 +00:00
some final fixups
This commit is contained in:
parent
d7df53d5c3
commit
ffb8f27d6b
4 changed files with 6 additions and 2 deletions
|
@ -614,6 +614,9 @@ SetType::~SetType() = default;
|
|||
#pragma GCC diagnostic ignored "-Wdeprecated-declarations"
|
||||
FuncType::Capture::Capture(detail::IDPtr _id, bool _deep_copy) : id(std::move(_id)), deep_copy(_deep_copy) {
|
||||
is_managed = id ? ZVal::IsManagedType(id->GetType()) : false;
|
||||
if ( ! is_managed )
|
||||
// For non-managed types, deep copying isn't applicable.
|
||||
deep_copy = false;
|
||||
}
|
||||
#pragma GCC diagnostic pop
|
||||
|
||||
|
|
|
@ -62,6 +62,7 @@ union ZVal {
|
|||
ZVal(const TypePtr& t);
|
||||
|
||||
// Construct directly.
|
||||
ZVal(bool v) { int_val = v; }
|
||||
ZVal(zeek_int_t v) { int_val = v; }
|
||||
ZVal(zeek_uint_t v) { uint_val = v; }
|
||||
ZVal(double v) { double_val = v; }
|
||||
|
|
|
@ -219,8 +219,6 @@ void ZAMCompiler::ResolveHookBreaks() {
|
|||
// Rewrite the breaks.
|
||||
for ( auto& b : breaks[0] ) {
|
||||
auto& i = insts1[b.stmt_num];
|
||||
// Preserve the auxiliary information (control-flow types
|
||||
// in particular).
|
||||
auto aux = i->aux;
|
||||
*i = ZInstI(OP_HOOK_BREAK_X);
|
||||
i->aux = aux;
|
||||
|
|
|
@ -21,6 +21,8 @@ assign-val v
|
|||
eval auto& v = Z_FRAME->GetElement($1);
|
||||
|
||||
internal-assignment-op Load-Global
|
||||
# We don't use GlobalVal() for the assignment because we want to leverage
|
||||
# the bookkeeping that assign-val gives us in terms of memory management.
|
||||
class Vg
|
||||
assign-val v
|
||||
eval auto& v = GlobalID($1)->GetVal();
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue