nitc :: ASendReassignFormExpr :: _write_callsite
The property invoked for the writingnitc :: ASendReassignFormExpr :: write_callsite
The property invoked for the writingnitc :: ASendReassignFormExpr :: write_callsite=
The property invoked for the writingnitc $ ASendReassignFormExpr :: SELF
Type of this instance, automatically specialized in every classnitc :: transform $ ASendReassignFormExpr :: accept_transform_visitor
x.foo(y)+=z
is replaced with
nitc :: typing $ ASendReassignFormExpr :: accept_typing
nitc :: ssa $ ASendReassignFormExpr :: generate_basic_blocks
Generate recursively basic block for this expressionnitc :: naive_interpreter $ ASendReassignFormExpr :: stmt
Evaluate the node as a statement.nitc :: abstract_compiler $ ASendReassignFormExpr :: stmt
Try to compile self as a statementnitc :: AExpr :: _after_flow_context
The flow after the full evaluation of the expression/statementnitc :: 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 :: 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 :: Prod :: _n_annotations
All the annotations attached directly to the nodenitc :: AReassignFormExpr :: _n_assign_op
The combined operator (eg.+=
)
nitc :: AReassignFormExpr :: _n_value
The right-value to apply on the combined operator.nitc :: AReassignFormExpr :: _read_type
nitc :: AReassignFormExpr :: _reassign_callsite
The method designed by the reassign operator.nitc :: AExpr :: _vararg_decl
It indicates the number of arguments collected as a vararg.nitc :: AExpr :: _variable_cache
nitc :: ASendReassignFormExpr :: _write_callsite
The property invoked for the writingnitc :: 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 :: 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 :: Prod :: defaultinit
nitc :: ASendExpr :: defaultinit
nitc :: ANode :: defaultinit
nitc :: AReassignFormExpr :: defaultinit
core :: Object :: defaultinit
core :: Cloneable :: 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 :: 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 :: ASendExpr :: init_asendexpr
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 :: AExpr :: make_var_read
Return a new variable read that contains the value of the expressionnitc :: 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 nodenitc :: AReassignFormExpr :: n_assign_op=
The combined operator (eg.+=
)
nitc :: AReassignFormExpr :: n_value
The right-value to apply on the combined operator.nitc :: AReassignFormExpr :: n_value=
The right-value to apply on the combined operator.core :: 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).nitc :: ANode :: parentize_tokens
Visit the AST and computes advanced AST attributes on Tokens and Prodnitc :: ASendExpr :: property_name
The name of the propertynitc :: ASendExpr :: property_node
The node identifying the name (id, operator, etc) for messages.nitc :: ASendExpr :: raw_arguments
An array of all arguments (excluding self)nitc :: AReassignFormExpr :: read_type
nitc :: AReassignFormExpr :: read_type=
nitc :: AReassignFormExpr :: reassign_callsite
The method designed by the reassign operator.nitc :: AReassignFormExpr :: reassign_callsite=
The method designed by the reassign operator.nitc :: 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 :: AReassignFormExpr :: resolve_reassignment
Determine thereassign_property
nitc :: Prod :: start_token
The token where the production really start (skipping ADoc).nitc :: 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?
nitc :: ASendReassignFormExpr :: write_callsite
The property invoked for the writingnitc :: ASendReassignFormExpr :: write_callsite=
The property invoked for the writing+= something
x[y,z]+=t
x.m(y)+=z
. OR just a simple complex assignment.
# A complex setter call (standard or brackets)
abstract class ASendReassignFormExpr
super ASendExpr
super AReassignFormExpr
end
src/parser/parser_nodes.nit:2424,1--2428,3
redef class ASendReassignFormExpr
# The property invoked for the writing
var write_callsite: nullable CallSite
redef fun accept_typing(v)
do
var recvtype = v.visit_expr(self.n_expr)
var name = self.property_name
var node = self.property_node
if recvtype == null then return # Forward error
var for_self = self.n_expr isa ASelfExpr
var callsite = v.build_callsite_by_name(node, recvtype, name, for_self)
if callsite == null then return
self.callsite = callsite
var args = compute_raw_arguments
callsite.check_signature(v, node, args)
var readtype = callsite.msignature.return_mtype
if readtype == null then
v.error(node, "Error: `{name}` is not a function.")
return
end
var wcallsite = v.build_callsite_by_name(node, recvtype, name + "=", self.n_expr isa ASelfExpr)
if wcallsite == null then return
self.write_callsite = wcallsite
var wtype = self.resolve_reassignment(v, readtype, wcallsite.msignature.mparameters.last.mtype)
if wtype == null then return
args = args.to_a # duplicate so raw_arguments keeps only the getter args
args.add(self.n_value)
wcallsite.check_signature(v, node, args)
self.is_typed = true
end
end
src/semantize/typing.nit:2129,1--2170,3
redef class ASendReassignFormExpr
redef fun accept_rapid_type_visitor(v)
do
v.add_callsite(callsite)
v.add_callsite(reassign_callsite)
v.add_callsite(write_callsite)
end
end
src/rapid_type_analysis.nit:715,1--722,3
redef class ASendReassignFormExpr
redef fun stmt(v)
do
var recv = v.expr(self.n_expr)
if recv == null then return
var args = v.varargize(callsite.mpropdef, callsite.signaturemap, recv, self.raw_arguments)
if args == null then return
var value = v.expr(self.n_value)
if value == null then return
var read = v.callsite(callsite, args)
assert read != null
var write = v.callsite(reassign_callsite, [read, value])
assert write != null
args.add(write)
v.callsite(write_callsite, args)
end
end
src/interpreter/naive_interpreter.nit:2311,1--2331,3
redef class ASendReassignFormExpr
redef fun generate_basic_blocks(ssa, old_block)
do
self.n_expr.generate_basic_blocks(ssa, old_block)
ssa.propdef.object_sites.add(self)
# Recursively goes into arguments to find variables if any
for e in self.raw_arguments do e.generate_basic_blocks(ssa, old_block)
return self.n_value.generate_basic_blocks(ssa, old_block)
end
end
src/ssa.nit:854,1--866,3
redef class ASendReassignFormExpr
# `x.foo(y)+=z` is replaced with
#
# ~~~nitish
# x.foo(y) = x.foo(y) + z
# ~~~
#
# witch is, in reality:
#
# ~~~nitish
# x."foo="(y, x.foo(y)."+"(z))
# ~~~
redef fun accept_transform_visitor(v)
do
var nblock = v.builder.make_block
nblock.add(n_expr)
var read_args = new Array[AExpr]
var write_args = new Array[AExpr]
for a in raw_arguments do
nblock.add(a)
read_args.add(a.make_var_read)
write_args.add(a.make_var_read)
end
var nread = v.builder.make_call(n_expr.make_var_read, callsite.as(not null), read_args)
var nnewvalue = v.builder.make_call(nread, reassign_callsite.as(not null), [n_value])
write_args.add(nnewvalue)
var nwrite = v.builder.make_call(n_expr.make_var_read, write_callsite.as(not null), write_args)
nblock.add(nwrite)
replace_with(nblock)
end
end
src/transform.nit:421,1--456,3
redef class ASendReassignFormExpr
redef fun stmt(v)
do
var recv = v.expr(self.n_expr, null)
var callsite = self.callsite.as(not null)
if callsite.is_broken then return
var args = v.varargize(callsite.mpropdef, callsite.signaturemap, recv, self.raw_arguments)
var value = v.expr(self.n_value, null)
var left = v.compile_callsite(callsite, args)
assert left != null
var res = v.compile_callsite(self.reassign_callsite.as(not null), [left, value])
assert res != null
args.add(res)
v.compile_callsite(self.write_callsite.as(not null), args)
end
end
src/compiler/abstract_compiler.nit:4433,1--4452,3