# wasm: Use \`File.Index\` for symbol locations · gitcafe/zig

[View on GitCafe](https://git.cafe/gitcafe/zig/commit/0a030d6598a42eae6f6af829e03bba053336b51c)

Repository: [gitcafe/zig](https://git.cafe/gitcafe/zig)

Visibility: public

Requested revision: 0a030d6598a42eae6f6af829e03bba053336b51c

Requested commit: 0a030d6598a42eae6f6af829e03bba053336b51c

Commit: 0a030d6598a42eae6f6af829e03bba053336b51c

Tree: dc18ba8e2eebf6b1b13c5a17bf317e7aa792b928

Author: Luuk de Gram

Committer: Luuk de Gram

## Message

```
wasm: Use `File.Index` for symbol locations

Rather than using the optional, we now directly use `File.Index` which
can already represent an unknown file due to its `.null` value. This
means we do not pay for the memory cost.

This type of index is now used for:
- SymbolLoc
- Key of the functions map
- InitFunc

Now we can simply pass things like atom.file, object.file, loc.file etc
whenever we need to access its representing object file which makes it
a lot easier.

```

## Parents

- [94f3a18c88eaee9a36a08a1b00c9df0584a01b05](https://git.cafe/gitcafe/zig/commit/94f3a18c88eaee9a36a08a1b00c9df0584a01b05?format=markdown)

[Source at this commit](https://git.cafe/gitcafe/zig/tree/0a030d6598a42eae6f6af829e03bba053336b51c?format=markdown)
