| Age | Commit message (Collapse) | Author | |
|---|---|---|---|
| 2021-01-19 | SPIR-V: Add glsl450 and vulkan spir-v operating system definitions | Robin Voetter | |
| 2021-01-19 | SPIR-V: Initial architecture definitions and setup | Robin Voetter | |
| 2021-01-11 | Merge branch 'Stage2 begin implementing container types' | Andrew Kelley | |
| 2021-01-02 | convert more {} to {d} and {s} | Andrew Kelley | |
| 2021-01-01 | std: have std.meta.fieldInfo take an enum rather than a string | daurnimator | |
| 2020-12-31 | stage2: compile error for invalid `var` type | Andrew Kelley | |
| 2020-12-31 | stage2: no Payload for Type.Tag.inferred_alloc | Andrew Kelley | |
| Simpler, less memory usage. The Value has all the info needed. | |||
| 2020-12-31 | stage2: inferred local variables | Andrew Kelley | |
| This patch introduces the following new things: Types: - inferred_alloc - This is a special value that tracks a set of types that have been stored to an inferred allocation. It does not support most of the normal type queries. However it does respond to `isConstPtr`, `ptrSize`, `zigTypeTag`, etc. - The payload for this type simply points to the corresponding Value payload. Values: - inferred_alloc - This is a special value that tracks a set of types that have been stored to an inferred allocation. It does not support any of the normal value queries. ZIR instructions: - store_to_inferred_ptr, - Same as `store` but the type of the value being stored will be used to infer the pointer type. - resolve_inferred_alloc - Each `store_to_inferred_ptr` puts the type of the stored value into a set, and then `resolve_inferred_alloc` triggers peer type resolution on the set. The operand is a `alloc_inferred` or `alloc_inferred_mut` instruction, which is the allocation that needs to have its type inferred. Changes to the C backend: * Implements the bitcast instruction. If the source and dest types are both pointers, uses a cast, otherwise uses memcpy. * Tests are run with -Wno-declaration-after-statement. Someday we can conform to this but not today. In ZIR form it looks like this: ```zir fn_body main { // unanalyzed %0 = dbg_stmt() =>%1 = alloc_inferred() %2 = declval_in_module(Decl(add)) %3 = deref(%2) %4 = param_type(%3, 0) %5 = const(TypedValue{ .ty = comptime_int, .val = 1}) %6 = as(%4, %5) %7 = param_type(%3, 1) %8 = const(TypedValue{ .ty = comptime_int, .val = 2}) %9 = as(%7, %8) %10 = call(%3, [%6, %9], modifier=auto) =>%11 = store_to_inferred_ptr(%1, %10) =>%12 = resolve_inferred_alloc(%1) %13 = dbg_stmt() %14 = ret_type() %15 = const(TypedValue{ .ty = comptime_int, .val = 3}) %16 = sub(%10, %15) %17 = as(%14, %16) %18 = return(%17) } // fn_body main ``` I have not played around with very many test cases yet. Some interesting ones that I want to look at before merging: ```zig var x = blk: { var y = foo(); y.a = 1; break :blk y; }; ``` In the above test case, x and y are supposed to alias. ```zig var x = if (bar()) blk: { var y = foo(); y.a = 1; break :blk y; } else blk: { var z = baz(); z.b = 1; break :blk z; }; ``` In the above test case, x, y, and z are supposed to alias. I also haven't tested with `var` instead of `const` yet. | |||
| 2020-12-30 | stage2: rework Value Payload layout | Andrew Kelley | |
| This is the same as the previous commit but for Value instead of Type. Add `Value.castTag` and note that it is preferable to call than `Value.cast`. This matches other abstractions in the codebase. Added a convenience function `Value.Tag.create` which really cleans up the callsites of creating `Value` objects. `Value` tags can now share payload types. This is in preparation for another improvement that I want to do. | |||
| 2020-12-30 | stage2: rework Type Payload layout | Andrew Kelley | |
| Add `Type.castTag` and note that it is preferable to call than `Type.cast`. This matches other abstractions in the codebase. Added a convenience function `Type.Tag.create` which really cleans up the callsites of creating `Type` objects. `Type` payloads can now share types. This is in preparation for another improvement that I want to do. | |||
| 2020-12-28 | stage2: add extern functions | Andrew Kelley | |
| and improve the C backend enough to support Hello World (almost) | |||
| 2020-12-09 | Change tag returned by zigTagType for c_longdouble to Float. | antlilja | |
| Function was returning Int before. | |||
| 2020-11-19 | Add builtin.Signedness, use it instead of is_signed | Tadeo Kondrak | |
| 2020-11-18 | stage2: handle opaque containers | Vexu | |
| 2020-11-17 | stage2: initial container astgen | Vexu | |
| 2020-11-15 | stage2: outline container types | Vexu | |
| 2020-11-12 | stage2 ARM & AArch64: ensure correct function alignment | joachimschmidt557 | |
| 2020-10-30 | stage2: implement switch validation for integers | Vexu | |
| 2020-10-12 | Rename .macosx to .macos | Vignesh Rajagopalan | |
| 2020-09-30 | stage2: struct type field access | Vexu | |
| 2020-09-30 | stage2: very basic imports | Vexu | |
| 2020-09-30 | stage2: add import builtin stub | Vexu | |
| 2020-09-21 | rename src-self-hosted/ to src/ | Andrew Kelley | |
