17. name hashing
• step 2
A.scala B.scala C1.scala
C3.scala
C2.scala
C4.scala
• collect method signatures and
other information
18. name hashing
• step 3 (second compilation)
• compile initial invalidation
• update signature info for A
A.scala B.scala C1.scala
C3.scala
C2.scala
C4.scala
19. name hashing
• step 4
API changes: compare the
signature information before and
after compilation
A.scala B.scala C1.scala
C3.scala
C2.scala
C4.scala
20. name hashing
• step 5
member ref: transitively invalidated
only if a "used name" changed its
signature
A.scala B.scala C1.scala
C3.scala
C2.scala
C4.scala
24. name hashing
package example
class B {
def foo: Unit = {
val a = new A
a.something
}
}
package example
class A {
// was 0
def something: Int = 2
}
• body change doesn't matter
25. name hashing
package example
class B {
def foo: Unit = {
val a = new A
a.something
}
}
package example
class A {
def something: Int = 0
// new
def somethingElse: Int = 1
}
• unused names do not matter
26. name hashing
package example
class C extends A {
def something: Int = 1
}
package example
class A {
def something: Int = 0
// new
def somethingElse: Int = 1
}
• inheritance propagates
invalidation