Fan

 

class

compiler::CallResolver

sys::Obj
  compiler::CompilerSupport
    compiler::CallResolver

CallResolver handles the process of resolving a CallExpr or UnknownVarExpr to a method call or a field access.

Slots

argsSource

Expr[] args

baseSource

CType? base

baseItSource

CType? baseIt

curMethodSource

MethodDef? curMethod

curTypeSource

TypeDef? curType

exprSource

NameExpr expr

findSource

Void find()

Find the method or field with the specified name.

foundSource

CSlot? found

foundOnItSource

Bool foundOnIt

inferClosureTypeFromCallSource

static Expr inferClosureTypeFromCall(CompilerSupport support, CallExpr call, CType base)

If the last argument to the resolved call is a closure, then use the method to infer the function type. If the last arg is a closure, but the call doesn't take a closure, then translate into an implicit call to Obj.with

isStaticLiteralSource

Bool isStaticLiteral()

If this is a standalone name without a base target such as "Foo" and the name maps to a type name, then this is a type literal.

isVarSource

Bool isVar

locationSource

Location location

makeSource

new make(Compiler compiler, TypeDef? curType, MethodDef? curMethod, NameExpr expr)

Construct with NameExpr (base class of CallExpr and UnknownVarExpr)

nameSource

Str name

resolveSource

Expr resolve()

Resolve into a method call or field access

resolveBaseSource

Void resolveBase()

Resolve the base type which defines the slot we are calling.

resultSource

Expr? result

targetSource

Expr? target