-
Notifications
You must be signed in to change notification settings - Fork 35
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* Fix spotless configuration * Bulk reformatting
- Loading branch information
Showing
62 changed files
with
2,155 additions
and
1,796 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
73 changes: 38 additions & 35 deletions
73
runtime/src/main/java/com/dylibso/chicory/runtime/HostFunction.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,42 +1,45 @@ | ||
package com.dylibso.chicory.runtime; | ||
|
||
import com.dylibso.chicory.wasm.types.ValueType; | ||
|
||
import java.util.List; | ||
|
||
public class HostFunction { | ||
private final WasmFunctionHandle handle; | ||
private final String moduleName; | ||
private final String fieldName; | ||
private final List<ValueType> paramTypes; | ||
private final List<ValueType> returnTypes; | ||
|
||
HostFunction(WasmFunctionHandle handle, String moduleName, String fieldName, List<ValueType> paramTypes, List<ValueType> returnTypes) { | ||
this.handle = handle; | ||
this.moduleName = moduleName; | ||
this.fieldName = fieldName; | ||
this.paramTypes = paramTypes; | ||
this.returnTypes = returnTypes; | ||
} | ||
|
||
public WasmFunctionHandle getHandle() { | ||
return handle; | ||
} | ||
|
||
public String getModuleName() { | ||
return moduleName; | ||
} | ||
|
||
public String getFieldName() { | ||
return fieldName; | ||
} | ||
|
||
public List<ValueType> getParamTypes() { | ||
return paramTypes; | ||
} | ||
|
||
public List<ValueType> getReturnTypes() { | ||
return returnTypes; | ||
} | ||
|
||
private final WasmFunctionHandle handle; | ||
private final String moduleName; | ||
private final String fieldName; | ||
private final List<ValueType> paramTypes; | ||
private final List<ValueType> returnTypes; | ||
|
||
HostFunction( | ||
WasmFunctionHandle handle, | ||
String moduleName, | ||
String fieldName, | ||
List<ValueType> paramTypes, | ||
List<ValueType> returnTypes) { | ||
this.handle = handle; | ||
this.moduleName = moduleName; | ||
this.fieldName = fieldName; | ||
this.paramTypes = paramTypes; | ||
this.returnTypes = returnTypes; | ||
} | ||
|
||
public WasmFunctionHandle getHandle() { | ||
return handle; | ||
} | ||
|
||
public String getModuleName() { | ||
return moduleName; | ||
} | ||
|
||
public String getFieldName() { | ||
return fieldName; | ||
} | ||
|
||
public List<ValueType> getParamTypes() { | ||
return paramTypes; | ||
} | ||
|
||
public List<ValueType> getReturnTypes() { | ||
return returnTypes; | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.