ValueNodeManager: Add flag to control frame variables.

- We now take a flag which determines whether or not to add parameters
  and locals from the frame to the container.
This commit is contained in:
Rene Gollent
2015-11-10 14:01:14 -05:00
parent be32382a6d
commit b4058de7fe
2 changed files with 17 additions and 14 deletions
@@ -17,12 +17,14 @@
#include "VariableValueNodeChild.h"
ValueNodeManager::ValueNodeManager()
ValueNodeManager::ValueNodeManager(bool addFrameNodes)
:
fAddFrameNodes(addFrameNodes),
fContainer(NULL),
fStackFrame(NULL),
fThread(NULL)
{
SetStackFrame(NULL, NULL);
}
@@ -50,7 +52,6 @@ ValueNodeManager::SetStackFrame(Thread* thread,
fStackFrame = stackFrame;
fThread = thread;
if (fStackFrame != NULL) {
fContainer = new(std::nothrow) ValueNodeContainer;
if (fContainer == NULL)
return B_NO_MEMORY;
@@ -66,6 +67,7 @@ ValueNodeManager::SetStackFrame(Thread* thread,
fContainer->AddListener(this);
if (fStackFrame != NULL && fAddFrameNodes) {
for (int32 i = 0; Variable* variable = fStackFrame->ParameterAt(i);
i++) {
_AddNode(variable);
@@ -17,7 +17,7 @@ class Variable;
class ValueNodeManager : public BReferenceable,
private ValueNodeContainer::Listener {
public:
ValueNodeManager();
ValueNodeManager(bool addFrameNodes = true);
virtual ~ValueNodeManager();
status_t SetStackFrame(Thread* thread,
@@ -45,6 +45,7 @@ private:
status_t _CreateValueNode(ValueNodeChild* nodeChild);
private:
bool fAddFrameNodes;
ValueNodeContainer* fContainer;
StackFrame* fStackFrame;
Thread* fThread;