Skip to content

Commit

Permalink
Remove unnecessary AOT stackSize utility method
Browse files Browse the repository at this point in the history
  • Loading branch information
electrum committed Oct 11, 2024
1 parent eff3ee8 commit ad819be
Show file tree
Hide file tree
Showing 2 changed files with 1 addition and 16 deletions.
2 changes: 1 addition & 1 deletion aot/src/main/java/com/dylibso/chicory/aot/AotEmitters.java
Original file line number Diff line number Diff line change
Expand Up @@ -212,7 +212,7 @@ public static void GLOBAL_GET(AotContext ctx, AnnotatedInstruction ins, MethodVi
var globalType = ctx.globalTypes().get(globalIndex);
emitLongToJvm(asm, ctx.globalTypes().get(globalIndex));

ctx.pushStackSize(stackSize(globalType));
ctx.pushStackSize(stackSize(jvmType(globalType)));
}

public static void GLOBAL_SET(AotContext ctx, AnnotatedInstruction ins, MethodVisitor asm) {
Expand Down
15 changes: 0 additions & 15 deletions aot/src/main/java/com/dylibso/chicory/aot/AotUtil.java
Original file line number Diff line number Diff line change
Expand Up @@ -207,21 +207,6 @@ public static StackSize stackSize(Class<?> clazz) {
throw new IllegalArgumentException("Unsupported JVM type: " + clazz);
}

public static StackSize stackSize(ValueType type) {
switch (type) {
case I32:
case F32:
case ExternRef:
case FuncRef:
return StackSize.ONE;
case I64:
case F64:
return StackSize.TWO;
default:
throw new IllegalArgumentException("Unsupported type: " + type);
}
}

public static int slotCount(ValueType type) {
switch (type) {
case I32:
Expand Down

0 comments on commit ad819be

Please sign in to comment.