mirror of
https://github.com/zeek/zeek.git
synced 2025-10-14 04:28:20 +00:00
updates to ZAM operations / gen-zam regularization, other than the operations themselves
This commit is contained in:
parent
1d7e71b499
commit
5fc2c601b4
17 changed files with 422 additions and 294 deletions
|
@ -127,9 +127,9 @@ const ZAMStmt ZAMCompiler::AddInst(const ZInstI& inst, bool suppress_non_local)
|
|||
auto gs = pending_global_store;
|
||||
pending_global_store = -1;
|
||||
|
||||
auto store_inst = ZInstI(OP_STORE_GLOBAL_V, gs);
|
||||
auto store_inst = ZInstI(OP_STORE_GLOBAL_g, gs);
|
||||
store_inst.op_type = OP_V_I1;
|
||||
store_inst.t = globalsI[gs].id->GetType();
|
||||
store_inst.SetType(globalsI[gs].id->GetType());
|
||||
|
||||
return AddInst(store_inst);
|
||||
}
|
||||
|
@ -138,15 +138,15 @@ const ZAMStmt ZAMCompiler::AddInst(const ZInstI& inst, bool suppress_non_local)
|
|||
auto cs = pending_capture_store;
|
||||
pending_capture_store = -1;
|
||||
|
||||
auto& cv = *func->GetType()->AsFuncType()->GetCaptures();
|
||||
auto& cv = *func->GetType()->GetCaptures();
|
||||
auto& c_id = cv[cs].Id();
|
||||
|
||||
ZOp op;
|
||||
|
||||
if ( ZVal::IsManagedType(c_id->GetType()) )
|
||||
op = OP_STORE_MANAGED_CAPTURE_VV;
|
||||
op = OP_STORE_MANAGED_CAPTURE_Vi;
|
||||
else
|
||||
op = OP_STORE_CAPTURE_VV;
|
||||
op = OP_STORE_CAPTURE_Vi;
|
||||
|
||||
auto store_inst = ZInstI(op, RawSlot(c_id.get()), cs);
|
||||
store_inst.op_type = OP_VV_I2;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue