diff options
| author | 2026-11-11 22:28:13 +0000 | |
|---|---|---|
| committer | 2026-11-11 22:47:34 +0000 | |
| commit | cb070b2d3f2b6e241e3be1b7e0eeb90fc755255f (patch) | |
| tree | c7d90c0abe9533c87d51b5196871846855efa1ba /src/generator.h | |
| download | thesis-cb070b2d3f2b6e241e3be1b7e0eeb90fc755255f.tar.gz | |
Diffstat (limited to 'src/generator.h')
| -rw-r--r-- | src/generator.h | 21 |
1 files changed, 21 insertions, 0 deletions
diff --git a/src/generator.h b/src/generator.h new file mode 100644 index 0000000..cab8687 --- /dev/null +++ b/src/generator.h | |||
| @@ -0,0 +1,21 @@ | |||
| 1 | #ifndef INCLUDED_GENERATOR_H | ||
| 2 | #define INCLUDED_GENERATOR_H | ||
| 3 | |||
| 4 | #include "compensations.h" | ||
| 5 | #include "arena.h" | ||
| 6 | |||
| 7 | struct replacement { | ||
| 8 | struct sv old; // replace this | ||
| 9 | struct sv new; // with this | ||
| 10 | }; | ||
| 11 | |||
| 12 | struct replacements { | ||
| 13 | struct replacement *items; | ||
| 14 | uint32_t count; | ||
| 15 | uint32_t capacity; | ||
| 16 | }; | ||
| 17 | |||
| 18 | struct replacements generate_replacements (struct arena *, const struct compensations *); | ||
| 19 | void write_code_with_replacements (int fd, struct sv original, const struct replacements *); | ||
| 20 | |||
| 21 | #endif // INCLUDED_GENERATOR_H | ||
