aboutsummaryrefslogtreecommitdiff
path: root/src/InternPool.zig
AgeCommit message (Collapse)Author
2023-06-10InternPool: add a slice encodingAndrew Kelley
This uses the data field to reference its pointer field type, which allows for efficient and infallible access of a slice type's pointer type.
2023-06-10stage2: add tmp_hack_arena for the InternPool transitionAndrew Kelley
Temporarily used for some unfortunate allocations made by backends that need to construct pointer types that can't be represented by the InternPool. Once all types are migrated to be stored in the InternPool, this can be removed.
2023-06-10InternPool: add a dump functionAndrew Kelley
So we can see stats
2023-06-10stage2: migrate many pointer types to the InternPoolAndrew Kelley
2023-06-10InternPool: enhance integer valuesAndrew Kelley
The Key struct now has a Storage tagged union which can store a u64, i64, or big int. This is needed so that indexToKey can be implemented for integers stored compactly in the data structure.
2023-06-10InternPool: add the missing pointer dataAndrew Kelley
2023-06-10stage2: move many Type encodings to InternPoolAndrew Kelley
Notably, `vector`. Additionally, all alternate encodings of `pointer`, `optional`, and `array`.
2023-06-10Type.isSlice: make it InternPool awareAndrew Kelley
2023-06-10stage2: move most simple values to InternPoolAndrew Kelley
2023-06-10InternPool: implement resolveTypeFieldsAndrew Kelley
2023-06-10stage2: add `interned` AIR tagAndrew Kelley
This required additionally passing the `InternPool` into some AIR methods. Also, implement `Type.isNoReturn` for interned types.
2023-06-10InternPool: flesh out some of the implementationsAndrew Kelley
* hashing * equality * encoding
2023-06-10stage2: start the InternPool transitionAndrew Kelley
Instead of doing everything at once which is a hopelessly large task, this introduces a piecemeal transition that can be done in small increments at a time. This is a minimal changeset that keeps the compiler compiling. It only uses the InternPool for a small set of types. Behavior tests are not passing. Air.Inst.Ref and Zir.Inst.Ref are separated into different enums but compile-time verified to have the same fields in the same order. The large set of changes is mainly to deal with the fact that most Type and Value methods now require a Module to be passed in, so that the InternPool object can be accessed.
2022-12-17std.builtin: rename Type.UnionField and Type.StructField's field_type to typer00ster91
2022-11-18run zig fmt on everything checked by CIStevie Hryciw
2022-04-06stage2: rename InternArena to InternPoolAndrew Kelley