mirror of
https://github.com/zeek/zeek.git
synced 2025-10-07 09:08:20 +00:00
script optimization fixes:
new initialization model for standalone C++ scripts type coercion fix ZAM fix for compiling using C++ optimizer disambiguate empty constructors
This commit is contained in:
parent
dbb2aa88a6
commit
134f8f2ef5
14 changed files with 80 additions and 96 deletions
|
@ -49,7 +49,15 @@ shared_ptr<CPP_InitInfo> CPPCompile::RegisterAttr(const AttrPtr& attr)
|
|||
|
||||
const auto& e = a->GetExpr();
|
||||
if ( e && ! IsSimpleInitExpr(e) )
|
||||
init_exprs.AddKey(e, p_hash(e));
|
||||
{
|
||||
auto h = p_hash(e);
|
||||
|
||||
// Include the type in the hash, otherwise expressions
|
||||
// like "vector()" are ambiguous.
|
||||
h = merge_p_hashes(h, p_hash(e->GetType()));
|
||||
|
||||
init_exprs.AddKey(e, h);
|
||||
}
|
||||
|
||||
auto gi = make_shared<AttrInfo>(this, attr);
|
||||
attr_info->AddInstance(gi);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue