Compile to bytecode

This commit is contained in:
2020-09-03 19:03:32 +02:00
parent 473334c3db
commit 96345ad6ba
45 changed files with 1615 additions and 1231 deletions

View File

@@ -7,50 +7,44 @@ namespace Execute
{
protected:
std::string message;
std::size_t byteLocation;
public:
std::string const & GetMessage() const;
RuntimeError();
RuntimeError(std::string const & what);
};
class StackUnderflow : public RuntimeError
{
public:
StackUnderflow();
};
class StackOverflow : public RuntimeError
{
public:
StackOverflow();
};
class MissingLabel : public RuntimeError
{
public:
MissingLabel(std::string const & label);
RuntimeError(std::string const & what, std::size_t const byteLocation);
};
class InterruptIndexOutOfRange : public RuntimeError
{
public:
InterruptIndexOutOfRange(int const index);
InterruptIndexOutOfRange(std::size_t const location, int const index);
};
class AttemptedWriteToImmediate : public RuntimeError
{
public:
AttemptedWriteToImmediate(std::size_t const location);
};
class NonExecutableInstruction : public RuntimeError
{
public:
NonExecutableInstruction(std::size_t const location);
};
class NonArgumentByte : public RuntimeError
{
public:
NonArgumentByte(std::size_t const location);
};
class OutOfMemory : public RuntimeError
{
public:
OutOfMemory(int const memoryLocation, int const memorySize);
OutOfMemory(
std::size_t const requiredMemorySize,
std::size_t const actualMemorySize);
};
namespace Internal
{
class BadValueType : public RuntimeError
{
public:
BadValueType();
};
}
}