private bool SharedWithActivation(int index)
{
NativeFunction f = activation.function;
int definedCount = f.GetParamCount();
if (index < definedCount)
{
// Check if argument is not hidden by later argument with the same
// name as hidden arguments are not shared with activation
if (index < definedCount - 1)
{
string argName = f.GetParamOrVarName(index);
for (int i = index + 1; i < definedCount; i++)
{
if (argName.Equals(f.GetParamOrVarName(i)))
{
return false;
}
}
}
return true;
}
return false;
}