MCPcopy Create free account
hub / github.com/HaxeFoundation/hxcpp / genBitOpSet

Function genBitOpSet

src/hx/cppia/Cppia.cpp:3675–3691  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

3673
3674
3675void genBitOpSet(CppiaCompiler *compiler, BitOp bitOp, const JitVal &ioValue, ExprType exprType, CppiaExpr *inExpr)
3676{
3677 if (exprType==etInt)
3678 {
3679 inExpr->genCode(compiler, sJitTemp2, etInt);
3680 compiler->bitOp(bitOp, ioValue, ioValue, sJitTemp2);
3681 }
3682 else
3683 {
3684 JitTemp ival(compiler, etInt);
3685 compiler->convert(ioValue, exprType, ival, etInt);
3686 inExpr->genCode(compiler, sJitTemp2, etInt);
3687
3688 compiler->bitOp(bitOp, sJitTemp0.as(jtInt), ival, sJitTemp2);
3689 compiler->convert(sJitTemp0, etInt, ioValue, exprType);
3690 }
3691}
3692
3693void genSetter(CppiaCompiler *compiler, const JitVal &ioValue, ExprType exprType, AssignOp inOp, CppiaExpr *inExpr)
3694{

Callers 1

genSetterFunction · 0.85

Calls 4

bitOpMethod · 0.80
convertMethod · 0.80
asMethod · 0.80
genCodeMethod · 0.45

Tested by

no test coverage detected