Skip to content

Conversation

@steveklabnik
Copy link
Collaborator

Add machine code generation for pointer intrinsics in both x86_64 and aarch64 backends:

  • @ptr_read: Load value from pointer address
  • @ptr_write: Store value to pointer address
  • @ptr_offset: Pointer arithmetic (ptr + offset * element_size)
  • @ptr_to_int: Convert pointer to u64
  • @int_to_ptr: Convert u64 to pointer
  • @addr_of/@addr_of_mut: Get address of local variable

Also adds type_size_bytes() helper function for calculating byte sizes needed for pointer arithmetic.

Closes: rue-bk7s

🤖 Generated with Claude Code

Add machine code generation for pointer intrinsics in both x86_64 and
aarch64 backends:

- @ptr_read: Load value from pointer address
- @ptr_write: Store value to pointer address  
- @ptr_offset: Pointer arithmetic (ptr + offset * element_size)
- @ptr_to_int: Convert pointer to u64
- @int_to_ptr: Convert u64 to pointer
- @addr_of/@addr_of_mut: Get address of local variable

Also adds type_size_bytes() helper function for calculating byte sizes
needed for pointer arithmetic.

Closes: rue-bk7s

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <[email protected]>
@steveklabnik steveklabnik enabled auto-merge January 4, 2026 20:15
@steveklabnik steveklabnik added this pull request to the merge queue Jan 4, 2026
Merged via the queue into rue-language:trunk with commit 9d2783c Jan 4, 2026
4 checks passed
@steveklabnik steveklabnik deleted the steveklabnik/push-prwyqyuvroqu branch January 4, 2026 20:26
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