aboutsummaryrefslogtreecommitdiff
path: root/test/stage1/behavior.zig
AgeCommit message (Collapse)Author
2021-04-29move behavior tests from test/stage1/ to test/Andrew Kelley
And fix test cases to make them pass. This is in preparation for starting to pass behavior tests with self-hosted.
2021-04-29update behavior tests with respect to new builtin pkgAndrew Kelley
2021-04-29tests: prepare behavior tests for stage2Andrew Kelley
2021-03-02re-enable behavior tests: translate-c macrosAndrew Kelley
These were temporarily disabled in dd973fb365dbbe11ce5beac8b4889bfab3fddc4d and we forgot re-enable them until now.
2021-01-02std: Use {s} instead of {} when printing stringsLemonBoy
2020-11-29stage1: Add missing bitcast when rendering var ptrLemonBoy
Some types require this extra bitcast, eg. structs or unions with extra padding fields inserted by the compiler. Fixes #7250
2020-11-25stage1: Fix ICE when generating struct fields with paddingLemonBoy
Make gen_const_ptr_struct_recursive aware of the possible presence of some trailing padding by always bitcasting the pointer to its expected type. Not an elegant solution but makes LLVM happy and is consistent with how the other callsites are handling this case. Fixes #5398
2020-11-13stage1: Resolve ErrorUnion children typesLemonBoy
Since the code is accessing the abi_size field compute the full type size for both err_set_type and payload_type, not only for the latter.
2020-11-11stage1: Fix crash in comptime struct generationLemonBoy
Using the gen_index rather than the src_index is needed to handle structures containing zero-sized or comptime only types. Closes #7027
2020-11-10stage1: Fix comparison of unions containing zero-sized typesLemonBoy
The code tried to be too smart and skipped the equality (returning true) if the payload type was zero-sized. This optimization is completely wrong when the union payload is a metatype! Fixes #7047
2020-10-29stage1: Fix bug in internal string slicing (#6843)LemonBoy
Closes #6456
2020-10-29stage1: Fix small bug in pointer type analysisLemonBoy
A flag meant to catch recursively-defined types was never reset, leading the compiler to generate wrong answers when asked for its type/alignment. Closes #6850
2020-10-26add regression test for already fixed bugAndrew Kelley
closes #6781
2020-07-16add behavior tests fro macro translationsVexu
2020-06-24Fixed crash when resolving peer types of *[N:s]const T and [*:s]const TAlexandros Naskos
2020-06-18add tests for `@src`Vexu
2020-06-09Add basic tests for the new builtinsJakub Konka
2020-06-05stage1: fix constness in some corner casesMichael Dusan
- for one-possible-value types, ir_analyze_struct_field_ptr() no longer hardcodes const/volatile - when slicing arrays, ir_analyze_instruction_slice() no longer consults ConstValSpecialStatic closes #5474
2020-05-31stage1: fix unresolved inferred error setsxackus
2020-05-30Merge pull request #5184 from alexnask/typeof_extern_callVeikka Tuominen
Extern functions are now evaluated to undefined values at comptime in TypeOf calls.
2020-05-26Changed test name to reflect it only fixes #4328Alexandros Naskos
2020-05-18Updated testAlexandros Naskos
2020-05-18Narrow down behaviour test cases; this removes wasmtime-enabled check in testsJakub Konka
2020-04-27Added tests.Alexandros Naskos
2020-04-07fix lazy value in ir_analyze_instruction_elem_ptrxackus
2020-04-03stage1: add compile errors for sentinel slicingMichael Dusan
closes #3963
2020-03-30added unit tests to demonstrate #4769 and related bugsKelly Boothby
2020-03-03Merge remote-tracking branch 'origin/master' into llvm10Andrew Kelley
2020-02-25add test case to catch regression from previous commitAndrew Kelley
Once this test case is passing, previous commit can be re-added. Closes #4560
2020-02-25Merge remote-tracking branch 'origin/master' into llvm10Andrew Kelley
2020-02-24Merge pull request #4516 from xackus/remove-bytes-to-sliceAndrew Kelley
remove @bytesToSlice, @sliceToBytes from the language
2020-02-23remove @bytesToSlice, @sliceToBytes from tests, docsxackus
2020-02-21add regression test for already fixed bugAndrew Kelley
closes #3586
2020-01-30drop @newStackCallAndrew Kelley
this was causing unrelated behavior tests to fail. if this commit is reverted, the docs are good, but `@newStackCall` is already deprecated in favor of `@call`, supplying the `stack` property.
2019-12-08implement tuple concatenationAndrew Kelley
2019-12-06add regression test for fixed bugAndrew Kelley
closes #3742
2019-12-05implement `@call`Andrew Kelley
closes #3732
2019-11-18add regression test case. closes #2889Andrew Kelley
2019-11-18add regression test case. closes #3007Andrew Kelley
2019-10-10stage1: fix ir_resolve_str() to return sliceMichael Dusan
`ir_resolve_str()` bug returns array expression even when when sliced to a lesser length. Fix is to return array if slice.len == array.len, otherwise return slice. Bug report use-case is based on one builtin function. However, at least the following builtins were exposed to the bug: `@byteOffsetOf` `@cDefine` `@cImport` `@cInclude` `@cUndef` `@compileError` `@embedFile` `@export` `@fieldParentPtr` `@hasDecl` `@hasField` `@import` `@unionInit` closes #3384
2019-10-05fix container member access for fn/struct-fnMichael Dusan
- decls brought in via `usingnamespace` were not always found because lookup was performed directly against decl_table and use_decls was never consulted - fix to use find_container_decl() path instead - closes #3367
2019-09-27add regression test for alignment of constantsAndrew Kelley
closes #1741
2019-09-24add VarDecl support for struct-method call syntaxMichael Dusan
implements #3306
2019-09-21add behavior test for float widening f16 to f128Andrew Kelley
it's disabled on aarch64, see #3282
2019-09-21Adjust tests for AArch64LemonBoy
2019-09-21Fix generation of tail fields for packed structLemonBoy
2019-09-20add test case for already fixed bugAndrew Kelley
closes #3046
2019-09-18rework the implementationAndrew Kelley
* update documentation - move `@shuffle` to be sorted alphabetically - remove mention of LLVM - minor clarifications & rewording * introduce ir_resolve_vector_elem_type to avoid duplicate compile error message and duplicate vector element checking logic * rework ir_analyze_shuffle_vector to solve various issues * improve `@shuffle` to allow implicit cast of arrays * the shuffle tests weren't being run
2019-09-03Add @Type builtinJonathan Marler
2019-09-01add regression test for already fixed bugAndrew Kelley
closes #2692