Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand All @@ -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);
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,15 +16,15 @@ public class GlobalInstance {
/**
* @deprecated use {@link #builder()}
*/
@Deprecated(since = "use builder()")
@Deprecated
public GlobalInstance(Value value) {
this(value, MutabilityType.Const);
}

/**
* @deprecated use {@link #builder()}
*/
@Deprecated(since = "use builder()")
@Deprecated
public GlobalInstance(Value value, MutabilityType mutabilityType) {
this.valueLow = value.raw();
this.valueHigh = 0;
Expand All @@ -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;
Expand All @@ -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;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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<ValType> convert(List objs) {
var result = new ArrayList<ValType>(objs.size());
for (var v : objs) {
Expand Down Expand Up @@ -51,7 +51,7 @@ public ImportFunction(
this.sourceInstance = sourceInstance;
}

@Deprecated(since = "1.3.0")
@Deprecated
public ImportFunction(
String module,
String name,
Expand Down
4 changes: 2 additions & 2 deletions runtime/src/main/java/run/endive/runtime/WasmArray.java
Original file line number Diff line number Diff line change
Expand Up @@ -17,15 +17,15 @@ 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);
}

/**
* @deprecated use {@link #builder()}
*/
@Deprecated(since = "use builder()")
@Deprecated
public WasmArray(int typeIdx, long[] elements, Object[] elementRefs) {
this.typeIdx = typeIdx;
this.elements = elements;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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);
}
Expand Down
4 changes: 2 additions & 2 deletions runtime/src/main/java/run/endive/runtime/WasmStruct.java
Original file line number Diff line number Diff line change
Expand Up @@ -17,15 +17,15 @@ 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);
}

/**
* @deprecated use {@link #builder()}
*/
@Deprecated(since = "use builder()")
@Deprecated
public WasmStruct(int typeIdx, long[] fields, Object[] fieldRefs) {
this.typeIdx = typeIdx;
this.fields = fields;
Expand Down
2 changes: 1 addition & 1 deletion wasm/src/main/java/run/endive/wasm/types/Global.java
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ public Global(ValType valType, MutabilityType mutabilityType, List<Instruction>
/**
* @deprecated use {@link #Global(ValType, MutabilityType, List)}
*/
@Deprecated(since = "1.3.0")
@Deprecated
public Global(ValueType valueType, MutabilityType mutabilityType, List<Instruction> init) {
this.valType = valueType.toValType();
this.mutabilityType = mutabilityType;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand Down
2 changes: 1 addition & 1 deletion wasm/src/main/java/run/endive/wasm/types/Table.java
Original file line number Diff line number Diff line change
Expand Up @@ -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(),
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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();
Expand Down
10 changes: 8 additions & 2 deletions wasm/src/main/java/run/endive/wasm/types/ValType.java
Original file line number Diff line number Diff line change
Expand Up @@ -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<Integer, FunctionType> context) {
if (!isValidOpcode(opcode)) {
throw new WasmEngineException("Invalid type opcode: " + opcode);
Expand Down Expand Up @@ -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<Integer, FunctionType> context) {
if (ValType.isReference(opcode) && typeIdx >= 0) {
Expand Down
2 changes: 1 addition & 1 deletion wasm/src/main/java/run/endive/wasm/types/Value.java
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down
2 changes: 1 addition & 1 deletion wasm/src/main/java/run/endive/wasm/types/ValueType.java
Original file line number Diff line number Diff line change
Expand Up @@ -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),
Expand Down
Loading