diff --git a/cmd/internal/load/gop.go b/cmd/internal/load/gop.go index b7f190e2..d5149f42 100644 --- a/cmd/internal/load/gop.go +++ b/cmd/internal/load/gop.go @@ -1,5 +1,5 @@ -//go:build go1.16 -// +build go1.16 +//go:build go1.18 +// +build go1.18 /* * Copyright (c) 2022 The GoPlus Authors (goplus.org). All rights reserved. diff --git a/cmd/internal/load/nogop.go b/cmd/internal/load/nogop.go index c4b57469..abfd7230 100644 --- a/cmd/internal/load/nogop.go +++ b/cmd/internal/load/nogop.go @@ -1,5 +1,5 @@ -//go:build !go1.16 -// +build !go1.16 +//go:build !go1.18 +// +build !go1.18 /* * Copyright (c) 2022 The GoPlus Authors (goplus.org). All rights reserved. diff --git a/cmd/internal/repl/gop.go b/cmd/internal/repl/gop.go index 9a827203..a7216204 100644 --- a/cmd/internal/repl/gop.go +++ b/cmd/internal/repl/gop.go @@ -1,5 +1,5 @@ -//go:build go1.16 -// +build go1.16 +//go:build go1.18 +// +build go1.18 /* * Copyright (c) 2022 The GoPlus Authors (goplus.org). All rights reserved. diff --git a/pkg/github.com/goplus/gop/builtin/ng/export.go b/pkg/github.com/goplus/gop/builtin/ng/export.go index 07e3ae7c..cee412ac 100755 --- a/pkg/github.com/goplus/gop/builtin/ng/export.go +++ b/pkg/github.com/goplus/gop/builtin/ng/export.go @@ -6,6 +6,7 @@ import ( q "github.com/goplus/gop/builtin/ng" "go/constant" + "go/token" "reflect" "github.com/goplus/igop" @@ -101,7 +102,13 @@ func init() { }, TypedConsts: map[string]igop.TypedConst{}, UntypedConsts: map[string]igop.UntypedConst{ - "GopPackage": {"untyped bool", constant.MakeBool(bool(q.GopPackage))}, + "GopPackage": {"untyped bool", constant.MakeBool(bool(q.GopPackage))}, + "Int128_IsUntyped": {"untyped bool", constant.MakeBool(bool(q.Int128_IsUntyped))}, + "Int128_Max": {"untyped int", constant.MakeFromLiteral("170141183460469231731687303715884105727", token.INT, 0)}, + "Int128_Min": {"untyped int", constant.MakeFromLiteral("-170141183460469231731687303715884105728", token.INT, 0)}, + "Uint128_IsUntyped": {"untyped bool", constant.MakeBool(bool(q.Uint128_IsUntyped))}, + "Uint128_Max": {"untyped int", constant.MakeFromLiteral("340282366920938463463374607431768211455", token.INT, 0)}, + "Uint128_Min": {"untyped int", constant.MakeInt64(int64(q.Uint128_Min))}, }, }) }