goscript 0.0.40 → 0.0.42
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/compiler/analysis.go +173 -2
- package/compiler/compiler.go +14 -4
- package/compiler/expr-type.go +25 -0
- package/compiler/field.go +4 -4
- package/compiler/spec.go +1 -1
- package/compiler/stmt.go +118 -17
- package/compiler/type.go +19 -4
- package/dist/gs/builtin/builtin.d.ts +10 -8
- package/dist/gs/builtin/builtin.js +14 -53
- package/dist/gs/builtin/builtin.js.map +1 -1
- package/dist/gs/builtin/errors.d.ts +8 -0
- package/dist/gs/builtin/errors.js +18 -0
- package/dist/gs/builtin/errors.js.map +1 -0
- package/dist/gs/builtin/index.d.ts +7 -0
- package/dist/gs/builtin/index.js +7 -0
- package/dist/gs/builtin/index.js.map +1 -1
- package/dist/gs/builtin/slice.d.ts +5 -2
- package/dist/gs/builtin/slice.js +110 -77
- package/dist/gs/builtin/slice.js.map +1 -1
- package/dist/gs/bytes/buffer.gs.d.ts +1 -1
- package/dist/gs/bytes/buffer.gs.js +1 -1
- package/dist/gs/bytes/buffer.gs.js.map +1 -1
- package/dist/gs/bytes/bytes.gs.d.ts +1 -1
- package/dist/gs/bytes/bytes.gs.js +1 -1
- package/dist/gs/bytes/bytes.gs.js.map +1 -1
- package/dist/gs/bytes/iter.gs.d.ts +1 -1
- package/dist/gs/bytes/iter.gs.js +1 -1
- package/dist/gs/bytes/iter.gs.js.map +1 -1
- package/dist/gs/bytes/reader.gs.d.ts +1 -1
- package/dist/gs/bytes/reader.gs.js +1 -1
- package/dist/gs/bytes/reader.gs.js.map +1 -1
- package/dist/gs/context/context.d.ts +1 -1
- package/dist/gs/context/context.js +1 -1
- package/dist/gs/context/context.js.map +1 -1
- package/dist/gs/errors/errors.d.ts +1 -1
- package/dist/gs/errors/errors.js +3 -15
- package/dist/gs/errors/errors.js.map +1 -1
- package/dist/gs/github.com/pkg/errors/errors.d.ts +1 -1
- package/dist/gs/github.com/pkg/errors/errors.js +1 -1
- package/dist/gs/github.com/pkg/errors/errors.js.map +1 -1
- package/dist/gs/github.com/pkg/errors/go113.d.ts +1 -1
- package/dist/gs/github.com/pkg/errors/go113.js +1 -1
- package/dist/gs/github.com/pkg/errors/go113.js.map +1 -1
- package/dist/gs/github.com/pkg/errors/stack.d.ts +1 -1
- package/dist/gs/github.com/pkg/errors/stack.js +1 -1
- package/dist/gs/github.com/pkg/errors/stack.js.map +1 -1
- package/dist/gs/internal/byteorder/index.d.ts +1 -1
- package/dist/gs/internal/byteorder/index.js +1 -1
- package/dist/gs/internal/byteorder/index.js.map +1 -1
- package/dist/gs/internal/oserror/errors.d.ts +1 -1
- package/dist/gs/io/fs/format.js +1 -1
- package/dist/gs/io/fs/format.js.map +1 -1
- package/dist/gs/io/fs/fs.d.ts +1 -1
- package/dist/gs/io/fs/fs.js +1 -1
- package/dist/gs/io/fs/fs.js.map +1 -1
- package/dist/gs/io/fs/glob.d.ts +1 -1
- package/dist/gs/io/fs/glob.js +1 -1
- package/dist/gs/io/fs/glob.js.map +1 -1
- package/dist/gs/io/fs/readdir.d.ts +1 -1
- package/dist/gs/io/fs/readdir.js +1 -1
- package/dist/gs/io/fs/readdir.js.map +1 -1
- package/dist/gs/io/fs/readfile.d.ts +1 -1
- package/dist/gs/io/fs/readfile.js +1 -1
- package/dist/gs/io/fs/readfile.js.map +1 -1
- package/dist/gs/io/fs/stat.d.ts +1 -1
- package/dist/gs/io/fs/stat.js +1 -1
- package/dist/gs/io/fs/stat.js.map +1 -1
- package/dist/gs/io/fs/sub.d.ts +1 -1
- package/dist/gs/io/fs/sub.js +1 -1
- package/dist/gs/io/fs/sub.js.map +1 -1
- package/dist/gs/io/fs/walk.d.ts +1 -1
- package/dist/gs/io/fs/walk.js +1 -1
- package/dist/gs/io/fs/walk.js.map +1 -1
- package/dist/gs/io/io.d.ts +1 -1
- package/dist/gs/maps/iter.d.ts +1 -1
- package/dist/gs/maps/iter.js +1 -1
- package/dist/gs/maps/iter.js.map +1 -1
- package/dist/gs/maps/maps.d.ts +1 -1
- package/dist/gs/maps/maps.js +1 -1
- package/dist/gs/maps/maps.js.map +1 -1
- package/dist/gs/math/erfinv.gs.js +1 -1
- package/dist/gs/math/erfinv.gs.js.map +1 -1
- package/dist/gs/math/gamma.gs.js +1 -1
- package/dist/gs/math/gamma.gs.js.map +1 -1
- package/dist/gs/math/j0.gs.js +1 -1
- package/dist/gs/math/j0.gs.js.map +1 -1
- package/dist/gs/math/j1.gs.js +1 -1
- package/dist/gs/math/j1.gs.js.map +1 -1
- package/dist/gs/math/lgamma.gs.js +1 -1
- package/dist/gs/math/lgamma.gs.js.map +1 -1
- package/dist/gs/math/pow10.gs.js +1 -1
- package/dist/gs/math/pow10.gs.js.map +1 -1
- package/dist/gs/math/sin.gs.js +1 -1
- package/dist/gs/math/sin.gs.js.map +1 -1
- package/dist/gs/math/tan.gs.js +1 -1
- package/dist/gs/math/tan.gs.js.map +1 -1
- package/dist/gs/math/tanh.gs.js +1 -1
- package/dist/gs/math/tanh.gs.js.map +1 -1
- package/dist/gs/math/trig_reduce.gs.js +1 -1
- package/dist/gs/math/trig_reduce.gs.js.map +1 -1
- package/dist/gs/os/dir.gs.d.ts +1 -1
- package/dist/gs/os/dir_unix.gs.d.ts +1 -1
- package/dist/gs/os/dir_unix.gs.js +1 -1
- package/dist/gs/os/dir_unix.gs.js.map +1 -1
- package/dist/gs/os/dirent_js.gs.d.ts +1 -1
- package/dist/gs/os/env.gs.d.ts +1 -1
- package/dist/gs/os/env.gs.js +1 -1
- package/dist/gs/os/env.gs.js.map +1 -1
- package/dist/gs/os/error.gs.d.ts +1 -1
- package/dist/gs/os/error.gs.js +1 -1
- package/dist/gs/os/error.gs.js.map +1 -1
- package/dist/gs/os/exec.gs.d.ts +1 -1
- package/dist/gs/os/exec.gs.js +1 -1
- package/dist/gs/os/exec.gs.js.map +1 -1
- package/dist/gs/os/exec_posix.gs.d.ts +1 -1
- package/dist/gs/os/exec_posix.gs.js +1 -1
- package/dist/gs/os/exec_posix.gs.js.map +1 -1
- package/dist/gs/os/exec_unix.gs.d.ts +1 -1
- package/dist/gs/os/executable.gs.d.ts +1 -1
- package/dist/gs/os/executable_js.gs.d.ts +1 -1
- package/dist/gs/os/executable_wasm.gs.d.ts +1 -1
- package/dist/gs/os/file_constants_js.gs.d.ts +1 -1
- package/dist/gs/os/file_constants_js.gs.js +1 -1
- package/dist/gs/os/file_constants_js.gs.js.map +1 -1
- package/dist/gs/os/file_js.gs.d.ts +1 -1
- package/dist/gs/os/file_open_unix.gs.d.ts +1 -1
- package/dist/gs/os/file_posix_js.gs.d.ts +1 -1
- package/dist/gs/os/file_unix_js.gs.d.ts +1 -1
- package/dist/gs/os/getwd_js.gs.d.ts +1 -1
- package/dist/gs/os/path.gs.d.ts +1 -1
- package/dist/gs/os/path.gs.js +1 -1
- package/dist/gs/os/path.gs.js.map +1 -1
- package/dist/gs/os/path_unix.gs.js +1 -1
- package/dist/gs/os/path_unix.gs.js.map +1 -1
- package/dist/gs/os/pidfd_js.gs.d.ts +1 -1
- package/dist/gs/os/pipe_wasm.gs.d.ts +1 -1
- package/dist/gs/os/proc.gs.d.ts +1 -1
- package/dist/gs/os/proc.gs.js +1 -1
- package/dist/gs/os/proc.gs.js.map +1 -1
- package/dist/gs/os/proc_js.gs.d.ts +1 -1
- package/dist/gs/os/proc_js.gs.js +1 -1
- package/dist/gs/os/proc_js.gs.js.map +1 -1
- package/dist/gs/os/rawconn_js.gs.d.ts +1 -1
- package/dist/gs/os/removeall_js.gs.d.ts +1 -1
- package/dist/gs/os/root_js.gs.d.ts +1 -1
- package/dist/gs/os/root_js.gs.js +1 -1
- package/dist/gs/os/root_js.gs.js.map +1 -1
- package/dist/gs/os/root_nonwindows.gs.d.ts +1 -1
- package/dist/gs/os/root_noopenat.gs.d.ts +1 -1
- package/dist/gs/os/stat.gs.d.ts +1 -1
- package/dist/gs/os/stat_js.gs.d.ts +1 -1
- package/dist/gs/os/stat_unix_js.gs.d.ts +1 -1
- package/dist/gs/os/sys.gs.d.ts +1 -1
- package/dist/gs/os/sys_bsd.gs.d.ts +1 -1
- package/dist/gs/os/sys_js.gs.d.ts +1 -1
- package/dist/gs/os/tempfile.gs.d.ts +1 -1
- package/dist/gs/os/types.gs.d.ts +1 -1
- package/dist/gs/os/types.gs.js +1 -1
- package/dist/gs/os/types.gs.js.map +1 -1
- package/dist/gs/os/types_js.gs.d.ts +1 -1
- package/dist/gs/os/types_js.gs.js +1 -1
- package/dist/gs/os/types_js.gs.js.map +1 -1
- package/dist/gs/os/types_unix.gs.d.ts +1 -1
- package/dist/gs/os/types_unix.gs.js +1 -1
- package/dist/gs/os/types_unix.gs.js.map +1 -1
- package/dist/gs/os/zero_copy_posix.gs.d.ts +1 -1
- package/dist/gs/os/zero_copy_posix.gs.js +1 -1
- package/dist/gs/os/zero_copy_posix.gs.js.map +1 -1
- package/dist/gs/path/filepath/path.d.ts +11 -10
- package/dist/gs/path/filepath/path.js +5 -4
- package/dist/gs/path/filepath/path.js.map +1 -1
- package/dist/gs/path/match.d.ts +1 -1
- package/dist/gs/path/match.js +1 -1
- package/dist/gs/path/match.js.map +1 -1
- package/dist/gs/path/path.js +1 -1
- package/dist/gs/path/path.js.map +1 -1
- package/dist/gs/reflect/value.d.ts +1 -1
- package/dist/gs/reflect/value.js +1 -1
- package/dist/gs/reflect/value.js.map +1 -1
- package/dist/gs/reflect/visiblefields.d.ts +1 -1
- package/dist/gs/reflect/visiblefields.js +1 -1
- package/dist/gs/reflect/visiblefields.js.map +1 -1
- package/dist/gs/slices/slices.d.ts +1 -1
- package/dist/gs/slices/slices.js +1 -1
- package/dist/gs/slices/slices.js.map +1 -1
- package/dist/gs/sort/search.gs.d.ts +1 -1
- package/dist/gs/sort/search.gs.js +1 -1
- package/dist/gs/sort/search.gs.js.map +1 -1
- package/dist/gs/sort/slice.gs.d.ts +1 -1
- package/dist/gs/sort/slice.gs.js +1 -1
- package/dist/gs/sort/slice.gs.js.map +1 -1
- package/dist/gs/sort/sort.gs.d.ts +1 -1
- package/dist/gs/sort/sort.gs.js +1 -1
- package/dist/gs/sort/sort.gs.js.map +1 -1
- package/dist/gs/strconv/atob.gs.d.ts +1 -1
- package/dist/gs/strconv/atob.gs.js +1 -1
- package/dist/gs/strconv/atob.gs.js.map +1 -1
- package/dist/gs/strconv/atof.gs.d.ts +1 -1
- package/dist/gs/strconv/atoi.gs.d.ts +1 -1
- package/dist/gs/strconv/atoi.gs.js +5 -6
- package/dist/gs/strconv/atoi.gs.js.map +1 -1
- package/dist/gs/strconv/ftoa.gs.d.ts +1 -1
- package/dist/gs/strconv/ftoa.gs.js +1 -1
- package/dist/gs/strconv/ftoa.gs.js.map +1 -1
- package/dist/gs/strconv/itoa.gs.d.ts +1 -1
- package/dist/gs/strconv/itoa.gs.js +1 -1
- package/dist/gs/strconv/itoa.gs.js.map +1 -1
- package/dist/gs/strconv/quote.gs.d.ts +1 -1
- package/dist/gs/strconv/quote.gs.js +1 -1
- package/dist/gs/strconv/quote.gs.js.map +1 -1
- package/dist/gs/strings/builder.d.ts +1 -1
- package/dist/gs/strings/builder.js +1 -1
- package/dist/gs/strings/builder.js.map +1 -1
- package/dist/gs/strings/iter.js +1 -1
- package/dist/gs/strings/iter.js.map +1 -1
- package/dist/gs/strings/reader.d.ts +1 -1
- package/dist/gs/strings/reader.js +7 -8
- package/dist/gs/strings/reader.js.map +1 -1
- package/dist/gs/strings/replace.d.ts +1 -1
- package/dist/gs/strings/replace.js +1 -1
- package/dist/gs/strings/replace.js.map +1 -1
- package/dist/gs/strings/strings.d.ts +1 -1
- package/dist/gs/strings/strings.js +1 -1
- package/dist/gs/strings/strings.js.map +1 -1
- package/dist/gs/sync/atomic/doc.gs.d.ts +1 -1
- package/dist/gs/sync/atomic/doc_64.gs.d.ts +1 -1
- package/dist/gs/sync/atomic/type.gs.d.ts +1 -1
- package/dist/gs/sync/atomic/type.gs.js +1 -1
- package/dist/gs/sync/atomic/type.gs.js.map +1 -1
- package/dist/gs/sync/atomic/value.gs.d.ts +1 -1
- package/dist/gs/sync/atomic/value.gs.js +1 -1
- package/dist/gs/sync/atomic/value.gs.js.map +1 -1
- package/dist/gs/syscall/index.d.ts +1 -1
- package/dist/gs/syscall/index.js +1 -1
- package/dist/gs/syscall/index.js.map +1 -1
- package/dist/gs/unicode/utf8/utf8.d.ts +1 -1
- package/dist/gs/unicode/utf8/utf8.js +1 -1
- package/dist/gs/unicode/utf8/utf8.js.map +1 -1
- package/gs/builtin/builtin.ts +16 -64
- package/gs/builtin/errors.ts +25 -0
- package/gs/builtin/index.ts +7 -0
- package/gs/builtin/slice.ts +125 -70
- package/gs/bytes/buffer.gs.ts +1 -1
- package/gs/bytes/bytes.gs.ts +1 -1
- package/gs/bytes/iter.gs.ts +1 -1
- package/gs/bytes/reader.gs.ts +1 -1
- package/gs/context/context.ts +1 -1
- package/gs/errors/errors.ts +3 -16
- package/gs/github.com/pkg/errors/errors.ts +1 -1
- package/gs/github.com/pkg/errors/go113.ts +2 -2
- package/gs/github.com/pkg/errors/stack.ts +1 -1
- package/gs/internal/byteorder/index.ts +1 -1
- package/gs/internal/oserror/errors.ts +1 -1
- package/gs/io/fs/format.ts +1 -1
- package/gs/io/fs/fs.ts +1 -1
- package/gs/io/fs/glob.ts +1 -1
- package/gs/io/fs/readdir.ts +1 -1
- package/gs/io/fs/readfile.ts +1 -1
- package/gs/io/fs/stat.ts +1 -1
- package/gs/io/fs/sub.ts +1 -1
- package/gs/io/fs/walk.ts +1 -1
- package/gs/io/io.ts +1 -1
- package/gs/maps/iter.ts +1 -1
- package/gs/maps/maps.ts +1 -1
- package/gs/math/abs.gs.ts +1 -1
- package/gs/math/acosh.gs.ts +1 -1
- package/gs/math/asinh.gs.ts +1 -1
- package/gs/math/atan.gs.ts +1 -1
- package/gs/math/atan2.gs.ts +1 -1
- package/gs/math/atanh.gs.ts +1 -1
- package/gs/math/bits.gs.ts +1 -1
- package/gs/math/cbrt.gs.ts +1 -1
- package/gs/math/const.gs.ts +1 -1
- package/gs/math/copysign.gs.ts +1 -1
- package/gs/math/dim.gs.ts +1 -1
- package/gs/math/erf.gs.ts +1 -1
- package/gs/math/erfinv.gs.ts +1 -1
- package/gs/math/exp.gs.ts +1 -1
- package/gs/math/expm1.gs.ts +1 -1
- package/gs/math/floor.gs.ts +1 -1
- package/gs/math/frexp.gs.ts +1 -1
- package/gs/math/gamma.gs.ts +1 -1
- package/gs/math/hypot.gs.ts +1 -1
- package/gs/math/j0.gs.ts +1 -1
- package/gs/math/j1.gs.ts +1 -1
- package/gs/math/jn.gs.ts +1 -1
- package/gs/math/ldexp.gs.ts +1 -1
- package/gs/math/lgamma.gs.ts +1 -1
- package/gs/math/log.gs.ts +1 -1
- package/gs/math/log10.gs.ts +1 -1
- package/gs/math/log1p.gs.ts +1 -1
- package/gs/math/logb.gs.ts +1 -1
- package/gs/math/mod.gs.ts +1 -1
- package/gs/math/modf.gs.ts +1 -1
- package/gs/math/nextafter.gs.ts +1 -1
- package/gs/math/pow.gs.ts +1 -1
- package/gs/math/pow10.gs.ts +1 -1
- package/gs/math/remainder.gs.ts +1 -1
- package/gs/math/signbit.gs.ts +1 -1
- package/gs/math/sin.gs.ts +1 -1
- package/gs/math/sincos.gs.ts +1 -1
- package/gs/math/sinh.gs.ts +1 -1
- package/gs/math/sqrt.gs.ts +1 -1
- package/gs/math/tan.gs.ts +1 -1
- package/gs/math/tanh.gs.ts +1 -1
- package/gs/math/trig_reduce.gs.ts +1 -1
- package/gs/math/unsafe.gs.ts +1 -1
- package/gs/os/dir.gs.ts +1 -1
- package/gs/os/dir_unix.gs.ts +1 -1
- package/gs/os/dirent_js.gs.ts +1 -1
- package/gs/os/env.gs.ts +1 -1
- package/gs/os/error.gs.ts +1 -1
- package/gs/os/error_errno.gs.ts +1 -1
- package/gs/os/exec.gs.ts +1 -1
- package/gs/os/exec_nohandle.gs.ts +1 -1
- package/gs/os/exec_posix.gs.ts +1 -1
- package/gs/os/exec_unix.gs.ts +1 -1
- package/gs/os/executable.gs.ts +1 -1
- package/gs/os/executable_js.gs.ts +1 -1
- package/gs/os/executable_wasm.gs.ts +1 -1
- package/gs/os/file_constants_js.gs.ts +1 -1
- package/gs/os/file_js.gs.ts +1 -1
- package/gs/os/file_open_unix.gs.ts +1 -1
- package/gs/os/file_posix_js.gs.ts +1 -1
- package/gs/os/file_unix_js.gs.ts +1 -1
- package/gs/os/getwd_js.gs.ts +1 -1
- package/gs/os/path.gs.ts +1 -1
- package/gs/os/path_unix.gs.ts +1 -1
- package/gs/os/pidfd_js.gs.ts +1 -1
- package/gs/os/pipe_wasm.gs.ts +1 -1
- package/gs/os/proc.gs.ts +1 -1
- package/gs/os/proc_js.gs.ts +1 -1
- package/gs/os/rawconn_js.gs.ts +1 -1
- package/gs/os/removeall_js.gs.ts +1 -1
- package/gs/os/root_js.gs.ts +1 -1
- package/gs/os/root_nonwindows.gs.ts +1 -1
- package/gs/os/root_noopenat.gs.ts +1 -1
- package/gs/os/stat.gs.ts +1 -1
- package/gs/os/stat_js.gs.ts +1 -1
- package/gs/os/stat_unix_js.gs.ts +1 -1
- package/gs/os/sticky_bsd.gs.ts +1 -1
- package/gs/os/sys.gs.ts +1 -1
- package/gs/os/sys_bsd.gs.ts +1 -1
- package/gs/os/sys_js.gs.ts +1 -1
- package/gs/os/tempfile.gs.ts +1 -1
- package/gs/os/types.gs.ts +1 -1
- package/gs/os/types_js.gs.ts +1 -1
- package/gs/os/types_unix.gs.ts +1 -1
- package/gs/os/wait_unimp.gs.ts +1 -1
- package/gs/os/zero_copy_posix.gs.ts +1 -1
- package/gs/os/zero_copy_stub.gs.ts +1 -1
- package/gs/path/filepath/path.ts +14 -13
- package/gs/path/match.ts +1 -1
- package/gs/path/path.ts +1 -1
- package/gs/reflect/value.ts +1 -1
- package/gs/reflect/visiblefields.ts +1 -1
- package/gs/slices/slices.ts +1 -1
- package/gs/sort/search.gs.ts +1 -1
- package/gs/sort/slice.gs.ts +1 -1
- package/gs/sort/sort.gs.ts +1 -1
- package/gs/strconv/atob.gs.ts +1 -1
- package/gs/strconv/atof.gs.ts +1 -1
- package/gs/strconv/atoi.gs.ts +5 -6
- package/gs/strconv/doc.gs.ts +1 -1
- package/gs/strconv/ftoa.gs.ts +1 -1
- package/gs/strconv/itoa.gs.ts +1 -1
- package/gs/strconv/quote.gs.ts +1 -1
- package/gs/strings/builder.ts +1 -1
- package/gs/strings/iter.ts +1 -1
- package/gs/strings/reader.ts +7 -9
- package/gs/strings/replace.ts +1 -1
- package/gs/strings/strings.ts +1 -1
- package/gs/sync/atomic/doc.gs.ts +1 -1
- package/gs/sync/atomic/doc_64.gs.ts +1 -1
- package/gs/sync/atomic/type.gs.ts +1 -1
- package/gs/sync/atomic/value.gs.ts +1 -1
- package/gs/syscall/index.ts +1 -1
- package/gs/unicode/utf8/utf8.ts +1 -1
- package/package.json +3 -3
- package/gs/builtin/io.ts +0 -22
package/gs/math/floor.gs.ts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import * as $ from "@goscript/builtin/
|
|
1
|
+
import * as $ from "@goscript/builtin/index.js";
|
|
2
2
|
import { IsInf, IsNaN } from "./bits.gs.js";
|
|
3
3
|
// archCeil, archFloor, archTrunc imports removed - using optimized implementation
|
|
4
4
|
import { Modf } from "./modf.gs.js";
|
package/gs/math/frexp.gs.ts
CHANGED
package/gs/math/gamma.gs.ts
CHANGED
package/gs/math/hypot.gs.ts
CHANGED
package/gs/math/j0.gs.ts
CHANGED
package/gs/math/j1.gs.ts
CHANGED
package/gs/math/jn.gs.ts
CHANGED
package/gs/math/ldexp.gs.ts
CHANGED
package/gs/math/lgamma.gs.ts
CHANGED
package/gs/math/log.gs.ts
CHANGED
package/gs/math/log10.gs.ts
CHANGED
package/gs/math/log1p.gs.ts
CHANGED
package/gs/math/logb.gs.ts
CHANGED
package/gs/math/mod.gs.ts
CHANGED
package/gs/math/modf.gs.ts
CHANGED
package/gs/math/nextafter.gs.ts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import * as $ from "@goscript/builtin/
|
|
1
|
+
import * as $ from "@goscript/builtin/index.js";
|
|
2
2
|
import { IsNaN, NaN } from "./bits.gs.js";
|
|
3
3
|
import { Copysign } from "./copysign.gs.js";
|
|
4
4
|
import { Float32bits, Float32frombits, Float64bits, Float64frombits } from "./unsafe.gs.js";
|
package/gs/math/pow.gs.ts
CHANGED
package/gs/math/pow10.gs.ts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import * as $ from "@goscript/builtin/
|
|
1
|
+
import * as $ from "@goscript/builtin/index.js";
|
|
2
2
|
import { Inf } from "./bits.gs.js";
|
|
3
3
|
|
|
4
4
|
let pow10tab = $.arrayToSlice<number>([1e00, 1e01, 1e02, 1e03, 1e04, 1e05, 1e06, 1e07, 1e08, 1e09, 1e10, 1e11, 1e12, 1e13, 1e14, 1e15, 1e16, 1e17, 1e18, 1e19, 1e20, 1e21, 1e22, 1e23, 1e24, 1e25, 1e26, 1e27, 1e28, 1e29, 1e30, 1e31])
|
package/gs/math/remainder.gs.ts
CHANGED
package/gs/math/signbit.gs.ts
CHANGED
package/gs/math/sin.gs.ts
CHANGED
package/gs/math/sincos.gs.ts
CHANGED
package/gs/math/sinh.gs.ts
CHANGED
package/gs/math/sqrt.gs.ts
CHANGED
package/gs/math/tan.gs.ts
CHANGED
package/gs/math/tanh.gs.ts
CHANGED
package/gs/math/unsafe.gs.ts
CHANGED
package/gs/os/dir.gs.ts
CHANGED
package/gs/os/dir_unix.gs.ts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import * as $ from "@goscript/builtin/
|
|
1
|
+
import * as $ from "@goscript/builtin/index.js";
|
|
2
2
|
import { direntIno, direntNamlen, direntReclen, direntType } from "./dirent_js.gs.js";
|
|
3
3
|
import { IsNotExist } from "./error.gs.js";
|
|
4
4
|
import { newUnixDirent } from "./file_unix_js.gs.js";
|
package/gs/os/dirent_js.gs.ts
CHANGED
package/gs/os/env.gs.ts
CHANGED
package/gs/os/error.gs.ts
CHANGED
package/gs/os/error_errno.gs.ts
CHANGED
package/gs/os/exec.gs.ts
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import * as $ from "@goscript/builtin/
|
|
1
|
+
import * as $ from "@goscript/builtin/index.js";
|
|
2
2
|
|
package/gs/os/exec_posix.gs.ts
CHANGED
package/gs/os/exec_unix.gs.ts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import * as $ from "@goscript/builtin/
|
|
1
|
+
import * as $ from "@goscript/builtin/index.js";
|
|
2
2
|
import { NewSyscallError, ErrUnimplemented } from "./error.gs.js";
|
|
3
3
|
import { newDoneProcess, newHandleProcess, newPIDProcess, Process, ErrProcessDone } from "./exec.gs.js";
|
|
4
4
|
|
package/gs/os/executable.gs.ts
CHANGED
package/gs/os/file_js.gs.ts
CHANGED
package/gs/os/file_unix_js.gs.ts
CHANGED
package/gs/os/getwd_js.gs.ts
CHANGED
package/gs/os/path.gs.ts
CHANGED
package/gs/os/path_unix.gs.ts
CHANGED
package/gs/os/pidfd_js.gs.ts
CHANGED
package/gs/os/pipe_wasm.gs.ts
CHANGED
package/gs/os/proc.gs.ts
CHANGED
package/gs/os/proc_js.gs.ts
CHANGED
package/gs/os/rawconn_js.gs.ts
CHANGED
package/gs/os/removeall_js.gs.ts
CHANGED
package/gs/os/root_js.gs.ts
CHANGED
package/gs/os/stat.gs.ts
CHANGED
package/gs/os/stat_js.gs.ts
CHANGED
package/gs/os/stat_unix_js.gs.ts
CHANGED
package/gs/os/sticky_bsd.gs.ts
CHANGED
package/gs/os/sys.gs.ts
CHANGED
package/gs/os/sys_bsd.gs.ts
CHANGED
package/gs/os/sys_js.gs.ts
CHANGED
package/gs/os/tempfile.gs.ts
CHANGED
package/gs/os/types.gs.ts
CHANGED
package/gs/os/types_js.gs.ts
CHANGED
package/gs/os/types_unix.gs.ts
CHANGED
package/gs/os/wait_unimp.gs.ts
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import * as $ from "@goscript/builtin/
|
|
1
|
+
import * as $ from "@goscript/builtin/index.js";
|
|
2
2
|
|
package/gs/path/filepath/path.ts
CHANGED
|
@@ -1,13 +1,14 @@
|
|
|
1
1
|
// Package filepath implements utility routines for manipulating filename paths
|
|
2
2
|
// in a way compatible with the target operating system-defined file paths.
|
|
3
|
+
import * as $ from "@goscript/builtin/index.js"
|
|
3
4
|
|
|
4
5
|
// Path separator constants
|
|
5
6
|
export const Separator = '/'
|
|
6
7
|
export const ListSeparator = ':'
|
|
7
8
|
|
|
8
9
|
// Error constants
|
|
9
|
-
export const SkipDir =
|
|
10
|
-
export const SkipAll =
|
|
10
|
+
export const SkipDir = $.newError('skip this directory')
|
|
11
|
+
export const SkipAll = $.newError('skip everything and stop the walk')
|
|
11
12
|
|
|
12
13
|
// Base returns the last element of path.
|
|
13
14
|
// Trailing path separators are removed before extracting the last element.
|
|
@@ -262,7 +263,7 @@ export function HasPrefix(p: string, prefix: string): boolean {
|
|
|
262
263
|
// Stubs for functions that require filesystem operations
|
|
263
264
|
// These are simplified implementations for compatibility
|
|
264
265
|
|
|
265
|
-
export function Abs(path: string): [string,
|
|
266
|
+
export function Abs(path: string): [string, $.GoError] {
|
|
266
267
|
if (IsAbs(path)) {
|
|
267
268
|
return [Clean(path), null]
|
|
268
269
|
}
|
|
@@ -274,7 +275,7 @@ export function Abs(path: string): [string, Error | null] {
|
|
|
274
275
|
export function Rel(
|
|
275
276
|
basepath: string,
|
|
276
277
|
targpath: string,
|
|
277
|
-
): [string,
|
|
278
|
+
): [string, $.GoError] {
|
|
278
279
|
// Simplified implementation - in reality this is much more complex
|
|
279
280
|
const base = Clean(basepath)
|
|
280
281
|
const targ = Clean(targpath)
|
|
@@ -291,12 +292,12 @@ export function Rel(
|
|
|
291
292
|
return [targ, null]
|
|
292
293
|
}
|
|
293
294
|
|
|
294
|
-
export function EvalSymlinks(path: string): [string,
|
|
295
|
+
export function EvalSymlinks(path: string): [string, $.GoError] {
|
|
295
296
|
// No filesystem support, just return the cleaned path
|
|
296
297
|
return [Clean(path), null]
|
|
297
298
|
}
|
|
298
299
|
|
|
299
|
-
export function Glob(_pattern: string): [string[],
|
|
300
|
+
export function Glob(_pattern: string): [string[], $.GoError] {
|
|
300
301
|
// No filesystem support, return empty array
|
|
301
302
|
return [[], null]
|
|
302
303
|
}
|
|
@@ -309,20 +310,20 @@ export function Glob(_pattern: string): [string[], Error | null] {
|
|
|
309
310
|
export type WalkFunc = (
|
|
310
311
|
path: string,
|
|
311
312
|
info: any,
|
|
312
|
-
err:
|
|
313
|
-
) =>
|
|
313
|
+
err: $.GoError,
|
|
314
|
+
) => $.GoError
|
|
314
315
|
|
|
315
|
-
export function Walk(root: string, walkFn: WalkFunc):
|
|
316
|
+
export function Walk(root: string, walkFn: WalkFunc): $.GoError {
|
|
316
317
|
// No filesystem support, just call the function with the root
|
|
317
|
-
return walkFn(root, null,
|
|
318
|
+
return walkFn(root, null, $.newError('filesystem not supported'))
|
|
318
319
|
}
|
|
319
320
|
|
|
320
|
-
export function WalkDir(_root: string, _walkFn: any):
|
|
321
|
+
export function WalkDir(_root: string, _walkFn: any): $.GoError {
|
|
321
322
|
// No filesystem support
|
|
322
|
-
return
|
|
323
|
+
return $.newError('filesystem not supported')
|
|
323
324
|
}
|
|
324
325
|
|
|
325
326
|
// Localize is a stub - in Go it's used for Windows path localization
|
|
326
|
-
export function Localize(path: string): [string,
|
|
327
|
+
export function Localize(path: string): [string, $.GoError] {
|
|
327
328
|
return [path, null]
|
|
328
329
|
}
|
package/gs/path/match.ts
CHANGED
package/gs/path/path.ts
CHANGED