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 @@ -28,10 +28,7 @@

public final class WasmModuleProcessor extends AbstractModuleProcessor {
private static final StandardLocation[] LOCATIONS = {
CLASS_PATH,
ANNOTATION_PROCESSOR_PATH,
SOURCE_PATH,
CLASS_OUTPUT,
CLASS_PATH, ANNOTATION_PROCESSOR_PATH, SOURCE_PATH, CLASS_OUTPUT,
};

@Override
Expand Down
7 changes: 2 additions & 5 deletions wasm/src/main/java/run/endive/wasm/Parser.java
Original file line number Diff line number Diff line change
Expand Up @@ -679,16 +679,13 @@ private static ImportSection parseImportSection(ByteBuffer buffer, TypeSection t
String importName = readName(buffer);
ExternalType descType;
try {
descType = ExternalType.byId((int) readVarUInt32(buffer));
descType = ExternalType.byId(readByte(buffer));
} catch (RuntimeException e) {
throw new MalformedException("malformed import kind", e);
}
switch (descType) {
case FUNCTION:
{
if (moduleName.isEmpty() && importName.isEmpty()) {
throw new MalformedException("malformed import kind");
}
importSection.addImport(
new FunctionImport(
moduleName, importName, (int) readVarUInt32(buffer)));
Expand Down Expand Up @@ -860,7 +857,7 @@ private static ExportSection parseExportSection(ByteBuffer buffer) {
// Parse individual functions in the function section
for (int i = 0; i < exportCount; i++) {
var name = readName(buffer, false);
var exportType = ExternalType.byId((int) readVarUInt32(buffer));
var exportType = ExternalType.byId(readByte(buffer));
var index = (int) readVarUInt32(buffer);
exportSection.addExport(new Export(name, index, exportType));
}
Expand Down
Loading