Remove unnecessary code.

- ResolveValueNodeJob() already handles location resolution for the
  NodeChild so this step is unnecessary.
This commit is contained in:
Rene Gollent 2012-12-18 17:36:49 -05:00
parent 68359a7361
commit eceaf78610
4 changed files with 2 additions and 45 deletions

View File

@ -336,9 +336,9 @@ DebugReportGenerator::_DumpDebuggedThreadInfo(BString& _output,
for (int32 i = 0; i < container->CountChildren(); i++) { for (int32 i = 0; i < container->CountChildren(); i++) {
ValueNodeChild* child = container->ChildAt(i); ValueNodeChild* child = container->ChildAt(i);
containerLocker.Unlock(); containerLocker.Unlock();
_ResolveValueIfNeeded(child->Node(), frame, 1); _ResolveValueIfNeeded(child->Node(), frame, 2);
containerLocker.Lock(); containerLocker.Lock();
UiUtils::PrintValueNodeGraph(_output, child, 3, 1); UiUtils::PrintValueNodeGraph(_output, child, 3, 2);
} }
_output << "\n"; _output << "\n";
} }
@ -380,10 +380,6 @@ DebugReportGenerator::_ResolveValueIfNeeded(ValueNode* node, StackFrame* frame,
for (int32 i = 0; i < node->CountChildren(); i++) { for (int32 i = 0; i < node->CountChildren(); i++) {
ValueNodeChild* child = node->ChildAt(i); ValueNodeChild* child = node->ChildAt(i);
containerLocker.Unlock(); containerLocker.Unlock();
result = _ResolveLocationIfNeeded(child, frame);
if (result != B_OK)
continue;
result = fNodeManager->AddChildNodes(child); result = fNodeManager->AddChildNodes(child);
if (result != B_OK) if (result != B_OK)
continue; continue;
@ -402,18 +398,3 @@ DebugReportGenerator::_ResolveValueIfNeeded(ValueNode* node, StackFrame* frame,
return result; return result;
} }
status_t
DebugReportGenerator::_ResolveLocationIfNeeded(ValueNodeChild* child,
StackFrame* frame)
{
ValueLocation* location = NULL;
ValueLoader loader(fTeam->GetArchitecture(), fTeam->GetTeamMemory(),
fTeam->GetTeamTypeInformation(), frame->GetCpuState());
status_t result = child->ResolveLocation(&loader, location);
child->SetLocation(location, result);
if (location != NULL)
location->ReleaseReference();
return result;
}

View File

@ -52,8 +52,6 @@ private:
status_t _DumpDebuggedThreadInfo(BString& output, status_t _DumpDebuggedThreadInfo(BString& output,
::Thread* thread); ::Thread* thread);
status_t _ResolveLocationIfNeeded(ValueNodeChild* child,
StackFrame* frame);
status_t _ResolveValueIfNeeded(ValueNode* node, status_t _ResolveValueIfNeeded(ValueNode* node,
StackFrame* frame, int32 maxDepth); StackFrame* frame, int32 maxDepth);

View File

@ -133,10 +133,6 @@ CliPrintVariableCommand::_ResolveValueIfNeeded(ValueNode* node,
for (int32 i = 0; i < node->CountChildren(); i++) { for (int32 i = 0; i < node->CountChildren(); i++) {
ValueNodeChild* child = node->ChildAt(i); ValueNodeChild* child = node->ChildAt(i);
containerLocker.Unlock(); containerLocker.Unlock();
result = _ResolveLocationIfNeeded(child, frame, context.GetTeam());
if (result != B_OK)
continue;
result = manager->AddChildNodes(child); result = manager->AddChildNodes(child);
if (result != B_OK) if (result != B_OK)
continue; continue;
@ -155,18 +151,3 @@ CliPrintVariableCommand::_ResolveValueIfNeeded(ValueNode* node,
return result; return result;
} }
status_t
CliPrintVariableCommand::_ResolveLocationIfNeeded(ValueNodeChild* child,
StackFrame* frame, ::Team* team)
{
ValueLocation* location = NULL;
ValueLoader loader(team->GetArchitecture(), team->GetTeamMemory(),
team->GetTeamTypeInformation(), frame->GetCpuState());
status_t result = child->ResolveLocation(&loader, location);
child->SetLocation(location, result);
if (location != NULL)
location->ReleaseReference();
return result;
}

View File

@ -24,9 +24,6 @@ public:
private: private:
status_t _ResolveValueIfNeeded(ValueNode* node, status_t _ResolveValueIfNeeded(ValueNode* node,
CliContext& context, int32 maxDepth); CliContext& context, int32 maxDepth);
status_t _ResolveLocationIfNeeded(ValueNodeChild* child,
StackFrame* frame, ::Team* team);
}; };