A specific method call site with its associated informations.

Introduced properties

private var _anchor: nullable MClassType

nitc :: CallSite :: _anchor

The anchor to use with recv or msignature
private var _erasure_cast: Bool

nitc :: CallSite :: _erasure_cast

Is a implicit cast required on erasure typing policy?
private var _id: Int

nitc :: CallSite :: _id

Identifier of the class which introduced the MMethod
private var _location: Location

nitc :: CallSite :: _location

private var _mmodule: MModule

nitc :: CallSite :: _mmodule

The module where the callsite is present
private var _mpropdef: MMethodDef

nitc :: CallSite :: _mpropdef

The statically designated method definition
private var _mproperty: MMethod

nitc :: CallSite :: _mproperty

The designated method
private var _msignature: MSignature

nitc :: CallSite :: _msignature

The resolved signature for the receiver
private var _offset: Int

nitc :: CallSite :: _offset

Position of the method in virtual table
private var _recv: MType

nitc :: CallSite :: _recv

The static type of the receiver (possibly unresolved)
private var _recv_is_self: Bool

nitc :: CallSite :: _recv_is_self

Is the receiver self?
private var _signaturemap: nullable SignatureMap

nitc :: CallSite :: _signaturemap

The mapping used on the call to associate arguments to parameters
private var _status: Int

nitc :: CallSite :: _status

Indicate the status of the optimization for this node
fun anchor: nullable MClassType

nitc :: CallSite :: anchor

The anchor to use with recv or msignature
protected fun anchor=(anchor: nullable MClassType)

nitc :: CallSite :: anchor=

The anchor to use with recv or msignature
private fun check_signature(v: TypeVisitor, node: ANode, args: Array[AExpr]): Bool

nitc :: CallSite :: check_signature

init defaultinit(location: Location, recv: MType, mmodule: MModule, anchor: nullable MClassType, recv_is_self: Bool, mproperty: MMethod, mpropdef: MMethodDef, msignature: MSignature, erasure_cast: Bool)

nitc :: CallSite :: defaultinit

fun dump_info(v: ASTDump): String

nitc :: CallSite :: dump_info

Information about the callsite to display on a node
fun erasure_cast: Bool

nitc :: CallSite :: erasure_cast

Is a implicit cast required on erasure typing policy?
protected fun erasure_cast=(erasure_cast: Bool)

nitc :: CallSite :: erasure_cast=

Is a implicit cast required on erasure typing policy?
fun id: Int

nitc :: CallSite :: id

Identifier of the class which introduced the MMethod
protected fun id=(id: Int)

nitc :: CallSite :: id=

Identifier of the class which introduced the MMethod
protected fun location=(location: Location)

nitc :: CallSite :: location=

fun mmodule: MModule

nitc :: CallSite :: mmodule

The module where the callsite is present
protected fun mmodule=(mmodule: MModule)

nitc :: CallSite :: mmodule=

The module where the callsite is present
fun mpropdef: MMethodDef

nitc :: CallSite :: mpropdef

The statically designated method definition
protected fun mpropdef=(mpropdef: MMethodDef)

nitc :: CallSite :: mpropdef=

The statically designated method definition
fun mproperty: MMethod

nitc :: CallSite :: mproperty

The designated method
protected fun mproperty=(mproperty: MMethod)

nitc :: CallSite :: mproperty=

The designated method
fun msignature: MSignature

nitc :: CallSite :: msignature

The resolved signature for the receiver
protected fun msignature=(msignature: MSignature)

nitc :: CallSite :: msignature=

The resolved signature for the receiver
fun offset: Int

nitc :: CallSite :: offset

Position of the method in virtual table
protected fun offset=(offset: Int)

nitc :: CallSite :: offset=

Position of the method in virtual table
fun optimize(recv: Instance)

nitc :: CallSite :: optimize

Optimize a method dispatch,
fun recv: MType

nitc :: CallSite :: recv

The static type of the receiver (possibly unresolved)
protected fun recv=(recv: MType)

nitc :: CallSite :: recv=

The static type of the receiver (possibly unresolved)
fun recv_is_self: Bool

nitc :: CallSite :: recv_is_self

Is the receiver self?
protected fun recv_is_self=(recv_is_self: Bool)

nitc :: CallSite :: recv_is_self=

Is the receiver self?
fun signaturemap: nullable SignatureMap

nitc :: CallSite :: signaturemap

The mapping used on the call to associate arguments to parameters
protected fun signaturemap=(signaturemap: nullable SignatureMap)

nitc :: CallSite :: signaturemap=

The mapping used on the call to associate arguments to parameters
fun status: Int

nitc :: CallSite :: status

Indicate the status of the optimization for this node
protected fun status=(status: Int)

nitc :: CallSite :: status=

Indicate the status of the optimization for this node

Redefined properties

redef type SELF: CallSite

nitc $ CallSite :: SELF

Type of this instance, automatically specialized in every class
redef fun infobox(v: HtmlightVisitor): HInfoBox

nitc :: htmlight $ CallSite :: infobox

An new infobox documenting the entity
redef fun linkto(v: HtmlightVisitor): HTMLTag

nitc :: htmlight $ CallSite :: linkto

A HTML version of to_s with hyper-links.
redef fun location: Location

nitc $ CallSite :: location

The origin of the definition.
redef fun mdoc_or_fallback: nullable MDoc

nitc $ CallSite :: mdoc_or_fallback

The documentation associated to the entity or their main nested entity.

All properties

fun !=(other: nullable Object): Bool

core :: Object :: !=

Have self and other different values?
fun ==(other: nullable Object): Bool

core :: Object :: ==

Have self and other the same value?
type CLASS: Class[SELF]

core :: Object :: CLASS

The type of the class of self.
type MENTITY: SELF

nitc :: MEntity :: MENTITY

FIXME used to bypass RTA limitation on type resolution
type SELF: Object

core :: Object :: SELF

Type of this instance, automatically specialized in every class
private var _anchor: nullable MClassType

nitc :: CallSite :: _anchor

The anchor to use with recv or msignature
private var _css_classes: Array[String]

nitc :: MEntity :: _css_classes

CSS classes used to decorate self
private var _deprecation: nullable MDeprecationInfo

nitc :: MEntity :: _deprecation

Is the entity deprecated?
private var _erasure_cast: Bool

nitc :: CallSite :: _erasure_cast

Is a implicit cast required on erasure typing policy?
private var _examples: Array[MExample]

nitc :: MEntity :: _examples

Examples found for self
private var _html_full_name: String

nitc :: MEntity :: _html_full_name

The MEntity full_name escaped for HTML
private var _html_id: String

nitc :: MEntity :: _html_id

The MEntity unique ID in the HTML output
private var _html_name: String

nitc :: MEntity :: _html_name

The MEntity name escaped for HTML
private var _html_url: String

nitc :: MEntity :: _html_url

The MEntity URL in the HTML output
private var _html_url: String

nitc :: MEntity :: _html_url

private var _id: Int

nitc :: CallSite :: _id

Identifier of the class which introduced the MMethod
private var _is_broken: Bool

nitc :: MEntity :: _is_broken

The indication that the entity did not pass some semantic verifications.
private var _is_fictive: Bool

nitc :: MEntity :: _is_fictive

Is self created for internal purpose?
private var _is_test: Bool

nitc :: MEntity :: _is_test

Is self created for unit testing purpose?
private var _location: Location

nitc :: CallSite :: _location

private var _mdoc: nullable MDoc

nitc :: MEntity :: _mdoc

The documentation associated to the entity
private var _mexample: nullable MExample

nitc :: MEntity :: _mexample

Return this entity as a MExample
private var _mmodule: MModule

nitc :: CallSite :: _mmodule

The module where the callsite is present
private var _mpropdef: MMethodDef

nitc :: CallSite :: _mpropdef

The statically designated method definition
private var _mproperty: MMethod

nitc :: CallSite :: _mproperty

The designated method
private var _msignature: MSignature

nitc :: CallSite :: _msignature

The resolved signature for the receiver
private var _offset: Int

nitc :: CallSite :: _offset

Position of the method in virtual table
private var _recv: MType

nitc :: CallSite :: _recv

The static type of the receiver (possibly unresolved)
private var _recv_is_self: Bool

nitc :: CallSite :: _recv_is_self

Is the receiver self?
private var _signaturemap: nullable SignatureMap

nitc :: CallSite :: _signaturemap

The mapping used on the call to associate arguments to parameters
private var _status: Int

nitc :: CallSite :: _status

Indicate the status of the optimization for this node
protected fun accept_json_serializer(v: JsonSerializer)

serialization :: Serializable :: accept_json_serializer

Refinable service to customize the serialization of this class to JSON
protected fun accept_msgpack_attribute_counter(v: AttributeCounter)

serialization :: Serializable :: accept_msgpack_attribute_counter

Hook to customize the behavior of the AttributeCounter
protected fun accept_msgpack_serializer(v: MsgPackSerializer)

serialization :: Serializable :: accept_msgpack_serializer

Hook to customize the serialization of this class to MessagePack
private fun add_doc_to_infobox(res: HInfoBox)

nitc :: MEntity :: add_doc_to_infobox

Append an entry for the doc in the given infobox
protected fun add_to_bundle(bundle: NativeBundle, key: JavaString)

serialization :: Serializable :: add_to_bundle

Called by []= to dynamically choose the appropriate method according
fun anchor: nullable MClassType

nitc :: CallSite :: anchor

The anchor to use with recv or msignature
protected fun anchor=(anchor: nullable MClassType)

nitc :: CallSite :: anchor=

The anchor to use with recv or msignature
fun api_url: String

nitc :: MEntity :: api_url

URL to self within the JSON api.
abstract fun c_name: String

nitc :: MEntity :: c_name

A fully-qualified C-like identifier of this model entity.
private fun check_signature(v: TypeVisitor, node: ANode, args: Array[AExpr]): Bool

nitc :: CallSite :: check_signature

protected fun class_factory(name: String): CLASS

core :: Object :: class_factory

Implementation used by get_class to create the specific class.
fun class_name: String

core :: Object :: class_name

The class name of the object.
fun collect_ancestors(mainmodule: MModule, filter: nullable ModelFilter): Set[MENTITY]

nitc :: MEntity :: collect_ancestors

Collect self ancestors (direct and indirect)
abstract fun collect_children(mainmodule: MModule, filter: nullable ModelFilter): Set[MENTITY]

nitc :: MEntity :: collect_children

Collect self children (direct descendants)
fun collect_descendants(mainmodule: MModule, filter: nullable ModelFilter): Set[MENTITY]

nitc :: MEntity :: collect_descendants

Collect self descendants (direct and direct)
fun collect_linearization(mainmodule: MModule): nullable Array[MEntity]

nitc :: MEntity :: collect_linearization

Collect self linearization anchored on mainmodule
fun collect_modifiers: Array[String]

nitc :: MEntity :: collect_modifiers

Collect modifier keywords like redef, private etc
abstract fun collect_parents(mainmodule: MModule, filter: nullable ModelFilter): Set[MENTITY]

nitc :: MEntity :: collect_parents

Collect self parents (direct ancestors)
fun color: String

nitc :: MEntity :: color

private fun complete_mdoc: nullable MDoc

nitc :: MEntity :: complete_mdoc

Doc to use in completion
private fun complete_name: String

nitc :: MEntity :: complete_name

Actual name used in completion
protected fun const_color=(const_color: String)

nitc :: MEntity :: const_color=

fun core_serialize_to(serializer: Serializer)

serialization :: Serializable :: core_serialize_to

Actual serialization of self to serializer
abstract fun create_ast_representation(astbuilder: nullable ASTBuilder): ANode

nitc :: MEntity :: create_ast_representation

Build a ANode from self
fun cs_comment(no_color: nullable Bool): nullable String

nitc :: MEntity :: cs_comment

Returns the comment of this MEntity formatted for console.
fun cs_declaration(no_color: nullable Bool): String

nitc :: MEntity :: cs_declaration

Returns the complete MEntity declaration (modifiers + name + signature).
fun cs_full_name(no_color: nullable Bool): String

nitc :: MEntity :: cs_full_name

Returns self.full_name formatted for console
fun cs_icon(no_color: nullable Bool): String

nitc :: MEntity :: cs_icon

Text icon to be displayed in front of the entity
fun cs_list_item(no_color: nullable Bool): String

nitc :: MEntity :: cs_list_item

Returns self as a list element that can be displayed in console.
fun cs_location(no_color: nullable Bool): String

nitc :: MEntity :: cs_location

Source code location of this MEntity formatted for console
fun cs_short_comment(no_color: nullable Bool): nullable String

nitc :: MEntity :: cs_short_comment

Returns the comment of this MEntity formatted for console.
fun cs_signature(no_color: nullable Bool): String

nitc :: MEntity :: cs_signature

Returns self signature formatted for console.
fun cs_source_code: String

nitc :: MEntity :: cs_source_code

Source code associated to this MEntity.
fun css_classes: Array[String]

nitc :: MEntity :: css_classes

CSS classes used to decorate self
protected fun css_classes=(css_classes: Array[String])

nitc :: MEntity :: css_classes=

CSS classes used to decorate self
init defaultinit(location: Location, recv: MType, mmodule: MModule, anchor: nullable MClassType, recv_is_self: Bool, mproperty: MMethod, mpropdef: MMethodDef, msignature: MSignature, erasure_cast: Bool)

nitc :: CallSite :: defaultinit

fun deprecation: nullable MDeprecationInfo

nitc :: MEntity :: deprecation

Is the entity deprecated?
fun deprecation=(deprecation: nullable MDeprecationInfo)

nitc :: MEntity :: deprecation=

Is the entity deprecated?
fun dump_info(v: ASTDump): String

nitc :: CallSite :: dump_info

Information about the callsite to display on a node
fun erasure_cast: Bool

nitc :: CallSite :: erasure_cast

Is a implicit cast required on erasure typing policy?
protected fun erasure_cast=(erasure_cast: Bool)

nitc :: CallSite :: erasure_cast=

Is a implicit cast required on erasure typing policy?
fun examples: Array[MExample]

nitc :: MEntity :: examples

Examples found for self
protected fun examples=(examples: Array[MExample])

nitc :: MEntity :: examples=

Examples found for self
init from_deserializer(deserializer: Deserializer)

serialization :: Serializable :: from_deserializer

Create an instance of this class from the deserializer
abstract fun full_name: String

nitc :: MEntity :: full_name

A fully-qualified name of this model entity.
fun get_class: CLASS

core :: Object :: get_class

The meta-object representing the dynamic type of self.
fun hash: Int

core :: Object :: hash

The hash code of the object.
fun hierarchy_poset(mainmodule: MModule, filter: nullable ModelFilter): POSet[MENTITY]

nitc :: MEntity :: hierarchy_poset

Build a poset representing self in it's own hierarchy
private fun href(v: NitlightVisitor): nullable String

nitc :: MEntity :: href

fun html_declaration: Template

nitc :: MEntity :: html_declaration

Returns the complete MEntity declaration decorated with HTML
fun html_full_name: String

nitc :: MEntity :: html_full_name

The MEntity full_name escaped for HTML
protected fun html_full_name=(html_full_name: String)

nitc :: MEntity :: html_full_name=

The MEntity full_name escaped for HTML
fun html_icon: BSIcon

nitc :: MEntity :: html_icon

An icon representative of the mentity
fun html_id: String

nitc :: MEntity :: html_id

The MEntity unique ID in the HTML output
protected fun html_id=(html_id: String)

nitc :: MEntity :: html_id=

The MEntity unique ID in the HTML output
fun html_name: String

nitc :: MEntity :: html_name

The MEntity name escaped for HTML
protected fun html_name=(html_name: String)

nitc :: MEntity :: html_name=

The MEntity name escaped for HTML
abstract fun html_namespace: Template

nitc :: MEntity :: html_namespace

Returns full_name decorated with HTML links
fun html_signature(short: nullable Bool): Template

nitc :: MEntity :: html_signature

Returns the MEntity signature decorated with HTML
fun html_url: String

nitc :: MEntity :: html_url

The MEntity URL in the HTML output
protected fun html_url=(html_url: String)

nitc :: MEntity :: html_url=

The MEntity URL in the HTML output
fun id: Int

nitc :: CallSite :: id

Identifier of the class which introduced the MMethod
protected fun id=(id: Int)

nitc :: CallSite :: id=

Identifier of the class which introduced the MMethod
abstract fun infobox(v: HtmlightVisitor): HInfoBox

nitc :: HInfoBoxable :: infobox

An new infobox documenting the entity
init init

core :: Object :: init

fun inspect: String

core :: Object :: inspect

Developer readable representation of self.
protected fun inspect_head: String

core :: Object :: inspect_head

Return "CLASSNAME:#OBJECTID".
fun is_broken: Bool

nitc :: MEntity :: is_broken

The indication that the entity did not pass some semantic verifications.
fun is_broken=(is_broken: Bool)

nitc :: MEntity :: is_broken=

The indication that the entity did not pass some semantic verifications.
fun is_example: Bool

nitc :: MEntity :: is_example

Is self existing for an example purpose?
fun is_fictive: Bool

nitc :: MEntity :: is_fictive

Is self created for internal purpose?
fun is_fictive=(is_fictive: Bool)

nitc :: MEntity :: is_fictive=

Is self created for internal purpose?
intern fun is_same_instance(other: nullable Object): Bool

core :: Object :: is_same_instance

Return true if self and other are the same instance (i.e. same identity).
fun is_same_serialized(other: nullable Object): Bool

core :: Object :: is_same_serialized

Is self the same as other in a serialization context?
intern fun is_same_type(other: Object): Bool

core :: Object :: is_same_type

Return true if self and other have the same dynamic type.
fun is_test: Bool

nitc :: MEntity :: is_test

Is self created for unit testing purpose?
fun is_test=(is_test: Bool)

nitc :: MEntity :: is_test=

Is self created for unit testing purpose?
private fun jname: String

nitc :: MEntity :: jname

A Java compatible name for self
abstract fun json_namespace: JsonNamespace

nitc :: MEntity :: json_namespace

Return self.full_name as an object that can be serialized to json.
fun linkto(v: HtmlightVisitor): HTMLTag

nitc :: MEntity :: linkto

A HTML version of to_s with hyper-links.
fun linkto_text(v: HtmlightVisitor, text: String): HTMLTag

nitc :: MEntity :: linkto_text

Link to the self with a specific text.
fun location: Location

nitc :: MEntity :: location

The origin of the definition.
protected fun location=(location: Location)

nitc :: CallSite :: location=

private fun make_node(nodes: HashMap[MEntity, NeoNode], model_name: nullable String): NeoNode

nitc :: MEntity :: make_node

Make a new NeoNode based on mentity.
fun mdoc: nullable MDoc

nitc :: MEntity :: mdoc

The documentation associated to the entity
fun mdoc=(mdoc: nullable MDoc)

nitc :: MEntity :: mdoc=

The documentation associated to the entity
fun mdoc_or_fallback: nullable MDoc

nitc :: MEntity :: mdoc_or_fallback

The documentation associated to the entity or their main nested entity.
private fun mentity_kind_rank: Int

nitc :: MEntity :: mentity_kind_rank

Compare MEntity class kind
fun mexample: nullable MExample

nitc :: MEntity :: mexample

Return this entity as a MExample
protected fun mexample=(mexample: nullable MExample)

nitc :: MEntity :: mexample=

Return this entity as a MExample
fun mmodule: MModule

nitc :: CallSite :: mmodule

The module where the callsite is present
protected fun mmodule=(mmodule: MModule)

nitc :: CallSite :: mmodule=

The module where the callsite is present
abstract fun model: Model

nitc :: MEntity :: model

A Model Entity has a direct link to its model
fun mpropdef: MMethodDef

nitc :: CallSite :: mpropdef

The statically designated method definition
protected fun mpropdef=(mpropdef: MMethodDef)

nitc :: CallSite :: mpropdef=

The statically designated method definition
fun mproperty: MMethod

nitc :: CallSite :: mproperty

The designated method
protected fun mproperty=(mproperty: MMethod)

nitc :: CallSite :: mproperty=

The designated method
protected fun msgpack_extra_array_items: Int

serialization :: Serializable :: msgpack_extra_array_items

Hook to request a larger than usual metadata array
fun msignature: MSignature

nitc :: CallSite :: msignature

The resolved signature for the receiver
protected fun msignature=(msignature: MSignature)

nitc :: CallSite :: msignature=

The resolved signature for the receiver
abstract fun name: String

nitc :: MEntity :: name

The short (unqualified) name of this model entity.
private intern fun native_class_name: CString

core :: Object :: native_class_name

The class name of the object in CString format.
abstract fun nitdoc_breadcrumbs: Array[MEntity]

nitc :: MEntity :: nitdoc_breadcrumbs

MEntities composing the breadcrumbs of a nitdoc page
intern fun object_id: Int

core :: Object :: object_id

An internal hash code for the object based on its identity.
fun offset: Int

nitc :: CallSite :: offset

Position of the method in virtual table
protected fun offset=(offset: Int)

nitc :: CallSite :: offset=

Position of the method in virtual table
fun optimize(recv: Instance)

nitc :: CallSite :: optimize

Optimize a method dispatch,
fun output

core :: Object :: output

Display self on stdout (debug only).
intern fun output_class_name

core :: Object :: output_class_name

Display class name on stdout (debug only).
fun ratings(config: NitwebConfig, user: nullable String): JsonObject

nitc :: MEntity :: ratings

Get the ratings of a mentity
fun ratings_by_dimension(config: NitwebConfig, dimension: String, user: nullable String): JsonObject

nitc :: MEntity :: ratings_by_dimension

Get the ratings of a dimension
fun recv: MType

nitc :: CallSite :: recv

The static type of the receiver (possibly unresolved)
protected fun recv=(recv: MType)

nitc :: CallSite :: recv=

The static type of the receiver (possibly unresolved)
fun recv_is_self: Bool

nitc :: CallSite :: recv_is_self

Is the receiver self?
protected fun recv_is_self=(recv_is_self: Bool)

nitc :: CallSite :: recv_is_self=

Is the receiver self?
fun serialization_hash: Int

core :: Object :: serialization_hash

Hash value use for serialization
fun serialize_msgpack(plain: nullable Bool): Bytes

serialization :: Serializable :: serialize_msgpack

Serialize self to MessagePack bytes
fun serialize_to(serializer: Serializer)

serialization :: Serializable :: serialize_to

Serialize self to serializer
fun serialize_to_json(plain: nullable Bool, pretty: nullable Bool): String

serialization :: Serializable :: serialize_to_json

Serialize self to JSON
private fun serialize_to_or_delay(v: Serializer)

serialization :: Serializable :: serialize_to_or_delay

Accept references or force direct serialization (using serialize_to)
fun signaturemap: nullable SignatureMap

nitc :: CallSite :: signaturemap

The mapping used on the call to associate arguments to parameters
protected fun signaturemap=(signaturemap: nullable SignatureMap)

nitc :: CallSite :: signaturemap=

The mapping used on the call to associate arguments to parameters
private fun source_url(url_pattern: nullable String): String

nitc :: MEntity :: source_url

Render a HTML link for the MEntity location
fun status: Int

nitc :: CallSite :: status

Indicate the status of the optimization for this node
protected fun status=(status: Int)

nitc :: CallSite :: status=

Indicate the status of the optimization for this node
intern fun sys: Sys

core :: Object :: sys

Return the global sys object, the only instance of the Sys class.
fun to_dot_node: DotNode

nitc :: MEntity :: to_dot_node

Return self as a DotNode
fun to_json: String

serialization :: Serializable :: to_json

Serialize self to plain JSON
fun to_json_ref: MEntityRef

nitc :: MEntity :: to_json_ref

Return a new MEntityRef to self.
abstract fun to_jvalue(env: JniEnv): JValue

core :: Object :: to_jvalue

private fun to_node(nodes: HashMap[MEntity, NeoNode], model_name: nullable String): NeoNode

nitc :: MEntity :: to_node

Build a NeoNode representing self.
fun to_pretty_json: String

serialization :: Serializable :: to_pretty_json

Serialize self to plain pretty JSON
fun to_s: String

core :: Object :: to_s

User readable representation of self.
abstract fun tpl_class(model: UMLModel): Writable

nitc :: MEntity :: tpl_class

Generates a dot-compatible Writable UML Class diagram from self
abstract fun tpl_module(model: UMLModel): Writable

nitc :: MEntity :: tpl_module

Builds a dot UML package diagram entity from self
fun visibility: MVisibility

nitc :: MEntity :: visibility

The visibility of the MEntity.
fun visit_all(v: ModelVisitor)

nitc :: MEntity :: visit_all

Call v.enter_visit on all nested entities.
fun web_url: String

nitc :: MEntity :: web_url

URL to self within the web interface.
private fun write_doc(model: Model, mainmodule: MModule, stream: Writer)

nitc :: MEntity :: write_doc

private fun write_extra_doc(model: Model, mainmodule: MModule, stream: Writer)

nitc :: MEntity :: write_extra_doc

Extra auto documentation to append to the stream
private fun write_location(mainmodule: MModule, stream: Writer)

nitc :: MEntity :: write_location

Location (file and line when available) of related declarations
package_diagram nitc::CallSite CallSite nitc::MEntity MEntity nitc::CallSite->nitc::MEntity nitc::HInfoBoxable HInfoBoxable nitc::MEntity->nitc::HInfoBoxable serialization::Serializable Serializable nitc::MEntity->serialization::Serializable ...nitc::HInfoBoxable ... ...nitc::HInfoBoxable->nitc::HInfoBoxable ...serialization::Serializable ... ...serialization::Serializable->serialization::Serializable

Ancestors

interface HInfoBoxable

nitc :: HInfoBoxable

Model entity or whatever that can produce an infobox
interface Object

core :: Object

The root of the class hierarchy.
interface Serializable

serialization :: Serializable

Instances of this class can be passed to Serializer::serialize

Parents

abstract class MEntity

nitc :: MEntity

A named and possibly documented entity in the model.

Class definitions

nitc $ CallSite
# A specific method call site with its associated informations.
class CallSite
	super MEntity

	redef var location

	# The static type of the receiver (possibly unresolved)
	var recv: MType

	# The module where the callsite is present
	var mmodule: MModule

	# The anchor to use with `recv` or `msignature`
	var anchor: nullable MClassType

	# Is the receiver self?
	# If "for_self", virtual types of the signature are kept
	# If "not_for_self", virtual type are erased
	var recv_is_self: Bool

	# The designated method
	var mproperty: MMethod

	# The statically designated method definition
	# The most specif one, it is.
	var mpropdef: MMethodDef

	# The resolved signature for the receiver
	var msignature: MSignature

	# Is a implicit cast required on erasure typing policy?
	var erasure_cast: Bool

	# The mapping used on the call to associate arguments to parameters
	# If null then no specific association is required.
	var signaturemap: nullable SignatureMap = null

	private fun check_signature(v: TypeVisitor, node: ANode, args: Array[AExpr]): Bool
	do
		var map = v.check_signature(node, args, self.mproperty, self.msignature)
		signaturemap = map
		if map == null then is_broken = true
		return map == null
	end

	# Information about the callsite to display on a node
	fun dump_info(v: ASTDump): String do
		return "{recv}.{mpropdef}{msignature}"
	end

	redef fun mdoc_or_fallback do return mproperty.intro.mdoc
end
src/semantize/typing.nit:774,1--825,3

nitc :: vm_optimizations $ CallSite
# Add informations to optimize some method calls
redef class CallSite
	# Position of the method in virtual table
	#
	# The relative position of this MMethod if perfect hashing is used,
	# The absolute position of this MMethod if SST is used
	var offset: Int

	# Indicate the status of the optimization for this node
	#
	# 0: default value
	# 1: SST (direct access) can be used
	# 2: PH (multiple inheritance implementation) must be used
	var status: Int = 0

	# Identifier of the class which introduced the MMethod
	var id: Int

	# Optimize a method dispatch,
	# If this method is always at the same position in virtual table, we can use direct access,
	# Otherwise we must use perfect hashing
	fun optimize(recv: Instance)
	do
		var position = recv.mtype.as(MClassType).mclass.get_position_methods(mproperty.intro_mclassdef.mclass)
		if position > 0 then
			offset = position + mproperty.offset
			status = 1
		else
			offset = mproperty.offset
			status = 2
		end
		id = mproperty.intro_mclassdef.mclass.vtable.id
	end
end
src/vm/vm_optimizations.nit:157,1--190,3

nitc :: htmlight $ CallSite
redef class CallSite
	redef fun infobox(v)
	do
		var res = new HInfoBox(v, "call {mpropdef}")
		res.href = v.hrefto(mpropdef)
		if not v.show_infobox then return res
		res.new_field("call").add(mpropdef.linkto(v)).add(msignature.linkto(v))
		if mpropdef.is_intro then
		else
			res.new_field("intro").add mproperty.intro.linkto_text(v, "in {mproperty.intro.mclassdef}")
		end
		add_doc_to_infobox(res)

		return res
	end
	redef fun linkto(v)
	do
		return mpropdef.linkto(v)
	end
end
src/htmlight.nit:684,1--703,3