Skip to content

Commit 7758970

Browse files
committed
remove useless + revert changes in native part
1 parent 7dd2ee3 commit 7758970

File tree

3 files changed

+7
-67
lines changed

3 files changed

+7
-67
lines changed

tracer/src/Datadog.Trace/Iast/Aspects/System.Runtime/DefaultInterpolatedStringHandlerIntegration.cs

-56
This file was deleted.

tracer/src/Datadog.Tracer.Native/iast/dataflow_aspects.cpp

+5-9
Original file line numberDiff line numberDiff line change
@@ -271,7 +271,6 @@ namespace iast
271271
mdTypeRef targetMethodTypeRef = 0;
272272
mdMemberRef targetMethodRef = 0;
273273
mdTypeRef targetTypeRef = 0;
274-
bool isRefStruct = false;
275274
std::vector<mdTypeRef> paramTypeRefs;
276275
std::vector<mdMemberRef> targetMethodRefCandidates;
277276
hr = module->FindTypeRefByName(_targetMethodType.c_str(), &targetMethodTypeRef);
@@ -341,7 +340,7 @@ namespace iast
341340

342341
if (targetMethodRef != 0)
343342
{
344-
return new DataflowAspectReference(moduleAspects, this, targetMethodRef, targetTypeRef, isRefStruct, paramTypeRefs);
343+
return new DataflowAspectReference(moduleAspects, this, targetMethodRef, targetTypeRef, paramTypeRefs);
345344
}
346345
}
347346
return nullptr;
@@ -354,7 +353,7 @@ namespace iast
354353

355354
//------------------------------
356355

357-
DataflowAspectReference::DataflowAspectReference(ModuleAspects* moduleAspects, DataflowAspect* aspect, mdMemberRef method, mdTypeRef type, bool isRefStruct, const std::vector<mdTypeRef>& paramType)
356+
DataflowAspectReference::DataflowAspectReference(ModuleAspects* moduleAspects, DataflowAspect* aspect, mdMemberRef method, mdTypeRef type, const std::vector<mdTypeRef>& paramType)
358357
{
359358
this->_moduleAspects = moduleAspects;
360359
this->_module = moduleAspects->_module;
@@ -587,17 +586,15 @@ namespace iast
587586
continue;
588587
}
589588

590-
auto instructionInfo =
591-
processor->StackAnalysis()->GetInstruction(instructionToProcess.instruction);
589+
auto instructionInfo = processor->StackAnalysis()->GetInstruction(instructionToProcess.instruction);
592590
auto methodSig = instructionInfo->GetArgumentSignature();
593591
int paramCount = methodSig->GetEffectiveParamCount();
594592
for (auto iInfo : processor->StackAnalysis()->LocateCallParamInstructions(
595593
instruction,
596594
paramCount - _aspect->_paramShift[x] - 1)) // Locate param load instruction
597595
{
598596
auto paramType = _targetParamTypeToken[x];
599-
processor->InsertAfter(iInfo->_instruction,
600-
processor->NewILInstr(CEE_BOX, paramType, true));
597+
processor->InsertAfter(iInfo->_instruction, processor->NewILInstr(CEE_BOX, paramType, true));
601598

602599
// Figure out if param is byref
603600
if (iInfo->IsArgument())
@@ -606,8 +603,7 @@ namespace iast
606603
auto param = sig->_params[iInfo->_instruction->m_Arg32];
607604
if (param->IsByRef())
608605
{
609-
processor->InsertAfter(iInfo->_instruction,
610-
processor->NewILInstr(CEE_LDOBJ, paramType, true));
606+
processor->InsertAfter(iInfo->_instruction, processor->NewILInstr(CEE_LDOBJ, paramType, true));
611607
}
612608
}
613609

tracer/src/Datadog.Tracer.Native/iast/dataflow_aspects.h

+2-2
Original file line numberDiff line numberDiff line change
@@ -41,6 +41,7 @@ namespace iast
4141
protected:
4242
WSTRING _line = EmptyWStr;
4343
bool _isValid = false;
44+
mdTypeDef _aspectTypeDef = 0;
4445

4546
public:
4647
Dataflow* _dataflow;
@@ -122,15 +123,14 @@ namespace iast
122123
class DataflowAspectReference
123124
{
124125
public:
125-
DataflowAspectReference(ModuleAspects* moduleAspects, DataflowAspect* aspect, mdMemberRef targetMethod, mdTypeRef targetType, bool isRefStruct, const std::vector<mdTypeRef>& paramType);
126+
DataflowAspectReference(ModuleAspects* moduleAspects, DataflowAspect* aspect, mdMemberRef targetMethod, mdTypeRef targetType, const std::vector<mdTypeRef>& paramType);
126127

127128
public:
128129
DataflowAspect* _aspect = nullptr;
129130
ModuleAspects* _moduleAspects = nullptr;
130131
ModuleInfo* _module = nullptr;
131132
mdMemberRef _targetMethodRef = 0;
132133
mdTypeRef _targetTypeRef = 0;
133-
bool _isRefStruct = false;
134134
std::vector<mdTypeRef> _targetParamTypeToken;
135135
std::vector<AspectFilter*> _filters;
136136

0 commit comments

Comments
 (0)