aboutsummaryrefslogtreecommitdiffstats
path: root/libalee/state.hpp
diff options
context:
space:
mode:
authorClyne Sullivan <clyne@bitgloo.com>2023-11-09 08:08:38 -0500
committerClyne Sullivan <clyne@bitgloo.com>2023-11-09 08:08:38 -0500
commit3dc947a7575bd23703644996d8e853e5e618b2e3 (patch)
treec91ff763003cb1b83f76c31b0948ff8699280f57 /libalee/state.hpp
parentb33c0c564c51252ff241a2143e467dadfb8d8994 (diff)
fix execute; disable verify(); bench w/ standalone
Diffstat (limited to 'libalee/state.hpp')
-rw-r--r--libalee/state.hpp14
1 files changed, 10 insertions, 4 deletions
diff --git a/libalee/state.hpp b/libalee/state.hpp
index 2e69463..abf7a1e 100644
--- a/libalee/state.hpp
+++ b/libalee/state.hpp
@@ -25,6 +25,8 @@
#include <csetjmp>
#include <cstddef>
+#define verify(C, E)
+
constexpr unsigned DataStackSize = 64;
constexpr unsigned ReturnStackSize = 64;
@@ -57,6 +59,10 @@ public:
*/
void reset();
+ void exit() {
+ std::longjmp(context.jmpbuf, static_cast<int>(Error::exit));
+ }
+
Addr& ip() noexcept {
return context.ip;
}
@@ -129,10 +135,10 @@ public:
return dict.read(context.ip);
}
- inline void verify(bool condition, Error error) {
- if (!condition)
- std::longjmp(context.jmpbuf, static_cast<int>(error));
- }
+// inline void verify(bool condition, Error error) {
+// if (!condition)
+// std::longjmp(context.jmpbuf, static_cast<int>(error));
+// }
private:
InputFunc inputfunc; // User-provided function to collect "stdin" input.