MCPcopy Create free account
hub / github.com/GarageGames/Torque3D / getAssignOpTypeOp

Function getAssignOpTypeOp

Engine/source/console/astNodes.cpp:1008–1053  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

1006//------------------------------------------------------------
1007
1008static void getAssignOpTypeOp(S32 op, TypeReq &type, U32 &operand)
1009{
1010 switch(op)
1011 {
1012 case '+':
1013 type = TypeReqFloat;
1014 operand = OP_ADD;
1015 break;
1016 case '-':
1017 type = TypeReqFloat;
1018 operand = OP_SUB;
1019 break;
1020 case '*':
1021 type = TypeReqFloat;
1022 operand = OP_MUL;
1023 break;
1024 case '/':
1025 type = TypeReqFloat;
1026 operand = OP_DIV;
1027 break;
1028 case '%':
1029 type = TypeReqUInt;
1030 operand = OP_MOD;
1031 break;
1032 case '&':
1033 type = TypeReqUInt;
1034 operand = OP_BITAND;
1035 break;
1036 case '^':
1037 type = TypeReqUInt;
1038 operand = OP_XOR;
1039 break;
1040 case '|':
1041 type = TypeReqUInt;
1042 operand = OP_BITOR;
1043 break;
1044 case opSHL:
1045 type = TypeReqUInt;
1046 operand = OP_SHL;
1047 break;
1048 case opSHR:
1049 type = TypeReqUInt;
1050 operand = OP_SHR;
1051 break;
1052 }
1053}
1054
1055U32 AssignOpExprNode::compile(CodeStream &codeStream, U32 ip, TypeReq type)
1056{

Callers 2

compileMethod · 0.85
getPreferredTypeMethod · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected