|
From: <wjh...@us...> - 2005-10-15 23:56:17
|
Update of /cvsroot/desquirr/desquirr In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv14227 Modified Files: node.cpp usedefine.cpp Log Message: renamed CallExpressen+GlobalVariable. Index: node.cpp =================================================================== RCS file: /cvsroot/desquirr/desquirr/node.cpp,v retrieving revision 1.3 retrieving revision 1.4 diff -u -d -r1.3 -r1.4 --- node.cpp 23 Jul 2005 09:23:26 -0000 1.3 +++ node.cpp 15 Oct 2005 23:56:03 -0000 1.4 @@ -26,6 +26,7 @@ #include "node.hpp" #include "dataflow.hpp" +// this finds consequetive sequences of instructions. void Node::CreateList(Instruction_list& instructions, Node_list& nodes)/*{{{*/ { Instruction_list::iterator cur = instructions.begin(); @@ -73,7 +74,22 @@ node.reset( new ReturnNode(begin, cur) ); begin = cur; break; - +/* + * TODO: currently call's are in the instruction list as: + * AssignmentInstruction(CallExpression()) + case Instruction::CALL: + cur++; + node.reset( new CallNode(instruction->Address(), instruction->.., begin, cur) ); + begin = cur; + break; +*/ +/* + case Instruction::SWITCH: + cur++; + node.reset( new N_WayNode(GetSwitchExpression(), begin, cur) ); + begin = cur; + break; +*/ default: cur++; break; @@ -98,11 +114,11 @@ if (destination->IsType(Expression::GLOBAL)) { - address = static_cast<Global*>(destination.get())->Address(); + address = static_cast<GlobalVariable*>(destination.get())->Address(); } else { - message("%p Error! Jump destination is not a Global!\n", jump->Address()); + message("%p Error! Jump destination is not a GlobalVariable!\n", jump->Address()); address = INVALID_ADDR; } @@ -121,11 +137,11 @@ if (destination->IsType(Expression::GLOBAL)) { - address = static_cast<Global*>(destination.get())->Address(); + address = static_cast<GlobalVariable*>(destination.get())->Address(); } else { - message("%p Error! Jump destination is not a Global!\n", jump->Address()); + message("%p Error! Jump destination is not a GlobalVariable!\n", jump->Address()); address = INVALID_ADDR; } @@ -151,6 +167,8 @@ typedef std::map<Addr, Node_ptr> Node_map; + + struct ConnectSuccessorsMapBuilder { Node_map& mMap; Index: usedefine.cpp =================================================================== RCS file: /cvsroot/desquirr/desquirr/usedefine.cpp,v retrieving revision 1.1.1.1 retrieving revision 1.2 diff -u -d -r1.1.1.1 -r1.2 --- usedefine.cpp 20 Jun 2002 18:00:45 -0000 1.1.1.1 +++ usedefine.cpp 15 Oct 2005 23:56:03 -0000 1.2 @@ -41,9 +41,9 @@ } virtual void Visit(BinaryExpression&) {} - virtual void Visit(Call& expression) {} + virtual void Visit(CallExpression& expression) {} virtual void Visit(Dummy&) {} - virtual void Visit(Global&) {} + virtual void Visit(GlobalVariable&) {} virtual void Visit(NumericLiteral&) {} virtual void Visit(StackVariable&) {} virtual void Visit(StringLiteral&) {} |