There was missing incremental compilation logic in the MachO linker
code, causing test failures. With this logic ported over from the
corresponding ELF logic, tests pass again.
Previously the frontend incorrectly called freeDecl for structs, which
never got allocateDecl called for them. There was simply a missing check
for hasCodeGenBits().
* Advance line and PC prior to ending sequence in debug line program
for a fn_decl. This is equivalent to closing scope in the debugger
and without it, the debugger will not map source-to-address info
as a result will not print the source when breaking at a symbol.
* Fix debug aranges sentinels to be of the size as the actual tuple
descriptor (assuming segment selector to be ommitted). In summary,
the sentinels were 32bit 0s, whereas they ought to be 64bit 0s.
* Make naming of symbols in the binary more consistent by prefixing
each symbol name with an underscore '_'.
Conflicts:
* build.zig
* src/Compilation.zig
* src/codegen/spirv/spec.zig
* src/link/SpirV.zig
* test/stage2/darwin.zig
- this one might be problematic; start.zig looks for `main` in the
root source file, not `_main`. Not sure why there is an underscore
there in master branch.
As it stands, the backend is incomplete, and there is no active contributor,
making it dead weight.
However, anyone is free to resurrect this backend at any time.
Just like when new parse errors occur during an update, when new AstGen
errors occur during an update, we do not reveal compile errors for Decl
objects which are inside of a newly failed File. Once the File passes
AstGen successfully, it will be compared with the previously succeeded
ZIR and the saved Decl compile errors will be handled properly.
Use .bold instead of .white, the effect is the same for light-on-dark
terminals but greatly improves the readability for dark-on-light ones.
Closes#8761
Previously, compile log stored full SrcLoc info, which included absolute
AST node index. This becomes invalid after an incremental compilation.
To make it survive incremental compilation, store an offset from parent
Decl instead.
* Do not report export collision errors until the very end, because it
is possible, during an update, for a new export to be added before an
old one is semantically analyzed to be deleted. In such a case there
should be no compile error.
- Likewise we defer emitting exports until the end when we know for
sure what will happen.
* Sema: Fix not adding a Decl dependency on imported files.
* Sema: Properly add Decl dependencies for all identifier and namespace
lookups.
* After semantic analysis for a Decl, if it is still marked as
`in_progress`, change it to `dependency_failure` because if the Decl
itself failed, it would have already been changed during the call to
add the compile error.
* std: fix overflow in math.scalbn32
* std: rewrite math.scalbn to be generic
* std: support f128 in math.isNormal
* std: enable f128 tests in math.scalbn
we only effectively need 1 control bit to represent 2 special states for
the metadata (free and tombstone)
this should reduce the number of actual element equality tests, but since
it's very low already, the impact is negligible
The `1 - shift` expression was computed using small unsigned types and
then casted to i32, producing either an underflow error or an incorrect
result.
Reported by `@notviri` in #8733
There is a lot left to be desired for this tool, as currently dependencies of extensions and dependencies
of capabilities on extensions are not included:
- There is no machine-readable definition of dependencies of extensions.
- A capability may depend on either of a multitude of extensions, which as of yet cannot be properly
modelled in the target system.
Originally, I thought that the dSYM bundle has to reside side-by-side
with the binary it carries the debugging information for. However, it
turns out macOS is clever enough that it auto-searches for matching
dSYM bundle based on the embedded UUID of the binary.
To verify this, run this on your macOS:
```
mdfind "com_apple_xcode_dsym_uuids == <UUID from LC_UUID>"
```
See [here] for more info.
[here]: https://developer.apple.com/documentation/xcode/adding-identifiable-symbol-names-to-a-crash-report
* Remove the ability for GenZir parent Scope to be null. Now there is a
Top Scope at the top.
* Introduce Scope.Namespace to contain a table of decl names in order
to emit a compile error for name conflicts.
* Fix use of invalid memory when reporting compile errors by
duplicating decl names into a temporary heap allocated buffer.
* Fix memory leak in while and for loops, not cleaning up their
labeled_breaks and store_to_block_ptr_list arrays.
* Fix stage2 test cases because now the source location of redundant
comptime keyword compile errors is improved.
* Implement compile error for local variable shadowing declaration.