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

WIP - Performance improvement to global initialization checker #21514

Draft
wants to merge 27 commits into
base: main
Choose a base branch
from

Commits on Sep 16, 2024

  1. Widen values in assignment

    liufengyun committed Sep 16, 2024
    Configuration menu
    Copy the full SHA
    9460eb7 View commit details
    Browse the repository at this point in the history
  2. Configuration menu
    Copy the full SHA
    6b95450 View commit details
    Browse the repository at this point in the history
  3. Configuration menu
    Copy the full SHA
    5cbc51b View commit details
    Browse the repository at this point in the history
  4. Configuration menu
    Copy the full SHA
    78c8c4a View commit details
    Browse the repository at this point in the history
  5. Configuration menu
    Copy the full SHA
    7b861a1 View commit details
    Browse the repository at this point in the history
  6. Configuration menu
    Copy the full SHA
    cf1515f View commit details
    Browse the repository at this point in the history
  7. Configuration menu
    Copy the full SHA
    75c5ff0 View commit details
    Browse the repository at this point in the history
  8. Configuration menu
    Copy the full SHA
    cb485c0 View commit details
    Browse the repository at this point in the history
  9. Configuration menu
    Copy the full SHA
    0af7e00 View commit details
    Browse the repository at this point in the history
  10. Fix crash due to out-of-band return values using return keyword

    See test tests/init-global/warn/return2.scala
    liufengyun committed Sep 16, 2024
    Configuration menu
    Copy the full SHA
    9f61f34 View commit details
    Browse the repository at this point in the history
  11. Configuration menu
    Copy the full SHA
    86e39de View commit details
    Browse the repository at this point in the history
  12. Fix typo

    liufengyun committed Sep 16, 2024
    Configuration menu
    Copy the full SHA
    a8dbaeb View commit details
    Browse the repository at this point in the history
  13. Configuration menu
    Copy the full SHA
    3e69d03 View commit details
    Browse the repository at this point in the history
  14. Configuration menu
    Copy the full SHA
    a84a8d1 View commit details
    Browse the repository at this point in the history
  15. Configuration menu
    Copy the full SHA
    4dd781c View commit details
    Browse the repository at this point in the history
  16. Configuration menu
    Copy the full SHA
    77fc613 View commit details
    Browse the repository at this point in the history
  17. Configuration menu
    Copy the full SHA
    c418982 View commit details
    Browse the repository at this point in the history
  18. Don't apply memory optimization for constructor calls

    Otherwise, the following program causes weird address not found error:
    
        import scala.collection.immutable.HashSet
    
        object A:
          val a = HashSet(1, 2, 3)
    
    The error looks like the following:
    
        -- Warning: out/bootstrap/scala2-library-bootstrapped/scala-3.6.0-RC1-bin-SNAPSHOT-nonbootstrapped/src_managed/main/scala-library-src/scala/collection/immutable/ChampCommon.scala:155:24
        155 |    currentStackLevel = currentStackLevel - 1
            |                        ^^^^^^^^^^^^^^^^^
            |[Internal error] Address not found FieldAddr(List(),val currentStackLevel,module class A$). Trace:
            |Calling trace:
            |├── object A:	[ HashSet.scala:3 ]
            |│   ^
            |├── val a = HashSet(1, 2, 3)	[ HashSet.scala:4 ]
            |│           ^^^^^^^^^^^^^^^^
            |├── def apply[A](elems: A*): CC[A] = from(elems)	[ Factory.scala:103 ]
            |│                                    ^^^^^^^^^^^
            |├── def from[A](source: collection.IterableOnce[A]): HashSet[A] =	[ HashSet.scala:1939 ]
            |│   ^
            |├── case _ => (newBuilder[A] ++= source).result()	[ HashSet.scala:1943 ]
            |│              ^^^^^^^^^^^^^^^^^^^^^^^^
            |├── @inline final def ++= (@deprecatedName("xs") elems: IterableOnce[A]): this.type = addAll(elems)	[ Growable.scala:69 ]
            |│                                                                                     ^^^^^^^^^^^^^
            |├── override def addAll(xs: IterableOnce[A]) = {	[ HashSet.scala:2079 ]
            |│   ^
            |├── }	[ HashSet.scala:2096 ]
            |│    ^
            |├── new ChampBaseIterator[A, SetNode[A]](hm.rootNode) {	[ HashSet.scala:2083 ]
            |│   ^
            |├── while(hasNext) {	[ HashSet.scala:2084 ]
            |│         ^^^^^^^
            |├── final def hasNext = (currentValueCursor < currentValueLength) || searchNextValueNode()	[ ChampCommon.scala:185 ]
            |│                                                                    ^^^^^^^^^^^^^^^^^^^^^
            |├── private final def searchNextValueNode(): Boolean = {	[ ChampCommon.scala:162 ]
            |│   ^
            |├── popNode()	[ ChampCommon.scala:178 ]
            |│   ^^^^^^^^^
            |├── private final def popNode(): Unit = {	[ ChampCommon.scala:154 ]
            |│   ^
            |└── currentStackLevel = currentStackLevel - 1	[ ChampCommon.scala:155 ]
            |                        ^^^^^^^^^^^^^^^^^
    liufengyun committed Sep 16, 2024
    Configuration menu
    Copy the full SHA
    19d92aa View commit details
    Browse the repository at this point in the history
  19. Configuration menu
    Copy the full SHA
    47f944d View commit details
    Browse the repository at this point in the history
  20. Configuration menu
    Copy the full SHA
    08b4e66 View commit details
    Browse the repository at this point in the history

Commits on Sep 18, 2024

  1. Add debug facility for gc

    liufengyun committed Sep 18, 2024
    Configuration menu
    Copy the full SHA
    59e5412 View commit details
    Browse the repository at this point in the history

Commits on Sep 22, 2024

  1. Join heaps properly

    liufengyun committed Sep 22, 2024
    Configuration menu
    Copy the full SHA
    6de4e60 View commit details
    Browse the repository at this point in the history

Commits on Sep 29, 2024

  1. Configuration menu
    Copy the full SHA
    7c909f4 View commit details
    Browse the repository at this point in the history
  2. Configuration menu
    Copy the full SHA
    fdc2a66 View commit details
    Browse the repository at this point in the history
  3. Configuration menu
    Copy the full SHA
    f15ec64 View commit details
    Browse the repository at this point in the history
  4. Fix cache for function and lazy vals

    Otherwise, the test tests/init-global/pos/lazy-local-val2.scala would stackoverflow
    liufengyun committed Sep 29, 2024
    Configuration menu
    Copy the full SHA
    aa27034 View commit details
    Browse the repository at this point in the history
  5. Configuration menu
    Copy the full SHA
    ce87173 View commit details
    Browse the repository at this point in the history