aboutsummaryrefslogtreecommitdiff
path: root/pkg/lang/vm/code
diff options
context:
space:
mode:
Diffstat (limited to 'pkg/lang/vm/code')
-rw-r--r--pkg/lang/vm/code/op.go2
-rw-r--r--pkg/lang/vm/code/pos.go13
2 files changed, 15 insertions, 0 deletions
diff --git a/pkg/lang/vm/code/op.go b/pkg/lang/vm/code/op.go
index 1ce08f7..b4c172a 100644
--- a/pkg/lang/vm/code/op.go
+++ b/pkg/lang/vm/code/op.go
@@ -19,7 +19,9 @@ const (
OpDrop
+ OpAddGlobal
OpGetGlobal
+ OpSetGlobal
OpGetLocal
OpSetLocal
OpGetMember
diff --git a/pkg/lang/vm/code/pos.go b/pkg/lang/vm/code/pos.go
new file mode 100644
index 0000000..90deb33
--- /dev/null
+++ b/pkg/lang/vm/code/pos.go
@@ -0,0 +1,13 @@
+package code
+
+type Pos struct {
+ Module int
+ PC int
+}
+
+func NewPos(module int, pc int) Pos {
+ return Pos{
+ Module: module,
+ PC: pc,
+ }
+} \ No newline at end of file