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

Method genCode

src/hx/cppia/Cppia.cpp:3558–3594  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

3556
3557
3558 void genCode(CppiaCompiler *compiler, const JitVal &inDest,ExprType destType) HXCPP_OVERRIDE
3559 {
3560 if (REFMODE==locAbsolute)
3561 {
3562 compiler->move( sJitTemp0, JitVal( (void *)pointer ) );
3563 if (isBoolInt())
3564 {
3565 compiler->move( sJitTemp0, sJitTemp0.star(jtByte,0) );
3566 compiler->convert( sJitTemp0,getType(),inDest, destType, true );
3567 }
3568 else
3569 compiler->convert( sJitTemp0.star(jtPointer,0), getType(),inDest, destType );
3570 }
3571 else if (REFMODE==locObj)
3572 {
3573 object->genCode( compiler, sJitTemp2, etObject );
3574 genNullReferenceExceptionCheck(compiler, sJitTemp2);
3575
3576 if (isBoolInt())
3577 {
3578 compiler->move( sJitTemp2, sJitTemp2.star(jtByte,offset) );
3579 compiler->convert( sJitTemp2,getType(),inDest, destType, true );
3580 }
3581 else
3582 compiler->convert( sJitTemp2.star(jtPointer,offset) ,getType(),inDest, destType );
3583 }
3584 else if (REFMODE==locThis)
3585 {
3586 JitThisPos target(offset, isBoolInt() ? jtByte : getJitType(getType()) );
3587 compiler->convert( target,getType(),inDest, destType, isBoolInt() );
3588 }
3589 else
3590 {
3591 JitFramePos target(offset, isBoolInt() ? jtByte : getJitType(getType()));
3592 compiler->convert( target,getType(),inDest, destType, isBoolInt() );
3593 }
3594 }
3595 #endif
3596
3597

Callers

nothing calls this directly

Calls 7

JitValClass · 0.85
getJitTypeFunction · 0.85
moveMethod · 0.80
convertMethod · 0.80
starMethod · 0.45
genCodeMethod · 0.45

Tested by

no test coverage detected