From 42ab361029a018d69372846cc73d3722f011fa76 Mon Sep 17 00:00:00 2001 From: Marcono1234 Date: Tue, 21 Jul 2026 00:05:03 +0200 Subject: [PATCH] Remove incorrect `Deprecated#since` values - Remove values which contained a message instead of a version - Remove versions which refer to Chicory versioning; Endive started at 0.0.1 again --- .../java/run/endive/experimental/aot/AotMachine.java | 4 ++-- .../main/java/run/endive/runtime/GlobalInstance.java | 8 ++++---- .../src/main/java/run/endive/runtime/HostFunction.java | 2 +- .../main/java/run/endive/runtime/ImportFunction.java | 4 ++-- .../src/main/java/run/endive/runtime/WasmArray.java | 4 ++-- .../main/java/run/endive/runtime/WasmException.java | 2 +- .../src/main/java/run/endive/runtime/WasmStruct.java | 4 ++-- wasm/src/main/java/run/endive/wasm/types/Global.java | 2 +- .../main/java/run/endive/wasm/types/GlobalImport.java | 2 +- wasm/src/main/java/run/endive/wasm/types/Table.java | 2 +- .../main/java/run/endive/wasm/types/TableImport.java | 2 +- wasm/src/main/java/run/endive/wasm/types/ValType.java | 10 ++++++++-- wasm/src/main/java/run/endive/wasm/types/Value.java | 2 +- .../src/main/java/run/endive/wasm/types/ValueType.java | 2 +- 14 files changed, 28 insertions(+), 22 deletions(-) diff --git a/compiler/src/main/java/run/endive/experimental/aot/AotMachine.java b/compiler/src/main/java/run/endive/experimental/aot/AotMachine.java index a473a7bb0..f62a86933 100644 --- a/compiler/src/main/java/run/endive/experimental/aot/AotMachine.java +++ b/compiler/src/main/java/run/endive/experimental/aot/AotMachine.java @@ -12,7 +12,7 @@ * This class is deprecated and will be removed in a future version. Please use * the {@link run.endive.compiler.MachineFactoryCompiler} instead. */ -@Deprecated(since = "1.4.0") +@Deprecated public final class AotMachine implements Machine { private final Machine machine; @@ -24,7 +24,7 @@ public final class AotMachine implements Machine { * * @param instance the instance to use for the machine */ - @Deprecated(since = "1.4.0") + @Deprecated public AotMachine(Instance instance) { this.machine = new MachineFactory(instance.module()).apply(instance); } diff --git a/runtime/src/main/java/run/endive/runtime/GlobalInstance.java b/runtime/src/main/java/run/endive/runtime/GlobalInstance.java index 296cd83d4..5cc92ab15 100644 --- a/runtime/src/main/java/run/endive/runtime/GlobalInstance.java +++ b/runtime/src/main/java/run/endive/runtime/GlobalInstance.java @@ -16,7 +16,7 @@ public class GlobalInstance { /** * @deprecated use {@link #builder()} */ - @Deprecated(since = "use builder()") + @Deprecated public GlobalInstance(Value value) { this(value, MutabilityType.Const); } @@ -24,7 +24,7 @@ public GlobalInstance(Value value) { /** * @deprecated use {@link #builder()} */ - @Deprecated(since = "use builder()") + @Deprecated public GlobalInstance(Value value, MutabilityType mutabilityType) { this.valueLow = value.raw(); this.valueHigh = 0; @@ -35,7 +35,7 @@ public GlobalInstance(Value value, MutabilityType mutabilityType) { /** * @deprecated use {@link #builder()} */ - @Deprecated(since = "use builder()") + @Deprecated public GlobalInstance( long valueLow, long valueHigh, ValueType valueType, MutabilityType mutabilityType) { this.valueLow = valueLow; @@ -47,7 +47,7 @@ public GlobalInstance( /** * @deprecated use {@link #builder()} */ - @Deprecated(since = "use builder()") + @Deprecated public GlobalInstance( long valueLow, long valueHigh, ValType valType, MutabilityType mutabilityType) { this.valueLow = valueLow; diff --git a/runtime/src/main/java/run/endive/runtime/HostFunction.java b/runtime/src/main/java/run/endive/runtime/HostFunction.java index fcf681c25..506147436 100644 --- a/runtime/src/main/java/run/endive/runtime/HostFunction.java +++ b/runtime/src/main/java/run/endive/runtime/HostFunction.java @@ -10,7 +10,7 @@ public class HostFunction extends ImportFunction { /** * @deprecated use {@link #HostFunction(String, String, FunctionType, WasmFunctionHandle)} */ - @Deprecated(since = "1.3.0") + @Deprecated public HostFunction( String moduleName, String symbolName, diff --git a/runtime/src/main/java/run/endive/runtime/ImportFunction.java b/runtime/src/main/java/run/endive/runtime/ImportFunction.java index d4b7c1b16..1c8f8fe3a 100644 --- a/runtime/src/main/java/run/endive/runtime/ImportFunction.java +++ b/runtime/src/main/java/run/endive/runtime/ImportFunction.java @@ -15,7 +15,7 @@ public class ImportFunction implements ImportValue { // Optional: source instance for cross-module canonical type matching private final Instance sourceInstance; - @Deprecated(since = "1.3.0") + @Deprecated protected static List convert(List objs) { var result = new ArrayList(objs.size()); for (var v : objs) { @@ -51,7 +51,7 @@ public ImportFunction( this.sourceInstance = sourceInstance; } - @Deprecated(since = "1.3.0") + @Deprecated public ImportFunction( String module, String name, diff --git a/runtime/src/main/java/run/endive/runtime/WasmArray.java b/runtime/src/main/java/run/endive/runtime/WasmArray.java index 5ee9486da..79f788cb8 100644 --- a/runtime/src/main/java/run/endive/runtime/WasmArray.java +++ b/runtime/src/main/java/run/endive/runtime/WasmArray.java @@ -17,7 +17,7 @@ public final class WasmArray implements WasmGcRef { /** * @deprecated use {@link #builder()} */ - @Deprecated(since = "use builder()") + @Deprecated public WasmArray(int typeIdx, long[] elements) { this(typeIdx, elements, null); } @@ -25,7 +25,7 @@ public WasmArray(int typeIdx, long[] elements) { /** * @deprecated use {@link #builder()} */ - @Deprecated(since = "use builder()") + @Deprecated public WasmArray(int typeIdx, long[] elements, Object[] elementRefs) { this.typeIdx = typeIdx; this.elements = elements; diff --git a/runtime/src/main/java/run/endive/runtime/WasmException.java b/runtime/src/main/java/run/endive/runtime/WasmException.java index f519021ee..da0b6a36c 100644 --- a/runtime/src/main/java/run/endive/runtime/WasmException.java +++ b/runtime/src/main/java/run/endive/runtime/WasmException.java @@ -22,7 +22,7 @@ private WasmException(Instance instance, int tagIdx, long[] args, Object[] refAr /** * @deprecated use {@link #builder()} */ - @Deprecated(since = "use builder()") + @Deprecated public WasmException(Instance instance, int tagIdx, long[] args) { this(instance, tagIdx, args.clone(), null); } diff --git a/runtime/src/main/java/run/endive/runtime/WasmStruct.java b/runtime/src/main/java/run/endive/runtime/WasmStruct.java index 2b6cfffd3..aa5b4d001 100644 --- a/runtime/src/main/java/run/endive/runtime/WasmStruct.java +++ b/runtime/src/main/java/run/endive/runtime/WasmStruct.java @@ -17,7 +17,7 @@ public final class WasmStruct implements WasmGcRef { /** * @deprecated use {@link #builder()} */ - @Deprecated(since = "use builder()") + @Deprecated public WasmStruct(int typeIdx, long[] fields) { this(typeIdx, fields, null); } @@ -25,7 +25,7 @@ public WasmStruct(int typeIdx, long[] fields) { /** * @deprecated use {@link #builder()} */ - @Deprecated(since = "use builder()") + @Deprecated public WasmStruct(int typeIdx, long[] fields, Object[] fieldRefs) { this.typeIdx = typeIdx; this.fields = fields; diff --git a/wasm/src/main/java/run/endive/wasm/types/Global.java b/wasm/src/main/java/run/endive/wasm/types/Global.java index d431f4a12..d16de2761 100644 --- a/wasm/src/main/java/run/endive/wasm/types/Global.java +++ b/wasm/src/main/java/run/endive/wasm/types/Global.java @@ -20,7 +20,7 @@ public Global(ValType valType, MutabilityType mutabilityType, List /** * @deprecated use {@link #Global(ValType, MutabilityType, List)} */ - @Deprecated(since = "1.3.0") + @Deprecated public Global(ValueType valueType, MutabilityType mutabilityType, List init) { this.valType = valueType.toValType(); this.mutabilityType = mutabilityType; diff --git a/wasm/src/main/java/run/endive/wasm/types/GlobalImport.java b/wasm/src/main/java/run/endive/wasm/types/GlobalImport.java index 911c7e573..249ca1e4f 100644 --- a/wasm/src/main/java/run/endive/wasm/types/GlobalImport.java +++ b/wasm/src/main/java/run/endive/wasm/types/GlobalImport.java @@ -27,7 +27,7 @@ public GlobalImport( /** * @deprecated use {@link #GlobalImport(String, String, MutabilityType, ValType)} */ - @Deprecated(since = "1.3.0") + @Deprecated public GlobalImport( String moduleName, String name, MutabilityType mutabilityType, ValueType type) { super(moduleName, name); diff --git a/wasm/src/main/java/run/endive/wasm/types/Table.java b/wasm/src/main/java/run/endive/wasm/types/Table.java index 8be8bda1d..5d96ec2b3 100644 --- a/wasm/src/main/java/run/endive/wasm/types/Table.java +++ b/wasm/src/main/java/run/endive/wasm/types/Table.java @@ -18,7 +18,7 @@ public Table(ValType elementType, TableLimits limits) { /** * @deprecated use {@link #Table(ValType, TableLimits)} */ - @Deprecated(since = "1.3.0") + @Deprecated public Table(ValueType elementType, TableLimits limits) { this( elementType.toValType(), diff --git a/wasm/src/main/java/run/endive/wasm/types/TableImport.java b/wasm/src/main/java/run/endive/wasm/types/TableImport.java index f785fa368..69ffb8853 100644 --- a/wasm/src/main/java/run/endive/wasm/types/TableImport.java +++ b/wasm/src/main/java/run/endive/wasm/types/TableImport.java @@ -26,7 +26,7 @@ public TableImport(String moduleName, String name, ValType entryType, TableLimit /** * @deprecated use {@link #TableImport(String, String, ValType, TableLimits)} */ - @Deprecated(since = "1.3.0") + @Deprecated public TableImport(String moduleName, String name, ValueType entryType, TableLimits limits) { super(moduleName, name); this.entryType = Objects.requireNonNull(entryType, "entryType").toValType(); diff --git a/wasm/src/main/java/run/endive/wasm/types/ValType.java b/wasm/src/main/java/run/endive/wasm/types/ValType.java index 0b1f55623..adee0b2a5 100644 --- a/wasm/src/main/java/run/endive/wasm/types/ValType.java +++ b/wasm/src/main/java/run/endive/wasm/types/ValType.java @@ -801,7 +801,10 @@ private boolean isExternRef() { return false; } - @Deprecated(since = "use .build.resolve(typeSection) instead") + /** + * @deprecated use {@code .build().resolve(typeSection)} instead + */ + @Deprecated public ValType build(Function context) { if (!isValidOpcode(opcode)) { throw new WasmEngineException("Invalid type opcode: " + opcode); @@ -834,7 +837,10 @@ public ValType build() { : -1); } - @Deprecated(since = "use .build.resolve(typeSection) instead") + /** + * @deprecated use {@code .build().resolve(typeSection)} instead + */ + @Deprecated public FunctionType substitute( int opcode, int typeIdx, Function context) { if (ValType.isReference(opcode) && typeIdx >= 0) { diff --git a/wasm/src/main/java/run/endive/wasm/types/Value.java b/wasm/src/main/java/run/endive/wasm/types/Value.java index 84771e6f7..adb717a79 100644 --- a/wasm/src/main/java/run/endive/wasm/types/Value.java +++ b/wasm/src/main/java/run/endive/wasm/types/Value.java @@ -120,7 +120,7 @@ public static Value funcRef(long data) { /** * @deprecated use {@link #Value(ValType, long)} */ - @Deprecated(since = "1.3.0") + @Deprecated public Value(ValueType type, long value) { this.type = requireNonNull(type, "type").toValType(); data = value; diff --git a/wasm/src/main/java/run/endive/wasm/types/ValueType.java b/wasm/src/main/java/run/endive/wasm/types/ValueType.java index 7cd43faa9..b4f175990 100644 --- a/wasm/src/main/java/run/endive/wasm/types/ValueType.java +++ b/wasm/src/main/java/run/endive/wasm/types/ValueType.java @@ -6,7 +6,7 @@ /** * @deprecated use {@link run.endive.wasm.types.ValType} */ -@Deprecated(since = "1.3.0") +@Deprecated public enum ValueType { UNKNOWN(-1), F64(ID.F64),