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

Reusing a compiler instance with -Yinline causes an inconsistent state #6782

Open
scabug opened this issue Dec 7, 2012 · 3 comments
Open

Reusing a compiler instance with -Yinline causes an inconsistent state #6782

scabug opened this issue Dec 7, 2012 · 3 comments
Assignees
Labels
Milestone

Comments

@scabug
Copy link

@scabug scabug commented Dec 7, 2012

If the REPL or fsc is used with -Yinline then we end up in a state where two symbols represent the same thing and the second version isn't initialized where it's expected. This is the root cause for the linked bugs which have more discussion on the subject.

Undoing the fix for #SI-5789 creates a simple reproducer. The test associated with that fix will cause an assertion in Mixin.scala.

@scabug
Copy link
Author

@scabug scabug commented Dec 7, 2012

Imported From: https://issues.scala-lang.org/browse/SI-6782?orig=1
Reporter: @JamesIry
Affected Versions: 2.10.0
See #5776, #5789, #6177

@scabug
Copy link
Author

@scabug scabug commented Oct 9, 2014

@scabug
Copy link
Author

@scabug scabug commented Oct 10, 2014

@retronym said:
I've saved my attempt to fix this in https://github.com/retronym/scala/tree/ticket/6782. Unfortunately it causes a regression in inlining of trait methods under separate compilation.

% qscala -nc -optimize -Yinline-warnings
Welcome to Scala version 2.11.3-20141010-000123-a654060c93 (Java HotSpot(TM) 64-Bit Server VM, Java 1.6.0_65).
Type in expressions to have them evaluated.
Type :help for more information.

scala> "".stripMargin
<console>:8: warning: Could not inline required method augmentString because bytecode unavailable.
              "".stripMargin
              ^
<console>:8: warning: At the end of the day, could not inline @inline-marked method augmentString
              "".stripMargin
              ^

@scabug scabug added the repl label Apr 7, 2017
@scabug scabug added this to the Backlog milestone Apr 7, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Linked pull requests

Successfully merging a pull request may close this issue.

None yet
2 participants