Задайте вопросЗадайте вопрос
 

ВопросNull Reference exception when travser a flow graph

  • 1 июня 2009 г. 8:19zhong hao Медали пользователяМедали пользователяМедали пользователяМедали пользователяМедали пользователя
     

    foreach (Phx.Unit unit in oldModuleUnit.ChildUnits) { if (unit.IsFunctionUnit) { Phx.FunctionUnit functionUnit = ((Phx.FunctionUnit)unit); Phx.FunctionUnitState raiseToState = Phx.FunctionUnit.LowLevelIRBeforeLayoutFunctionUnitState; functionUnit = oldModuleUnit.Raise(functionUnit.FunctionSymbol, raiseToState); functionUnit.BuildFlowGraph(); Phx.Dataflow.MemoryLivenessWalker walker = Phx.Dataflow.MemoryLivenessWalker.New(functionUnit.Lifetime); walker.Traverse(Phx.Dataflow.TraversalKind.Iterative, functionUnit); //error } }
    When I execute the above code snippet, I get a null reference exeption at the line marked as "error". The error message says as follows:

    Phoenix Assertion Failure: d:\enlistments\sdk_june08\src\phx\dataflow\traverser.
    cpp, Line 377
      this->BlockDataArray != nullptr : Called Walker::Initialize before Traverse
      in (Data) <unnamed unit> during IR Unit Function Phases
      in (PEModule) F:\tmp1\test\test\bin\Debug\test.exe
      in (Program) <unnamed unit>
    Phoenix Assertion Failure: d:\enlistments\sdk_june08\src\phx\dataflow\traverser.
    cpp, Line 378
      this->Direction != Dataflow::Direction::IllegalSentinel
      in (Data) <unnamed unit> during IR Unit Function Phases
      in (PEModule) F:\tmp1\test\test\bin\Debug\test.exe
      in (Program) <unnamed unit>

    Can anyone give me some suggestions on why I get such an error message?
    • Измененоzhong hao 1 июня 2009 г. 8:31
    •  

Все ответы