Skip to content

Compiler simplify OCSemanticScope#13303

Merged
MarcusDenker merged 4 commits intopharo-project:Pharo12from
privat:compiler-simplify-semantic-scope
Apr 6, 2023
Merged

Compiler simplify OCSemanticScope#13303
MarcusDenker merged 4 commits intopharo-project:Pharo12from
privat:compiler-simplify-semantic-scope

Conversation

@privat
Copy link
Contributor

@privat privat commented Apr 5, 2023

The class hierarchy OCSemanticScope is used to abstract the contextual semantic of a source code: method definition, basic script, or advanced script in a context (for debugger).

For some reason, the current code is far more complex than required. This PR tries to simplify it.

@privat
Copy link
Contributor Author

privat commented Apr 5, 2023

  • all tests: green
  • windows: U

Copy link
Member

@jecisc jecisc left a comment

Choose a reason for hiding this comment

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

This seems easier to read indeed

anObject ifTrue: [
semanticScope := semanticScope asDoItScope.
"when we compile an expression, embedd sources, as the resulting method will never be installed"
self parseOptions: #(+ #optionEmbeddSources).
Copy link
Member

Choose a reason for hiding this comment

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

Is this parse option removal intended?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Yep, it is wrongly placed and duplicates one that is correctly placed: https://github.com/pharo-project/pharo/blob/Pharo12/src/OpalCompiler-Core/OpalCompiler.class.st#L335

@MarcusDenker
Copy link
Member

there is no a conflict

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

Archived in project

Development

Successfully merging this pull request may close these issues.

3 participants