Does Array.index need to be a foreign import?

Aperta
#241 0 commenti 0 reazioni 0 assegnatari Vedi su GitHub

Nessuno ha ancora preso questa issue.

Valutazione

Difficoltà
4/5
Tempo stimato
3-5 giorni
Idoneità per principianti
35/100
Tipo di issue
Refactoring
Chiarezza
Abbastanza chiara
Stato di attività
Ferma
Ambito
backend

Direzione di ricerca

The issue names Array.index, length, and unsafeIndexImpl, and mentions the backend optimizer. Start by reading the implementation of Array.index and how its foreign import is used, then check whether the optimizer change described in the issue has landed. Done means determining whether the bounds check can be implemented in PureScript while preserving the expected behavior and enabling the stated optimization.

Scritto dal modello di indicizzazione a partire dal testo della issue.

Descrizione

The logic of Array.index can be implemented in terms of length and unsafeIndexImpl. Is it necessary for it to be foreign? In backend-optimizer, I'm preparing a change to inline the bounds check so that the Just allocation can be eliminated in some cases. If index bounds checking was implemented in PureScript rather than FFI, this would just work.

Lingua principale
PureScript
Stelle
58
Fork
70
Merge medio
2g 22h
PR unite (30g)
1

Preparare l'ambiente

  • Nessun Dockerfile né file Docker Compose
  • Ha un modello di pull request
  • Nessuna guida per i contributori

Come iniziare

  1. Leggi tutta la issue e poi la guida ai contributi del progetto.
  2. Commenta sulla issue per dire che te ne occupi tu — evita che due persone facciano lo stesso lavoro.
  3. Fai un fork del repository e lavora su un branch.
  4. Apri una pull request che faccia riferimento al numero della issue.

Altre issue di purescript/purescript-arrays

Tutte le issue di purescript/purescript-arrays

Issue simili

Altre issue su Backend & API Design

Ricevi le nuove issue nella tua casella

Un breve riepilogo di issue GitHub adatte ai principianti.