0
Fork 0
mirror of https://codeberg.org/ziglang/zig synced 2026-11-18 07:05:05 +00:00
zig/src
Andrew Kelley 17eb24a7e4
move types from builtin to std
* All the data types from `@import("builtin")` are moved to
  `@import("std").builtin`. The target-related types are moved
  to `std.Target`. This allows the data types to have methods, such as
  `std.Target.current.isDarwin()`.
 * `std.os.windows.subsystem` is moved to
   `std.Target.current.subsystem`.
 * Remove the concept of the panic package from the compiler
   implementation. Instead, `std.builtin.panic` is always the panic
   function. It checks for `@hasDecl(@import("root"), "panic")`,
   or else provides a default implementation.

This is an important step for multibuilds (#3028). Without this change,
the types inside the builtin namespace look like different types, when
trying to merge builds with different target settings. With this change,
Zig can figure out that, e.g., `std.builtin.Os` (the enum type) from one
compilation and `std.builtin.Os` from another compilation are the same
type, even if the target OS value differs.
History 2019-10-23 19:09:49 -04:00
..
all_types.hpp move types from builtin to std 2019-10-23 19:09:49 -04:00
analyze.cpp move types from builtin to std 2019-10-23 19:09:49 -04:00
analyze.hpp move types from builtin to std 2019-10-23 19:09:49 -04:00
ast_render.cpp stage1 parser supports doc comments 2019-10-06 16:39:27 -04:00
ast_render.hpp translate-c: a little closer to self-hosted implementation 2019-04-25 00:06:54 -04:00
bigfloat.cpp fix NaN comparing equal to itself 2019-04-04 22:07:15 -04:00
bigfloat.hpp fix NaN comparing equal to itself 2019-04-04 22:07:15 -04:00
bigint.cpp Encapsulate bigint representation, assert on cast data loss 2019-08-23 11:14:08 -04:00
bigint.hpp Encapsulate bigint representation, assert on cast data loss 2019-08-23 11:14:08 -04:00
blake2.h stage1: import blake2b implementation 2018-09-05 23:23:11 -04:00
blake2b.c stage1: build blake code with -std=c99 2018-09-11 17:29:18 -04:00
buffer.cpp remove redundant assert 2019-09-22 15:58:57 -04:00
buffer.hpp generated docs: show doc comments on functions 2019-10-07 12:21:11 -04:00
c_tokenizer.cpp fix translate-c regression 2019-05-09 20:11:56 -04:00
c_tokenizer.hpp translate-c: enough C tokenization/parsing to handle shifting in macros 2019-05-09 12:48:38 -04:00
cache_hash.cpp add review changes 2019-05-29 14:39:13 -04:00
cache_hash.hpp stage1 caching system: detect problematic mtimes 2019-03-11 10:26:08 -04:00
codegen.cpp move types from builtin to std 2019-10-23 19:09:49 -04:00
codegen.hpp integrate stage1 progress display with semantic analysis 2019-10-22 17:52:12 -04:00
compiler.cpp zig additionally looks for lib/std/std.zig 2019-09-26 00:30:51 -04:00
compiler.hpp ability to target any glibc version 2019-07-07 17:56:08 -04:00
config.h.in add -DZIG_ENABLE_MEM_PROFILE option and -fmem-report flag 2019-10-19 03:23:23 -04:00
dump_analysis.cpp add -DZIG_ENABLE_MEM_PROFILE option and -fmem-report flag 2019-10-19 03:23:23 -04:00
dump_analysis.hpp proof of concept of stage1 doc generation 2019-10-04 20:18:06 -04:00
errmsg.cpp Fix the color of compiler messages for light-themed terminal. 2017-12-04 19:22:34 +09:00
errmsg.hpp use size_t for indexes 2016-09-19 11:54:01 -04:00
error.cpp move types from builtin to std 2019-10-23 19:09:49 -04:00
error.hpp translate-c: a little closer to self-hosted implementation 2019-04-25 00:06:54 -04:00
glibc.cpp rework the progress module and integrate with stage1 2019-10-17 20:20:22 -04:00
glibc.hpp rework the progress module and integrate with stage1 2019-10-17 20:20:22 -04:00
hash_map.hpp rewrite scope implementation 2016-12-01 21:08:12 -05:00
install_files.h update musl src to v1.1.24 2019-10-17 11:55:43 -04:00
ir.cpp move types from builtin to std 2019-10-23 19:09:49 -04:00
ir.hpp stage1 enhance IR print 2019-09-05 13:06:10 -04:00
ir_print.cpp reduce the size of IrInstruction by 8 bytes on 64 bit targets 2019-10-19 03:51:04 -04:00
ir_print.hpp add -DZIG_ENABLE_MEM_PROFILE option and -fmem-report flag 2019-10-19 03:23:23 -04:00
libc_installation.cpp Remove duplicate exe name with zig run 2019-06-17 14:10:10 -04:00
libc_installation.hpp fixed visibility of zig_libc_cc_print_file_name 2019-04-27 16:17:07 -05:00
link.cpp integrate stage1 progress display with semantic analysis 2019-10-22 17:52:12 -04:00
list.hpp pass param as ref in ZigList::append 2019-09-19 11:41:18 -04:00
main.cpp main.cpp: fix not ending progress node for zig build 2019-10-22 23:32:06 -04:00
memory_profiling.cpp add -DZIG_ENABLE_MEM_PROFILE option and -fmem-report flag 2019-10-19 03:23:23 -04:00
memory_profiling.hpp add -DZIG_ENABLE_MEM_PROFILE option and -fmem-report flag 2019-10-19 03:23:23 -04:00
os.cpp more helpful error message when failing to parse glibc abi.txt 2019-09-22 17:41:15 -04:00
os.hpp add -fdump-analysis to dump type information to json 2019-10-03 17:58:22 -04:00
parse_f128.c parse_f128.c: fix whitespace 2019-03-23 13:46:50 -04:00
parse_f128.h get rid of restrict; it's not supported by MSVC 2019-03-22 16:08:19 -04:00
parser.cpp remove pub syntax for container fields 2019-10-21 23:04:19 -04:00
parser.hpp remove namespace type; files are empty structs 2019-02-28 10:11:32 -05:00
range_set.cpp Fix computation of switch coverage 2019-09-23 16:13:28 -04:00
range_set.hpp better bigint/bigfloat implementation 2017-07-08 17:59:10 -04:00
softfloat.hpp depend on embedded SoftFloat-3d instead of __float128 2017-09-14 01:46:47 -04:00
target.cpp Merge pull request #3331 from meme/android-ndk 2019-09-28 13:30:19 -04:00
target.hpp Merge pull request #3331 from meme/android-ndk 2019-09-28 13:30:19 -04:00
tokenizer.cpp Merge pull request #3390 from nrdmn/unicode_character_literals 2019-10-09 13:25:41 -04:00
tokenizer.hpp stage1 parser supports doc comments 2019-10-06 16:39:27 -04:00
translate_c.cpp finish conversion of translate_c.cpp to use zig_clang.h 2019-10-02 19:21:40 -04:00
translate_c.hpp translate-c: unify API for self-hosted and C++ translate-c 2019-04-25 00:06:57 -04:00
userland.cpp integrate stage1 progress display with semantic analysis 2019-10-22 17:52:12 -04:00
userland.h move types from builtin to std 2019-10-23 19:09:49 -04:00
util.cpp add -DZIG_ENABLE_MEM_PROFILE option and -fmem-report flag 2019-10-19 03:23:23 -04:00
util.hpp add -DZIG_ENABLE_MEM_PROFILE option and -fmem-report flag 2019-10-19 03:23:23 -04:00
windows_com.hpp compiling on mingw is now supported (#1542) 2018-09-18 00:13:17 -04:00
windows_sdk.cpp fixed mingw compilation 2018-10-27 11:35:01 -04:00
windows_sdk.h self-hosted: add first compare-output test 2018-07-23 00:35:53 -04:00
zig_clang.cpp finish conversion of translate_c.cpp to use zig_clang.h 2019-10-02 19:21:40 -04:00
zig_clang.h finish conversion of translate_c.cpp to use zig_clang.h 2019-10-02 19:21:40 -04:00
zig_clang_cc1_main.cpp stage1: fix gcc 9.1.0 compiler error on archlinux 2019-09-19 23:30:48 -04:00
zig_clang_cc1as_main.cpp update clang driver code to llvm9 2019-07-19 18:07:31 -04:00
zig_clang_driver.cpp stage1: fix lost argv[0] 2019-09-22 11:21:22 -04:00
zig_llvm.cpp Add dlltool functionality 2019-10-12 10:56:16 +02:00
zig_llvm.h Add dlltool functionality 2019-10-12 10:56:16 +02:00