Skip to content

Compiler: simplify word size testing#508

Open
chqrlie wants to merge 1 commit intoc2lang:masterfrom
chqrlie:word-size
Open

Compiler: simplify word size testing#508
chqrlie wants to merge 1 commit intoc2lang:masterfrom
chqrlie:word-size

Conversation

@chqrlie
Copy link
Copy Markdown
Contributor

@chqrlie chqrlie commented Apr 18, 2026

  • add native_kind in ast_builder.Builder
  • group allocation stuff in TailAllocator as a member of ast_context.Context
  • add wordsize in ast_context.Context
  • move compiler sub-object creation after target analysis
  • use gen.targetInfo for word size in C Generator
  • add align member in Type.typebits, use for builtins, pointers and functions
  • initialize dummy slot 0 in pointer pool
  • move getWordSize() and getNativeKind() from global to ast_context
  • simplify size_analyser.sizeOfType: no reference to global needed
  • conversion_checker gets native_kind from builder/context
  • simplify getUnaryOpWidth, no global reference anymore

* add `native_kind` in `ast_builder.Builder`
* group allocation stuff in `TailAllocator` as a member of `ast_context.Context`
* add `wordsize` in `ast_context.Context`
* move compiler sub-object creation after target analysis
* use `gen.targetInfo` for word size in C Generator
* add `align` member in `Type.typebits`, use for builtins, pointers and functions
* initialize dummy slot 0 in pointer pool
* move `getWordSize()` and `getNativeKind()` from global to ast_context
* simplify `size_analyser.sizeOfType`: no reference to `global` needed
* conversion_checker gets `native_kind` from builder/context
* simplify `getUnaryOpWidth`, no global reference anymore
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant