Array get convertion
This commit is contained in:
@@ -16,31 +16,17 @@
|
|||||||
|
|
||||||
package org.jetbrains.kotlin.codegen.intrinsics;
|
package org.jetbrains.kotlin.codegen.intrinsics;
|
||||||
|
|
||||||
import kotlin.ExtensionFunction1;
|
import org.jetbrains.kotlin.codegen.AsmUtil.correctElementType
|
||||||
import kotlin.Unit;
|
import org.jetbrains.kotlin.codegen.Callable
|
||||||
import org.jetbrains.annotations.NotNull;
|
import org.jetbrains.kotlin.codegen.CallableMethod
|
||||||
import org.jetbrains.kotlin.codegen.Callable;
|
import org.jetbrains.org.objectweb.asm.commons.InstructionAdapter
|
||||||
import org.jetbrains.kotlin.codegen.CallableMethod;
|
|
||||||
import org.jetbrains.org.objectweb.asm.Type;
|
|
||||||
import org.jetbrains.org.objectweb.asm.commons.InstructionAdapter;
|
|
||||||
|
|
||||||
import static org.jetbrains.kotlin.codegen.AsmUtil.correctElementType;
|
public class ArrayGet : IntrinsicMethod() {
|
||||||
|
|
||||||
public class ArrayGet extends IntrinsicMethod {
|
override fun toCallable(method: CallableMethod): Callable {
|
||||||
|
return MappedCallable(method) {
|
||||||
@NotNull
|
val type = correctElementType(calcReceiverType())
|
||||||
@Override
|
it.aload(type)
|
||||||
public Callable toCallable(@NotNull CallableMethod method) {
|
}
|
||||||
return new MappedCallable(method, new ExtensionFunction1<MappedCallable, InstructionAdapter, Unit>() {
|
|
||||||
@Override
|
|
||||||
public Unit invoke(
|
|
||||||
MappedCallable callable,
|
|
||||||
InstructionAdapter adapter
|
|
||||||
) {
|
|
||||||
Type type = correctElementType(callable.calcReceiverType());
|
|
||||||
adapter.aload(type);
|
|
||||||
return Unit.INSTANCE$;
|
|
||||||
}
|
|
||||||
});
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user