C# Class Rakudo.Metamodel.SharedTable

This represents the commonalities shared by many instances of a given "type". Type in this context refers to a given combination of meta-object and representation.
Exibir arquivo Open project: jnthn/6model

Public Properties

Property Type Description
DuckTables RakudoObject[]>.Dictionary
HOW RakudoObject
REPR Representation
SC SerializationContext
SpecialFindMethod Func
SpecialInvoke Func
TypeCacheID int
TypeCheckCache Rakudo.Metamodel.RakudoObject[]
VTable Rakudo.Metamodel.RakudoObject[]
WHAT RakudoObject

Public Methods

Method Description
FindMethod ( ThreadContext TC, RakudoObject Obj, string Name, int Hint ) : RakudoObject

This finds a method with the given name or using a hint.

Invoke ( ThreadContext TC, RakudoObject Obj, RakudoObject Cap ) : RakudoObject

Invokes. By default, looks up a postcircumfix:<( )> and runs that.

TypeCheck ( ThreadContext TC, RakudoObject Obj, RakudoObject Checkee ) : RakudoObject

Used to do a type check. If one was published, looks in the type check cache. If there is none, calls .HOW.type_check.

Method Details

FindMethod() public method

This finds a method with the given name or using a hint.
public FindMethod ( ThreadContext TC, RakudoObject Obj, string Name, int Hint ) : RakudoObject
TC Rakudo.Runtime.ThreadContext
Obj RakudoObject
Name string
Hint int
return RakudoObject

Invoke() public method

Invokes. By default, looks up a postcircumfix:<( )> and runs that.
public Invoke ( ThreadContext TC, RakudoObject Obj, RakudoObject Cap ) : RakudoObject
TC Rakudo.Runtime.ThreadContext
Obj RakudoObject
Cap RakudoObject
return RakudoObject

TypeCheck() public method

Used to do a type check. If one was published, looks in the type check cache. If there is none, calls .HOW.type_check.
public TypeCheck ( ThreadContext TC, RakudoObject Obj, RakudoObject Checkee ) : RakudoObject
TC Rakudo.Runtime.ThreadContext
Obj RakudoObject
Checkee RakudoObject
return RakudoObject

Property Details

DuckTables public_oe property

Ducktable storage.
public Dictionary DuckTables
return RakudoObject[]>.Dictionary

HOW public_oe property

The HOW (which is the meta-package). If we do $obj.HOW then it will refer to a getting of this field.
public RakudoObject,Rakudo.Metamodel HOW
return RakudoObject

REPR public_oe property

The representation object that manages object layout.
public Representation,Rakudo.Metamodel REPR
return Representation

SC public_oe property

The serialization context of this STable, if any.
public SerializationContext SC
return SerializationContext

SpecialFindMethod public_oe property

Sometimes, we may want to install a hook for overriding method finding. This does that. (We used to just give this a default closure, but it makes dispatch a bit more expensive, and this is path is red hot...)
public Func SpecialFindMethod
return Func

SpecialInvoke public_oe property

Hook for overriding invocation.
public Func SpecialInvoke
return Func

TypeCacheID public_oe property

The unique ID for this type. Note that this ID is not ever, ever, ever, ever to be used as a handle for the type for looking it up. It is only ever valid to use in a cache situation where a reference to the STable is held for at least as long as the cache will exist. It is also NOT going to be the same between runs (or at lesat not automatically), and will be set up whenever the STable is deserialized. Thus never, ever serialize this ID anywhere; it's for strictly for per-run scoped caches _only_. You have been warned.
public int TypeCacheID
return int

TypeCheckCache public_oe property

For types where we know all the possible types it could match up front, this type check cache can be published.
public RakudoObject[],Rakudo.Metamodel TypeCheckCache
return Rakudo.Metamodel.RakudoObject[]

VTable public_oe property

The generated v-table, if any.
public RakudoObject[],Rakudo.Metamodel VTable
return Rakudo.Metamodel.RakudoObject[]

WHAT public_oe property

The type-object. If we do $obj.WHAT then it will refer to a getting of this field.
public RakudoObject,Rakudo.Metamodel WHAT
return RakudoObject