CurryResolver handles the process of resolving a CurryExpr.
Slots
-
private CallExpr call
-
private MethodDef ctor
-
private TypeDef curType
-
private TypeDef curry
-
private Int curryCount
- defineCurrySource
-
Void defineCurry()
Define a synthetic class called Curry$xx.
-
private CurryExpr expr
- genSignatureSource
-
Void genSignature()
Define the signature of the curries method which is any partial parameters left incomplete.
-
private Location loc
- makeSource
-
new make(Compiler compiler, TypeDef curType, Int curryCount, CurryExpr expr)
Constructor
- mapCurrySource
-
Expr mapCurry()
For each argument specified we need to pass to the constructor and stash away and in a field for use in redirecting to the target method.
-
private CMethod method
- reflectionSource
-
Expr reflection()
Calling curry on a Func instance is just syntax sugar for calling Func.curry
- resolveSource
-
Expr resolve()
Resolve into a method call or field access
-
private FuncType sig
- simpleStaticSource
-
Expr simpleStatic()
If the curry is a static method with no arguments, then really it isn't a curry per se, because we can optimize to just a method lookup.
-
private Bool thisIsParam