git: openjdk/babylon: code-reflection: Initial code reflection prototype

Paul Sandoz psandoz at openjdk.org
Tue Jan 16 19:57:12 UTC 2024


Changeset: 38abcc97
Author:    Paul Sandoz <psandoz at openjdk.org>
Date:      2024-01-16 19:55:48 +0000
URL:       https://git.openjdk.org/babylon/commit/38abcc97ba1c0e7a49f0965a66acd71913303f82

Initial code reflection prototype

Co-authored-by: Mourad Abbay <mabbay at openjdk.org>
Co-authored-by: Gary Frost <gfrost at openjdk.org>
Co-authored-by: Ian Graves <igraves at openjdk.org>
Co-authored-by: Maurizio Cimadamore <mcimadamore at openjdk.org>
Co-authored-by: Adam Sotona <asotona at openjdk.org>

+ cr-util/copy-to-compiler.sh
! make/conf/module-loader-map.conf
! make/langtools/build.xml
! make/modules/java.base/Java.gmk
! make/modules/jdk.compiler/Gensrc.gmk
! src/java.base/share/classes/java/lang/invoke/AbstractValidatingLambdaMetafactory.java
! src/java.base/share/classes/java/lang/invoke/InnerClassLambdaMetafactory.java
! src/java.base/share/classes/java/lang/invoke/LambdaMetafactory.java
! src/java.base/share/classes/java/lang/reflect/Method.java
+ src/java.base/share/classes/java/lang/reflect/code/Block.java
+ src/java.base/share/classes/java/lang/reflect/code/Body.java
+ src/java.base/share/classes/java/lang/reflect/code/CodeElement.java
+ src/java.base/share/classes/java/lang/reflect/code/CopyContext.java
+ src/java.base/share/classes/java/lang/reflect/code/CopyContextImpl.java
+ src/java.base/share/classes/java/lang/reflect/code/Op.java
+ src/java.base/share/classes/java/lang/reflect/code/OpTransformer.java
+ src/java.base/share/classes/java/lang/reflect/code/Quotable.java
+ src/java.base/share/classes/java/lang/reflect/code/Quoted.java
+ src/java.base/share/classes/java/lang/reflect/code/Value.java
+ src/java.base/share/classes/java/lang/reflect/code/analysis/Liveness.java
+ src/java.base/share/classes/java/lang/reflect/code/analysis/Patterns.java
+ src/java.base/share/classes/java/lang/reflect/code/analysis/SSA.java
+ src/java.base/share/classes/java/lang/reflect/code/analysis/package-info.java
+ src/java.base/share/classes/java/lang/reflect/code/bytecode/BytecodeGenerator.java
+ src/java.base/share/classes/java/lang/reflect/code/bytecode/BytecodeInstructionOps.java
+ src/java.base/share/classes/java/lang/reflect/code/bytecode/BytecodeLift.java
+ src/java.base/share/classes/java/lang/reflect/code/bytecode/BytecodeLower.java
+ src/java.base/share/classes/java/lang/reflect/code/bytecode/package-info.java
+ src/java.base/share/classes/java/lang/reflect/code/descriptor/FieldDesc.java
+ src/java.base/share/classes/java/lang/reflect/code/descriptor/MethodDesc.java
+ src/java.base/share/classes/java/lang/reflect/code/descriptor/MethodTypeDesc.java
+ src/java.base/share/classes/java/lang/reflect/code/descriptor/RecordTypeDesc.java
+ src/java.base/share/classes/java/lang/reflect/code/descriptor/TypeDesc.java
+ src/java.base/share/classes/java/lang/reflect/code/descriptor/impl/FieldDescImpl.java
+ src/java.base/share/classes/java/lang/reflect/code/descriptor/impl/MethodDescImpl.java
+ src/java.base/share/classes/java/lang/reflect/code/descriptor/impl/MethodTypeDescImpl.java
+ src/java.base/share/classes/java/lang/reflect/code/descriptor/impl/RecordTypeDescImpl.java
+ src/java.base/share/classes/java/lang/reflect/code/descriptor/impl/TypeDescImpl.java
+ src/java.base/share/classes/java/lang/reflect/code/descriptor/package-info.java
+ src/java.base/share/classes/java/lang/reflect/code/impl/GlobalValueBlockNaming.java
+ src/java.base/share/classes/java/lang/reflect/code/impl/OpWriter.java
+ src/java.base/share/classes/java/lang/reflect/code/interpreter/Interpreter.java
+ src/java.base/share/classes/java/lang/reflect/code/interpreter/InvokableLeafOps.java
+ src/java.base/share/classes/java/lang/reflect/code/interpreter/package-info.java
+ src/java.base/share/classes/java/lang/reflect/code/op/CoreOps.java
+ src/java.base/share/classes/java/lang/reflect/code/op/ExtendedOps.java
+ src/java.base/share/classes/java/lang/reflect/code/op/OpDeclaration.java
+ src/java.base/share/classes/java/lang/reflect/code/op/OpDefinition.java
+ src/java.base/share/classes/java/lang/reflect/code/op/OpFactory.java
+ src/java.base/share/classes/java/lang/reflect/code/op/OpWithDefinition.java
+ src/java.base/share/classes/java/lang/reflect/code/op/package-info.java
+ src/java.base/share/classes/java/lang/reflect/code/package-info.java
+ src/java.base/share/classes/java/lang/reflect/code/parser/OpParser.java
+ src/java.base/share/classes/java/lang/reflect/code/parser/impl/DescParser.java
+ src/java.base/share/classes/java/lang/reflect/code/parser/impl/Errors.java
+ src/java.base/share/classes/java/lang/reflect/code/parser/impl/JavaBasedTokenizer.java
+ src/java.base/share/classes/java/lang/reflect/code/parser/impl/Lexer.java
+ src/java.base/share/classes/java/lang/reflect/code/parser/impl/Log.java
+ src/java.base/share/classes/java/lang/reflect/code/parser/impl/Position.java
+ src/java.base/share/classes/java/lang/reflect/code/parser/impl/Scanner.java
+ src/java.base/share/classes/java/lang/reflect/code/parser/impl/Tokens.java
+ src/java.base/share/classes/java/lang/reflect/code/parser/impl/UnicodeReader.java
+ src/java.base/share/classes/java/lang/reflect/code/parser/package-info.java
+ src/java.base/share/classes/java/lang/runtime/CodeReflection.java
! src/java.base/share/classes/module-info.java
! src/java.compiler/share/classes/javax/lang/model/util/Elements.java
+ src/jdk.code.tools/share/classes/jdk/code/tools/dot/DotGenerator.java
+ src/jdk.code.tools/share/classes/jdk/code/tools/dot/DotRenderer.java
+ src/jdk.code.tools/share/classes/jdk/code/tools/dot/DotViewer.java
+ src/jdk.code.tools/share/classes/jdk/code/tools/renderer/CStyleRenderer.java
+ src/jdk.code.tools/share/classes/jdk/code/tools/renderer/CommonRenderer.java
+ src/jdk.code.tools/share/classes/jdk/code/tools/renderer/Diff.java
+ src/jdk.code.tools/share/classes/jdk/code/tools/renderer/GlobalValueBlockNaming.java
+ src/jdk.code.tools/share/classes/jdk/code/tools/renderer/ProcessRunner.java
+ src/jdk.code.tools/share/classes/jdk/code/tools/renderer/SRRenderer.java
+ src/jdk.code.tools/share/classes/jdk/code/tools/renderer/TerminalColors.java
+ src/jdk.code.tools/share/classes/jdk/code/tools/renderer/TextRenderer.java
+ src/jdk.code.tools/share/classes/module-info.java
! src/jdk.compiler/share/classes/com/sun/tools/javac/code/Source.java
! src/jdk.compiler/share/classes/com/sun/tools/javac/code/Symtab.java
! src/jdk.compiler/share/classes/com/sun/tools/javac/code/Types.java
! src/jdk.compiler/share/classes/com/sun/tools/javac/comp/ArgumentAttr.java
! src/jdk.compiler/share/classes/com/sun/tools/javac/comp/Attr.java
! src/jdk.compiler/share/classes/com/sun/tools/javac/comp/DeferredAttr.java
! src/jdk.compiler/share/classes/com/sun/tools/javac/comp/LambdaToMethod.java
+ src/jdk.compiler/share/classes/com/sun/tools/javac/comp/ReflectMethods.java
! src/jdk.compiler/share/classes/com/sun/tools/javac/jvm/Gen.java
! src/jdk.compiler/share/classes/com/sun/tools/javac/main/JavaCompiler.java
! src/jdk.compiler/share/classes/com/sun/tools/javac/model/JavacElements.java
! src/jdk.compiler/share/classes/com/sun/tools/javac/resources/compiler.properties
! src/jdk.compiler/share/classes/com/sun/tools/javac/tree/JCTree.java
! src/jdk.compiler/share/classes/com/sun/tools/javac/tree/TreeInfo.java
+ test/jdk/java/lang/reflect/Method/cr/TreeAccessTest.java
+ test/jdk/java/lang/reflect/code/TestArrayCreation.java
+ test/jdk/java/lang/reflect/code/TestBinops.java
+ test/jdk/java/lang/reflect/code/TestBlockOp.java
+ test/jdk/java/lang/reflect/code/TestBreakContinue.java
+ test/jdk/java/lang/reflect/code/TestBuild.java
+ test/jdk/java/lang/reflect/code/TestClosureOps.java
+ test/jdk/java/lang/reflect/code/TestConditionalExpression.java
+ test/jdk/java/lang/reflect/code/TestConditionalOp.java
+ test/jdk/java/lang/reflect/code/TestConstants.java
+ test/jdk/java/lang/reflect/code/TestCopy.java
+ test/jdk/java/lang/reflect/code/TestDominate.java
+ test/jdk/java/lang/reflect/code/TestEnhancedForOp.java
+ test/jdk/java/lang/reflect/code/TestExceptionRegionOps.java
+ test/jdk/java/lang/reflect/code/TestForOp.java
+ test/jdk/java/lang/reflect/code/TestIfOp.java
+ test/jdk/java/lang/reflect/code/TestInline.java
+ test/jdk/java/lang/reflect/code/TestLambdaOps.java
+ test/jdk/java/lang/reflect/code/TestLinq.java
+ test/jdk/java/lang/reflect/code/TestLinqUsingQuotable.java
+ test/jdk/java/lang/reflect/code/TestLiveness.java
+ test/jdk/java/lang/reflect/code/TestLocalTransformationsAdaption.java
+ test/jdk/java/lang/reflect/code/TestPatterns.java
+ test/jdk/java/lang/reflect/code/TestPrimitiveCast.java
+ test/jdk/java/lang/reflect/code/TestSSA.java
+ test/jdk/java/lang/reflect/code/TestTry.java
+ test/jdk/java/lang/reflect/code/TestTryFinally.java
+ test/jdk/java/lang/reflect/code/TestTryFinallyNested.java
+ test/jdk/java/lang/reflect/code/TestUsesDependsOn.java
+ test/jdk/java/lang/reflect/code/TestWhileOp.java
+ test/jdk/java/lang/reflect/code/ad/ActiveSet.java
+ test/jdk/java/lang/reflect/code/ad/ExpressionElimination.java
+ test/jdk/java/lang/reflect/code/ad/ForwardDifferentiation.java
+ test/jdk/java/lang/reflect/code/ad/TestForwardAutoDiff.java
+ test/jdk/java/lang/reflect/code/bytecode/TestArrayCreation.java
+ test/jdk/java/lang/reflect/code/bytecode/TestLiftArrayCreation.java
+ test/jdk/java/lang/reflect/code/bytecode/TestLiftControl.java
+ test/jdk/java/lang/reflect/code/bytecode/TestLiftExample.java
+ test/jdk/java/lang/reflect/code/bytecode/TestLiftSimple.java
+ test/jdk/java/lang/reflect/code/bytecode/TestNew.java
+ test/jdk/java/lang/reflect/code/bytecode/TestSimple.java
+ test/jdk/java/lang/reflect/code/bytecode/TestSlots.java
+ test/jdk/java/lang/reflect/code/bytecode/TestTry.java
+ test/jdk/java/lang/reflect/code/bytecode/TestTryFinally.java
+ test/jdk/java/lang/reflect/code/bytecode/TestTryFinallyNested.java
+ test/jdk/java/lang/reflect/code/bytecode/TestWhile.java
+ test/jdk/java/lang/reflect/code/descriptors/TestDescriptors.java
+ test/jdk/java/lang/reflect/code/expression/ExpressionElimination.java
+ test/jdk/java/lang/reflect/code/expression/TestExpressionElimination.java
+ test/jdk/java/lang/reflect/code/parser/TestParse.java
+ test/jdk/java/lang/reflect/code/parser/TestScanner.java
+ test/jdk/java/lang/reflect/code/stream/StreamFuser.java
+ test/jdk/java/lang/reflect/code/stream/StreamFuserUsingQuotable.java
+ test/jdk/java/lang/reflect/code/stream/TestStream.java
+ test/jdk/java/lang/reflect/code/stream/TestStreamUsingQuotable.java
! test/langtools/tools/javac/diags/examples.not-yet.txt
+ test/langtools/tools/javac/reflect/ArrayAccessTest.java
+ test/langtools/tools/javac/reflect/BinopTest.java
+ test/langtools/tools/javac/reflect/BlockTest.java
+ test/langtools/tools/javac/reflect/BoxingConversionTest.java
+ test/langtools/tools/javac/reflect/BreakContinueTest.java
+ test/langtools/tools/javac/reflect/CastInstanceOfTest.java
+ test/langtools/tools/javac/reflect/CodeModelSameInstanceTest.java
+ test/langtools/tools/javac/reflect/CodeReflectionTester.java
+ test/langtools/tools/javac/reflect/ConditionalAndOrTest.java
+ test/langtools/tools/javac/reflect/ConditionalExpressionTest.java
+ test/langtools/tools/javac/reflect/ConstantsTest.java
+ test/langtools/tools/javac/reflect/DenotableTypesTest.java
+ test/langtools/tools/javac/reflect/EnumAccessTest.java
+ test/langtools/tools/javac/reflect/FieldAccessTest.java
+ test/langtools/tools/javac/reflect/ForLoopTest.java
+ test/langtools/tools/javac/reflect/IR.java
+ test/langtools/tools/javac/reflect/IfTest.java
+ test/langtools/tools/javac/reflect/ImplicitConversionTest.java
+ test/langtools/tools/javac/reflect/IntersectionTypeTest.java
+ test/langtools/tools/javac/reflect/LambdaTest.java
+ test/langtools/tools/javac/reflect/LocalVarTest.java
+ test/langtools/tools/javac/reflect/MethodCallTest.java
+ test/langtools/tools/javac/reflect/MethodReferenceTest.java
+ test/langtools/tools/javac/reflect/NewArrayTest.java
+ test/langtools/tools/javac/reflect/NewTest.java
+ test/langtools/tools/javac/reflect/NullTest.java
+ test/langtools/tools/javac/reflect/PatternsTest.java
+ test/langtools/tools/javac/reflect/PrimitiveCastTest.java
+ test/langtools/tools/javac/reflect/QuotableIntersectionTest.java
+ test/langtools/tools/javac/reflect/QuotableSubtypeTest.java
+ test/langtools/tools/javac/reflect/QuotedSameInstanceTest.java
+ test/langtools/tools/javac/reflect/QuotedTest.java
+ test/langtools/tools/javac/reflect/SwitchExpressionTest.java
+ test/langtools/tools/javac/reflect/TestIRFromAnnotation.java
+ test/langtools/tools/javac/reflect/ThrowTest.java
+ test/langtools/tools/javac/reflect/TryTest.java
+ test/langtools/tools/javac/reflect/WhileLoopTest.java
+ test/langtools/tools/javac/reflect/quoted/TestAssignment.java
+ test/langtools/tools/javac/reflect/quoted/TestAssignment.out
+ test/langtools/tools/javac/reflect/quoted/TestCaptureQuotable.java
+ test/langtools/tools/javac/reflect/quoted/TestCaptureQuoted.java
+ test/langtools/tools/javac/reflect/quoted/TestGenericMethodCall.java
+ test/langtools/tools/javac/reflect/quoted/TestGenericMethodCall.out
+ test/langtools/tools/javac/reflect/quoted/TestMethodCall.java
+ test/langtools/tools/javac/reflect/quoted/TestMethodCall.out
+ test/langtools/tools/javac/reflect/quoted/TestRecovery.java
+ test/langtools/tools/javac/reflect/quoted/TestRecovery.out



More information about the babylon-dev mailing list