Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Start building the new Piece internal representation and new style. #1263

Merged
merged 4 commits into from
Sep 14, 2023

Conversation

munificent
Copy link
Member

@munificent munificent commented Sep 12, 2023

This gets the foundation in place for the new IR, the new visitor that produces it, the new line splitter that consumes it, the new style, and new tests for it. It also adds support for formatting library, import, and export directives to make sure everything is wired up together and working.

Existing formatting behavior is unchanged. You have to opt in to the new stuff by passing "tall-style" as an experiment flag.

This PR doesn't support comments, but it does leave some unused code in a few places that will be used to handle comments in future PRs. It has many UnimplementedError throws. Those will get filled in as more of the language is implemented in the new style. There are also two new kinds of TODO comments:

// TODO(tall): ...

These comments describe that work that needs to be done before the new style is fully working.

// TODO(perf): ...

These describe potential areas for optimization. Once more of the language is supported with the new IR and I can run some larger benchmark samples through it, I can start exploring where the actual performance problems are. For now, I'm just leaving breadcrumbs.

This gets the foundation in place for the new IR, the new visitor that
produces it, the new line splitter that consumes it, the new style, and
new tests for it.

It also adds support for formatting library, import, and export
directives to make sure everything is wired up together and working.

Existing formatting behavior is unchanged. You have to opt in to the
new stuff by passing "tall-style" as an experiment flag.

This PR doesn't support comments, but it does leave some unused code
in a few places that will be used to handle comments in future PRs.

It has many UnimplementedError throws. Those will get filled in as more
of the language is implemented in the new style.

There are also two new kinds of TODO comments:

  TODO(tall): ...

These comments describe that work that needs to be done before the new
style is fully working.

  TODO(perf): ...

These describe potential areas for optimization. Once more of the
language is supported with the new IR and I can run some larger
benchmark samples through it, I can start exploring where the actual
performance problems are. For now, I'm just leaving breadcrumbs.
lib/src/back_end/code_writer.dart Outdated Show resolved Hide resolved
lib/src/back_end/code_writer.dart Outdated Show resolved Hide resolved
lib/src/back_end/code_writer.dart Show resolved Hide resolved
lib/src/back_end/code_writer.dart Show resolved Hide resolved
lib/src/back_end/code_writer.dart Outdated Show resolved Hide resolved
lib/src/front_end/piece_writer.dart Show resolved Hide resolved
lib/src/front_end/piece_writer.dart Outdated Show resolved Hide resolved
lib/src/piece/import.dart Show resolved Hide resolved
lib/src/piece/import.dart Outdated Show resolved Hide resolved
lib/src/piece/piece.dart Outdated Show resolved Hide resolved
@munificent
Copy link
Member Author

Thanks!

lib/src/piece/import.dart Outdated Show resolved Hide resolved
lib/src/piece/piece.dart Show resolved Hide resolved
@munificent munificent merged commit 473a21d into main Sep 14, 2023
7 checks passed
@munificent munificent deleted the piece-ir branch September 14, 2023 22:25
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.

2 participants