# stage2: comptime function calls · gitcafe/zig

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

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

Visibility: public

Requested revision: fea8659b82ea1a785f933c58ba9d65ceb05a4094

Requested commit: fea8659b82ea1a785f933c58ba9d65ceb05a4094

Commit: fea8659b82ea1a785f933c58ba9d65ceb05a4094

Tree: 91d33abe8ae357bc5aecc06e9fd2423bd83a10a8

Author: Andrew Kelley

Committer: Andrew Kelley

## Message

```
stage2: comptime function calls

 * Function calls that happen in a comptime scope get called at
   compile-time. We do this by putting the parameters in place as
   constant values and then running regular function analysis on the
   body.
 * Added `Scope.Block.dump()` for debugging purposes.
 * Fixed some code to call `identifierTokenString` rather than
   `tokenSlice`, making it work for `@""` syntax.
 * Implemented `Value.copy` for big integers.

Follow-up issues to tackle:
 * Adding compile errors to the callsite instead of the callee Decl.
 * Proper error notes for "called from here".
   - Related: #7555
 * Branch quotas.
 * ZIR support?

```

## Parents

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

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