Introduce CoroutineImpl as a common super class for coroutines

The main benefit are class-files sizes for them
(not repeating the same declaration for each coroutine)
Also it helped to simplify coroutine codegen code a little

Note that controller/label field become non-volatile (see KT-14636)

 #KT-14636 In Progress
This commit is contained in:
Denis Zharkov
2016-11-08 10:43:45 +03:00
parent fc9605b94e
commit 7e49db8768
9 changed files with 133 additions and 141 deletions
@@ -40,6 +40,8 @@ public class AsmTypes {
public static final Type MUTABLE_PROPERTY_REFERENCE0 = Type.getObjectType("kotlin/jvm/internal/MutablePropertyReference0");
public static final Type MUTABLE_PROPERTY_REFERENCE1 = Type.getObjectType("kotlin/jvm/internal/MutablePropertyReference1");
public static final Type MUTABLE_PROPERTY_REFERENCE2 = Type.getObjectType("kotlin/jvm/internal/MutablePropertyReference2");
public static final Type COROUTINE_IMPL = Type.getObjectType("kotlin/jvm/internal/CoroutineImpl");
public static final Type[] PROPERTY_REFERENCE_IMPL = {
Type.getObjectType("kotlin/jvm/internal/PropertyReference0Impl"),