aboutsummaryrefslogtreecommitdiff
path: root/src/analyze.cpp
AgeCommit message (Collapse)Author
2020-01-16allow non-exhaustive enums with no fieldsVexu
2020-01-16turn panics into compile errors, require at least 1 field in non-exhaustive enumVexu
2020-01-15small fixesVexu
* error for '_' prong on exhaustive enum * todo panic for `@tagName` on non-exhaustive enum * don't require '_' field on tagged unions
2020-01-15require size for non-exhaustive enumsVexu
2020-01-15implement non-exhaustive enumsVexu
2020-01-14Fix ICE when BoundFn are passed as parametersLemonBoy
Closes #4022 Closes #3699
2020-01-13add an extra assertAndrew Kelley
2020-01-10Don't special-case `builtin` too muchLemonBoy
Let's use the usual declaration-searching mechanism that resolves the `usingnamespace` declarations on the go instead of directly peeking into the symbol table. Fixes #4134
2020-01-09New @export() handlingLemonBoy
Use a struct as second parameter to be future proof (and also allows to specify default values for the parameters) Closes #2679 as it was just a matter of a few lines of code.
2020-01-08Propagate more failures upwardsLemonBoy
Fixes #4112
2020-01-06fix test suite regressionsAndrew Kelley
2020-01-06remove stdcallcc, extern, nakedcc from stage1; zig fmt rewritesAndrew Kelley
2020-01-06Merge branch 'cc-work' of https://github.com/LemonBoy/zig into LemonBoy-cc-workAndrew Kelley
2020-01-03Correct evaluation of optional type alignmentLemonBoy
The lazy logic was too oversimplified and produced a different result than the one computed later causing all kinds of problems. Closes #4013
2020-01-02Implement Thiscall CCLemonBoy
2020-01-02Catch more errors during the type resolution phaseLemonBoy
Returning the uninitialized/stale error condition made the compiler turn a blind eye to some problems.
2020-01-02Implement the callconv() annotationLemonBoy
2019-12-30fix comparing comptime_int against undefined literalAndrew Kelley
closes #4004
2019-12-30Resolve more types as neededLemonBoy
Closes #3994
2019-12-22report compile errors instead of crashing when frame is invalidAndrew Kelley
2019-12-17Make sure the fields array is always non-nullLemonBoy
Fixes #3497
2019-12-16allow comparison of any numeric typesAndrew Kelley
2019-12-15improve extern enumVexu
2019-12-15Generate the fn pointers into the correct address spaceLemonBoy
Fixes #3645
2019-12-12un-special-case startup code in the std libAndrew Kelley
Previously, the compiler had special logic to determine whether to include the startup code, which was in `std/special/start.zig`. Now, the file is moved to `std/start.zig`, and there is no special logic in the compiler. Instead, the standard library unconditionally imports the `start.zig` file, which then has a `comptime` block that does the logic of determining what, if any, start symbols to export. Instead of `start.zig` being in its own special package, it is just another normal file that is part of the standard library. `std.builtin.TestFn` is now part of the standard library rather than specially generated by the compiler.
2019-12-10Replace typeOf with TypeOf in stage0Robin Voetter
2019-12-09remove var args from the languageAndrew Kelley
closes #208
2019-12-08implement tuple concatenationAndrew Kelley
2019-12-08tuple detection does not require AST nodeAndrew Kelley
2019-12-08Make array types (quasi-)lazyLemonBoy
Fixes #3843
2019-12-08fix anon struct literal field initialized with fn callAndrew Kelley
2019-12-08add syntax for comptime struct fieldsAndrew Kelley
2019-12-08implement comptime struct fieldsAndrew Kelley
2019-12-06remove `@inlineCall` from zigAndrew Kelley
2019-12-05implement `@call`Andrew Kelley
closes #3732
2019-12-03move more startup code to std libVexu
2019-12-03Pick up WinMain with proper CCLemonBoy
2019-12-01Merge remote-tracking branch 'origin/kill-ConstGlobalRefs' into ↵Andrew Kelley
remove-array-type-coercion
2019-12-01sometimes free stuff from Zig IR pass 1Andrew Kelley
Total bytes used in stage1 std lib tests: 3.418 -> 3.198 GiB (saving 225 MiB) There's still this from pass 1 not getting freed: Const: 6909049 items, 72 bytes each, total 474.407 MiB This is due to 2 things hanging on to references to IrAnalyze pointers: * ZigVar->owner_exec->analysis * LazyValue->ira The LazyValue one could be solved by memoizing the results after the lazy value is resolved, and then it could unref the IrAnalyze. ZigVars that are determined to be comptime const, could have their const_value set to that value, instead of using the mem_slot_index mechanism. This would prevent an IrAnalyze ref in some cases.
2019-12-01inline ConstGlobalRefs into ZigValueAndrew Kelley
Having ConstGlobalRefs be a pointer in ZigValue was a hack that caused plenty of bugs. It was used to work around difficulties in type coercing array values into slices. However, after #3787 is merged, array values no longer type coerce into slices, and so this provided an opportunity to clean up the code. This has the nice effect of reducing stage1 peak RAM usage during the std lib tests from 3.443 GiB to 3.405 GiB (saving 39 MiB). There is one behavior test failing in this branch, which I plan to debug after merging #3787.
2019-11-30Merge pull request #3284 from Sahnvour/export_variablesAndrew Kelley
Improved support for exporting variables
2019-11-25Merge pull request #3774 from mikdusan/stage1-intern-housekeepingMichael Dusan
stage1: consolodate interning
2019-11-25move logic to the appropriate layers; add new compile errorAndrew Kelley
2019-11-25stage1: consolodate interningMichael Dusan
- merge const_void_val → intern.x_void - move const_zero_byte → intern.zero_byte - wrap intern access
2019-11-25unembed ZigValue from IrInstructionMichael Dusan
2019-11-25rename ConstExprValue → ZigValueMichael Dusan
2019-11-25more sentinel-terminated pointers std lib integrationAndrew Kelley
See #3767
2019-11-24make std.mem.toSlice use null terminated pointersAndrew Kelley
and fix the fallout
2019-11-24Merge remote-tracking branch 'origin/master' into null-terminated-pointersAndrew Kelley
2019-11-24export: check variable typeSahnvour
also fixed existing occurrences