diff --git a/.builds/freebsd.yml b/.builds/freebsd.yml index 5e94a83a3a..79dfab50c8 100644 --- a/.builds/freebsd.yml +++ b/.builds/freebsd.yml @@ -13,28 +13,28 @@ tasks: - test: | cd zig/build bin/zig test ../test/stage1/behavior.zig - bin/zig test ../std/special/compiler_rt/index.zig + bin/zig test ../std/special/compiler_rt.zig bin/zig test ../test/stage1/behavior.zig --library c - bin/zig test ../std/special/compiler_rt/index.zig --library c + bin/zig test ../std/special/compiler_rt.zig --library c bin/zig test ../test/stage1/behavior.zig --release-fast - bin/zig test ../std/special/compiler_rt/index.zig --release-fast + bin/zig test ../std/special/compiler_rt.zig --release-fast bin/zig test ../test/stage1/behavior.zig --release-fast --library c - bin/zig test ../std/special/compiler_rt/index.zig --release-fast --library c + bin/zig test ../std/special/compiler_rt.zig --release-fast --library c bin/zig test ../test/stage1/behavior.zig --release-small --library c - bin/zig test ../std/special/compiler_rt/index.zig --release-small --library c + bin/zig test ../std/special/compiler_rt.zig --release-small --library c bin/zig test ../test/stage1/behavior.zig --release-small - bin/zig test ../std/special/compiler_rt/index.zig --release-small + bin/zig test ../std/special/compiler_rt.zig --release-small bin/zig test ../test/stage1/behavior.zig --release-safe - bin/zig test ../std/special/compiler_rt/index.zig --release-safe + bin/zig test ../std/special/compiler_rt.zig --release-safe bin/zig test ../test/stage1/behavior.zig --release-safe --library c - bin/zig test ../std/special/compiler_rt/index.zig --release-safe --library c + bin/zig test ../std/special/compiler_rt.zig --release-safe --library c # TODO enable all tests #bin/zig build --build-file ../build.zig test # TODO integrate with the download page updater and make a diff --git a/CMakeLists.txt b/CMakeLists.txt index 9e2cb5b9d4..881f432c61 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -442,7 +442,7 @@ set(ZIG_CPP_SOURCES set(ZIG_STD_FILES "array_list.zig" - "atomic/index.zig" + "atomic.zig" "atomic/int.zig" "atomic/queue.zig" "atomic/stack.zig" @@ -452,17 +452,17 @@ set(ZIG_STD_FILES "buffer.zig" "build.zig" "build/fmt.zig" + "c.zig" "c/darwin.zig" "c/freebsd.zig" - "c/index.zig" "c/linux.zig" "c/netbsd.zig" "c/windows.zig" "coff.zig" + "crypto.zig" "crypto/blake2.zig" "crypto/chacha20.zig" "crypto/hmac.zig" - "crypto/index.zig" "crypto/md5.zig" "crypto/poly1305.zig" "crypto/sha1.zig" @@ -470,8 +470,8 @@ set(ZIG_STD_FILES "crypto/sha3.zig" "crypto/x25519.zig" "cstr.zig" + "debug.zig" "debug/failing_allocator.zig" - "debug/index.zig" "dwarf.zig" "dynamic_library.zig" "elf.zig" @@ -488,25 +488,25 @@ set(ZIG_STD_FILES "event/net.zig" "event/rwlock.zig" "event/rwlocked.zig" + "fmt.zig" + "fmt/errol.zig" "fmt/errol/enum3.zig" - "fmt/errol/index.zig" "fmt/errol/lookup.zig" - "fmt/index.zig" "fmt/parse_float.zig" + "hash.zig" "hash/adler.zig" "hash/crc.zig" "hash/fnv.zig" - "hash/index.zig" "hash/siphash.zig" "hash_map.zig" "heap.zig" - "index.zig" "io.zig" "io/seekable_stream.zig" "json.zig" "lazy_init.zig" "linked_list.zig" "macho.zig" + "math.zig" "math/acos.zig" "math/acosh.zig" "math/asin.zig" @@ -514,10 +514,11 @@ set(ZIG_STD_FILES "math/atan.zig" "math/atan2.zig" "math/atanh.zig" - "math/big/index.zig" + "math/big.zig" "math/big/int.zig" "math/cbrt.zig" "math/ceil.zig" + "math/complex.zig" "math/complex/abs.zig" "math/complex/acos.zig" "math/complex/acosh.zig" @@ -530,7 +531,6 @@ set(ZIG_STD_FILES "math/complex/cos.zig" "math/complex/cosh.zig" "math/complex/exp.zig" - "math/complex/index.zig" "math/complex/ldexp.zig" "math/complex/log.zig" "math/complex/pow.zig" @@ -553,7 +553,6 @@ set(ZIG_STD_FILES "math/frexp.zig" "math/hypot.zig" "math/ilogb.zig" - "math/index.zig" "math/inf.zig" "math/isfinite.zig" "math/isinf.zig" @@ -578,50 +577,51 @@ set(ZIG_STD_FILES "math/tanh.zig" "math/trunc.zig" "mem.zig" - "meta/index.zig" + "meta.zig" "meta/trait.zig" "mutex.zig" "net.zig" + "os.zig" "os/child_process.zig" "os/darwin.zig" "os/darwin/errno.zig" "os/epoch.zig" "os/file.zig" + "os/freebsd.zig" "os/freebsd/errno.zig" - "os/freebsd/index.zig" "os/get_app_data_dir.zig" "os/get_user_id.zig" - "os/index.zig" + "os/linux.zig" "os/linux/arm64.zig" "os/linux/errno.zig" - "os/linux/index.zig" "os/linux/vdso.zig" "os/linux/x86_64.zig" + "os/netbsd.zig" "os/netbsd/errno.zig" - "os/netbsd/index.zig" "os/path.zig" "os/time.zig" "os/uefi.zig" + "os/windows.zig" "os/windows/advapi32.zig" "os/windows/error.zig" - "os/windows/index.zig" "os/windows/kernel32.zig" "os/windows/ntdll.zig" "os/windows/ole32.zig" "os/windows/shell32.zig" - "os/windows/tls.zig" "os/windows/util.zig" "os/zen.zig" "pdb.zig" "priority_queue.zig" - "rand/index.zig" + "rand.zig" "rand/ziggurat.zig" "segmented_list.zig" "sort.zig" "special/bootstrap.zig" "special/bootstrap_lib.zig" + "special/bootstrap_windows_tls.zig" "special/build_runner.zig" "special/builtin.zig" + "special/compiler_rt.zig" "special/compiler_rt/addXf3.zig" "special/compiler_rt/aulldiv.zig" "special/compiler_rt/aullrem.zig" @@ -656,7 +656,6 @@ set(ZIG_STD_FILES "special/compiler_rt/floatuntidf.zig" "special/compiler_rt/floatuntisf.zig" "special/compiler_rt/floatuntitf.zig" - "special/compiler_rt/index.zig" "special/compiler_rt/muloti4.zig" "special/compiler_rt/multi3.zig" "special/compiler_rt/truncXfYf2.zig" @@ -674,10 +673,11 @@ set(ZIG_STD_FILES "special/test_runner.zig" "spinlock.zig" "statically_initialized_mutex.zig" + "std.zig" "testing.zig" "unicode.zig" + "zig.zig" "zig/ast.zig" - "zig/index.zig" "zig/parse.zig" "zig/parse_string_literal.zig" "zig/render.zig" diff --git a/build.zig b/build.zig index 756ec53708..6acf08a0e5 100644 --- a/build.zig +++ b/build.zig @@ -115,9 +115,9 @@ pub fn build(b: *Builder) !void { test_step.dependOn(tests.addPkgTests(b, test_filter, "test/stage1/behavior.zig", "behavior", "Run the behavior tests", modes)); - test_step.dependOn(tests.addPkgTests(b, test_filter, "std/index.zig", "std", "Run the standard library tests", modes)); + test_step.dependOn(tests.addPkgTests(b, test_filter, "std/std.zig", "std", "Run the standard library tests", modes)); - test_step.dependOn(tests.addPkgTests(b, test_filter, "std/special/compiler_rt/index.zig", "compiler-rt", "Run the compiler_rt tests", modes)); + test_step.dependOn(tests.addPkgTests(b, test_filter, "std/special/compiler_rt.zig", "compiler-rt", "Run the compiler_rt tests", modes)); test_step.dependOn(tests.addCompareOutputTests(b, test_filter, modes)); test_step.dependOn(tests.addBuildExampleTests(b, test_filter, modes)); diff --git a/doc/langref.html.in b/doc/langref.html.in index 9dc0a31b23..b816d65289 100644 --- a/doc/langref.html.in +++ b/doc/langref.html.in @@ -6116,7 +6116,7 @@ test "main" { {#header_close#} {#header_open|@frameAddress#} -
{#syntax#}@frameAddress(){#endsyntax#}
+
{#syntax#}@frameAddress() usize{#endsyntax#}

This function returns the base pointer of the current stack frame.

@@ -6482,17 +6482,18 @@ test "call foo" { {#header_close#} {#header_open|@returnAddress#} -
{#syntax#}@returnAddress(){#endsyntax#}
+
{#syntax#}@returnAddress() usize{#endsyntax#}

- This function returns a pointer to the return address of the current stack - frame. + This function returns the address of the next machine code instruction that will be executed + when the current function returns.

The implications of this are target specific and not consistent across all platforms.

- This function is only valid within function scope. + This function is only valid within function scope. If the function gets inlined into + a calling function, the returned address will apply to the calling function.

{#header_close#} {#header_open|@setAlignStack#} @@ -6785,7 +6786,6 @@ pub const TypeId = enum { Enum, Union, Fn, - Namespace, Block, BoundFn, ArgTuple, @@ -6820,7 +6820,6 @@ pub const TypeInfo = union(TypeId) { Enum: Enum, Union: Union, Fn: Fn, - Namespace: void, BoundFn: Fn, ArgTuple: void, Opaque: void, @@ -6829,18 +6828,18 @@ pub const TypeInfo = union(TypeId) { pub const Int = struct { is_signed: bool, - bits: u8, + bits: comptime_int, }; pub const Float = struct { - bits: u8, + bits: comptime_int, }; pub const Pointer = struct { size: Size, is_const: bool, is_volatile: bool, - alignment: u32, + alignment: comptime_int, child: type, pub const Size = enum { @@ -6851,7 +6850,7 @@ pub const TypeInfo = union(TypeId) { }; pub const Array = struct { - len: usize, + len: comptime_int, child: type, }; @@ -6863,7 +6862,7 @@ pub const TypeInfo = union(TypeId) { pub const StructField = struct { name: []const u8, - offset: ?usize, + offset: ?comptime_int, field_type: type, }; @@ -6884,7 +6883,7 @@ pub const TypeInfo = union(TypeId) { pub const Error = struct { name: []const u8, - value: usize, + value: comptime_int, }; pub const ErrorSet = struct { @@ -6893,7 +6892,7 @@ pub const TypeInfo = union(TypeId) { pub const EnumField = struct { name: []const u8, - value: usize, + value: comptime_int, }; pub const Enum = struct { @@ -8167,17 +8166,18 @@ coding style.