about summary refs log tree commit diff
path: root/pkg/lang/vm/errors.go
diff options
context:
space:
mode:
authorMel <einebeere@gmail.com>2022-05-28 14:28:46 +0000
committerGitHub <noreply@github.com>2022-05-28 14:28:46 +0000
commit2ddb215e3b0d3818b3fac8f315d97d8020eb699f (patch)
tree80ab831b31a550751847f543cf4741f8d3449f2f /pkg/lang/vm/errors.go
parent0a7700112f82e634a957685bee0cbaa3458f4945 (diff)
downloadjinx-2ddb215e3b0d3818b3fac8f315d97d8020eb699f.tar.zst
jinx-2ddb215e3b0d3818b3fac8f315d97d8020eb699f.zip
Extract stack package and hide behind interface
Diffstat (limited to 'pkg/lang/vm/errors.go')
-rw-r--r--pkg/lang/vm/errors.go26
1 files changed, 0 insertions, 26 deletions
diff --git a/pkg/lang/vm/errors.go b/pkg/lang/vm/errors.go
index 2f5b56a..a717c09 100644
--- a/pkg/lang/vm/errors.go
+++ b/pkg/lang/vm/errors.go
@@ -25,35 +25,9 @@ func (e Error) Error() string {
 // Fatal errors
 
 var (
-	ErrStackOverflow  = errors.New("stack overflow (max depth: 1000)")
-	ErrStackUnderflow = errors.New("local stack underflow")
-
-	ErrReachedMaxCallDepth  = errors.New("reached max call depth (max depth: 1000)")
-	ErrReachedRootCallFrame = errors.New("reached root call frame")
-
-	ErrCallBaseCantBeNegative = errors.New("call base cannot be negative")
-
 	ErrEnvNotSet = errors.New("env not set")
 )
 
-type ErrLocalIndexOutOfBounds struct {
-	Index int
-	Len   int
-}
-
-func (e ErrLocalIndexOutOfBounds) Error() string {
-	return fmt.Sprintf("local index out of bounds: %d (len: %d)", e.Index, e.Len)
-}
-
-type ErrStackIndexOutOfBounds struct {
-	Index int
-	Len   int
-}
-
-func (e ErrStackIndexOutOfBounds) Error() string {
-	return fmt.Sprintf("stack index out of bounds: %d (len: %d)", e.Index, e.Len)
-}
-
 type ErrInvalidOp struct {
 	Op uint8
 }