Skip to content

Refactor splice interpreter #16280

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

Merged
merged 1 commit into from
Nov 15, 2022

Conversation

nicolasstucki
Copy link
Contributor

Extract the general purpose logic from the splice interpreter. The new interpreter class will be the basis for the macro annotation interpreter. The splice interpreter only keeps logic related with level -1 quote and type evaluation.

Part of https://github.com/dotty-staging/dotty/tree/design-macro-annotations

Copy link
Member

@smarter smarter left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Otherwise LGTM.

import dotty.tools.repl.AbstractFileClassLoader


/** List of classes of the parameters of the signature of `sym` */
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

That comment seems misplaced? It also appears above def paramsSig

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Removed. I must have pasted it by mistake.


type Env = Map[Symbol, Object]

/** Returns the interpreted result of interpreting the code a call to the symbol with default arguments.
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks like this comment was here before but I'm having trouble interpreting it myself :). Is there a word missing around "the code a call", should it be "the code of a call" ?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I rewrote the sentence.

@smarter smarter assigned nicolasstucki and unassigned smarter Nov 14, 2022
Extract the general purpose logic from the splice interpreter. The new interpreter
class will be the basis for the macro annotation interpreter. The splice interpreter
only keeps logic related with level -1 quote and type evaluation.

Part of https://github.com/dotty-staging/dotty/tree/design-macro-annotations
@nicolasstucki nicolasstucki force-pushed the refactor-splice-interpreter branch from 05303a9 to ee51648 Compare November 15, 2022 07:43
@smarter smarter merged commit 4ae4dc8 into scala:main Nov 15, 2022
@smarter smarter deleted the refactor-splice-interpreter branch November 15, 2022 12:23
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