154 public final Type overrideType; |
154 public final Type overrideType; |
155 public final Type retentionType; |
155 public final Type retentionType; |
156 public final Type deprecatedType; |
156 public final Type deprecatedType; |
157 public final Type suppressWarningsType; |
157 public final Type suppressWarningsType; |
158 public final Type inheritedType; |
158 public final Type inheritedType; |
|
159 public final Type profileType; |
159 public final Type proprietaryType; |
160 public final Type proprietaryType; |
160 public final Type systemType; |
161 public final Type systemType; |
161 public final Type autoCloseableType; |
162 public final Type autoCloseableType; |
162 public final Type trustMeType; |
163 public final Type trustMeType; |
163 public final Type lambdaMetafactory; |
164 public final Type lambdaMetafactory; |
356 } |
357 } |
357 } |
358 } |
358 }; |
359 }; |
359 } |
360 } |
360 |
361 |
|
362 } |
|
363 |
|
364 // Enter a synthetic class that is used to mark classes in ct.sym. |
|
365 // This class does not have a class file. |
|
366 private Type enterSyntheticAnnotation(String name) { |
|
367 ClassType type = (ClassType)enterClass(name); |
|
368 ClassSymbol sym = (ClassSymbol)type.tsym; |
|
369 sym.completer = null; |
|
370 sym.flags_field = PUBLIC|ACYCLIC|ANNOTATION|INTERFACE; |
|
371 sym.erasure_field = type; |
|
372 sym.members_field = new Scope(sym); |
|
373 type.typarams_field = List.nil(); |
|
374 type.allparams_field = List.nil(); |
|
375 type.supertype_field = annotationType; |
|
376 type.interfaces_field = List.nil(); |
|
377 return type; |
361 } |
378 } |
362 |
379 |
363 /** Constructor; enters all predefined identifiers and operators |
380 /** Constructor; enters all predefined identifiers and operators |
364 * into symbol table. |
381 * into symbol table. |
365 */ |
382 */ |
519 synthesizeBoxTypeIfMissing(voidType); |
536 synthesizeBoxTypeIfMissing(voidType); |
520 |
537 |
521 // Enter a synthetic class that is used to mark internal |
538 // Enter a synthetic class that is used to mark internal |
522 // proprietary classes in ct.sym. This class does not have a |
539 // proprietary classes in ct.sym. This class does not have a |
523 // class file. |
540 // class file. |
524 ClassType proprietaryType = (ClassType)enterClass("sun.Proprietary+Annotation"); |
541 proprietaryType = enterSyntheticAnnotation("sun.Proprietary+Annotation"); |
525 this.proprietaryType = proprietaryType; |
542 |
526 ClassSymbol proprietarySymbol = (ClassSymbol)proprietaryType.tsym; |
543 // Enter a synthetic class that is used to provide profile info for |
527 proprietarySymbol.completer = null; |
544 // classes in ct.sym. This class does not have a class file. |
528 proprietarySymbol.flags_field = PUBLIC|ACYCLIC|ANNOTATION|INTERFACE; |
545 profileType = enterSyntheticAnnotation("jdk.Profile+Annotation"); |
529 proprietarySymbol.erasure_field = proprietaryType; |
546 MethodSymbol m = new MethodSymbol(PUBLIC | ABSTRACT, names.value, intType, profileType.tsym); |
530 proprietarySymbol.members_field = new Scope(proprietarySymbol); |
547 profileType.tsym.members().enter(m); |
531 proprietaryType.typarams_field = List.nil(); |
|
532 proprietaryType.allparams_field = List.nil(); |
|
533 proprietaryType.supertype_field = annotationType; |
|
534 proprietaryType.interfaces_field = List.nil(); |
|
535 |
548 |
536 // Enter a class for arrays. |
549 // Enter a class for arrays. |
537 // The class implements java.lang.Cloneable and java.io.Serializable. |
550 // The class implements java.lang.Cloneable and java.io.Serializable. |
538 // It has a final length field and a clone method. |
551 // It has a final length field and a clone method. |
539 ClassType arrayClassType = (ClassType)arrayClass.type; |
552 ClassType arrayClassType = (ClassType)arrayClass.type; |