# compiler: start handling anonymous decls differently · gitcafe/zig

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

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

Visibility: public

Requested revision: c0b55125443cab63945205b2f7c66bf12cae71e1

Requested commit: c0b55125443cab63945205b2f7c66bf12cae71e1

Commit: c0b55125443cab63945205b2f7c66bf12cae71e1

Tree: c47592afbee6b860b6a611e594ab8e7ed732e621

Author: Andrew Kelley

Committer: Andrew Kelley

## Message

```
compiler: start handling anonymous decls differently

Instead of explicitly creating a `Module.Decl` object for each anonymous
declaration, each `InternPool.Index` value is implicitly understood to
be an anonymous declaration when encountered by backend codegen.

The memory management strategy for these anonymous decls then becomes to
garbage collect them along with standard InternPool garbage.

In the interest of a smooth transition, this commit only implements this
new scheme for string literals and leaves all the previous mechanisms in
place.

```

## Parents

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

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