Commit 7e88b679 authored by Benoit Perrot's avatar Benoit Perrot
Browse files

Add unlimited register existence checker

parent b5747e87
2003-07-18 Benot Perrot <benoit@lrde.epita.fr>
* src/vm/cpu.hh: Add a checker for unlimited register existence.
2003-07-17 Benot Perrot <benoit@lrde.epita.fr> 2003-07-17 Benot Perrot <benoit@lrde.epita.fr>
* src/vm/memory.hh: stack_size is an argument of Memory constructor. * src/vm/memory.hh: stack_size is an argument of Memory constructor.
......
...@@ -84,9 +84,14 @@ namespace vm ...@@ -84,9 +84,14 @@ namespace vm
GPR[k] = r; GPR[k] = r;
} }
bool has_unlimited(int i) const
{
return unlimited.has(i);
}
register_t get_unlimited(int i) const register_t get_unlimited(int i) const
{ {
// FIXME: precondition: check existence! // FIXME: precondition: check existence!
precondition(has_unlimited(i));
return unlimited.get(i); return unlimited.get(i);
} }
void set_unlimited(int i, register_t r) void set_unlimited(int i, register_t r)
......
...@@ -29,7 +29,6 @@ ...@@ -29,7 +29,6 @@
# ifndef INT32_MAX # ifndef INT32_MAX
# define INT32_MAX 2147483647 # define INT32_MAX 2147483647
# endif # endif
//# include <string.h>
namespace vm namespace vm
{ {
......
Markdown is supported
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