True when the evaluation of Current has no side effect at all (i.e. no memory allocated, no
modification in the _heap_ memory, no external code with possible side effect).
This method may be called to solve the Current expression type knowing that the Current expression
has_been_specialized for the type given as an argument.
Used both for specialize_in and specialize_thru to indicate that we have all FEATURE_STAMPs
ready for use and that FEATURE_NAMEs are no longer used (except for calls on non-current target
who are available after specialize_2 -- step).
Assuming that Current is already specialized in parent_type, now specialize Current for the
new_type knowing that this source code is inherited thru parent_edge.
True when the evaluation of Current has no side effect at all (i.e. no memory allocated, no
modification in the _heap_ memory, no external code with possible side effect).
Actually, when
side_effect_free is True, Current can be evaluated more than once or not evaluated at all.
The specialize_2
step has been added to continue specialization which can't be made at specialize_in / specialize_thru
time (because the expression TYPE computation may involve TYPEs who don't yet exist).
At specialize_2 step, all TYPEs used by Current expression are ready, so TYPE may be known for all
sub-members (target, arguments) using resolve_in, if we take care to call specialize_2 on them
before calling resolve_in. So we can continue the specialization process and perform some validation
checks knowing the TYPE of other components.
After this specialize_2 has been called on Current, resolve_in can be used to know the
Current expression result TYPE.
True if Current represents Void, False , 0, or whatever is a default value.
Also note
that some default values like NULL_POINTER, cannot be written in pure Eiffel.
(Thanks to the new ?:= operator, this is_default_value frozen definition is pretty fine.)
This method may be called to solve the Current expression type knowing that the Current expression
has_been_specialized for the type given as an argument.
It is important to keep in mind that the
resolve_in function must not be called from some specialize_in / specialize_thru function
(those functions are used when *one* TYPE is created and current expression may refer to TYPEs not yet
created) Hence, resolve_in calls are likely to occurs during the specialize_2 process or later if it
is necessary, but specialize_2 *must* have been called on Current expression before resolve_in is
called. One may also know that resolve_in function may be called one or more times or may not be
called at all. (Note that the require assertion is checking that we are not currently doing some
specialize_in / specialize_thru.)
Collect Current to become actually true live code in type knowing that Current is already
specialized in type.
The Result indicates the TYPE of Current expression in type. The same
call may occurs more than once during the compilation process until for example the magic_count
to be stabilized. Also note that the Result must be the one given by a similar resolve_in call.
True when we do have to add an extra pair of brackets if the Current expression is the target
of a call.
As an example, this is True for infix calls. (This feature is used for pretty as
well as for short). As another example, it is also true (-1).foo because of the usual low
priority of prefix minus.
Specialize Current knowing that the corresponding source code was written in type.
The Result
still contains all the original source code information in order to be able to specialize_in again
the Result in another type. (See also specialize_thru and has_been_specialized as well.)
Used both for specialize_in and specialize_thru to indicate that we have all FEATURE_STAMPs
ready for use and that FEATURE_NAMEs are no longer used (except for calls on non-current target
who are available after specialize_2 -- step).
Finally, also note that the purpose of this
feature is mostly to write contracts (see also the strange ensure assertion).
Assuming that Current is already specialized in parent_type, now specialize Current for the
new_type knowing that this source code is inherited thru parent_edge.