Compile to bytecode
This commit is contained in:
@@ -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();
|
||||
};
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user