{"push_id":1133606868,"size":14,"distinct_size":14,"ref":"refs/heads/fields-rebase","head":"5ef0fd0ffe216fdac40fe50f8e6e105085c1a4a5","before":"71ddd06d0618b0936d9752f687b42908fdc59561","commits":[{"sha":"857a0984e206586c96c8d2ef4a955eabbb1a7361","author":{"name":"Adriaan Moors","email":"f49fe8e628c98e28393d6102d918645e55da46bc@typesafe.com"},"message":"Fields phase\n\nconstant trait val getters\n\nDon't emit the unused fields that we\nused to emit for constant vals, even though the getters\nimmediately return the constant, and thus the field goes unused.\n\nThere's also no need to synthesize impls\nfor these in subclasses -- the getter can be implemented\nin the interface.\n\ncommit b9052dad44\nAuthor: Lukas Rytz <lukas.rytz@gmail.com>\nDate:   3 weeks ago\n\n    Fix enclosing method attribute for classes nested in trait fields\n\n    Trait fields are now created as MethodSymbol (no longer TermSymbol).\n    This symbol shows up in the `originalOwner` chain of a class declared\n    within the field initializer. This promoted the field getter to\n    being the enclosing method of the nested class, which it is not\n    (the EnclosingMethod attribute is a source-level property).\n\ncommit cf845abed7\nAuthor: Adriaan Moors <adriaan.moors@typesafe.com>\nDate:   3 weeks ago\n\n    don't suppress field for unit-typed vals\n\n    it affects the memory model -- even a write of unit to a field is relevant...\n\ncommit 337a9dd8e6\nAuthor: Adriaan Moors <adriaan.moors@typesafe.com>\nDate:   4 weeks ago\n\n    unit-typed lazy vals should never receive a field\n\n    this need was unmasked by test/files/run/t7843-jsr223-service.scala,\n    which no longer printed the output expected from the `0 to 10 foreach`\n\n    Currently failing tests:\n\n     - test/files/pos/t6780.scala\n     - test/files/neg/anytrait.scala\n     - test/files/neg/delayed-init-ref.scala\n     - test/files/neg/t562.scala\n     - test/files/neg/t6276.scala\n     - test/files/run/delambdafy_uncurry_byname_inline.scala\n     - test/files/run/delambdafy_uncurry_byname_method.scala\n     - test/files/run/delambdafy_uncurry_inline.scala\n     - test/files/run/delambdafy_uncurry_method.scala\n     - test/files/run/inner-obj-auto.scala\n     - test/files/run/lazy-traits.scala\n     - test/files/run/reify_lazyunit.scala\n     - test/files/run/showraw_mods.scala\n     - test/files/run/t3670.scala\n     - test/files/run/t3980.scala\n     - test/files/run/t4047.scala\n     - test/files/run/t6622.scala\n     - test/files/run/t7406.scala\n     - test/files/run/t7843-jsr223-service.scala\n     - test/files/jvm/innerClassAttribute\n     - test/files/specialized/SI-7343.scala\n     - test/files/specialized/constant_lambda.scala\n     - test/files/specialized/spec-early.scala\n     - test/files/specialized/spec-init.scala\n     - test/files/specialized/spec-matrix-new.scala\n     - test/files/specialized/spec-matrix-old.scala\n     - test/files/presentation/scope-completion-3\n\ncommit b1b4e5c0ca\nAuthor: Adriaan Moors <adriaan.moors@typesafe.com>\nDate:   4 weeks ago\n\n    wip: lambdalift fix\n\n    test/files/trait-defaults/lambdalift.scala works,\n    but still some related tests failing\n\n    (note that we can't use a bootstrapped compiler yet\n    due to binary incompatibility in partest)\n\ncommit eae7dacd8c\nAuthor: Adriaan Moors <adriaan.moors@typesafe.com>\nDate:   4 weeks ago\n\n    update check now that trait vals can be concrete, use names not letters\n\n    note the progression in a concrete trait val now being recognized as such\n    ```\n    -trait T => true\n    -method $init$ => false\n    -value z1 => true\n    -value z2 => true // z2 is actually concrete!\n    ```\n\ncommit 273cb209df\nAuthor: Adriaan Moors <adriaan.moors@typesafe.com>\nDate:   6 weeks ago\n\n    skip presuper vals in new encoding\n\nstore local copy of frequently used baseType (itself cached)\ndeal with missing field symbols due to conflicting definitions in class when mixing in trait accessors+field\ntweaking error messages: kind string for accessors/values/variables\nRemove logging in busy namers code path\n\nmove fields to after uncurry for trait sams with vals\nafter uncurry, need to do resultType on a getter\nremove special case from refchecks\nnow fields runs after it\n\noh boy... was using modifyInfo which kills history\nthe good part is that we can now skip that expensive subst since we're later in the pipeline\n\ngetter.referenced == traitsetter\n\nreify's toolbox compiler changes the name of the trait\nthat owns the accessor between fields and constructors (`$` suffix),\nso that the trait setter cannot be found when doing mkAssign in constructors\nthis could be solved by creating the mkAssign tree immediately during fields\n\nanyway, first experiment: use `referenced` now that fields runs closer\nto the constructors phase (I tried this before and something broke)\n\nnext experiment: move fields after specialize (in a trait,\nspecialization needs the connection between a getter and its rhs),\nand move the RHS of a DefDef in a trait to an invocation\nof the trait setter in the template\n\nInfer result type for `val`s, like we do for `def`s\n\nThe lack of result type inference caused pos/t6780 to fail\nin the new field encoding for traits, as there is no separate accessor,\nand method synthesis computes the type signature based on the ValDef tree.\nThis caused a cyclic error in implicit search, because now the\nimplicit val's result type was not inferred from the super member,\nand inferring it from the RHS would cause implicit search to consider\nthe member in question, so that a cycle is detected and type checking fails...\n\nRegardless of the new encoding, we should consistently infer result types\nfor `def`s and `val`s.\n\nRemoved test/files/run/t4287inferredMethodTypes.scala and test/files/presentation/t4287c,\nsince they were relying on inferring argument types from \"overridden\" constructors\nin a test for range positions of default arguments. Constructors don't override,\nso that was a mis-feature of -Yinfer-argument-types.\n\nHad to slightly refactor test/files/presentation/doc, as it was relying\non scalac inferring a big intersection type to approximate the anonymous\nclass that's instantiated for `override lazy val analyzer`.\nNow that we infer `Global` as the expected type based on the overridden val,\nwe make `getComment` private in navigating between good old Skylla and Charybdis.\nI'm not sure why we need this restriction for anonymous classes though;\nonly structural calls are restricted in the way that we're trying to avoid.\n\nThe old behavior is maintained nder -Xsource:2.11.\n\nTests:\n  - test/files/{pos,neg}/val_infer.scala\n  - test/files/neg/val_sig_infer_match.scala\n  - test/files/neg/val_sig_infer_struct.scala\n\nneed NMT when inferring sig for accessor\nQ: why are we calling valDefSig and not methodSig?\nA: traits use defs for vals, but still use valDefSig...\nkeep accessor and field info in synch","distinct":true,"url":"https://api.github.com/repos/adriaanm/scala/commits/857a0984e206586c96c8d2ef4a955eabbb1a7361"},{"sha":"92df7f76e7140029e9f09ce56bf5fdc9abcafb59","author":{"name":"Adriaan Moors","email":"b1bbc8f7d9b1f3f69d0e5ab77559c084f9d79d89@lightbend.com"},"message":"small refactoring","distinct":true,"url":"https://api.github.com/repos/adriaanm/scala/commits/92df7f76e7140029e9f09ce56bf5fdc9abcafb59"},{"sha":"0f0be995d8f5b0c9e4eb826a8647d8f0680b7371","author":{"name":"Adriaan Moors","email":"b1bbc8f7d9b1f3f69d0e5ab77559c084f9d79d89@lightbend.com"},"message":"clean up valsig infer","distinct":true,"url":"https://api.github.com/repos/adriaanm/scala/commits/0f0be995d8f5b0c9e4eb826a8647d8f0680b7371"},{"sha":"80694b6edac16df1773ca0a7a2b6d3c461b83d63","author":{"name":"Adriaan Moors","email":"b1bbc8f7d9b1f3f69d0e5ab77559c084f9d79d89@lightbend.com"},"message":"Inline isSetter so that is usage does not spread\n\nThere's no reliable way to detect all kinds of setters from flags or namega!\nA BeanSetter's name does not end in  -- it does begin with set, but so could the getter\nfor a regular Scala field...\n\nTODO: can we add a flag to distinguish getter/setter accessors?","distinct":true,"url":"https://api.github.com/repos/adriaanm/scala/commits/80694b6edac16df1773ca0a7a2b6d3c461b83d63"},{"sha":"56421182d760f3447c5d0fc57d754df6a5fe1ff2","author":{"name":"Adriaan Moors","email":"b1bbc8f7d9b1f3f69d0e5ab77559c084f9d79d89@lightbend.com"},"message":"can we retire lateDEFERRED?\n\nit seems redundant with SYNTHESIZE_IMPL_IN_SUBCLASS","distinct":true,"url":"https://api.github.com/repos/adriaanm/scala/commits/56421182d760f3447c5d0fc57d754df6a5fe1ff2"},{"sha":"347b8e06209e7c4d1923ea61b93b5dfe9577c86a","author":{"name":"Adriaan Moors","email":"b1bbc8f7d9b1f3f69d0e5ab77559c084f9d79d89@lightbend.com"},"message":"no need for MIXEDIN_ACCESSOR with fields after refchecks","distinct":true,"url":"https://api.github.com/repos/adriaanm/scala/commits/347b8e06209e7c4d1923ea61b93b5dfe9577c86a"},{"sha":"b95c555ac8cad2e9bfd0bc3409537d23649001c0","author":{"name":"Adriaan Moors","email":"f49fe8e628c98e28393d6102d918645e55da46bc@typesafe.com"},"message":"refactoring cleanup of fields","distinct":true,"url":"https://api.github.com/repos/adriaanm/scala/commits/b95c555ac8cad2e9bfd0bc3409537d23649001c0"},{"sha":"4c893fd9715d8b4ef541611db897e81b7394ab16","author":{"name":"Adriaan Moors","email":"f49fe8e628c98e28393d6102d918645e55da46bc@typesafe.com"},"message":"info transform should only run once to begin with???","distinct":true,"url":"https://api.github.com/repos/adriaanm/scala/commits/4c893fd9715d8b4ef541611db897e81b7394ab16"},{"sha":"c2fb7feda9d15cd8e16a8584ce139e261ebfef6c","author":{"name":"Adriaan Moors","email":"b1bbc8f7d9b1f3f69d0e5ab77559c084f9d79d89@lightbend.com"},"message":"mapOver last in info transform","distinct":true,"url":"https://api.github.com/repos/adriaanm/scala/commits/c2fb7feda9d15cd8e16a8584ce139e261ebfef6c"},{"sha":"0c0dd91b3e5ce103a1e5c54bfaafdc5777bcb97c","author":{"name":"Adriaan Moors","email":"b1bbc8f7d9b1f3f69d0e5ab77559c084f9d79d89@lightbend.com"},"message":"opt: fuse some operations on scopes","distinct":true,"url":"https://api.github.com/repos/adriaanm/scala/commits/0c0dd91b3e5ce103a1e5c54bfaafdc5777bcb97c"},{"sha":"d49637bf342b6f50f976228fb0ec708b9da82a25","author":{"name":"Adriaan Moors","email":"f49fe8e628c98e28393d6102d918645e55da46bc@typesafe.com"},"message":"don't cache in method's memberType","distinct":true,"url":"https://api.github.com/repos/adriaanm/scala/commits/d49637bf342b6f50f976228fb0ec708b9da82a25"},{"sha":"f1fb7906564fb273f81f5a6395f439e34e8141fa","author":{"name":"Adriaan Moors","email":"f49fe8e628c98e28393d6102d918645e55da46bc@typesafe.com"},"message":"synthesize modules during fields -- keep info transform in refchecks\n\ndon't emit module sym during mixins\n\ncheck variance for module classes\n\nperf thicket + cleanup\n\ncorrect accessor for static modules matching member in superclass\n\nupdate check\n\nserialization check update\n\nLinkedList's serialization signature changes because we emit a more precise type\nfor its next field:\n\n```\n➜  scala git:(fields-wip) qsc -Xprint:mixin /Users/adriaan/Library/Preferences/IdeaIC2016.1/scratches/scratch.scala\n[[syntax trees at end of                     mixin]] // scratch.scala\npackage <empty> {\n  abstract trait Seq extends Object;\n  abstract trait SeqLike extends Object;\n  abstract trait LinkedListLike extends Object with SeqLike {\n    <accessor> <sub_synth> def next(): Seq;\n    @scala.runtime.TraitSetter <accessor> <sub_synth> def next_=(x$1: Seq): Unit;\n    def /*LinkedListLike*/$init$(): Unit = {\n      ()\n    }\n  };\n  class LinkedList extends Object with Seq with LinkedListLike {\n    override <accessor> def next(): LinkedList = LinkedList.this.next;\n    private[this] var next: LinkedList = _;\n    @scala.runtime.TraitSetter override <accessor> def next_=(x$1: LinkedList): Unit = LinkedList.this.next = x$1;\n    override <bridge> <artifact> def next_=(x$1: Seq): Unit = LinkedList.this.next_=(x$1.$asInstanceOf[LinkedList]());\n    override <bridge> <artifact> def next(): Seq = LinkedList.this.next();\n    def <init>(): LinkedList = {\n      LinkedList.super.<init>();\n      LinkedList.super./*LinkedListLike*/$init$();\n      LinkedList.this.next_=(this);\n      ()\n    }\n  }\n}\n\n➜  scala git:(fields-wip) scalac -Xprint:mixin /Users/adriaan/Library/Preferences/IdeaIC2016.1/scratches/scratch.scala\n[[syntax trees at end of                     mixin]] // scratch.scala\npackage <empty> {\n  abstract trait Seq extends Object;\n  abstract trait SeqLike extends Object;\n  abstract trait LinkedListLike extends Object with SeqLike {\n    <accessor> def next(): Seq = LinkedListLike.this.next();\n    @runtime.TraitSetter <accessor> def next_=(x$1: Seq): Unit = LinkedListLike.this.next_=(x$1);\n    def /*LinkedListLike*/$init$(): Unit = {\n      ()\n    }\n  };\n  class LinkedList extends Object with Seq with LinkedListLike {\n    <accessor> def next(): Seq = LinkedList.this.next;\n    private[this] var next: Seq = _;\n    @runtime.TraitSetter <accessor> def next_=(x$1: Seq): Unit = {\n      LinkedList.this.next = x$1;\n      ()\n    };\n    def <init>(): LinkedList = {\n      LinkedList.super.<init>();\n      LinkedList.super./*LinkedListLike*/$init$();\n      LinkedList.this.next_=(this);\n      ()\n    }\n  }\n}\n```\n\nSmaller example:\n```\ntrait Seq[A]\ntrait SeqLike[A, +This <: SeqLike[A, This] with Seq[A]]\ntrait LinkedListLike[A, This <: Seq[A] with LinkedListLike[A, This]] extends SeqLike[A, This] {\n  var next: This = _\n}\n\nclass LinkedList[A]() extends Seq[A] with LinkedListLike[A, LinkedList[A]] {\n  next = this\n}\n```\n\nneg/override-object-no.scala\n\nsince ref check no longer info-transforms\nthe info of an object needs be to be wrapped in a\nNullaryMethodType to match a getter's info\n\ncompanionModule\n\nthe fact that sometimes there's no term\n*with* flag MODULE but *without* METHOD broke run/t7747-repl.scala\n\nhonestly, no idea why this was a problem before\n\nrun/t8549.scala","distinct":true,"url":"https://api.github.com/repos/adriaanm/scala/commits/f1fb7906564fb273f81f5a6395f439e34e8141fa"},{"sha":"79a417b6789f28dc336e7848f50093e924993a18","author":{"name":"Adriaan Moors","email":"f49fe8e628c98e28393d6102d918645e55da46bc@typesafe.com"},"message":"refchecks is no longer an infotransform -- do module to method in uncu","distinct":true,"url":"https://api.github.com/repos/adriaanm/scala/commits/79a417b6789f28dc336e7848f50093e924993a18"},{"sha":"5ef0fd0ffe216fdac40fe50f8e6e105085c1a4a5","author":{"name":"Adriaan Moors","email":"f49fe8e628c98e28393d6102d918645e55da46bc@typesafe.com"},"message":"mixin assert: only new trait fields come from lamlif land","distinct":true,"url":"https://api.github.com/repos/adriaanm/scala/commits/5ef0fd0ffe216fdac40fe50f8e6e105085c1a4a5"}]}
{"actor":{"display_login":"adriaanm"}}