MCPcopy Create free account
hub / github.com/dfranx/ShaderDebugger / translateMethodCall

Method translateMethodCall

src/HLSLCompiler.cpp:872–896  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

870 }
871 }
872 void HLSLCompiler::translateMethodCall(M4::HLSLMethodCall* expr)
873 {
874 // arguments
875 bool temp_isSet = m_isSet, temp_usePointer = m_usePointer;
876 m_isSet = false;
877 m_usePointer = true;
878 for (int i = expr->numArguments - 1; i >= 0; i--) {
879 M4::HLSLExpression* arg = expr->argument;
880 for (int j = 0; j < i; j++)
881 arg = arg->nextExpression;
882 translateExpression(arg);
883 }
884 m_isSet = temp_isSet;
885 m_usePointer = temp_usePointer;
886
887 // object
888 m_isSet = false;
889 m_usePointer = true;
890 translateExpression(expr->object);
891 m_isSet = temp_isSet;
892 m_usePointer = temp_usePointer;
893
894 // call method
895 m_gen.Function.CallReturnMethod(expr->function->name, expr->numArguments);
896 }
897 void HLSLCompiler::translateAttributes(M4::HLSLAttribute* attribute)
898 {
899 while (attribute != NULL)

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected