# frontend: rework \`@embedFile\` for incremental compilation · gitcafe/zig

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

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

Visibility: public

Requested revision: 411fcd22abe5348271669e7673006421d2d7f195

Requested commit: 411fcd22abe5348271669e7673006421d2d7f195

Commit: 411fcd22abe5348271669e7673006421d2d7f195

Tree: 8e893758efeebb1eb50cf87e8d7a898eb62c40f6

Author: Andrew Kelley

Committer: Andrew Kelley

## Message

```
frontend: rework `@embedFile` for incremental compilation

This feature was made to work with the legacy incremental compilation
mechanism which is being reworked.

This commit regresses the ability to update files used with `@embedFile`
while the compiler is running.

In exchange, we get these benefits:
* The embedded file contents are copied directly into InternPool rather
  than there being an extra allocation and memcpy.
* The EmbedFile struct, which represents a long-lived object, is made
  more serialization friendly.
* Eliminate the creation and use of a Decl as an anonymous decl.

When implementing the new incremental compilation mechanism,
functionality will need to be added back for handling `@embedFile`.

```

## Parents

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

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