Tensegritics / Tensegritics/ClojureDart

Add a "nano pass" to the compiler to perform statements lifting

Open
#288 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

pondering-design
Dominant language
Clojure
Stars
1.6k
Forks
119
PR merge metrics
No merged PRs in 30d

Description

Lifting statements out of expressions is a concern through all the compiler emit-* functions.

I propose we extract that concern into a distinct pass.

Currently we have

text -(reader)-> clj forms -(emit)-> dart-sexp -(write)-> dart text

where dart-sexp is our internal representation of the subset of dart we target.

With this proposal we would have

text -(reader)-> clj forms -(emit)-> dart-sexp -(lift)-> dart-sexp -(write)-> dart text

After lift the dart sexp representation would be guaranteed to be properly lifted and thus writeable.

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

Start by examining the compiler's emit-* functions and the existing reader-to-emit-to-write pipeline described in the issue. Define the new lift stage around the dart-sexp representation, then verify that statement lifting is handled there and that the writer receives properly lifted dart-sexp output.

Written by the indexing model from the issue text.

Assessment

Tech stack
clojure, dart
Domain
compilers
Issue type
Refactor
Difficulty
5/5
Estimated time
Over a week
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
25/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.