Commit 33139f44 authored by Benoit Perrot's avatar Benoit Perrot
Browse files

Index: ChangeLog

from  Benoît Perrot  <benoit@lrde.epita.fr>

	* src/task/task.hh, src/task/task.cc:
	Split in...
	* src/task/function_task.hh, src/task/function_task.cc,
	* src/task/libtask.hh:
	These new files.
	* src/task/Makefile.am:
	Distribute new files.
	* src/task/task-tasks.hh, src/shell/shell-tasks.hh,
	* src/parse/parse-tasks.hh, src/nolimips-tasks.hh,
	* src/inst/inst-tasks.hh, src/vm/vm-tasks.hh:
	Include libtask.hh instead of task/task.hh
parent 20195447
2004-09-18 Benot Perrot <benoit@lrde.epita.fr>
* src/task/task.hh, src/task/task.cc:
Split in...
* src/task/function_task.hh, src/task/function_task.cc,
* src/task/libtask.hh:
These new files.
* src/task/Makefile.am:
Distribute new files.
* src/task/task-tasks.hh, src/shell/shell-tasks.hh,
* src/parse/parse-tasks.hh, src/nolimips-tasks.hh,
* src/inst/inst-tasks.hh, src/vm/vm-tasks.hh:
Include libtask.hh instead of task/task.hh
2004-07-18 Benot Perrot <benoit@lrde.epita.fr>
Add the backtrace command to the shell.
......@@ -28,7 +42,7 @@
2004-07-15 Benot Perrot <benoit@lrde.epita.fr>
* tests/runtime/address-load.s, tests/runtime/address-store.s:
Test illegal access to memory.
Test invalid access to memory.
* tests/runtime/Makefile.am: Distribute them.
2004-07-15 Benot Perrot <benoit@lrde.epita.fr>
......
......@@ -19,7 +19,7 @@
#ifndef INST_INST_TASKS_HH
# define INST_INST_TASKS_HH
# include "task/task.hh"
# include "task/libtask.hh"
namespace inst
{
......
......@@ -19,7 +19,7 @@
#ifndef NOLIMIPS_TASKS_HH
# define NOLIMIPS_TASKS_HH
# include "task/task.hh"
# include "task/libtask.hh"
namespace nolimips
{
......
......@@ -19,7 +19,7 @@
#ifndef PARSE_PARSE_TASKS_HH
# define PARSE_PARSE_TASKS_HH
# include "task/task.hh"
# include "task/libtask.hh"
namespace inst { class Program; }
......
......@@ -19,7 +19,7 @@
#ifndef SHELL_SHELL_TASKS_HH
# define SHELL_SHELL_TASKS_HH
# include "task/task.hh"
# include "task/libtask.hh"
namespace shell
{
......
......@@ -3,5 +3,7 @@ INCLUDES = -I$(top_srcdir)/src -I $(top_builddir)/src
noinst_LIBRARIES = libtask.a
libtask_a_SOURCES = \
task.hh task.cc \
function_task.hh function_task.cc \
task_register.hh task_register.cc \
libtask.hh \
task-tasks.hh task-tasks.cc
//
// This file is part of Nolimips, a MIPS simulator with unlimited registers
// Copyright (C) 2004 Akim Demaille <akim@epita.fr> and
// Benoit Perrot <benoit@lrde.epita.fr>
//
// Nolimips is free software; you can redistribute it and/or modify
// it under the terms of the GNU General Public License as published by
// the Free Software Foundation; either version 2 of the License, or
// (at your option) any later version.
//
// Nolimips is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
// GNU General Public License for more details.
//
// You should have received a copy of the GNU General Public License
// along with this program; if not, write to the Free Software
// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
//
#include "task/function_task.hh"
namespace task
{
FunctionTask::FunctionTask(void (*execute) (void),
const std::string& option,
const std::string& module_name,
const std::string& desc,
const std::string& deps):
Task(option, module_name, desc, deps),
execute_(execute)
{}
void
FunctionTask::execute() const
{
execute_();
}
} // namespace task
//
// This file is part of Nolimips, a MIPS simulator with unlimited registers
// Copyright (C) 2004 Akim Demaille <akim@epita.fr> and
// Benoit Perrot <benoit@lrde.epita.fr>
//
// Nolimips is free software; you can redistribute it and/or modify
// it under the terms of the GNU General Public License as published by
// the Free Software Foundation; either version 2 of the License, or
// (at your option) any later version.
//
// Nolimips is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
// GNU General Public License for more details.
//
// You should have received a copy of the GNU General Public License
// along with this program; if not, write to the Free Software
// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
//
#ifndef TASK_FUNCTION_TASK_HH
# define TASK_FUNCTION_TASK_HH
#include "task/task.hh"
namespace task
{
class FunctionTask: public Task
{
public:
FunctionTask(void (*execute) (void),
const std::string& option, const std::string& module_name,
const std::string& desc, const std::string& deps = "");
public:
virtual void execute() const;
private:
void (*execute_) (void);
};
} // namespace task
#endif // !TASK_FUNCTION_TASK_HH
//
// This file is part of Nolimips, a MIPS simulator with unlimited registers
// Copyright (C) 2004 Akim Demaille <akim@epita.fr> and
// Benoit Perrot <benoit@lrde.epita.fr>
//
// Nolimips is free software; you can redistribute it and/or modify
// it under the terms of the GNU General Public License as published by
// the Free Software Foundation; either version 2 of the License, or
// (at your option) any later version.
//
// Nolimips is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
// GNU General Public License for more details.
//
// You should have received a copy of the GNU General Public License
// along with this program; if not, write to the Free Software
// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
//
#ifndef TASK_LIBTASK_HH
# define TASK_LIBTASK_HH
# include "task/function_task.hh"
# ifdef NOLIMIPS_CC_
# define TASK_MODULE(Name) \
const char module_name [] = Name;
# define TASK_DECLARE(Option, Desc, Routine, Deps) \
extern void (Routine) (void); \
task::FunctionTask task_##Routine (Routine, \
Option, module_name, \
Desc, Deps)
# else // !NOLIMIPS_CC_
# define TASK_MODULE(Name)
# define TASK_DECLARE(Name, Help, Routine, Dependencies) \
extern void (Routine) (void)
# endif // NOLIMIPS_CC_
#endif // !TASK_LIBTASK_HH
......@@ -19,7 +19,7 @@
#ifndef TASK_TASK_TASKS_HH
# define TASK_TASK_TASKS_HH
# include "task/task.hh"
# include "task/libtask.hh"
namespace task
{
......
......@@ -71,11 +71,4 @@ namespace task
// std::cout << "\t" << *i << std::endl;
// }
void
FunctionTask::execute() const
{
execute_();
}
} // namespace task
......@@ -72,44 +72,6 @@ namespace task
deps_type dependencies_;
};
class FunctionTask : public Task
{
public:
FunctionTask (void (*execute) (void),
const std::string& option, const std::string& module_name,
const std::string& desc, const std::string& deps = ""):
Task (option, module_name, desc, deps),
execute_ (execute)
{
}
public:
virtual void execute() const;
private:
void (*execute_) (void);
};
#ifdef NOLIMIPS_CC_
# define TASK_MODULE(Name) \
const char module_name [] = Name;
# define TASK_DECLARE(Option, Desc, Routine, Deps) \
extern void (Routine) (void); \
task::FunctionTask task_##Routine (Routine, \
Option, module_name, \
Desc, Deps)
#else // !NOLIMIPS_CC_
# define TASK_MODULE(Name)
# define TASK_DECLARE(Name, Help, Routine, Dependencies) \
extern void (Routine) (void)
#endif // NOLIMIPS_CC_
} // namespace task
#endif // !TASK_TASK_HH
#endif// !TASK_TASK_HH
......@@ -19,7 +19,7 @@
#ifndef VM_VM_TASKS_HH
# define VM_VM_TASKS_HH
# include "task/task.hh"
# include "task/libtask.hh"
namespace vm
{
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment