@@ -2,11 +2,11 @@ package dotty.tools
2
2
package backend
3
3
package jvm
4
4
5
+ import scala .annotation .threadUnsafe
5
6
import scala .tools .asm
6
7
import scala .tools .asm .AnnotationVisitor
7
8
import scala .tools .asm .ClassWriter
8
9
import scala .collection .mutable
9
- import dotty .tools .io .AbstractFile
10
10
11
11
import dotty .tools .dotc .CompilationUnit
12
12
import dotty .tools .dotc .ast .tpd
@@ -25,6 +25,7 @@ import dotty.tools.dotc.core.Types
25
25
import dotty .tools .dotc .core .Types ._
26
26
import dotty .tools .dotc .core .TypeErasure
27
27
import dotty .tools .dotc .transform .GenericSignatures
28
+ import dotty .tools .io .AbstractFile
28
29
29
30
/*
30
31
* Traits encapsulating functionality to convert Scala AST Trees into ASM ClassNodes.
@@ -47,6 +48,11 @@ trait BCodeHelpers extends BCodeIdiomatic with BytecodeWriters {
47
48
def ScalaATTRName : String = " Scala"
48
49
def ScalaSignatureATTRName : String = " ScalaSig"
49
50
51
+ @ threadUnsafe lazy val AnnotationRetentionAttr : ClassSymbol = ctx.requiredClass(" java.lang.annotation.Retention" )
52
+ @ threadUnsafe lazy val AnnotationRetentionSourceAttr : TermSymbol = ctx.requiredClass(" java.lang.annotation.RetentionPolicy" ).linkedClass.requiredValue(" SOURCE" )
53
+ @ threadUnsafe lazy val AnnotationRetentionClassAttr : TermSymbol = ctx.requiredClass(" java.lang.annotation.RetentionPolicy" ).linkedClass.requiredValue(" CLASS" )
54
+ @ threadUnsafe lazy val AnnotationRetentionRuntimeAttr : TermSymbol = ctx.requiredClass(" java.lang.annotation.RetentionPolicy" ).linkedClass.requiredValue(" RUNTIME" )
55
+ @ threadUnsafe lazy val JavaAnnotationClass : ClassSymbol = ctx.requiredClass(" java.lang.annotation.Annotation" )
50
56
51
57
val bCodeAsmCommon : BCodeAsmCommon [int.type ] = new BCodeAsmCommon (int)
52
58
import bCodeAsmCommon ._
0 commit comments