From 22a69393f58abcf3bcf9e7039f994dae78422213 Mon Sep 17 00:00:00 2001 From: Mel Date: Wed, 27 Jul 2022 11:01:29 +0000 Subject: Implement VM modules and globals --- pkg/lang/vm/value/value.go | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) (limited to 'pkg/lang/vm/value/value.go') diff --git a/pkg/lang/vm/value/value.go b/pkg/lang/vm/value/value.go index 5dd5012..b051f04 100644 --- a/pkg/lang/vm/value/value.go +++ b/pkg/lang/vm/value/value.go @@ -1,6 +1,7 @@ package value import ( + "jinx/pkg/lang/vm/code" "jinx/pkg/lang/vm/mem" ) @@ -52,8 +53,8 @@ func NewNull() Value { return Value{t: CORE_TYPE_NULL, d: NullData{}} } -func NewFunction(pc int, args uint) Value { - return Value{t: CORE_TYPE_FUNCTION, d: FunctionData{pc: pc, args: args}} +func NewFunction(pos code.Pos, args uint) Value { + return Value{t: CORE_TYPE_FUNCTION, d: FunctionData{pos: pos, args: args}} } func NewNativeFunction(f NativeFunc, args uint) Value { -- cgit 1.4.1