You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@groovy.apache.org by su...@apache.org on 2020/07/15 07:06:07 UTC

[groovy] branch GROOVY_3_0_X updated: Trivial tweak: support logging generation of bytecode for records

This is an automated email from the ASF dual-hosted git repository.

sunlan pushed a commit to branch GROOVY_3_0_X
in repository https://gitbox.apache.org/repos/asf/groovy.git


The following commit(s) were added to refs/heads/GROOVY_3_0_X by this push:
     new 4d5a05a  Trivial tweak: support logging generation of bytecode for records
4d5a05a is described below

commit 4d5a05a184c306b0a74b088a225a1975c7214d8e
Author: Daniel Sun <su...@apache.org>
AuthorDate: Wed Jul 15 15:04:22 2020 +0800

    Trivial tweak: support logging generation of bytecode for records
    
    (cherry picked from commit f65b353f481682b19fcaa54c1876e028451713bd)
---
 .../classgen/asm/util/LoggableTextifier.java       | 33 ++++++++++++++++++++++
 1 file changed, 33 insertions(+)

diff --git a/src/main/java/org/codehaus/groovy/classgen/asm/util/LoggableTextifier.java b/src/main/java/org/codehaus/groovy/classgen/asm/util/LoggableTextifier.java
index c9a4fc5..5ab719c 100644
--- a/src/main/java/org/codehaus/groovy/classgen/asm/util/LoggableTextifier.java
+++ b/src/main/java/org/codehaus/groovy/classgen/asm/util/LoggableTextifier.java
@@ -515,4 +515,37 @@ public class LoggableTextifier extends Textifier {
         log();
         return t;
     }
+
+    @Override
+    public Printer visitRecordComponent(String name, String descriptor, String signature) {
+        Printer p = super.visitRecordComponent(name, descriptor, signature);
+        log();
+        return p;
+    }
+
+    @Override
+    public Textifier visitRecordComponentAnnotation(String descriptor, boolean visible) {
+        Textifier t = super.visitRecordComponentAnnotation(descriptor, visible);
+        log();
+        return t;
+    }
+
+    @Override
+    public Printer visitRecordComponentTypeAnnotation(int typeRef, TypePath typePath, String descriptor, boolean visible) {
+        Printer p = super.visitRecordComponentTypeAnnotation(typeRef, typePath, descriptor, visible);
+        log();
+        return p;
+    }
+
+    @Override
+    public void visitRecordComponentAttribute(Attribute attribute) {
+        super.visitRecordComponentAttribute(attribute);
+        log();
+    }
+
+    @Override
+    public void visitRecordComponentEnd() {
+        super.visitRecordComponentEnd();
+        log();
+    }
 }