Skip to content

Commit

Permalink
Implement EEOP_SBSREF_* operators.
Browse files Browse the repository at this point in the history
  • Loading branch information
higuoxing committed Aug 31, 2024
1 parent 2380fbd commit f80ef79
Showing 1 changed file with 16 additions and 2 deletions.
18 changes: 16 additions & 2 deletions asmjit_expr.cc
Original file line number Diff line number Diff line change
Expand Up @@ -825,13 +825,27 @@ bool AsmJitCompileExpr(ExprState *State) {
}

case EEOP_SBSREF_SUBSCRIPTS: {
todo();
jit::InvokeNode *InvokeSubscriptFunc;
x86::Gp RetVal = Jitcc.newInt8("ret.i8");
Jitcc.invoke(
&InvokeSubscriptFunc, jit::imm(Op->d.sbsref_subscript.subscriptfunc),
jit::FuncSignature::build<bool, ExprState *, struct ExprEvalStep *,
ExprContext *>());
InvokeSubscriptFunc->setArg(0, Expression);
InvokeSubscriptFunc->setArg(1, jit::imm(Op));
InvokeSubscriptFunc->setArg(2, EContext);
InvokeSubscriptFunc->setRet(0, RetVal);

Jitcc.cmp(RetVal, jit::imm(0));
Jitcc.je(L_Opblocks[Op->d.sbsref_subscript.jumpdone]);
break;
}

case EEOP_SBSREF_OLD:
case EEOP_SBSREF_ASSIGN:
case EEOP_SBSREF_FETCH: {
todo();
BuildEvalXFunc3(Op->d.sbsref.subscriptfunc);
break;
}

case EEOP_CASE_TESTVAL: {
Expand Down

0 comments on commit f80ef79

Please sign in to comment.