The most general form of the if-then-else INSTRUCTION. Actually, if-then-else INSTRUCTIONs are handled
with IFTHENELSE but also with IFTHEN. Indeed, when we have a single if-then without else part, the
parser creates only an IFTHEN object. When we have an "else" part or when there are at least one
"elseif", the general IFTHENELSE is used.
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).
Because complex BOOLEAN expression may needs to let escape dynamic dispatch instructions,
"elseif" constructions are removed and replaced by imbricated "else if then...".
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).
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.
After this specialize_and_check has been called on Current, resolve_in can be used to know the
Current expression result TYPE.
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).
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
Because complex BOOLEAN expression may needs to let escape dynamic dispatch instructions,
"elseif" constructions are removed and replaced by imbricated "else if then...".
Thus,
extra statements needed by dynamic dispatch have a place to go (between "else" and "if").
require
code_accumulator /= Void
type /= Void
ensure
code_accumulator.context_level = old code_accumulator.context_level
Value greater than 0 strictly given by the eiffel_parser.
Internally generated pseudo
code (i.e. non-written or inlined code) is supposed to have a 0 value. When comparing
two instructions (created by the eiffel_parser), a greater value indicates that the
instruction was parsed after the other. The eiffel_parser_stamp is used to unlock
temporary INTERNAL_C_LOCAL.
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.
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).