mirror of
https://github.com/zeek/zeek.git
synced 2025-10-16 21:48:21 +00:00
removed raw frame access for indirect-when-call operations
This commit is contained in:
parent
fbf4c662b7
commit
b62b31846e
2 changed files with 13 additions and 7 deletions
|
@ -1056,10 +1056,12 @@ const ZAMStmt ZAMCompiler::DoCall(const CallExpr* c, const NameExpr* n) {
|
|||
|
||||
default:
|
||||
if ( in_when ) {
|
||||
if ( indirect )
|
||||
op = OP_WHENINDCALLN_Vi;
|
||||
else
|
||||
if ( ! indirect )
|
||||
op = OP_WHENCALLN_V;
|
||||
else if ( func_id->IsGlobal() )
|
||||
op = OP_WHEN_ID_INDCALLN_V;
|
||||
else
|
||||
op = OP_WHENINDCALLN_VV;
|
||||
}
|
||||
|
||||
else if ( indirect ) {
|
||||
|
|
|
@ -1594,11 +1594,15 @@ side-effects
|
|||
eval WhenCall($$, z.aux->func)
|
||||
|
||||
internal-op WhenIndCallN
|
||||
type Vi
|
||||
type VV
|
||||
side-effects
|
||||
eval auto sel = $1;
|
||||
auto func = (sel < 0) ? z.aux->id_val->GetVal()->AsFunc() : frame[sel].AsFunc();
|
||||
WhenCall($$, func)
|
||||
eval WhenCall($$, $1.AsFunc())
|
||||
|
||||
# Form for when we need to look up the function value at run-time.
|
||||
internal-op When-ID-IndCallN
|
||||
type V
|
||||
side-effects
|
||||
eval WhenCall($$, z.aux->id_val->GetVal()->AsFunc())
|
||||
|
||||
|
||||
########## Statements ##########
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue