| author | |
| committer | |
| log | cb46d0b5b0d1d83856adab34b461049f5cfac019 |
| tree | b1aff76b3fd220242a9bc0cc265cfbf28dd70477 |
| parent | ccc8e9f4c328cb29fa7f21101d8c20fd23e4942a |
3 files changed, 10 insertions(+), 20 deletions(-)
README.md+4-4| ... | ... | @@ -45,10 +45,10 @@ compromises backward compatibility. |
| 45 | 45 | ### Current Status |
| 46 | 46 | |
| 47 | 47 | * Have a look in the examples/ folder to see some code examples. |
| 48 | * Some language features available such as loops, inline assembly, expressions, | |
| 49 | literals, functions, importing other files. | |
| 50 | * Only Linux x86_64 is supported. | |
| 51 | * Only building for the native target is supported. | |
| 48 | * Basic language features available such as loops, inline assembly, | |
| 49 | expressions, literals, functions, importing, structs, enums. | |
| 50 | * Linux x86_64 is supported. | |
| 51 | * Building for the native target is supported. | |
| 52 | 52 | * Optimized machine code that Zig produces is indistinguishable from |
| 53 | 53 | optimized machine code produced from equivalent C program. |
| 54 | 54 | * Zig can generate dynamic libraries, executables, object files, and C |
src/codegen.cpp+1-2| ... | ... | @@ -2748,8 +2748,7 @@ void codegen_add_root_code(CodeGen *g, Buf *src_dir, Buf *src_basename, Buf *sou |
| 2748 | 2748 | g->bootstrap_import = add_special_code(g, "bootstrap.zig"); |
| 2749 | 2749 | } |
| 2750 | 2750 | |
| 2751 | // TODO re-enable this | |
| 2752 | //add_special_code(g, "builtin.zig"); | |
| 2751 | add_special_code(g, "builtin.zig"); | |
| 2753 | 2752 | } |
| 2754 | 2753 | |
| 2755 | 2754 | if (g->verbose) { |
test/run_tests.cpp+5-14| ... | ... | @@ -1033,19 +1033,6 @@ fn print_ok(val: #typeof(x)) -> #typeof(foo) { |
| 1033 | 1033 | const foo : i32 = 0; |
| 1034 | 1034 | )SOURCE", "OK\n"); |
| 1035 | 1035 | |
| 1036 | add_simple_case("enum with void types", R"SOURCE( | |
| 1037 | use "std.zig"; | |
| 1038 | enum Foo { A, B, C, D, } | |
| 1039 | pub fn main(argc: isize, argv: &&u8, env: &&u8) -> i32 { | |
| 1040 | const foo : Foo = Foo.B; | |
| 1041 | if (foo != Foo.B) { | |
| 1042 | print_str("BAD\n"); | |
| 1043 | } | |
| 1044 | print_str("OK\n"); | |
| 1045 | return 0; | |
| 1046 | } | |
| 1047 | )SOURCE", "OK\n"); | |
| 1048 | ||
| 1049 | 1036 | add_simple_case("enum type", R"SOURCE( |
| 1050 | 1037 | use "std.zig"; |
| 1051 | 1038 | |
| ... | ... | @@ -1070,7 +1057,11 @@ enum Bar { |
| 1070 | 1057 | pub fn main(argc: isize, argv: &&u8, env: &&u8) -> i32 { |
| 1071 | 1058 | const foo1 = Foo.One(13); |
| 1072 | 1059 | const foo2 = Foo.Two(Point { .x = 1234, .y = 5678, }); |
| 1073 | const bar = Bar.A; | |
| 1060 | const bar = Bar.B; | |
| 1061 | ||
| 1062 | if (bar != Bar.B) { | |
| 1063 | print_str("BAD\n"); | |
| 1064 | } | |
| 1074 | 1065 | |
| 1075 | 1066 | if (#value_count(Foo) != 3) { |
| 1076 | 1067 | print_str("BAD\n"); |