Merge RestrictedCoroutineImpl into CoroutineImpl

This commit is contained in:
Denis Zharkov
2017-01-11 20:22:49 +03:00
parent d487c1ef0f
commit 7837d736f7
6 changed files with 20 additions and 38 deletions
@@ -187,7 +187,7 @@ class CoroutineCodegen(
// .resume(Unit)
StackValue.putUnitInstance(this)
invokevirtual(
AsmTypes.RESTRICTED_COROUTINE_IMPL.internalName,
AsmTypes.COROUTINE_IMPL.internalName,
CONTINUATION_RESUME_METHOD_NAME.identifier,
Type.getMethodDescriptor(Type.VOID_TYPE, AsmTypes.OBJECT_TYPE),
false
@@ -110,7 +110,7 @@ class CoroutineTransformerMethodVisitor(
VarInsnNode(Opcodes.ALOAD, 0),
FieldInsnNode(
Opcodes.GETFIELD,
AsmTypes.RESTRICTED_COROUTINE_IMPL.internalName,
AsmTypes.COROUTINE_IMPL.internalName,
COROUTINE_LABEL_FIELD_NAME, Type.INT_TYPE.descriptor
),
TableSwitchInsnNode(0,
@@ -295,7 +295,7 @@ class CoroutineTransformerMethodVisitor(
VarInsnNode(Opcodes.ALOAD, 0),
*withInstructionAdapter { iconst(id) }.toArray(),
FieldInsnNode(
Opcodes.PUTFIELD, AsmTypes.RESTRICTED_COROUTINE_IMPL.internalName, COROUTINE_LABEL_FIELD_NAME,
Opcodes.PUTFIELD, AsmTypes.COROUTINE_IMPL.internalName, COROUTINE_LABEL_FIELD_NAME,
Type.INT_TYPE.descriptor
)
)