x._a=y
nitc :: AAttrAssignExpr :: defaultinit
nitc :: AAttrAssignExpr :: make
nitc $ AAttrAssignExpr :: SELF
Type of this instance, automatically specialized in every classnitc :: pretty $ AAttrAssignExpr :: accept_pretty_printer
Start visit ofself
using a PrettyPrinterVisitor
nitc :: typing $ AAttrAssignExpr :: accept_typing
nitc :: abstract_compiler $ AAttrAssignExpr :: expr
Try to compile self as an expressionnitc :: java_compiler $ AAttrAssignExpr :: expr
Try to compile self as an expressionnitc :: ssa $ AAttrAssignExpr :: generate_basic_blocks
Generate recursively basic block for this expressionnitc :: parser_prod $ AAttrAssignExpr :: n_expr=
The receiver of the attributenitc :: parser_prod $ AAttrAssignExpr :: n_id=
The name of the attributenitc :: parser_prod $ AAttrAssignExpr :: n_value=
The right-value to assign.nitc :: parser_prod $ AAttrAssignExpr :: replace_child
Replace a child with an other node in the ASTnitc :: vm_optimizations $ AAttrAssignExpr :: stmt
Evaluate the node as a statement.nitc :: naive_interpreter $ AAttrAssignExpr :: stmt
Evaluate the node as a statement.nitc :: parser_prod $ AAttrAssignExpr :: visit_all
Visit all nodes in order.nitc :: AExpr :: _after_flow_context
The flow after the full evaluation of the expression/statementnitc :: AAttrFormExpr :: _attr_type
The static type of the attribute.nitc :: AExpr :: _comprehension
Is non-null ifself
is a leaf of a comprehension array construction.
nitc :: Prod :: _first_location
Location on the first token after the start of a productionnitc :: Prod :: _first_token
The first token of the production in the ASTnitc :: AAttrFormExpr :: _id
Identifier of the class which introduced the attributenitc :: AExpr :: _implicit_cast_to
If required, the following implicit cast.as(XXX)
nitc :: ANode :: _is_broken
The indication that the node did not pass some semantic verifications.nitc :: Prod :: _last_token
The last token of the production in the ASTnitc :: AAttrFormExpr :: _mproperty
The attribute accessed.nitc :: Prod :: _n_annotations
All the annotations attached directly to the nodenitc :: AAttrFormExpr :: _offset
Position of the attribute in attribute tablenitc :: AAttrFormExpr :: _status
Indicate the status of the optimization for this nodenitc :: AExpr :: _vararg_decl
It indicates the number of arguments collected as a vararg.nitc :: AExpr :: _variable_cache
nitc :: ANode :: accept_ast_validation
nitc :: ANode :: accept_auto_super_init
nitc :: AExpr :: accept_explain_assert
Fillv
to explain this node if the parent assert fails
nitc :: ANode :: accept_flow_visitor
nitc :: ANode :: accept_forward_analysis
Apply the forward analysisv
to self
.
nitc :: ANode :: accept_literal
nitc :: ANode :: accept_post_typing
nitc :: ANode :: accept_pretty_printer
Start visit ofself
using a PrettyPrinterVisitor
nitc :: ANode :: accept_reaching_defs
Apply a ReachingDefsAnalysis toself
.
nitc :: ANode :: accept_regex_visitor
nitc :: ANode :: accept_scope_visitor
nitc :: ANode :: accept_simple_misc
nitc :: ANode :: accept_string_finder
nitc :: AExpr :: accept_typing
nitc :: AExpr :: after_flow_context
The flow after the full evaluation of the expression/statementnitc :: AExpr :: after_flow_context=
The flow after the full evaluation of the expression/statementnitc :: ANode :: after_simple_misc
nitc :: AExpr :: allocate_mtype
Make themtype
of the expression live
nitc :: AAttrFormExpr :: attr_type=
The static type of the attribute.nitc :: ANode :: bad_expr_message
An additional information message to explain the role of a child expression.nitc :: ANode :: check_callsite
core :: Object :: class_factory
Implementation used byget_class
to create the specific class.
nitc :: ANode :: collect_annotations_by_name
Do a deep search and return an array of node that are annotatednitc :: Prod :: collect_comments
Collect allTComment
contained in the production
nitc :: ANode :: collect_length
Collect the length (inChar
) of the node.
nitc :: ANode :: collect_tokens_by_text
Do a deep search and return an array of tokens that match a given textnitc :: ANode :: common_parent
The most specific common parent betweenself
and other
nitc :: AExpr :: comprehension
Is non-null ifself
is a leaf of a comprehension array construction.
nitc :: AExpr :: comprehension=
Is non-null ifself
is a leaf of a comprehension array construction.
nitc :: ANode :: create_contracts
nitc :: ANode :: decorate_tag
Add aditionnal information on a child-token and return an additionnal HInfoBox on itnitc :: AExpr :: defaultinit
nitc :: AAttrFormExpr :: defaultinit
nitc :: AAttrAssignExpr :: defaultinit
core :: Object :: defaultinit
nitc :: ANode :: defaultinit
core :: Cloneable :: defaultinit
nitc :: Prod :: defaultinit
nitc :: AAssignFormExpr :: defaultinit
nitc :: AExpr :: detach_with_placeholder
Thedetach
method completely remove the node in the parent.
nitc :: ANode :: do_cloneable
nitc :: Prod :: first_location
Location on the first token after the start of a productionnitc :: Prod :: first_location=
Location on the first token after the start of a productionnitc :: Prod :: first_token
The first token of the production in the ASTnitc :: Prod :: first_token=
The first token of the production in the ASTnitc :: ANode :: force_block=
Forceself
to be rendered as a block.
nitc :: ANode :: force_inline=
Forceself
to be rendered as a line.
nitc :: ANode :: full_transform_visitor
nitc :: AExpr :: generate_basic_blocks
Generate recursively basic block for this expressionnitc :: Prod :: get_annotations
Return all its annotations of a given name in the order of their declarationnitc :: Prod :: get_single_annotation
Try to get its single annotation with a given namenitc :: ANode :: hot_location
The location of the important part of the node (identifier or whatever)nitc :: AAttrFormExpr :: id=
Identifier of the class which introduced the attributenitc :: AExpr :: implicit_cast_to
If required, the following implicit cast.as(XXX)
nitc :: AExpr :: implicit_cast_to=
If required, the following implicit cast.as(XXX)
nitc :: ANode :: is_broken=
The indication that the node did not pass some semantic verifications.nitc :: ANode :: is_noserialize
Is this node annotated to not be made serializable?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 :: ANode :: is_serialize
Is this node annotated to be made serializable?nitc :: ANode :: is_structural
Isself
a token or a pure-structural production like AQId
?
nitc :: Prod :: last_token
The last token of the production in the ASTnitc :: Prod :: last_token=
The last token of the production in the ASTnitc :: AAttrAssignExpr :: make
nitc :: AExpr :: make_var_read
Return a new variable read that contains the value of the expressionnitc :: AAttrFormExpr :: mproperty=
The attribute accessed.nitc :: ANode :: must_be_block
Doesself
have to be rendered as a block?
nitc :: ANode :: must_be_inline
Doesself
have be rendered as a line?
nitc :: Prod :: n_annotations
All the annotations attached directly to the nodenitc :: Prod :: n_annotations=
All the annotations attached directly to the nodecore :: Object :: native_class_name
The class name of the object in CString format.nitc :: AAttrFormExpr :: offset=
Position of the attribute in attribute tablenitc :: AAttrFormExpr :: optimize
Optimize this attribute accesscore :: Object :: output_class_name
Display class name on stdout (debug only).nitc :: ANode :: parentize_tokens
Visit the AST and computes advanced AST attributes on Tokens and Prodnitc :: ANode :: replace_child
Replace a child with an other node in the ASTnitc :: ANode :: replace_with
Replace itself with an other node in the ASTnitc :: AAttrFormExpr :: resolve_property
Resolve the attribute accessed.nitc :: Prod :: start_token
The token where the production really start (skipping ADoc).nitc :: AAttrFormExpr :: status
Indicate the status of the optimization for this nodenitc :: AAttrFormExpr :: status=
Indicate the status of the optimization for this nodenitc :: AExpr :: vararg_decl
It indicates the number of arguments collected as a vararg.nitc :: AExpr :: vararg_decl=
It indicates the number of arguments collected as a vararg.nitc :: AExpr :: variable_cache
nitc :: AExpr :: variable_cache=
nitc :: AExpr :: warn_parentheses
Warn in case of superfluous parenthesesnitc :: ANode :: was_inline
Doesself
was written in one line before transformation?
# The assignment of an attribute. eg `x._a=y`
class AAttrAssignExpr
super AAttrFormExpr
super AAssignFormExpr
end
src/parser/parser_nodes.nit:2407,1--2411,3
redef class AAttrAssignExpr
init init_aattrassignexpr (
n_expr: nullable AExpr,
n_id: nullable TAttrid,
n_assign: nullable TAssign,
n_value: nullable AExpr
)
do
_n_expr = n_expr.as(not null)
n_expr.parent = self
_n_id = n_id.as(not null)
n_id.parent = self
_n_assign = n_assign.as(not null)
n_assign.parent = self
_n_value = n_value.as(not null)
n_value.parent = self
end
redef fun replace_child(old_child: ANode, new_child: nullable ANode)
do
if _n_expr == old_child then
n_expr = new_child.as(AExpr)
return
end
if _n_id == old_child then
n_id = new_child.as(TAttrid)
return
end
if _n_assign == old_child then
n_assign = new_child.as(TAssign)
return
end
if _n_value == old_child then
n_value = new_child.as(AExpr)
return
end
end
redef fun n_expr=(node)
do
_n_expr = node
node.parent = self
end
redef fun n_id=(node)
do
_n_id = node
node.parent = self
end
redef fun n_assign=(node)
do
_n_assign = node
node.parent = self
end
redef fun n_value=(node)
do
_n_value = node
node.parent = self
end
redef fun visit_all(v: Visitor)
do
v.enter_visit(_n_expr)
v.enter_visit(_n_id)
v.enter_visit(_n_assign)
v.enter_visit(_n_value)
end
end
src/parser/parser_prod.nit:5245,1--5312,3
redef class AAttrAssignExpr
redef fun accept_typing(v)
do
self.resolve_property(v)
var mtype = self.attr_type
v.visit_expr_subtype(self.n_value, mtype)
self.is_typed = mtype != null
end
end
src/semantize/typing.nit:2544,1--2553,3
redef class AAttrAssignExpr
private init make(recv: AExpr, attribute: nullable MAttribute, value: AExpr)
do
_n_expr = recv
recv.parent = self
_n_id = new TAttrid
_n_value = value
value.parent = self
_n_assign = new TAssign
_mproperty = attribute
_mtype = value.mtype
end
end
src/astbuilder.nit:697,1--709,3
redef class AAttrAssignExpr
redef fun stmt(v)
do
var recv = v.expr(self.n_expr)
if recv == null then return
if recv.is_null then fatal(v, "Receiver is null")
var i = v.expr(self.n_value)
if i == null then return
var mproperty = self.mproperty.as(not null)
v.write_attribute(mproperty, recv, i)
end
end
src/interpreter/naive_interpreter.nit:2405,1--2416,3
redef class AAttrAssignExpr
redef fun stmt(v)
do
# TODO : a workaround for now
if not v isa VirtualMachine then
super
return
end
var recv = v.expr(self.n_expr)
if recv == null then return
if recv.mtype isa MNullType then fatal(v, "Receiver is null")
var i = v.expr(self.n_value)
if i == null then return
var mproperty = self.mproperty.as(not null)
assert recv isa MutableInstance
if status == 0 then optimize(mproperty, recv)
if status == 1 then
v.write_attribute_sst(recv.internal_attributes, offset, i)
else
v.write_attribute_ph(recv.internal_attributes, recv.vtable.internal_vtable,
recv.vtable.mask, id, offset, i)
end
#TODO : we need recompilations here
status = 0
end
end
src/vm/vm_optimizations.nit:126,1--155,3
redef class AAttrAssignExpr
redef fun generate_basic_blocks(ssa, old_block)
do
ssa.propdef.object_sites.add(self)
return self.n_expr.generate_basic_blocks(ssa, old_block)
end
end
src/ssa.nit:898,1--905,3