vx-lang / vx-lang/Vx

vector types · phase 7: placement under `unsafe`

Open
#480 1 comment 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

core-lang enhancement
Dominant language
Rust
Stars
14
Forks
2
Avg merge
12h 42m
Merged PRs (30d)
61

Description

Phase 7 of docs/discussions/design-vector-types.md: a raw pointer into a device space dereferenced on the host is a placement error inside unsafe.

Type::Pointer has an Option<MemorySpace> slot, and nothing fills it: the parser passes None (src/parser/types.rs:169), no other site in the tree constructs a pointer with Some(..), and the deref check destructures the space away, binding Type::Pointer(t, _, _) (src/hir/check/access.rs:906). So this phase first decides the spelling of a pointer's memory space, then whether the deref check consults it. Report before implementing if the spelling is contentious.

Blocked on Vx#478.

Contributor guide

No contributing guide indexed for this repository

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Read docs/discussions/design-vector-types.md and first resolve the dependency on Vx#478. Then inspect src/parser/types.rs:169 and src/hir/check/access.rs:906 to understand how pointer memory spaces are currently represented and ignored during dereference checks. Report before implementing if the pointer-space spelling is contentious; done means the representation and unsafe placement check are agreed and implemented.

Written by the indexing model from the issue text.

Assessment

Tech stack
rust
Domain
compilers
Issue type
Feature
Difficulty
5/5
Estimated time
Over a week
Activity status
Active
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.