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 2021/04/16 04:02:50 UTC
[groovy] 02/02: Trivial tweak
This is an automated email from the ASF dual-hosted git repository.
sunlan pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/groovy.git
commit 0d51fd00259a48bf8ce9350626a95dfbe9d8ca34
Author: Daniel Sun <su...@apache.org>
AuthorDate: Thu Apr 15 08:04:11 2021 +0800
Trivial tweak
---
src/main/java/org/codehaus/groovy/classgen/asm/OperandStack.java | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/src/main/java/org/codehaus/groovy/classgen/asm/OperandStack.java b/src/main/java/org/codehaus/groovy/classgen/asm/OperandStack.java
index 73f6689..23476c4 100644
--- a/src/main/java/org/codehaus/groovy/classgen/asm/OperandStack.java
+++ b/src/main/java/org/codehaus/groovy/classgen/asm/OperandStack.java
@@ -332,7 +332,8 @@ public class OperandStack {
ClassNode top = stack.get(size - 1);
targetType = targetType.redirect();
- if (ClassNodeUtils.isCompatibleWith(top, targetType)) return;
+ if (top == targetType /* for better performance */
+ || ClassNodeUtils.isCompatibleWith(top, targetType)) return;
if (coerce) {
controller.getInvocationWriter().coerce(top, targetType);