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.
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.
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_and_check -- step).
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.
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.
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 or
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_and_check process or later if it is necessary, but specialize_and_check *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 or
specialize_thru.)
Collect Current to become actually true live code in type knowing that Current
already specialized in type.
The Result is used for EXPRESSION only to indicates its
TYPE in the type context. Feature collect may be call more than once on the same
target until for example the magic_count to be stabilized. Also note that, when not
Void, the Result must be the one given by a similar resolve_in call.
AS THE NEW collect NOW ACCEPT VOID AS A TARGET, IT
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.)
require
start_position.class_text = type.class_text
ensure
Result.has_been_specialized
All the original source code information is kept in the Result:
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.
The specialize_and_check
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_and_check 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_and_check on them
before calling resolve_in. So we can continue the specialization process and perform some validation
checks knowing the TYPE of other components.
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_and_check -- step).
Finally, also note that the purpose of this
feature is mostly to write contracts (see also the strange ensure assertion).
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.)
Append in str the Eiffel coding of the character (Table in chapter 25 of ETL, page 423).%%%%%%%%
When the % letter notation exists, it is returned in priority: '%N' gives "%N", '%T'
gives "%T", etc.
When % letter notation does not exists (not in the ETL table), numbered coding
used ("%/1/", "%/2/" etc).