mirror of
https://github.com/zeek/zeek.git
synced 2025-10-16 05:28:20 +00:00
added &no_ZAM_opt/&no_CPP_opt attributes and --no-opt-files/--no-opt-funcs for controlling skipping script optimization
This commit is contained in:
parent
2bde66c9d6
commit
441baaf2c1
16 changed files with 198 additions and 57 deletions
|
@ -76,7 +76,7 @@ std::shared_ptr<CPP_InitInfo> CPPCompile::GenerateGlobalInit(IDPtr g) {
|
|||
if ( ! standalone )
|
||||
return make_shared<GlobalLookupInitInfo>(this, g, globals[gn]);
|
||||
|
||||
if ( obj_matches_opt_files(g) )
|
||||
if ( obj_matches_opt_files(g) == AnalyzeDecision::SHOULD )
|
||||
return make_shared<GlobalInitInfo>(this, g, globals[gn]);
|
||||
|
||||
// It's not a global that's created by the scripts we're compiling,
|
||||
|
@ -86,7 +86,7 @@ std::shared_ptr<CPP_InitInfo> CPPCompile::GenerateGlobalInit(IDPtr g) {
|
|||
bool needs_redef = false;
|
||||
|
||||
for ( const auto& i_e : g->GetOptInfo()->GetInitExprs() )
|
||||
if ( obj_matches_opt_files(i_e) ) {
|
||||
if ( obj_matches_opt_files(i_e) == AnalyzeDecision::SHOULD ) {
|
||||
needs_redef = true;
|
||||
break;
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue