Terraria v1.4.4.9
Terraria source code documentation
Loading...
Searching...
No Matches

◆ CompileTypeIsExpression()

void System.Linq.Expressions.Interpreter.LightCompiler.CompileTypeIsExpression ( Expression expr)
inlineprivate

Definition at line 2170 of file LightCompiler.cs.

2171 {
2172 TypeBinaryExpression typeBinaryExpression = (TypeBinaryExpression)expr;
2173 AnalyzeTypeIsResult analyzeTypeIsResult = ConstantCheck.AnalyzeTypeIs(typeBinaryExpression);
2174 Compile(typeBinaryExpression.Expression);
2175 switch (analyzeTypeIsResult)
2176 {
2177 case AnalyzeTypeIsResult.KnownFalse:
2178 case AnalyzeTypeIsResult.KnownTrue:
2179 if (typeBinaryExpression.Expression.Type != typeof(void))
2180 {
2182 }
2184 break;
2185 case AnalyzeTypeIsResult.KnownAssignable:
2186 _instructions.EmitLoad(null);
2188 break;
2189 default:
2190 if (typeBinaryExpression.TypeOperand.IsValueType)
2191 {
2192 _instructions.EmitLoad(typeBinaryExpression.TypeOperand.GetNonNullableType());
2194 }
2195 else
2196 {
2198 }
2199 break;
2200 }
2201 }
void EmitNotEqual(Type type, bool liftedToNull=false)
void Compile(Expression expr, bool asVoid)

References System.Linq.Expressions.Interpreter.LightCompiler._instructions, System.Linq.Expressions.ConstantCheck.AnalyzeTypeIs(), System.Linq.Expressions.Interpreter.LightCompiler.Compile(), System.Linq.Expressions.Interpreter.InstructionList.EmitLoad(), System.Linq.Expressions.Interpreter.InstructionList.EmitNotEqual(), System.Linq.Expressions.Interpreter.InstructionList.EmitPop(), System.Linq.Expressions.Interpreter.InstructionList.EmitTypeEquals(), and System.Linq.Expressions.Interpreter.InstructionList.EmitTypeIs().

Referenced by System.Linq.Expressions.Interpreter.LightCompiler.CompileNoLabelPush().