Packages

o

scala.tools.tasty

TastyFormat

object TastyFormat

Source
TastyFormat.scala
Linear Supertypes
Content Hierarchy
Ordering
  1. Alphabetic
  2. By Inheritance
Inherited
  1. TastyFormat
  2. AnyRef
  3. Any
  1. Hide All
  2. Show All
Visibility
  1. Public
  2. Protected

Type Members

  1. class NameTags extends AnyRef

    Tags used to serialize names, should update TastyFormat$.nameTagToString if a new constant is added

Value Members

  1. final def !=(arg0: Any): Boolean
    Definition Classes
    AnyRef → Any
  2. final def ##: Int
    Definition Classes
    AnyRef → Any
  3. final def ==(arg0: Any): Boolean
    Definition Classes
    AnyRef → Any
  4. final val ABSTRACT: Int(9)
  5. final val ALTERNATIVE: Int(151)
  6. final val ANDtype: Int(165)
  7. final val ANNOTATEDtpt: Int(154)
  8. final val ANNOTATEDtype: Int(153)
  9. final val ANNOTATION: Int(173)
  10. final val APPLIEDtpt: Int(162)
  11. final val APPLIEDtype: Int(161)
  12. final val APPLY: Int(136)
  13. final val APPLYsigpoly: Int(181)
  14. final val ARTIFACT: Int(24)
  15. final val ASSIGN: Int(139)
  16. final val ASTsSection: String("ASTs")
  17. final val AttributesSection: String("Attributes")
  18. final val BIND: Int(150)
  19. final val BLOCK: Int(140)
  20. final val BOUNDED: Int(102)
  21. final val BYNAMEtpt: Int(94)
  22. final val BYNAMEtype: Int(93)
  23. final val BYTEconst: Int(67)
  24. final val CAPTURECHECKEDattr: Int(3)
  25. final val CASE: Int(12)
  26. final val CASEDEF: Int(155)
  27. final val CASEaccessor: Int(27)
  28. final val CHARconst: Int(69)
  29. final val CLASSconst: Int(92)
  30. final val CONTRAVARIANT: Int(29)
  31. final val COVARIANT: Int(28)
  32. final val CommentsSection: String("Comments")
  33. final val DEFDEF: Int(130)
  34. final val DOUBLEconst: Int(73)
  35. final val ELIDED: Int(104)
  36. final val EMPTYCLAUSE: Int(45)
  37. final val ENUM: Int(21)
  38. final val ERASED: Int(34)
  39. final val EXPLICITNULLSattr: Int(2)
  40. final val EXPLICITtpt: Int(103)
  41. final val EXPORT: Int(177)
  42. final val EXPORTED: Int(39)
  43. final val EXTENSION: Int(36)
  44. final val ExperimentalVersion: Int

    Natural Number.

    Natural Number. The ExperimentalVersion allows for experimentation with changes to TASTy without committing to any guarantees of compatibility.

    A zero value indicates that the TASTy version is from a stable, final release.

    A strictly positive value indicates that the TASTy version is experimental. An experimental TASTy file can only be read by a tool with the same version. However, tooling with an experimental TASTy version is able to read final TASTy documents if the file's MinorVersion is strictly less than the current value.

  45. final val FALSEconst: Int(3)
  46. final val FIELDaccessor: Int(26)
  47. final val FINAL: Int(10)
  48. final val FLOATconst: Int(72)
  49. final val GIVEN: Int(37)
  50. final val HASDEFAULT: Int(31)
  51. final val HOLE: Int(255)
  52. final val IDENT: Int(110)
  53. final val IDENTtpt: Int(111)
  54. final val IF: Int(141)
  55. final val IMPLICIT: Int(13)
  56. final val IMPLICITarg: Int(97)
  57. final val IMPORT: Int(132)
  58. final val IMPORTED: Int(75)
  59. final val INFIX: Int(43)
  60. final val INLINE: Int(17)
  61. final val INLINED: Int(147)
  62. final val INLINEPROXY: Int(16)
  63. final val INTconst: Int(70)
  64. final val INVISIBLE: Int(44)
  65. final val JAVAattr: Int(5)
  66. final val LAMBDA: Int(142)
  67. final val LAMBDAtpt: Int(171)
  68. final val LAZY: Int(14)
  69. final val LOCAL: Int(22)
  70. final val LONGconst: Int(71)
  71. final val MACRO: Int(33)
  72. final val MATCH: Int(143)
  73. final val MATCHCASEtype: Int(192)
  74. final val MATCHtpt: Int(191)
  75. final val MATCHtype: Int(190)
  76. final val METHODtype: Int(180)
  77. final val MUTABLE: Int(25)
  78. final val MajorVersion: Int

    Natural number.

    Natural number. Each increment of the MajorVersion begins a new series of backward compatible TASTy versions.

    A TASTy file in either the preceeding or succeeding series is incompatible with the current value.

  79. final val MinorVersion: Int

    Natural number.

    Natural number. Each increment of the MinorVersion, within a series declared by the MajorVersion, breaks forward compatibility, but remains backwards compatible, with all preceeding MinorVersion.

  80. final val NAMEDARG: Int(119)
  81. final val NEW: Int(95)
  82. final val NULLconst: Int(5)
  83. final val OBJECT: Int(19)
  84. final val OPAQUE: Int(35)
  85. final val OPEN: Int(40)
  86. final val ORtype: Int(167)
  87. final val OUTLINEattr: Int(6)
  88. final val OVERRIDE: Int(15)
  89. final val PACKAGE: Int(128)
  90. final val PARAM: Int(134)
  91. final val PARAMalias: Int(41)
  92. final val PARAMsetter: Int(38)
  93. final val PARAMtype: Int(172)
  94. final val POLYtype: Int(169)
  95. final val PRIVATE: Int(6)
  96. final val PRIVATEqualified: Int(98)
  97. final val PROTECTED: Int(8)
  98. final val PROTECTEDqualified: Int(99)
  99. final val PositionsSection: String("Positions")
  100. final val QUALTHIS: Int(91)
  101. final val RECthis: Int(66)
  102. final val RECtype: Int(100)
  103. final val REFINEDtpt: Int(160)
  104. final val REFINEDtype: Int(159)
  105. final val RENAMED: Int(76)
  106. final val REPEATED: Int(149)
  107. final val RETURN: Int(144)
  108. final val SCALA2STANDARDLIBRARYattr: Int(1)
  109. final val SEALED: Int(11)
  110. final val SELECT: Int(112)
  111. final val SELECTin: Int(176)
  112. final val SELECTouter: Int(148)
  113. final val SELECTtpt: Int(113)
  114. final val SELFDEF: Int(118)
  115. final val SHAREDterm: Int(60)
  116. final val SHAREDtype: Int(61)
  117. final val SHORTconst: Int(68)
  118. final val SINGLETONtpt: Int(101)
  119. final val SOURCE: Int(4)
  120. final val SOURCEFILEattr: Int(129)
  121. final val SPLITCLAUSE: Int(46)
  122. final val STABLE: Int(32)
  123. final val STATIC: Int(18)
  124. final val STRINGconst: Int(74)
  125. final val SUPER: Int(157)
  126. final val SUPERtype: Int(158)
  127. final val SYNTHETIC: Int(23)
  128. final val TEMPLATE: Int(156)
  129. final val TERMREF: Int(115)
  130. final val TERMREFdirect: Int(62)
  131. final val TERMREFin: Int(174)
  132. final val TERMREFpkg: Int(64)
  133. final val TERMREFsymbol: Int(114)
  134. final val THIS: Int(90)
  135. final val THROW: Int(96)
  136. final val TRAIT: Int(20)
  137. final val TRANSPARENT: Int(42)
  138. final val TRUEconst: Int(4)
  139. final val TRY: Int(146)
  140. final val TYPEAPPLY: Int(137)
  141. final val TYPEBOUNDS: Int(163)
  142. final val TYPEBOUNDStpt: Int(164)
  143. final val TYPED: Int(138)
  144. final val TYPEDEF: Int(131)
  145. final val TYPELAMBDAtype: Int(170)
  146. final val TYPEPARAM: Int(133)
  147. final val TYPEREF: Int(117)
  148. final val TYPEREFdirect: Int(63)
  149. final val TYPEREFin: Int(175)
  150. final val TYPEREFpkg: Int(65)
  151. final val TYPEREFsymbol: Int(116)
  152. final val UNAPPLY: Int(152)
  153. final val UNITconst: Int(2)
  154. final val VALDEF: Int(129)
  155. final val WHILE: Int(145)
  156. final val WITHPUREFUNSattr: Int(4)
  157. final def asInstanceOf[T0]: T0
    Definition Classes
    Any
  158. def astTagToString(tag: Int): String
  159. def attributeTagToString(tag: Int): String
  160. def clone(): AnyRef
    Attributes
    protected[lang]
    Definition Classes
    AnyRef
    Annotations
    @throws(classOf[java.lang.CloneNotSupportedException]) @native()
  161. final def eq(arg0: AnyRef): Boolean
    Definition Classes
    AnyRef
  162. def equals(arg0: AnyRef): Boolean
    Definition Classes
    AnyRef → Any
  163. def finalize(): Unit
    Attributes
    protected[lang]
    Definition Classes
    AnyRef
    Annotations
    @throws(classOf[java.lang.Throwable])
  164. final val firstASTTreeTag: Int(90)
  165. final val firstLengthTreeTag: Int(128)
  166. final val firstNatASTTreeTag: Int(110)
  167. final val firstNatTreeTag: Int(60)
  168. final val firstSimpleTreeTag: Int(2)
  169. final def getClass(): Class[_ <: AnyRef]
    Definition Classes
    AnyRef → Any
    Annotations
    @native()
  170. def hashCode(): Int
    Definition Classes
    AnyRef → Any
    Annotations
    @native()
  171. final val header: Array[Int]

    The first four bytes of a TASTy file, followed by four values: - MajorVersion: Int - see definition in TastyFormat - MinorVersion: Int - see definition in TastyFormat - ExperimentalVersion: Int - see definition in TastyFormat - ToolingVersion: String - arbitrary length string representing the tool that produced the TASTy.

  172. def isBooleanAttrTag(tag: Int): Boolean
  173. final def isInstanceOf[T0]: Boolean
    Definition Classes
    Any
  174. def isLegalTag(tag: Int): Boolean

    Useful for debugging

  175. def isModifierTag(tag: Int): Boolean
  176. def isParamTag(tag: Int): Boolean
  177. def isStringAttrTag(tag: Int): Boolean
  178. def isTypeTreeTag(tag: Int): Boolean
  179. def isVersionCompatible(fileMajor: Int, fileMinor: Int, fileExperimental: Int, compilerMajor: Int, compilerMinor: Int, compilerExperimental: Int): Boolean

    This method implements a binary relation (<:<) between two TASTy versions.

    This method implements a binary relation (<:<) between two TASTy versions.

    We label the lhs file and rhs compiler. if file <:< compiler then the TASTy file is valid to be read.

    A TASTy version, e.g. v := 28.0-3 is composed of three fields:

    • v.major == 28
    • v.minor == 0
    • v.experimental == 3

    TASTy versions have a partial order, for example, a <:< b and b <:< a are both false if

    • a and b have different major fields.
    • a and b have the same major & minor fields, but different experimental fields, both non-zero.

    A TASTy version with a zero value for its experimental field is considered to be stable. Files with a stable TASTy version can be read by a compiler with an unstable TASTy version, (where the compiler's TASTy version has a higher minor field).

    A compiler with a stable TASTy version can never read a file with an unstable TASTy version.

    We follow the given algorithm:

    (fileMajor, fileMinor, fileExperimental) match case (compilerMajor, compilerMinor, compilerExperimental) => true // full equality case (compilerMajor, minor, 0) if minor < compilerMinor => true // stable backwards compatibility case _ => false

  180. def nameTagToString(tag: Int): String

    Should be kept in sync with NameTags.

    Should be kept in sync with NameTags. Converts constants to a String representing their identifier, or NotANameTag(tag) if unrecognised.

    For debugging purposes when unpickling names in a TASTy file.

  181. final def ne(arg0: AnyRef): Boolean
    Definition Classes
    AnyRef
  182. final def notify(): Unit
    Definition Classes
    AnyRef
    Annotations
    @native()
  183. final def notifyAll(): Unit
    Definition Classes
    AnyRef
    Annotations
    @native()
  184. def numRefs(tag: Int): Int

    returns

    If non-negative, the number of leading references (represented as nats) of a length/trees entry. If negative, minus the number of leading non-reference trees.

  185. final def synchronized[T0](arg0: => T0): T0
    Definition Classes
    AnyRef
  186. def toString(): String
    Definition Classes
    AnyRef → Any
  187. final def wait(): Unit
    Definition Classes
    AnyRef
    Annotations
    @throws(classOf[java.lang.InterruptedException])
  188. final def wait(arg0: Long, arg1: Int): Unit
    Definition Classes
    AnyRef
    Annotations
    @throws(classOf[java.lang.InterruptedException])
  189. final def wait(arg0: Long): Unit
    Definition Classes
    AnyRef
    Annotations
    @throws(classOf[java.lang.InterruptedException]) @native()
  190. object NameTags extends NameTags

Inherited from AnyRef

Inherited from Any

Ungrouped