mirror of
https://github.com/zeek/zeek.git
synced 2025-10-02 22:58:20 +00:00
some very minor tidying of script optimization code/documentation
This commit is contained in:
parent
8e0a62bfec
commit
a824bb1e4b
4 changed files with 5 additions and 6 deletions
|
@ -460,12 +460,12 @@ FuncTypeInfo::FuncTypeInfo(CPPCompile* _c, TypePtr _t) : AbstractTypeInfo(_c, st
|
||||||
params = f->Params();
|
params = f->Params();
|
||||||
yield = f->Yield();
|
yield = f->Yield();
|
||||||
|
|
||||||
auto gi = c->RegisterType(f->Params());
|
auto gi = c->RegisterType(params);
|
||||||
if ( gi )
|
if ( gi )
|
||||||
init_cohort = gi->InitCohort();
|
init_cohort = gi->InitCohort();
|
||||||
|
|
||||||
if ( yield ) {
|
if ( yield ) {
|
||||||
gi = c->RegisterType(f->Yield());
|
auto gi = c->RegisterType(f->Yield());
|
||||||
if ( gi )
|
if ( gi )
|
||||||
init_cohort = max(init_cohort, gi->InitCohort());
|
init_cohort = max(init_cohort, gi->InitCohort());
|
||||||
}
|
}
|
||||||
|
|
|
@ -594,7 +594,7 @@ public:
|
||||||
|
|
||||||
private:
|
private:
|
||||||
FunctionFlavor flavor;
|
FunctionFlavor flavor;
|
||||||
TypePtr params;
|
RecordTypePtr params;
|
||||||
TypePtr yield;
|
TypePtr yield;
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
|
@ -13,7 +13,7 @@ The maintenance workflow:
|
||||||
|
|
||||||
1. Make sure the compiler can compile and execute the base scripts:
|
1. Make sure the compiler can compile and execute the base scripts:
|
||||||
|
|
||||||
echo | src/zeek -O gen-C++
|
src/zeek -O gen-C++ /dev/null
|
||||||
ninja
|
ninja
|
||||||
src/zeek -O use-C++ -r some.pcap
|
src/zeek -O use-C++ -r some.pcap
|
||||||
|
|
||||||
|
@ -21,7 +21,7 @@ The maintenance workflow:
|
||||||
|
|
||||||
rm CPP-gen.cc
|
rm CPP-gen.cc
|
||||||
ninja
|
ninja
|
||||||
echo | src/zeek -O gen-standalone-C++
|
src/zeek -O gen-standalone-C++ /dev/null
|
||||||
ninja
|
ninja
|
||||||
rm CPP-gen.cc
|
rm CPP-gen.cc
|
||||||
ninja
|
ninja
|
||||||
|
|
|
@ -1832,7 +1832,6 @@ op1-read
|
||||||
type VVV
|
type VVV
|
||||||
eval auto v = frame[z.v1].subnet_val->AsSubNet().AsString();
|
eval auto v = frame[z.v1].subnet_val->AsSubNet().AsString();
|
||||||
EvalSwitchBody(str_cases,)
|
EvalSwitchBody(str_cases,)
|
||||||
auto t = str_cases[z.v2];
|
|
||||||
|
|
||||||
|
|
||||||
internal-op Branch-If-Not-Type
|
internal-op Branch-If-Not-Type
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue