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

Safe initialization for Scala #7789

Merged
merged 112 commits into from
Feb 13, 2020
Merged

Commits on Feb 13, 2020

  1. Add basic definitions

    liufengyun committed Feb 13, 2020
    Configuration menu
    Copy the full SHA
    baccbd8 View commit details
    Browse the repository at this point in the history
  2. Add Env definition

    liufengyun committed Feb 13, 2020
    Configuration menu
    Copy the full SHA
    337c4b6 View commit details
    Browse the repository at this point in the history
  3. Add SuperRef as potential

    liufengyun committed Feb 13, 2020
    Configuration menu
    Copy the full SHA
    52c8441 View commit details
    Browse the repository at this point in the history
  4. Add phase SetDefTree

    liufengyun committed Feb 13, 2020
    Configuration menu
    Copy the full SHA
    91baf28 View commit details
    Browse the repository at this point in the history
  5. Configuration menu
    Copy the full SHA
    68ec7ec View commit details
    Browse the repository at this point in the history
  6. Add documentation for Warm

    liufengyun committed Feb 13, 2020
    Configuration menu
    Copy the full SHA
    f47577a View commit details
    Browse the repository at this point in the history
  7. Tweak summariztion

    liufengyun committed Feb 13, 2020
    Configuration menu
    Copy the full SHA
    fa6c182 View commit details
    Browse the repository at this point in the history
  8. Handle Lazy ValDef

    liufengyun committed Feb 13, 2020
    Configuration menu
    Copy the full SHA
    bb513dc View commit details
    Browse the repository at this point in the history
  9. Configuration menu
    Copy the full SHA
    891d6d8 View commit details
    Browse the repository at this point in the history
  10. WIP - add checking

    liufengyun committed Feb 13, 2020
    Configuration menu
    Copy the full SHA
    1ac3356 View commit details
    Browse the repository at this point in the history
  11. Configuration menu
    Copy the full SHA
    0494ac1 View commit details
    Browse the repository at this point in the history
  12. Handle lazy fields

    liufengyun committed Feb 13, 2020
    Configuration menu
    Copy the full SHA
    cbc4a31 View commit details
    Browse the repository at this point in the history
  13. Support traceOp

    liufengyun committed Feb 13, 2020
    Configuration menu
    Copy the full SHA
    820c67b View commit details
    Browse the repository at this point in the history
  14. Configuration menu
    Copy the full SHA
    6f11bf6 View commit details
    Browse the repository at this point in the history
  15. WIP - summarization of new

    liufengyun committed Feb 13, 2020
    Configuration menu
    Copy the full SHA
    c58a967 View commit details
    Browse the repository at this point in the history
  16. Configuration menu
    Copy the full SHA
    073eec2 View commit details
    Browse the repository at this point in the history
  17. Add show to ClassSummary

    liufengyun committed Feb 13, 2020
    Configuration menu
    Copy the full SHA
    594c1bf View commit details
    Browse the repository at this point in the history
  18. Configuration menu
    Copy the full SHA
    94267d7 View commit details
    Browse the repository at this point in the history
  19. Fix typing errors

    liufengyun committed Feb 13, 2020
    Configuration menu
    Copy the full SHA
    b94ce00 View commit details
    Browse the repository at this point in the history
  20. Configuration menu
    Copy the full SHA
    67e7165 View commit details
    Browse the repository at this point in the history
  21. Configuration menu
    Copy the full SHA
    e5e1c68 View commit details
    Browse the repository at this point in the history
  22. Configuration menu
    Copy the full SHA
    dc680dc View commit details
    Browse the repository at this point in the history
  23. More fixes

    liufengyun committed Feb 13, 2020
    Configuration menu
    Copy the full SHA
    5310886 View commit details
    Browse the repository at this point in the history
  24. WIP

    liufengyun committed Feb 13, 2020
    Configuration menu
    Copy the full SHA
    6e6a181 View commit details
    Browse the repository at this point in the history
  25. Add asSeenFrom

    liufengyun committed Feb 13, 2020
    Configuration menu
    Copy the full SHA
    994c240 View commit details
    Browse the repository at this point in the history
  26. WIP - Fix expand

    liufengyun committed Feb 13, 2020
    Configuration menu
    Copy the full SHA
    4eb8eaa View commit details
    Browse the repository at this point in the history
  27. Configuration menu
    Copy the full SHA
    9244e27 View commit details
    Browse the repository at this point in the history
  28. Configuration menu
    Copy the full SHA
    06ee111 View commit details
    Browse the repository at this point in the history
  29. Fix compilation warnings

    liufengyun committed Feb 13, 2020
    Configuration menu
    Copy the full SHA
    e923bf4 View commit details
    Browse the repository at this point in the history
  30. Handle outer

    liufengyun committed Feb 13, 2020
    Configuration menu
    Copy the full SHA
    617a6d9 View commit details
    Browse the repository at this point in the history
  31. WIP - asSeenFrom

    liufengyun committed Feb 13, 2020
    Configuration menu
    Copy the full SHA
    4f76c6a View commit details
    Browse the repository at this point in the history
  32. Fix Potentials.asSeenFrom

    liufengyun committed Feb 13, 2020
    Configuration menu
    Copy the full SHA
    554620c View commit details
    Browse the repository at this point in the history
  33. Fix Effects.asSeenFrom

    liufengyun committed Feb 13, 2020
    Configuration menu
    Copy the full SHA
    949a009 View commit details
    Browse the repository at this point in the history
  34. Configuration menu
    Copy the full SHA
    5c59fee View commit details
    Browse the repository at this point in the history
  35. Configuration menu
    Copy the full SHA
    13ce15e View commit details
    Browse the repository at this point in the history
  36. Remove RootPotential

    liufengyun committed Feb 13, 2020
    Configuration menu
    Copy the full SHA
    917ac30 View commit details
    Browse the repository at this point in the history
  37. Code refactoring

    liufengyun committed Feb 13, 2020
    Configuration menu
    Copy the full SHA
    5d34ea1 View commit details
    Browse the repository at this point in the history
  38. Configuration menu
    Copy the full SHA
    9f7c853 View commit details
    Browse the repository at this point in the history
  39. Add checker phase

    liufengyun committed Feb 13, 2020
    Configuration menu
    Copy the full SHA
    ac2b9dc View commit details
    Browse the repository at this point in the history
  40. Configuration menu
    Copy the full SHA
    bcd7c58 View commit details
    Browse the repository at this point in the history
  41. First example works

    liufengyun committed Feb 13, 2020
    Configuration menu
    Copy the full SHA
    077eb5b View commit details
    Browse the repository at this point in the history
  42. Handle class parameters

    Class parameters are always initialized before parent
    constructor calls and class body fields.
    liufengyun committed Feb 13, 2020
    Configuration menu
    Copy the full SHA
    8a9c0cf View commit details
    Browse the repository at this point in the history
  43. Handle ignored methods

    liufengyun committed Feb 13, 2020
    Configuration menu
    Copy the full SHA
    25c7a90 View commit details
    Browse the repository at this point in the history
  44. Configuration menu
    Copy the full SHA
    bf917a7 View commit details
    Browse the repository at this point in the history
  45. Handle A & B for this via self type

    We need to keep all components, as in asSeenFrom all
    will become empty except the class that contains the code for `this`.
    liufengyun committed Feb 13, 2020
    Configuration menu
    Copy the full SHA
    8ba171c View commit details
    Browse the repository at this point in the history
  46. Fix classSymbol in parents

    Previous code gets the constructor symbol instead of the class symbol.
    liufengyun committed Feb 13, 2020
    Configuration menu
    Copy the full SHA
    99679b8 View commit details
    Browse the repository at this point in the history
  47. Fix summarization of class

    In case of local class, the outer is the enclosing class.
    
    In checking a class, no need to check args in parent calls, as they are hot.
    Checking them is subtle, as access of class params are final instead of virtual.
    Meanwhile, posttyper generates confusing accessor:
    
    ```
    abstract class Base(val x: Int)
    class C(x: Int) extends Base(x)
    ```
    
    After posttyper:
    
    ```
    abstract class Base(val x: Int)
    class C(x: Int) extends Base(C.this.x) {
      private def x: Int = super.x
    }
    ```
    
    The accessor `def x: Int = super.x` makes it subtle to give
    semantics to `Base(C.this.x)`.
    liufengyun committed Feb 13, 2020
    Configuration menu
    Copy the full SHA
    43d46cd View commit details
    Browse the repository at this point in the history
  48. Configuration menu
    Copy the full SHA
    9b99ffc View commit details
    Browse the repository at this point in the history
  49. Configuration menu
    Copy the full SHA
    ec03ffd View commit details
    Browse the repository at this point in the history
  50. Configuration menu
    Copy the full SHA
    6e3e41d View commit details
    Browse the repository at this point in the history
  51. Configuration menu
    Copy the full SHA
    8ab9c8b View commit details
    Browse the repository at this point in the history
  52. Configuration menu
    Copy the full SHA
    38c2d1d View commit details
    Browse the repository at this point in the history
  53. Configuration menu
    Copy the full SHA
    c7d2a0a View commit details
    Browse the repository at this point in the history
  54. Configuration menu
    Copy the full SHA
    d0e54b0 View commit details
    Browse the repository at this point in the history
  55. Configuration menu
    Copy the full SHA
    10c620d View commit details
    Browse the repository at this point in the history
  56. Fix missed effects in new-expressions

    All inner-outer tests are green
    liufengyun committed Feb 13, 2020
    Configuration menu
    Copy the full SHA
    d2d498b View commit details
    Browse the repository at this point in the history
  57. Configuration menu
    Copy the full SHA
    97e4ee4 View commit details
    Browse the repository at this point in the history
  58. Configuration menu
    Copy the full SHA
    9996f50 View commit details
    Browse the repository at this point in the history
  59. Migrate feature tests

    liufengyun committed Feb 13, 2020
    Configuration menu
    Copy the full SHA
    e6cabb4 View commit details
    Browse the repository at this point in the history
  60. Migrate tests

    liufengyun committed Feb 13, 2020
    Configuration menu
    Copy the full SHA
    f351d80 View commit details
    Browse the repository at this point in the history
  61. Migrate function tests

    liufengyun committed Feb 13, 2020
    Configuration menu
    Copy the full SHA
    60cbb7d View commit details
    Browse the repository at this point in the history
  62. Migrate hybrid tests

    liufengyun committed Feb 13, 2020
    Configuration menu
    Copy the full SHA
    1a9b409 View commit details
    Browse the repository at this point in the history
  63. Fix secondary constructor

    liufengyun committed Feb 13, 2020
    Configuration menu
    Copy the full SHA
    58c8dc1 View commit details
    Browse the repository at this point in the history
  64. Configuration menu
    Copy the full SHA
    0a1fbfa View commit details
    Browse the repository at this point in the history
  65. Configuration menu
    Copy the full SHA
    56d402e View commit details
    Browse the repository at this point in the history
  66. Fix lazy val access

    liufengyun committed Feb 13, 2020
    Configuration menu
    Copy the full SHA
    3ea4894 View commit details
    Browse the repository at this point in the history
  67. Fix expansion of SuperRef

    liufengyun committed Feb 13, 2020
    Configuration menu
    Copy the full SHA
    89b0815 View commit details
    Browse the repository at this point in the history
  68. Fix asSeenFrom

    liufengyun committed Feb 13, 2020
    Configuration menu
    Copy the full SHA
    99e42b5 View commit details
    Browse the repository at this point in the history
  69. Configuration menu
    Copy the full SHA
    79de26c View commit details
    Browse the repository at this point in the history
  70. Configuration menu
    Copy the full SHA
    02ddbd7 View commit details
    Browse the repository at this point in the history
  71. Ignore EnumValues.register

    liufengyun committed Feb 13, 2020
    Configuration menu
    Copy the full SHA
    10f51f7 View commit details
    Browse the repository at this point in the history
  72. All misc tests green

    liufengyun committed Feb 13, 2020
    Configuration menu
    Copy the full SHA
    c48a8e4 View commit details
    Browse the repository at this point in the history
  73. Fix indentation warning

    liufengyun committed Feb 13, 2020
    Configuration menu
    Copy the full SHA
    41ffc62 View commit details
    Browse the repository at this point in the history
  74. Add back lazylists

    liufengyun committed Feb 13, 2020
    Configuration menu
    Copy the full SHA
    89972d3 View commit details
    Browse the repository at this point in the history
  75. Respect @unchecked annotation

    liufengyun committed Feb 13, 2020
    Configuration menu
    Copy the full SHA
    4c96a4b View commit details
    Browse the repository at this point in the history
  76. Refactor crash tests

    liufengyun committed Feb 13, 2020
    Configuration menu
    Copy the full SHA
    3cf5dcb View commit details
    Browse the repository at this point in the history
  77. Configuration menu
    Copy the full SHA
    cd57149 View commit details
    Browse the repository at this point in the history
  78. Enable more tests

    liufengyun committed Feb 13, 2020
    Configuration menu
    Copy the full SHA
    11e5767 View commit details
    Browse the repository at this point in the history
  79. Configuration menu
    Copy the full SHA
    1e04d6e View commit details
    Browse the repository at this point in the history
  80. Configuration menu
    Copy the full SHA
    2976e97 View commit details
    Browse the repository at this point in the history
  81. Doc tweaks

    liufengyun committed Feb 13, 2020
    Configuration menu
    Copy the full SHA
    bef686a View commit details
    Browse the repository at this point in the history
  82. Add link in sidebar

    liufengyun committed Feb 13, 2020
    Configuration menu
    Copy the full SHA
    414d8a8 View commit details
    Browse the repository at this point in the history
  83. Fix typo in docs

    liufengyun committed Feb 13, 2020
    Configuration menu
    Copy the full SHA
    0480b96 View commit details
    Browse the repository at this point in the history
  84. Configuration menu
    Copy the full SHA
    d2a3a8b View commit details
    Browse the repository at this point in the history
  85. Configuration menu
    Copy the full SHA
    eb1a49c View commit details
    Browse the repository at this point in the history
  86. Fix typos in documentation

    liufengyun committed Feb 13, 2020
    Configuration menu
    Copy the full SHA
    3c16fd9 View commit details
    Browse the repository at this point in the history
  87. Make doc align with paper

    liufengyun committed Feb 13, 2020
    Configuration menu
    Copy the full SHA
    21b5662 View commit details
    Browse the repository at this point in the history
  88. Configuration menu
    Copy the full SHA
    2e0268c View commit details
    Browse the repository at this point in the history
  89. Rename Leak to Promote

    Promote is more semantically correct than Leak: leaking means
    something bad, but promotion is neutral or positive. A warning
    may be reported if the promotion is unsafe.
    liufengyun committed Feb 13, 2020
    Configuration menu
    Copy the full SHA
    a9a6742 View commit details
    Browse the repository at this point in the history
  90. Add definition of Errors

    liufengyun committed Feb 13, 2020
    Configuration menu
    Copy the full SHA
    b2b4976 View commit details
    Browse the repository at this point in the history
  91. More errors

    liufengyun committed Feb 13, 2020
    Configuration menu
    Copy the full SHA
    2ac188f View commit details
    Browse the repository at this point in the history
  92. Configuration menu
    Copy the full SHA
    085cf64 View commit details
    Browse the repository at this point in the history
  93. Add error reporting

    liufengyun committed Feb 13, 2020
    Configuration menu
    Copy the full SHA
    9b12559 View commit details
    Browse the repository at this point in the history
  94. Refine error messages

    liufengyun committed Feb 13, 2020
    Configuration menu
    Copy the full SHA
    4a5c718 View commit details
    Browse the repository at this point in the history
  95. Configuration menu
    Copy the full SHA
    ce42450 View commit details
    Browse the repository at this point in the history
  96. Configuration menu
    Copy the full SHA
    8ed50b8 View commit details
    Browse the repository at this point in the history
  97. Configuration menu
    Copy the full SHA
    49e3efb View commit details
    Browse the repository at this point in the history
  98. Address review

    liufengyun committed Feb 13, 2020
    Configuration menu
    Copy the full SHA
    d4b54a7 View commit details
    Browse the repository at this point in the history
  99. Refine error messages

    liufengyun committed Feb 13, 2020
    Configuration menu
    Copy the full SHA
    3c2d818 View commit details
    Browse the repository at this point in the history
  100. Fix exception

    liufengyun committed Feb 13, 2020
    Configuration menu
    Copy the full SHA
    a42bab2 View commit details
    Browse the repository at this point in the history
  101. Fix exception: not all traits have constructors

    ErasedFunctionX does not have constructors, thus no need to follow.
    
    dotc -d out -Yerased-terms -Ycheck-init tests/run-custom-args/erased/erased-15.scala
    liufengyun committed Feb 13, 2020
    Configuration menu
    Copy the full SHA
    6ded31f View commit details
    Browse the repository at this point in the history
  102. Fix exception: Any and AnyVal don't have constructors

    dotc -d out -Ycheck-init  tests/run/vc-equals.scala
    liufengyun committed Feb 13, 2020
    Configuration menu
    Copy the full SHA
    2e54c6a View commit details
    Browse the repository at this point in the history
  103. Fix exception

    dotc -d out -Ycheck-init tests/pos/aliasNew.scala
    liufengyun committed Feb 13, 2020
    Configuration menu
    Copy the full SHA
    328f6a9 View commit details
    Browse the repository at this point in the history
  104. Fix extractor for closureDef

    The method name is not an invariant:
    
    dotc -d out -Ycheck-init tests/pos/i4350.scala
    liufengyun committed Feb 13, 2020
    Configuration menu
    Copy the full SHA
    ba63e45 View commit details
    Browse the repository at this point in the history
  105. Fix crash: SuperType.supertpe can be AndType

    dotc -d out -Ycheck-init tests/pos/SI-4012-b.scala
    liufengyun committed Feb 13, 2020
    Configuration menu
    Copy the full SHA
    d3ce80a View commit details
    Browse the repository at this point in the history
  106. Fix crash: polymorphic function apply does not have symbols

    dotc -d out -Ycheck-init tests/run/polymorphic-functions.scala
    liufengyun committed Feb 13, 2020
    Configuration menu
    Copy the full SHA
    4d500bd View commit details
    Browse the repository at this point in the history
  107. Fix crash: handle annotations in parents

    dotc -d out -Ycheck-init tests/pos/annot.scala
    liufengyun committed Feb 13, 2020
    Configuration menu
    Copy the full SHA
    8379ee1 View commit details
    Browse the repository at this point in the history
  108. Configuration menu
    Copy the full SHA
    8192b2c View commit details
    Browse the repository at this point in the history
  109. Refactor expand

    It should return a tuple of effects and potentials due to length limit.
    Previously, the effects are checked but the errors are thrown away.
    liufengyun committed Feb 13, 2020
    Configuration menu
    Copy the full SHA
    5581d74 View commit details
    Browse the repository at this point in the history
  110. Better explain scopability

    liufengyun committed Feb 13, 2020
    Configuration menu
    Copy the full SHA
    7b5fc1a View commit details
    Browse the repository at this point in the history
  111. Refine stacktrace printing

    liufengyun committed Feb 13, 2020
    Configuration menu
    Copy the full SHA
    1694e4a View commit details
    Browse the repository at this point in the history
  112. Fix syntax change

    liufengyun committed Feb 13, 2020
    Configuration menu
    Copy the full SHA
    6a4d06a View commit details
    Browse the repository at this point in the history