class compiler::CallResolver

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

Source

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

args

Expr[] args

Source

base

CType? base

Source

baseIt

CType? baseIt

Source

curMethod

MethodDef? curMethod

Source

curType

TypeDef? curType

Source

expr

NameExpr expr

Source

find

Void find()

Source

Find the method or field with the specified name.

found

CSlot? found

Source

foundOnIt

Bool foundOnIt

Source

inferClosureTypeFromCall

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

Source

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

isFuncFieldCall

Bool isFuncFieldCall

Source

isItAdd

Bool isItAdd

Source

isStaticLiteral

Bool isStaticLiteral()

Source

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.

isVar

Bool isVar

Source

loc

Loc loc

Source

make

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

Source

Construct with NameExpr (base class of CallExpr and UnknownVarExpr)

name

Str name

Source

resolve

Expr resolve()

Source

Resolve into a method call or field access

resolveBase

Void resolveBase()

Source

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

result

Expr? result

Source

target

Expr? target

Source