recv
or msignature
nitc :: CallSite :: _erasure_cast
Is a implicit cast required on erasure typing policy?nitc :: CallSite :: _msignature
The resolved signature for the receivernitc :: CallSite :: _signaturemap
The mapping used on the call to associate arguments to parametersrecv
or msignature
recv
or msignature
nitc :: CallSite :: check_signature
nitc :: CallSite :: defaultinit
nitc :: CallSite :: erasure_cast
Is a implicit cast required on erasure typing policy?nitc :: CallSite :: erasure_cast=
Is a implicit cast required on erasure typing policy?nitc :: CallSite :: msignature=
The resolved signature for the receivernitc :: CallSite :: recv_is_self=
Is the receiver self?nitc :: CallSite :: signaturemap
The mapping used on the call to associate arguments to parametersnitc :: CallSite :: signaturemap=
The mapping used on the call to associate arguments to parametersnitc $ CallSite :: mdoc_or_fallback
The documentation associated to the entity or their main nested entity.recv
or msignature
nitc :: MEntity :: _const_color
nitc :: MEntity :: _css_classes
CSS classes used to decorateself
nitc :: MEntity :: _deprecation
Is the entity deprecated?nitc :: CallSite :: _erasure_cast
Is a implicit cast required on erasure typing policy?nitc :: MEntity :: _html_full_name
The MEntityfull_name
escaped for HTML
nitc :: MEntity :: _is_broken
The indication that the entity did not pass some semantic verifications.nitc :: CallSite :: _msignature
The resolved signature for the receivernitc :: CallSite :: _signaturemap
The mapping used on the call to associate arguments to parametersserialization :: Serializable :: accept_inspect_serializer_core
serialization :: Serializable :: accept_json_serializer
Refinable service to customize the serialization of this class to JSONserialization :: Serializable :: accept_msgpack_attribute_counter
Hook to customize the behavior of theAttributeCounter
serialization :: Serializable :: accept_msgpack_serializer
Hook to customize the serialization of this class to MessagePacknitc :: MEntity :: add_doc_to_infobox
Append an entry for the doc in the given infoboxserialization :: Serializable :: add_to_bundle
Called by[]=
to dynamically choose the appropriate method according
recv
or msignature
recv
or msignature
nitc :: CallSite :: check_signature
core :: Object :: class_factory
Implementation used byget_class
to create the specific class.
nitc :: MEntity :: collect_ancestors
Collectself
ancestors (direct and indirect)
nitc :: MEntity :: collect_children
Collectself
children (direct descendants)
nitc :: MEntity :: collect_descendants
Collectself
descendants (direct and direct)
nitc :: MEntity :: collect_linearization
Collectself
linearization anchored on mainmodule
nitc :: MEntity :: collect_metrics
nitc :: MEntity :: collect_modifiers
Collect modifier keywords likeredef
, private
etc
nitc :: MEntity :: collect_parents
Collectself
parents (direct ancestors)
nitc :: MEntity :: const_color
nitc :: MEntity :: const_color=
nitc :: MEntity :: core_serialize_base
serialization :: Serializable :: core_serialize_to
Actual serialization ofself
to serializer
nitc :: MEntity :: create_ast_representation
Build a ANode fromself
nitc :: MEntity :: cs_comment
Returns the comment of this MEntity formatted for console.nitc :: MEntity :: cs_declaration
Returns the complete MEntity declaration (modifiers + name + signature).nitc :: MEntity :: cs_full_name
Returnsself.full_name
formatted for console
nitc :: MEntity :: cs_list_item
Returnsself
as a list element that can be displayed in console.
nitc :: MEntity :: cs_location
Source code location of this MEntity formatted for consolenitc :: MEntity :: cs_short_comment
Returns the comment of this MEntity formatted for console.nitc :: MEntity :: cs_signature
Returnsself
signature formatted for console.
nitc :: MEntity :: cs_source_code
Source code associated to this MEntity.nitc :: MEntity :: css_classes=
CSS classes used to decorateself
nitc :: CallSite :: defaultinit
nitc :: HInfoBoxable :: defaultinit
nitc :: MEntity :: defaultinit
core :: Object :: defaultinit
nitc :: MEntity :: deprecation=
Is the entity deprecated?nitc :: CallSite :: erasure_cast
Is a implicit cast required on erasure typing policy?nitc :: CallSite :: erasure_cast=
Is a implicit cast required on erasure typing policy?nitc :: MEntity :: field_separator
serialization :: Serializable :: from_deserializer
Create an instance of this class from thedeserializer
nitc :: MEntity :: hierarchy_poset
Build a poset representingself
in it's own hierarchy
nitc :: MEntity :: html_declaration
Returns the complete MEntity declaration decorated with HTMLnitc :: MEntity :: html_full_name=
The MEntityfull_name
escaped for HTML
nitc :: MEntity :: html_name=
The MEntity name escaped for HTMLnitc :: MEntity :: html_namespace
Returnsfull_name
decorated with HTML links
nitc :: MEntity :: html_signature
Returns the MEntity signature decorated with HTMLnitc :: HInfoBoxable :: infobox
An new infobox documenting the entitynitc :: MEntity :: is_broken=
The indication that the entity did not pass some semantic verifications.nitc :: MEntity :: is_fictive=
Isself
created for internal purpose?
core :: Object :: is_same_instance
Return true ifself
and other
are the same instance (i.e. same identity).
core :: Object :: is_same_serialized
Isself
the same as other
in a serialization context?
core :: Object :: is_same_type
Return true ifself
and other
have the same dynamic type.
nitc :: MEntity :: json_namespace
Returnself.full_name
as an object that can be serialized to json.
nitc :: MEntity :: line_separator
nitc :: MEntity :: linkto_text
Link to theself
with a specific text.
nitc :: MEntity :: mdoc_or_fallback
The documentation associated to the entity or their main nested entity.serialization :: Serializable :: msgpack_extra_array_items
Hook to request a larger than usual metadata arraynitc :: CallSite :: msignature=
The resolved signature for the receivercore :: Object :: native_class_name
The class name of the object in CString format.core :: Object :: output_class_name
Display class name on stdout (debug only).mentity
nitc :: MEntity :: ratings_by_dimension
Get the ratings of adimension
nitc :: CallSite :: recv_is_self=
Is the receiver self?serialization :: Serializable :: serialize_msgpack
Serializeself
to MessagePack bytes
serialization :: Serializable :: serialize_to
Serializeself
to serializer
serialization :: Serializable :: serialize_to_json
Serializeself
to JSON
serialization :: Serializable :: serialize_to_or_delay
Accept references or force direct serialization (usingserialize_to
)
nitc :: CallSite :: signaturemap
The mapping used on the call to associate arguments to parametersnitc :: CallSite :: signaturemap=
The mapping used on the call to associate arguments to parametersnitc :: MEntity :: source_url
Render a HTML link for the MEntity locationserialization :: Serializable :: to_pretty_json
Serializeself
to plain pretty JSON
nitc :: MEntity :: tpl_module
Builds a dot UML package diagram entity fromself
v.enter_visit
on all nested entities.
nitc :: MEntity :: write_extra_doc
Extra auto documentation to append to thestream
nitc :: MEntity :: write_location
Location (file and line when available) of related declarationsSerializer::serialize
# 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
# 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
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