Does Array.index need to be a foreign import?

Offen
#241 0 Kommentare 0 Reaktionen 0 zugewiesene Personen Auf GitHub ansehen

Dieses Issue hat noch niemand übernommen.

Bewertung

Schwierigkeit
4/5
Geschätzter Aufwand
3-5 Tage
Anfängerfreundlichkeit
35/100
Issue-Typ
Refactoring
Klarheit
Größtenteils klar
Aktivitätsstatus
Veraltet
Bereich
backend

Rechercherichtung

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.

Vom Indexierungsmodell aus dem Issue-Text verfasst.

Beschreibung

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.

Vorherrschende Sprache
PureScript
Sterne
58
Forks
70
Ø Merge
2 T. 22 Std.
Gemergte PRs (30 T.)
1

Entwicklungsumgebung

  • Kein Dockerfile und keine Docker-Compose-Datei
  • Hat eine Pull-Request-Vorlage
  • Kein Beitragsleitfaden

Erste Schritte

  1. Lesen Sie das ganze Issue und danach den Beitragsleitfaden des Projekts.
  2. Schreiben Sie ins Issue, dass Sie es übernehmen — das erspart doppelte Arbeit.
  3. Forken Sie das Repository und arbeiten Sie in einem Branch.
  4. Öffnen Sie einen Pull Request, der die Issue-Nummer nennt.

Mehr aus purescript/purescript-arrays

Alle Issues in purescript/purescript-arrays

Ähnliche Issues

Weitere Issues zu Backend & API Design

Neue Issues direkt in Ihr Postfach

Eine kurze Übersicht über anfängerfreundliche GitHub-Issues.