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

Method returnNull

src/hx/cppia/CppiaCompiler.cpp:1100–1124  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

1098 }
1099
1100 void returnNull(const JitVal &inTarget, ExprType inToType) HXCPP_OVERRIDE
1101 {
1102 switch(inToType)
1103 {
1104 case etObject:
1105 move(inTarget.as(jtPointer), (void *)0);
1106 break;
1107 case etString:
1108 {
1109 move(inTarget.as(jtInt), (int)0);
1110 move(inTarget.as(jtPointer) + StringOffset::Ptr, (void *)0);
1111 }
1112 break;
1113 case etInt:
1114 move(inTarget.as(jtInt), (int)0);
1115 break;
1116 case etFloat:
1117 move(sJitTemp0, JitVal((void *)&sZero) );
1118 move(inTarget.as(jtFloat), sJitTemp0.star(etFloat) );
1119 break;
1120 case etVoid:
1121 case etNull:
1122 break;
1123 }
1124 }
1125
1126
1127 void traceObject(const char *inLabel, const JitVal &inObj) HXCPP_OVERRIDE

Callers 3

genCodeMethod · 0.80
genCodeMethod · 0.80
genCodeMethod · 0.80

Calls 3

JitValClass · 0.85
asMethod · 0.80
starMethod · 0.45

Tested by

no test coverage detected