mirror of
https://github.com/zeek/zeek.git
synced 2025-10-02 06:38:20 +00:00
fixes for ZAM tracking the return type associated with function calls
This commit is contained in:
parent
56d01ea83b
commit
e7817b709c
1 changed files with 5 additions and 4 deletions
|
@ -1134,8 +1134,10 @@ const ZAMStmt ZAMCompiler::DoCall(const CallExpr* c, const NameExpr* n) {
|
|||
ZInstI z;
|
||||
|
||||
if ( call_case == 0 ) {
|
||||
if ( n )
|
||||
if ( n ) {
|
||||
z = ZInstI(AssignmentFlavor(OP_CALL0_V, nt), n_slot);
|
||||
z.SetType(n->GetType());
|
||||
}
|
||||
else
|
||||
z = ZInstI(OP_CALL0_X);
|
||||
}
|
||||
|
@ -1228,6 +1230,8 @@ const ZAMStmt ZAMCompiler::DoCall(const CallExpr* c, const NameExpr* n) {
|
|||
z = ZInstI(op, n_slot);
|
||||
z.op_type = OP_V;
|
||||
}
|
||||
|
||||
z.SetType(n->GetType());
|
||||
}
|
||||
else {
|
||||
if ( indirect && ! func_id->IsGlobal() ) {
|
||||
|
@ -1263,9 +1267,6 @@ const ZAMStmt ZAMCompiler::DoCall(const CallExpr* c, const NameExpr* n) {
|
|||
|
||||
z.aux->call_expr = {NewRef{}, const_cast<CallExpr*>(c)};
|
||||
|
||||
if ( in_when )
|
||||
z.SetType(n->GetType());
|
||||
|
||||
if ( ! indirect || func_id->IsGlobal() ) {
|
||||
z.aux->id_val = func_id;
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue