logo

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

args

Expr[] args

Source

base

CType base

Source

curMethod

MethodDef curMethod

Source

curType

TypeDef curType

Source

expr

NameExpr expr

Source

find

Void find()

Find the method or field with the specified name.

Source

found

CSlot found

Source

isStaticLiteral

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.

Source

isVar

Bool isVar

Source

location

Location location

Source

make

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

Construct with NameExpr (base class of CallExpr and UnknownVarExpr)

Source

name

Str name

Source

resolve

Expr resolve()

Resolve into a method call or field access

Source

resolveBase

Void resolveBase()

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

Source

result

Expr result

Source

target

Expr target

Source

withBlockAdd

Void withBlockAdd()

If we failed to resolve with.expr and the with target supports an add method, then attempt to resolve as a standalone expr (no with base). If that works we assume this is syntax sugar for with.add(expr) - the CallExpr is created in ResolveExpr after the entire sub-expr has been processed.

Source