authorgravatar for andrew@ziglang.orgAndrew Kelley <andrew@ziglang.org> 2016-01-11 20:43:48-07:00
committergravatar for andrew@ziglang.orgAndrew Kelley <andrew@ziglang.org> 2016-01-11 20:44:10-07:00
logcb46d0b5b0d1d83856adab34b461049f5cfac019
treeb1aff76b3fd220242a9bc0cc265cfbf28dd70477
parentccc8e9f4c328cb29fa7f21101d8c20fd23e4942a

fix not adding builtin functions code


3 files changed, 10 insertions(+), 20 deletions(-)

README.md+4-4
...@@ -45,10 +45,10 @@ compromises backward compatibility....@@ -45,10 +45,10 @@ compromises backward compatibility.
45### Current Status45### Current Status
4646
47 * Have a look in the examples/ folder to see some code examples.47 * Have a look in the examples/ folder to see some code examples.
48 * Some language features available such as loops, inline assembly, expressions,48 * Basic language features available such as loops, inline assembly,
49 literals, functions, importing other files.49 expressions, literals, functions, importing, structs, enums.
50 * Only Linux x86_64 is supported.50 * Linux x86_64 is supported.
51 * Only building for the native target is supported.51 * Building for the native target is supported.
52 * Optimized machine code that Zig produces is indistinguishable from52 * Optimized machine code that Zig produces is indistinguishable from
53 optimized machine code produced from equivalent C program.53 optimized machine code produced from equivalent C program.
54 * Zig can generate dynamic libraries, executables, object files, and C54 * 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,8 +2748,7 @@ void codegen_add_root_code(CodeGen *g, Buf *src_dir, Buf *src_basename, Buf *sou
2748 g->bootstrap_import = add_special_code(g, "bootstrap.zig");2748 g->bootstrap_import = add_special_code(g, "bootstrap.zig");
2749 }2749 }
27502750
2751 // TODO re-enable this2751 add_special_code(g, "builtin.zig");
2752 //add_special_code(g, "builtin.zig");
2753 }2752 }
27542753
2755 if (g->verbose) {2754 if (g->verbose) {
test/run_tests.cpp+5-14
...@@ -1033,19 +1033,6 @@ fn print_ok(val: #typeof(x)) -> #typeof(foo) {...@@ -1033,19 +1033,6 @@ fn print_ok(val: #typeof(x)) -> #typeof(foo) {
1033const foo : i32 = 0;1033const foo : i32 = 0;
1034 )SOURCE", "OK\n");1034 )SOURCE", "OK\n");
10351035
1036 add_simple_case("enum with void types", R"SOURCE(
1037use "std.zig";
1038enum Foo { A, B, C, D, }
1039pub 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 add_simple_case("enum type", R"SOURCE(1036 add_simple_case("enum type", R"SOURCE(
1050use "std.zig";1037use "std.zig";
10511038
...@@ -1070,7 +1057,11 @@ enum Bar {...@@ -1070,7 +1057,11 @@ enum Bar {
1070pub fn main(argc: isize, argv: &&u8, env: &&u8) -> i32 {1057pub fn main(argc: isize, argv: &&u8, env: &&u8) -> i32 {
1071 const foo1 = Foo.One(13);1058 const foo1 = Foo.One(13);
1072 const foo2 = Foo.Two(Point { .x = 1234, .y = 5678, });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 }
10741065
1075 if (#value_count(Foo) != 3) {1066 if (#value_count(Foo) != 3) {
1076 print_str("BAD\n");1067 print_str("BAD\n");