5 Star 0 Fork 25

src-openEuler/netty

加入 Gitee
与超过 1200万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
文件
该仓库未声明开源许可证文件(LICENSE),使用请关注具体项目描述及其代码上游依赖。
克隆/下载
0006-Do-not-use-the-Graal-annotations.patch 5.93 KB
一键复制 编辑 原始数据 按行查看 历史
starlet_dx 提交于 2024-11-13 15:41 . Update to 4.1.114
From 6cc11ea389160c067b103bd4d0c356bb13442c77 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Fridrich=20=C5=A0trba?= <fridrich.strba@bluewin.ch>
Date: Thu, 30 Mar 2023 13:19:45 +0200
Subject: [PATCH 5/7] Do not use the Graal annotations
---
.../java/io/netty/util/NetUtilSubstitutions.java | 13 -------------
.../util/internal/svm/CleanerJava6Substitution.java | 10 ----------
.../svm/PlatformDependent0Substitution.java | 10 ----------
.../internal/svm/PlatformDependentSubstitution.java | 9 ---------
.../svm/UnsafeRefArrayAccessSubstitution.java | 9 ---------
5 files changed, 51 deletions(-)
diff --git a/common/src/main/java/io/netty/util/NetUtilSubstitutions.java b/common/src/main/java/io/netty/util/NetUtilSubstitutions.java
index 65c7bb94a5..18bfc1664f 100644
--- a/common/src/main/java/io/netty/util/NetUtilSubstitutions.java
+++ b/common/src/main/java/io/netty/util/NetUtilSubstitutions.java
@@ -15,35 +15,22 @@
*/
package io.netty.util;
-import com.oracle.svm.core.annotate.Alias;
-import com.oracle.svm.core.annotate.InjectAccessors;
-import com.oracle.svm.core.annotate.TargetClass;
-
import java.net.Inet4Address;
import java.net.Inet6Address;
import java.net.InetAddress;
import java.net.NetworkInterface;
import java.util.Collection;
-@TargetClass(NetUtil.class)
final class NetUtilSubstitutions {
private NetUtilSubstitutions() {
}
- @Alias
- @InjectAccessors(NetUtilLocalhost4Accessor.class)
public static Inet4Address LOCALHOST4;
- @Alias
- @InjectAccessors(NetUtilLocalhost6Accessor.class)
public static Inet6Address LOCALHOST6;
- @Alias
- @InjectAccessors(NetUtilLocalhostAccessor.class)
public static InetAddress LOCALHOST;
- @Alias
- @InjectAccessors(NetUtilNetworkInterfacesAccessor.class)
public static Collection<NetworkInterface> NETWORK_INTERFACES;
private static final class NetUtilLocalhost4Accessor {
diff --git a/common/src/main/java/io/netty/util/internal/svm/CleanerJava6Substitution.java b/common/src/main/java/io/netty/util/internal/svm/CleanerJava6Substitution.java
index aed4777a0d..0fa5a858ab 100644
--- a/common/src/main/java/io/netty/util/internal/svm/CleanerJava6Substitution.java
+++ b/common/src/main/java/io/netty/util/internal/svm/CleanerJava6Substitution.java
@@ -15,19 +15,9 @@
*/
package io.netty.util.internal.svm;
-import com.oracle.svm.core.annotate.Alias;
-import com.oracle.svm.core.annotate.RecomputeFieldValue;
-import com.oracle.svm.core.annotate.TargetClass;
-
-@TargetClass(className = "io.netty.util.internal.CleanerJava6")
final class CleanerJava6Substitution {
private CleanerJava6Substitution() {
}
- @Alias
- @RecomputeFieldValue(
- kind = RecomputeFieldValue.Kind.FieldOffset,
- declClassName = "java.nio.DirectByteBuffer",
- name = "cleaner")
private static long CLEANER_FIELD_OFFSET;
}
diff --git a/common/src/main/java/io/netty/util/internal/svm/PlatformDependent0Substitution.java b/common/src/main/java/io/netty/util/internal/svm/PlatformDependent0Substitution.java
index 1a06a5518d..3bd61f467a 100644
--- a/common/src/main/java/io/netty/util/internal/svm/PlatformDependent0Substitution.java
+++ b/common/src/main/java/io/netty/util/internal/svm/PlatformDependent0Substitution.java
@@ -15,19 +15,9 @@
*/
package io.netty.util.internal.svm;
-import com.oracle.svm.core.annotate.Alias;
-import com.oracle.svm.core.annotate.RecomputeFieldValue;
-import com.oracle.svm.core.annotate.TargetClass;
-
-@TargetClass(className = "io.netty.util.internal.PlatformDependent0")
final class PlatformDependent0Substitution {
private PlatformDependent0Substitution() {
}
- @Alias
- @RecomputeFieldValue(
- kind = RecomputeFieldValue.Kind.FieldOffset,
- declClassName = "java.nio.Buffer",
- name = "address")
private static long ADDRESS_FIELD_OFFSET;
}
diff --git a/common/src/main/java/io/netty/util/internal/svm/PlatformDependentSubstitution.java b/common/src/main/java/io/netty/util/internal/svm/PlatformDependentSubstitution.java
index 08932da772..8df7f18218 100644
--- a/common/src/main/java/io/netty/util/internal/svm/PlatformDependentSubstitution.java
+++ b/common/src/main/java/io/netty/util/internal/svm/PlatformDependentSubstitution.java
@@ -15,11 +15,6 @@
*/
package io.netty.util.internal.svm;
-import com.oracle.svm.core.annotate.Alias;
-import com.oracle.svm.core.annotate.RecomputeFieldValue;
-import com.oracle.svm.core.annotate.TargetClass;
-
-@TargetClass(className = "io.netty.util.internal.PlatformDependent")
final class PlatformDependentSubstitution {
private PlatformDependentSubstitution() {
}
@@ -31,9 +26,5 @@ final class PlatformDependentSubstitution {
* in PlatformDependent happens during image building, the non-recomputed value
* is cached.
*/
- @Alias
- @RecomputeFieldValue(
- kind = RecomputeFieldValue.Kind.ArrayBaseOffset,
- declClass = byte[].class)
private static long BYTE_ARRAY_BASE_OFFSET;
}
diff --git a/common/src/main/java/io/netty/util/internal/svm/UnsafeRefArrayAccessSubstitution.java b/common/src/main/java/io/netty/util/internal/svm/UnsafeRefArrayAccessSubstitution.java
index 08f492f132..f0b10d7cde 100644
--- a/common/src/main/java/io/netty/util/internal/svm/UnsafeRefArrayAccessSubstitution.java
+++ b/common/src/main/java/io/netty/util/internal/svm/UnsafeRefArrayAccessSubstitution.java
@@ -15,18 +15,9 @@
*/
package io.netty.util.internal.svm;
-import com.oracle.svm.core.annotate.Alias;
-import com.oracle.svm.core.annotate.RecomputeFieldValue;
-import com.oracle.svm.core.annotate.TargetClass;
-
-@TargetClass(className = "io.netty.util.internal.shaded.org.jctools.util.UnsafeRefArrayAccess")
final class UnsafeRefArrayAccessSubstitution {
private UnsafeRefArrayAccessSubstitution() {
}
- @Alias
- @RecomputeFieldValue(
- kind = RecomputeFieldValue.Kind.ArrayIndexShift,
- declClass = Object[].class)
public static int REF_ELEMENT_SHIFT;
}
--
2.46.1
马建仓 AI 助手
尝试更多
代码解读
代码找茬
代码优化
1
https://gitee.com/src-openeuler/netty.git
git@gitee.com:src-openeuler/netty.git
src-openeuler
netty
netty
master

搜索帮助