/[eiffelstudio]/branches/eth/eve/Src/Eiffel/API/evaluated_type/like_type_a.e
ViewVC logotype

Log of /branches/eth/eve/Src/Eiffel/API/evaluated_type/like_type_a.e

Parent Directory Parent Directory | Revision Log Revision Log


Links to HEAD: (view) (annotate)
Sticky Revision:

Revision 94983 - (view) (annotate) - [select for diffs]
Modified Fri May 2 11:05:28 2014 UTC (5 years, 7 months ago) by jasonw
File length: 16334 byte(s)
Diff to previous 94581
<<Merged from trunk#94978.>>

Revision 94581 - (view) (annotate) - [select for diffs]
Modified Fri Mar 7 11:57:58 2014 UTC (5 years, 9 months ago) by jasonw
File length: 16344 byte(s)
Diff to previous 92723
<<Merged from trunk#94580.>>

Revision 92723 - (view) (annotate) - [select for diffs]
Modified Fri Jun 21 07:47:04 2013 UTC (6 years, 5 months ago) by jasonw
File length: 16317 byte(s)
Diff to previous 92499
<<Merged from trunk#92722.>>

Revision 92499 - (view) (annotate) - [select for diffs]
Modified Fri Apr 26 23:06:21 2013 UTC (6 years, 7 months ago) by jasonw
File length: 15700 byte(s)
Diff to previous 92434
<<Merged from trunk#92492.>>

Revision 92434 - (view) (annotate) - [select for diffs]
Modified Fri Apr 12 10:41:30 2013 UTC (6 years, 8 months ago) by jasonw
File length: 15693 byte(s)
Diff to previous 89347
<<Merged from trunk#92433.>>

Revision 89347 - (view) (annotate) - [select for diffs]
Modified Fri Aug 10 15:09:25 2012 UTC (7 years, 4 months ago) by jasonw
File length: 15681 byte(s)
Diff to previous 87220
<<Merged from trunk#89346.>>

Revision 87220 - (view) (annotate) - [select for diffs]
Modified Thu Sep 15 08:09:35 2011 UTC (8 years, 2 months ago) by jasonw
File length: 15799 byte(s)
Diff to previous 86696
<<Merged from trunk#87219.>>

Revision 86696 - (view) (annotate) - [select for diffs]
Modified Fri Jun 10 11:12:57 2011 UTC (8 years, 6 months ago) by jasonw
File length: 15342 byte(s)
Diff to previous 86354
<<Merged from trunk#86694.>>

Revision 86354 - (view) (annotate) - [select for diffs]
Modified Fri Apr 29 18:23:18 2011 UTC (8 years, 7 months ago) by jasonw
File length: 14936 byte(s)
Diff to previous 85117
<<Merged from trunk#86353.>>

Revision 85117 - (view) (annotate) - [select for diffs]
Modified Fri Dec 10 16:29:10 2010 UTC (9 years ago) by jasonw
File length: 14558 byte(s)
Diff to previous 84268
<<Merged from trunk#85114.>>

Revision 84268 - (view) (annotate) - [select for diffs]
Modified Tue Aug 24 14:02:11 2010 UTC (9 years, 3 months ago) by jasonw
File length: 14538 byte(s)
Diff to previous 83928
<<Merged from trunk#84267.>>

Revision 83928 - (view) (annotate) - [select for diffs]
Modified Fri Jul 16 15:21:01 2010 UTC (9 years, 4 months ago) by mpei
File length: 14468 byte(s)
Diff to previous 83740
<<Merged from trunk#83927>>

Revision 83740 - (view) (annotate) - [select for diffs]
Modified Tue Jun 29 10:47:08 2010 UTC (9 years, 5 months ago) by julian
File length: 14319 byte(s)
Diff to previous 83702
<<Merged from trunk#83736.>>

Revision 83702 - (view) (annotate) - [select for diffs]
Modified Fri Jun 25 13:00:44 2010 UTC (9 years, 5 months ago) by julian
File length: 14148 byte(s)
Diff to previous 83441
<<Merged from trunk#83700.>>

Revision 83441 - (view) (annotate) - [select for diffs]
Modified Sat Jun 5 13:52:53 2010 UTC (9 years, 6 months ago) by jasonw
File length: 14136 byte(s)
Diff to previous 83331
Renamed branch eve3 to eve. The eve branch serves as the new branch for the EVE project.

Revision 83331 - (view) (annotate) - [select for diffs]
Modified Wed May 26 18:49:35 2010 UTC (9 years, 6 months ago) by jasonw
Original Path: branches/eth/eve3/Src/Eiffel/API/evaluated_type/like_type_a.e
File length: 14136 byte(s)
Diff to previous 82578
<<Breanched from trunk@83330>> Created a branch to upgrade Eiffel Transform library to trunk.

Revision 82578 - (view) (annotate) - [select for diffs]
Modified Mon Mar 15 20:19:03 2010 UTC (9 years, 8 months ago) by manus
Original Path: trunk/Src/Eiffel/API/evaluated_type/like_type_a.e
File length: 14136 byte(s)
Diff to previous 82540
Added notion of ephemeral class in the type system. However this is not yet enabled as we haven't decided how to make a class ephemeral (keyword or certain properties of a class).


Revision 82540 - (view) (annotate) - [select for diffs]
Modified Wed Mar 10 14:08:04 2010 UTC (9 years, 9 months ago) by alexk
Original Path: trunk/Src/Eiffel/API/evaluated_type/like_type_a.e
File length: 14003 byte(s)
Diff to previous 80247
Changed export status of features that are not subject to public use (in
particular in visitor classes that have too many of them). This also
improves readability when browsing the features in various tools and
documents which of them are really used by the clients.
Moved `feature_table' from AST_CONTEXT to AST_FEATURE_CHECKER_GENERATOR
since it is not used outside it and therefore requires unnecessary
initialization at the degrees, not related to
AST_FEATURE_CHECKER_GENERATOR.
Removed feature {TYPE_A}.is_solved as it always returns the same value
regardless of the associated type object.
Added feature {TYPE_A}.is_computable_using_ancestors as a short track to
see if a particular type may need type information other than from the
current class and ancestors. Pobably it will not be used or will be
replaced with the more precise computation. At the moment it is supposed to
be used together with {FEATURE_I}.is_type_evaluation_delayed.
Added feature {FEATURE_I}.is_type_evaluation_delayed that tells if type
checking for the feature cannot be done before building feature tables for
all the classes in the system.
Replaced direct access to {INHERIT_INFO}.a_feature with a conditional one,
including delayed feature instantiation if the types of the feature
signature are not yet computed.
Introduced and used "delayed" versions of the following features for cases
when type information associated with a feature is not computed yet:
 - {CONVERTIBILITY_CHECKER}.check_conversion_type
 - {INHERIT_INFO}.instantiate_a_feature
 - {FEATURE_I}.check_assigner
 - {FEATURE_I}.check_same_signature
 - {FEATURE_I}.check_signature
 - {FEATURE_I}.check_types
 - {FEATURE_I}.process_pattern
 - {FEATURE_I}.update_instantiator2
Delayed computation of a class skeleton because it may depend on features
for which type information is not available yet. This is a subject for
future optimization.
Added some assertions to ensure everything is properly set before
processing.
Added actions to update type information associated with a feature in cases
it is cloned in a descendant while the type information of the original
feature is not computed yet.
Introduced new mechanism in DEGREE_4 to record actions to be taken after
the "normal" processing when some type checks are delayed. This is required
to compute qualified anchored types that may depend on descendants or other
classes that are not processed before the given one, but are still required
to get the correct type information.
Introduced new mechanism to TMP_FEATURE_SERVER to store features for which
type information is not yet computed. These features are kept in memory
instead flushing to the disk that is performed after computing type
information for them.
Made some minor optimizaions.


Revision 80247 - (view) (annotate) - [select for diffs]
Modified Thu Aug 13 17:24:47 2009 UTC (10 years, 3 months ago) by manus
Original Path: trunk/Src/Eiffel/API/evaluated_type/like_type_a.e
File length: 13806 byte(s)
Diff to previous 77520
To prevent many eweasel tests to fail due to missing C compilation that was required with the addition
  of `generating_type: TYPE [like Current]' in ANY, we made sure that the compiler would not force a
  freeze each time a new generic derivation of TYPE was added to the system (it was freezing because TYPE
  contains some C externals). To prevent the freeze, now in the case of TYPE we say no need to freeze
  and we have augmented the interpreter with the ability to generate in byte code EXTERNAL_B node assuming
  they are builtin.
Fixed a bug in the code generation of the manifest type `{like Current}' in ANY. Indeed from ANY's point
  of view, like Current is a reference and it was generating the TYPE instance for the reference generice
  derivation of TYPE. Unfortunately when the descendant is expanded it uses the wrong generic derivation
  and code fails at execution. To prevent that problem, a manifest type creation only compute the type
  of its actual generic parameter, and then in the runtime we added `eif_typeof_type_of' which computes
  the approprite TYPE generic derivation to use based on the actual type. Because of that the 
  `rt_type_set' is indexed via the actual generic parameter type rather than by the type of the TYPE instance.
  Note the entry is actually `dftype + 1' as the 0 index is for TYPE [NONE].
Fixed missing analyze of type in TYPE_EXPR_B causing `Current' not to be registered for GC in finalized mode
  when generating a routine with just `Result := {like Current}'. This was making eweasel test#runtime005
  fail.
Fixed a bug in processing TYPED_POINTER associated CLASS_TYPE because the actual generic parameter recorded
  in `basic_type' could be anything and thus would be out of context.
Removed native processing of `generating_type' for basic types since now we need to generate STRING in
  non-experimental mode and TYPE [like Current] in experimental mode.
Renamed private `sk_type' from eif_type_id.c into public `eif_dtype_to_sk_type' in `cecil.c'. This is used
  by the `eif_typeof_type_of' above to calculate the proper generic derivation.
Made `RTLNTY' and `eif_type_malloc' really thread safe (they were not previously due to resizing of
  `rt_type_set'.
Changed signature of `generate_cid_init' in TYPE_A to also take a context (this is needed for the LIKE_CURRENT
  descendant) and this matches the need for a context in `generate_cid' and `generate_cid_array'.
Fixed `internal_same_generic_derivation_as' in GEN_TYPE_A to properly process actual generic parameter
  which are LIKE_CURRENT. This fixes eweasel test#incr074 which was failing with the addition of 
  `generating_type: TYPE [like Current]' in ANY.
Changed LIKE_CURRENT to always use the context type when provided and if not `conformance_type'.
Refactored `generate_type_id' in CREATE_TYPE to use `generated_id' from TYPE_A. This is needed for allowing
  generating the type declaration of NONE.
This commit fixes eweasel test#melt097 and test#valid257.


Revision 77520 - (view) (annotate) - [select for diffs]
Modified Wed Mar 4 01:50:25 2009 UTC (10 years, 9 months ago) by manus
Original Path: trunk/Src/Eiffel/API/evaluated_type/like_type_a.e
File length: 13768 byte(s)
Diff to previous 77402
Updated to new syntax of object test and attached/detachable types using the `syntax_updater' tool.


Revision 77402 - (view) (annotate) - [select for diffs]
Modified Fri Feb 27 12:13:49 2009 UTC (10 years, 9 months ago) by alexk
Original Path: trunk/Src/Eiffel/API/evaluated_type/like_type_a.e
File length: 13792 byte(s)
Diff to previous 76432
Added a new feature {TYPE_A}.formal_instantiation_in that takes care of
both formal generic and "like Current" resolution, as they should be
evaluated taking into account slightly different context (current
constraint for the formal generics and current type for "like Current", as
the latter may be resolved to a formal generic and should not be resolved
to a signle constraint in a multi-constraint case).
Promoted attachment setting of a formal generic when it is evaluated in a
descendant.
Used "detachable ANY" as a default constraint for a formal generic.
Added a query {TYPE_SET_A}.is_attached that might be used to see if a given
multi-constraint formal is attached.
Changed calculation of a type in the given context when type-checking code
to use the new function.
Implemented detection of VUTA(2) errors for unary and binary operators.
Avoided compiler crash when reporting VWOE error for unary operator in
multi-constraint case.


Revision 76432 - (view) (annotate) - [select for diffs]
Modified Mon Dec 29 23:41:59 2008 UTC (10 years, 11 months ago) by manus
Original Path: trunk/Src/Eiffel/API/evaluated_type/like_type_a.e
File length: 13500 byte(s)
Diff to previous 76125
Removal of `is' keyword.
Replacement of `is' by `=' for constant definitions.
Replaced `indexing' by `note'.


Revision 76125 - (view) (annotate) - [select for diffs]
Modified Tue Dec 9 20:24:44 2008 UTC (11 years ago) by manus
Original Path: trunk/Src/Eiffel/API/evaluated_type/like_type_a.e
File length: 13652 byte(s)
Diff to previous 75946
Added a context class to `conform_to'. This prevents having to use `System.current_class' in the case
  of formals and thus making the code more robust.


Revision 75946 - (view) (annotate) - [select for diffs]
Modified Fri Nov 28 13:42:30 2008 UTC (11 years ago) by alexk
Original Path: trunk/Src/Eiffel/API/evaluated_type/like_type_a.e
File length: 13609 byte(s)
Diff to previous 75567
Corrected setting attachment marks for anchored types, so that the attachment status is of an anchored type itself if it has an explicit mark or of the anchor type otherwise.

Revision 75567 - (view) (annotate) - [select for diffs]
Modified Thu Nov 13 20:39:48 2008 UTC (11 years ago) by manus
Original Path: trunk/Src/Eiffel/API/evaluated_type/like_type_a.e
File length: 13579 byte(s)
Diff to previous 75456
Added support for attachment marks at runtime in actual generic parameters:
- Updated runtime to understand annotation marks in our type arrays and all routines for 
  creating types and handling conformance.
- To properly handle conformance, a new entry in the type arrays generated in eparents.c have been
  added, it stores whether or not a type is attached. That is to say A inherits B, and when we check if
  !A conforms to !B, we modify the type array so that it has the attachment mark.
- Increased storable version number as old systems cannot understand the marks.
- Fixed catcall detection at runtime which was not properly handling attached arguments (as before
  we only check catcalls for non-void argument, but it the argument is attached, then we need to
  check that it is indeed not Void.
- Changed the Eiffel code generation so that even if we asked to create !A, we actually create A
  (i.e. we remove the annotation as they do not make sense for the type of an object).
- Made sure that a generic descriptor is created for attributes whose type is an attached non-generic type
  as well as a non-explicit type (e.g. formal/anchors).


Revision 75456 - (view) (annotate) - [select for diffs]
Modified Thu Nov 6 16:15:54 2008 UTC (11 years, 1 month ago) by alexk
Original Path: trunk/Src/Eiffel/API/evaluated_type/like_type_a.e
File length: 12648 byte(s)
Diff to previous 75259
Refactored attachment status manipulation so that the design is more consistent (that fixes some issues involving anchored types and formal generics) and used `conformance_type' in conformance checks for formal generic so that it should also work for anchored types.

Revision 75259 - (view) (annotate) - [select for diffs]
Modified Thu Oct 23 18:28:25 2008 UTC (11 years, 1 month ago) by alexk
Original Path: trunk/Src/Eiffel/API/evaluated_type/like_type_a.e
File length: 12829 byte(s)
Diff to previous 75151
Renamed `as_attached' to `as_attached_type' to avoid conflict with a
feature from ANY.
Transformed `to_current_attachment' to `to_other_attachment' as the latter
allows returning an anchored type that permits to avoid reverse assignment.
Implemented features that transform a type to the one with the given
attachment status in TYPE_SET_A which is required to perform conformance
tests for formal generics correctly (see test#attach025).
Taken attachment status of the formal generic when performing conformance
tests (this fixes test#attach025).
Ensured the scope for non-void Result in a postcondition is activated only
when its type is attached as otherwise it is incorrectly treated as
attached regardless of the actual type in void-safe mode. However the
Result is marked as set in the postcondition if it has to be initialized in
the body.
Supported a check for VEVI errors in inherited assertions.
Provided a check for self-initializing attribute bodies.
Avoided a false VEVI error for self-initializing attribute if it is not set
explicitly at the end of a creation procedure.


Revision 75151 - (view) (annotate) - [select for diffs]
Modified Fri Oct 17 08:35:38 2008 UTC (11 years, 1 month ago) by alexk
Original Path: trunk/Src/Eiffel/API/evaluated_type/like_type_a.e
File length: 12812 byte(s)
Diff to previous 75116
Added a query that tells if initialization is required for a type (this is
different from attachment status, because entities of formal generic type
require initialization though we do not know if the actual type will be
attached or not).
Factored out a function that transfers attachment status of the current
type to the specified one which is required for processing anchored types.


Revision 75116 - (view) (annotate) - [select for diffs]
Modified Wed Oct 15 19:49:08 2008 UTC (11 years, 1 month ago) by manus
Original Path: trunk/Src/Eiffel/API/evaluated_type/like_type_a.e
File length: 13705 byte(s)
Diff to previous 74866
Slight modification in the generic conformance code so that it uses much less memory. With
  EiffelStudio, we went from using 40MB of C memory down to 16MB and a minor speed improvement
  where we went from 111s down to 107s. The change is to never build the conformance table
  when computing the dynamic type of a generic class, the conformance table is only build when
  needed, i.e. object test/assignment attempts and explicit call to {ANY}.conforms_to.
  For this to work, we had to review the representation of formal generic parameters in a
  type description. Now we cannot use the "0xFFF8 + pos" when describing a type in workbench mode
  nor in finalized mode except if we can guarantee that it is always a formal in all its descendants.
  The reason is quite simple, if a descendant instantiate the generic type, then 0xFFF8 does not
  make sense anymore, previously we relied on the conformance table to find out the type of the formal
  in the descendant, now we actually rely on our TYPE_FEATURE_I (so far only used in .NET code
  generation) to get the type of a formal and for generating a type description of a FORMAL_A
  we use the same technique as the one used for anchors by using the CREATE_FORMAL_TYPE abstraction.
Fixed a few issues with the processing of TYPE_FEATURE_I so that their pattern_id is properly
  computed. And defined TYPE_FEATURE_I to be a function and properly implemented `new_rout_entry'
  so that it generates a FORMAL_ENTRY which is like a ROUT_ENTRY for which the type information is
  always generated in workbench mode. Also made sure that those TYPE_FEATURE_I are added
  to `system.rout_info_table' otherwise code generation simply does not work.
Minor refactor of SELECT_TABLE.add_units so that we can easily add the processing of TYPE_FEATURE_I
  for finalization without duplicating too much code.
Removed `bc_gen_param_create' opcode since not used anymore.
Removed `eif_gen_tuple_typecode_str' which was not used anymore.


Revision 74866 - (view) (annotate) - [select for diffs]
Modified Mon Sep 29 16:28:32 2008 UTC (11 years, 2 months ago) by manus
Original Path: trunk/Src/Eiffel/API/evaluated_type/like_type_a.e
File length: 13697 byte(s)
Diff to previous 73697
Refactored the code for simplification of the runtime type encoding code generation.
Fixed an issue where A [INTEGER], A [?INTEGER] and A [!INTEGER] would generate 3 different
  CLASS_TYPEs instances where one is enough since an expanded type is always attached.
Added support (but disabled it for the time being) for encoding the attachment mark in the
  runtime type encoding, this is done via {TYPE_A}.annotation_flags which currently always
  return 0.
Changed the way `eparents' is generated, instead of generating again the class name, we simply
  generate the type id and we use that `type_id' to get the class name via the `cn_generator' field
  of the `struct cnode' structure.


Revision 73697 - (view) (annotate) - [select for diffs]
Modified Fri May 23 18:22:30 2008 UTC (11 years, 6 months ago) by manus
Original Path: trunk/Src/Eiffel/API/evaluated_type/like_type_a.e
File length: 13670 byte(s)
Diff to previous 73009
Properly implemented the ~ operator on .NET.
Fixed .NET code generation which was generating incorrect code for the basic type when we changed the
  signature from `like Current' to the basic type. The issue is that our code generation was not good
  at changing the expanded status of an argument in a signature as this was not detected.
  To make this work, I also changed the code generation of basic type so that they use the basic type
  .NET equivalent rather than the value type we generate for all the signatures (see
  {BASIC_A}.generic_derivation change).
  And also changed a few things here and there for some various transformation of values from ref to
  basic and reverse.
Also if an inherited routine of an expanded class was calling a routine whose signature was changed
  in the expanded type (e.g. `infix "&"' in INTEGER_32 calling `bit_and' which is redefined) then
  we were calling the new `bit_and' routine but still using its inherited signature thus generating
  the wrong argument passing. So we fixed that by changing {CALL_ACCESS_B}.byte_node to update the
  call to the descendant signature but this caused eweasel test#exec060 to now fails. We tried to
  fix it but could not for the time being. The only result of that change is in {BYTE_CONTEXT}.real_type
  which has been factorized to use {BYTE_CONTEXT}.creation_type which now has a slightly different
  code for resolving types when handling inherited code. Other eweasel tests affected by this change
  but that are passing are test#incr288, test#expanded007 and test#melt069.
Had to change FEATURE_I.access to call the new {TYPE_A}.context_free_type instead of {TYPE_A}.deep_actual_type
  because otherwise the code generation in workbench mode for .NET of `abs_ref' in INTEGER would 
  be incorrect for the postcondition. Basically `context_free_type' only keeps `like Current' and gets
  rid of all the other anchors. The name is not that great since it is not completely free from context,
  but could not find one that express this.
 
Added some validity precondition in TYPE_A for `dispatch_anchors', `is_equivalent', `is_safe_equivalent'
  and `equivalent'. Updated REFERENCE_DESC to reflect that change.


Revision 73009 - (view) (annotate) - [select for diffs]
Modified Fri Apr 11 20:15:19 2008 UTC (11 years, 8 months ago) by alexk
Original Path: trunk/Src/Eiffel/API/evaluated_type/like_type_a.e
File length: 13548 byte(s)
Diff to previous 72955
Corrected processing of implicitly attached types when detachable mark should not be taken into account (this fixes recently broken test#attach016).

Revision 72955 - (view) (annotate) - [select for diffs]
Modified Sat Apr 5 07:27:44 2008 UTC (11 years, 8 months ago) by alexk
Original Path: trunk/Src/Eiffel/API/evaluated_type/like_type_a.e
File length: 13167 byte(s)
Diff to previous 72895
Improved support for implicitly attached types that is required if CAP
rules cover not only read-only entities, but also local variables.
Changed processing of implicitly attached types during type checking to
ensure this property is not promoted to the types that are derived from the
other context types (anchored types in particular), because in
non-void-safe mode we cannot be sure that the status of an implicitly
attached type is preserved.
Extended CAP rules to cover Result and local variables.
Added new conditions for variable-based CAP rules: an assignment of a
non-void value and a creation instruction.
Tracked when a variable may get a void value to terminate its non-void
scope.
Modified processing of non-void scopes that is required to implement more
dynamic modifiction of the variable voidness state that was not needed for
read-only entities.
Extended CAP rules to allow left and right parts of equality expressions to
be included in parentheses.


Revision 72895 - (view) (annotate) - [select for diffs]
Modified Fri Mar 28 11:47:23 2008 UTC (11 years, 8 months ago) by alexk
Original Path: trunk/Src/Eiffel/API/evaluated_type/like_type_a.e
File length: 12490 byte(s)
Diff to previous 72874
Allowed to use anchored types of object test locals as attached by making sure that an implicit attachment flag is propagated to the associated actual type (this fixes test#attach016).

Revision 72874 - (view) (annotate) - [select for diffs]
Modified Wed Mar 26 09:29:11 2008 UTC (11 years, 8 months ago) by alexk
Original Path: trunk/Src/Eiffel/API/evaluated_type/like_type_a.e
File length: 12256 byte(s)
Diff to previous 72829
Supported object tests in inherited pre- and postconditions. Now they use different byte node from normal locals, because they have to be reindexed at code generation time to take into account current feature context that may have other object test locals that come from other inherited assertions. They have unique position numbers inside one routine body. At code generation time the object test locals are registered just after normal locals.

Revision 72829 - (view) (annotate) - [select for diffs]
Modified Fri Mar 21 21:55:55 2008 UTC (11 years, 8 months ago) by manus
Original Path: trunk/Src/Eiffel/API/evaluated_type/like_type_a.e
File length: 12190 byte(s)
Diff to previous 72651
Fixed `deep_actual_type' so that it does not stop at the first level in generics (this was causing
  eweasel test#final047 to fail).
Removed call to `deep_actual_type' from `process_array_as' in AST_FEATURE_CHECKER_GENERATOR because
  our recent changes to ensure SPECIALs are created with proper type highlighted a bug in eweasel
  test#term143 where a catcall was detected since we used the static solved type of the array.
  Verified that test#term131 is not failing since it was the reason for the call to `deep_actual_type';
  it is not failing because now dead code removal has no impact on the generation of the table
  for anchored creation.
Removed `generate_expanded_creation' and `generate_expanded_initialization' from TYPE_A and descendants
  they were already not used due to a previous commit, but I could not commit TYPE_A due to a conflict change.
Added some missing precondition in `TYPE_A'.
In AST_FEATURE_CHECKER_GENERATOR, added a call to `reset_constraint_error_list' which did not seem to
  cause a failure but for correctness it should always be called.

Fixed some inlining bugs with the various context switches (eweasel test#final042, term#exec283)
  are now successfully passing. One issue was that arguments were not resolved
  when creating the INLINED_FEAT_B node, this ensured that there was no need to call `real_type' and remove
  the risk of being in the wrong contest. Then the getting of registers for inlined arguments, locals and
  result should be done before doing the switch since calling `attachment_type' in the wrong context
  would cause a crash when it has some anchors.

Fixed inlining bug test#final048 where if the inlined routine is present in a descendant but defined in
  a class which does not conform to the current type, we would inline but assuming as context of inlining
  the first descendant defining it, this is bad since some dynamic calls would be replaced with static ones
  and this is wrong, since more than one descendant are present.

Fixed inlining bug test#final047 where printing the current register was not always done in the proper
  context because we did not use INLINED_CURRENT_B in `BYTE_CONTEXT.current_register' but the original
  REGISTRABLE.


Revision 72651 - (view) (annotate) - [select for diffs]
Modified Fri Mar 7 19:19:42 2008 UTC (11 years, 9 months ago) by manus
Original Path: trunk/Src/Eiffel/API/evaluated_type/like_type_a.e
File length: 12068 byte(s)
Diff to previous 72419
Ensured to `is_type_set' is properly defined for like anchor types to return `true'
  when the anchor is itself a type set.
Did the same for `generics'. Strangely it was already defined properly for `like Current'.
Ensured that callers of `is_type_set' are using `type.actual_type' for the assignment attempt if any.
Redefined `instantiated_in' in CL_TYPE_A to have a better return type.


Revision 72419 - (view) (annotate) - [select for diffs]
Modified Sat Feb 23 00:45:27 2008 UTC (11 years, 9 months ago) by manus
Original Path: trunk/Src/Eiffel/API/evaluated_type/like_type_a.e
File length: 11854 byte(s)
Diff to previous 71650
Changed SUPPLIER_AS to only create the supplier on demands.

Merged TYPE_I and TYPE_A hierarchies in just TYPE_A one.
1-The major change is that now to compute the associated class type (CLASS_TYPE instance) of a TYPE_A
  one has to provide a context in which the TYPE_A instance appear. If no context is provided, then
  formal generics are not replaced. For example: LIST [G] alone will simply give you the LIST [G]
  CLASS_TYPE, but if you do it in the context of TEST [INTEGER], then it will return the
  LIST [INTEGER] CLASS_TYPE.
2-Updated all callers accordingly.
3-Simplified a few calls where before we did `type.associated_class_type.associated_class' to just
  `type.associated_class'.
4-Added new preconditions to the context provided, it really helped finding out when we were not doing
  things properly especially in code generation when regenerating code from parent into descendant.
5-Eventhough TYPE_I disappeared, I kept TYPE_C and its descendants since they are useful to have
  them for C code generation and quick discimination for TYPE_A instances.
6-Made validity of types better controled by checking more things in `{TYPE_A}.is_valid'. For example
  that if type used to represent a class which was expanded and that it is not expanded anymore, then
  the type is not valid anymore.
7-The most problematic change with TYPE_I/TYPE_A was that they had different notion of `is_external'
  we have added `is_true_external' to simplify the code in certain areas where the old TYPE_I semantic
  was needed.

Code generation change:
1-We now assume that the default context is always `{BYTE_CONTEXT}.context_class_type'. Then in
  `real_type' and `creation_type' we use `{TYPE_A}.evaluated_type_in_descendant' to properly evaluate
  a type from the ancestor code in the current context. Very useful for regeneration of inherited
  assertions and replicated features. Before it worked, but it was not clear how to do things properly,
  now it is clear.
2-Changed the way we generate the type information for like arguments: we simply nest calls to resolve
  the type of the arguments. This affects the interpreter and C code generation which includes a level
  ID for computing the type of generics.

C Code generation change:
1-Because debugging was too difficult at some point during that work and also because the name mapping
  we were using limited us to 32767 types and 131071 routines, I've changed the mechanism to not use
  the `encode.c' modules in C/bench and did everything in Eiffel. So now we simply write for a feature
  name FXXX_YYY where XXX is the type ID and YYY the body index. The same kind of changes have been
  done for other names (See ENCODER class for details.).
2-We also use `type_id' instead of `static_type_id' for names. The reason it is safe to do so is because
  `type_id' never changes in workbench mode and that in finalized mode, even if you have different
  incremental recompilation, 2 projects should generate more or less the same code at the ID levels
  making it easier to compare them.
3-Changed the way type are created. Instead of having a CREATE_INFO instance in the TYPE_I objects
  used to properly generate the type, we simply use the original TYPE_A instance. That way when we
  have an anchor, we either generate its `actual_type' or its anchor spec depending on the value of
  `use_info. We still use CREATE_INFO to generate the type information but instead of being an object
  in each TYPE_I, it is merely a once that we reinitialize each time we need it.
4-ONE CRITICAL ASPECT OF THE CHANGE #3 was that storable depends on the way type descriptions are generated
  and thanks to eweasel test#storable013 I was able to catch this much earlier in the process.
5-Generates less polymorphic tables for attributes and types specification. What happened before was
  that when we needed a polymorphic type specification for example to create `like x' where x is covariantly
  redefined, we were generating at the same time the polymorphic table for `x' even though if `x'
  was not actually used in the system. This reduces by a tiny amount only the size of the executable.
6-Made the DESCRIPTOR entries much smaller than they used to be by computing the number of ancestors
  instead of allocating for the numbers of routines which was really silly.

IL code generation change:
1-Provided a implementation for creation of BIT constants in .NET however it does not completely work yet,
  it has to do with the manner we generate the BIT_REF class.
2-Changed the way we compare signatures, we store a CLASS_TYPE and a routine ID instead. And then when
  needed we refetch the FEATURE_I object to perform the signature comparions. The issue is that the previous
  solution would not work if NATIVE_ARRAY and TYPED_POINTER do not record all the possible genereric
  derivations in which they are present which is now the case for simplicity.
3-Fixed a bug in code generation for a TYPE_FEATURE_I that is instantiated as a basic type. We would
  generate its associated reference type instead of the basic type. It was not caught before because those
  routines where never called at runtime unless you had a formal generic parameter creation constraint.
4-Fixed an inconsistency shown by eweasel test#incr168 where a precondition check was generated eventhough
  none was needed because one inherited routine had a True precondition. The C code was doing it ok, but
  not .NET
5-Found out see eweasel test#final041 that we first generate inherited assertion and then precondition,
  which is the contrary of what is done in melted or C code generation.
6-Simplified creation of manifest ARRAYS and TUPLE by avoiding a local variable.


Debugger:
1-Updated the code accordingly to the TYPE_I/TYPE_A merge
2-Fixed bug in {DBG_EVALUATOR}.prepare_parameters so that we do not use BYTE_CONTEXT to resolve
  the type but `instantiation_in' instead. It seems to solve one case that the previous debugger did
  not handle (See updated comment).
3-Fixed precondition violation in
  {AST_DEBUGGER_EXPRESSION_CHECKER_GENERATOR}.expression_or_instruction_type_check_and_code where
  we were still trying to evaluate in the descendant if the parent evaluation failed. Causing some
  precondition violations since the AST was not completely annotated with IDs needed for resolution.

Bug fixes:
1-Fixed issue with the way we maintained {CLASS_C}.generic_features, because you could rebuild the list
  without recompiling descendants (case of modifying only a contract of the class) and the rebuilding
  would yield new routine IDs. Then during either type checking or code generation the evaluation of 
  `{TYPE_A}.evaluate_type_in_descendant' could fail because it is not find the new routine ID in the
  descendant class. Now we preserve the routine ID as long as we can, same with feature ID.
2-Made `feature_of_rout_id' works to find the invariant feature.
3-Made sure that when removing an ID from a server it is also removed from the TMP server. Added
  a `not_present' postcondition after calling `remove' to ensure that.


Revision 71650 - (view) (annotate) - [select for diffs]
Modified Wed Dec 26 11:16:18 2007 UTC (11 years, 11 months ago) by alexk
Original Path: trunk/Src/Eiffel/API/evaluated_type/like_type_a.e
File length: 6418 byte(s)
Diff to previous 71184
Fixed bug#13753 by avoiding accessing actual type of an unresolved anchored type to set attachment properties (see test#attach006).

Revision 71184 - (view) (annotate) - [select for diffs]
Modified Fri Nov 16 14:30:46 2007 UTC (12 years ago) by alexk
Original Path: trunk/Src/Eiffel/API/evaluated_type/like_type_a.e
File length: 6308 byte(s)
Diff to previous 71164
Fixed bug#13617 by avoiding making a type detachable when it has a detachable mark, but is expanded (this has to be reviewed after ECMA confirms or rejects that a detachable mark is allowed for expanded types).

Revision 71164 - (view) (annotate) - [select for diffs]
Modified Thu Nov 15 17:37:28 2007 UTC (12 years ago) by alexk
Original Path: trunk/Src/Eiffel/API/evaluated_type/like_type_a.e
File length: 6256 byte(s)
Diff to previous 71150
Avoided precondition violation by avoiding changing attachment status if it matches the required one.

Revision 71150 - (view) (annotate) - [select for diffs]
Modified Wed Nov 14 19:34:34 2007 UTC (12 years ago) by alexk
Original Path: trunk/Src/Eiffel/API/evaluated_type/like_type_a.e
File length: 6120 byte(s)
Diff to previous 70926
Supported attachment marks for formal generic parameter (in internal
structures only).
Refactored types that can have attachment marks into a separate class.
Fixed issue when "like Current" was not considered as attached even when
compiling with an option "is_attached_by_default".
Taken into account attachment status when comparing types for equality.
Made TUPLE type in an agent type (PROCEDURE or FUNCTION) attached in
void-safe context, so that it conforms to the usual type declaration.
Ensured actual type preserves attachment status of the corresponding
anchored type.


Revision 70926 - (view) (annotate) - [select for diffs]
Modified Sat Oct 27 07:28:29 2007 UTC (12 years, 1 month ago) by alexk
Original Path: trunk/Src/Eiffel/API/evaluated_type/like_type_a.e
File length: 6576 byte(s)
Diff to previous 70778
Ensured types of constant attributes, manifest constants, manifest arrays, types, type expressions, agents, creation expressions, current and creation types in creation instructions are attached if the source code is marked as void-safe.

Revision 70778 - (view) (annotate) - [select for diffs]
Modified Mon Oct 22 05:25:01 2007 UTC (12 years, 1 month ago) by alexk
Original Path: trunk/Src/Eiffel/API/evaluated_type/like_type_a.e
File length: 6348 byte(s)
Diff to previous 70534
Supported configuration options that tell whether a class is void-safe and
what the default attachment status of a type is.
Added checks for VUTA error when target of a call is not attached (the
check is activated for void-safe classes only).
Ensured the attached status of arguments that are in scope of the
corresponding voidness tests.
Ensured the attached status of Current.


Revision 70534 - (view) (annotate) - [select for diffs]
Modified Tue Oct 9 11:31:35 2007 UTC (12 years, 2 months ago) by alexk
Original Path: trunk/Src/Eiffel/API/evaluated_type/like_type_a.e
File length: 6326 byte(s)
Diff to previous 69973
Supported syntax for explicit declaration of attached and detachable types.
Modified conformance rules to take into account attachment status.
Supported syntax for object test.
Added validity rules for object test (including temporary restriction on
object test local names).
Supported the notion of scoped entities with the associated rules for void
test and object test that effectively are the basis for the CAPs.
Modified AST and associated visitors to take into account object test
nodes.


Revision 69973 - (view) (annotate) - [select for diffs]
Modified Tue Aug 14 19:15:39 2007 UTC (12 years, 3 months ago) by alexk
Original Path: trunk/Src/Eiffel/API/evaluated_type/like_type_a.e
File length: 6112 byte(s)
Diff to previous 68030
Promoted attachment properties to descendants of TYPE_A.

Revision 68030 - (view) (annotate) - [select for diffs]
Modified Mon Apr 30 18:38:45 2007 UTC (12 years, 7 months ago) by martins
Original Path: trunk/Src/Eiffel/API/evaluated_type/like_type_a.e
File length: 5076 byte(s)
Diff to previous 58325
Main change: I merged many occurences of "constrained_type" like features into `FORMAL_A'
Renamed `is_multi_constrained_formal' into `is_multi_constrained'
type_a.e: I moved some features into FORMAL_A because the usage pattern suggests that they are not needed in TYPE_A (to improve speed).
renamed_type_a.e: added implementation for `conformance_type', this was a bug (not reported)
formal_dec_as.e: fixed a bug in `is_multi_constrained' (not reported)

Revision 58325 - (view) (annotate) - [select for diffs]
Modified Thu Apr 20 16:05:16 2006 UTC (13 years, 7 months ago) by manus
Original Path: trunk/Src/Eiffel/API/evaluated_type/like_type_a.e
File length: 5076 byte(s)
Diff to previous 58027
Moved trunk/Src/bench/Eiffel to trunk/Src/Eiffel.

Revision 58027 - (view) (annotate) - [select for diffs]
Modified Wed Apr 5 07:08:57 2006 UTC (13 years, 8 months ago) by manus
Original Path: trunk/Src/bench/Eiffel/API/evaluated_type/like_type_a.e
File length: 5076 byte(s)
Diff to previous 57371
Fixed mixing paranthesis in indexing clause for the licensing.
Added missing license reference in newly created Eiffel classes.


Revision 57371 - (view) (annotate) - [select for diffs]
Modified Wed Mar 8 00:05:46 2006 UTC (13 years, 9 months ago) by manus
Original Path: trunk/Src/bench/Eiffel/API/evaluated_type/like_type_a.e
File length: 5066 byte(s)
Diff to previous 56535
Refactoring which separate TYPE_AS from TYPE_A.
* The TYPE_AS classes specific to the compiler have been removed, we now use the one from the
  parser cluster. Only INTEGER_CONSTANT and FORMAL_CONSTRAINT_AS are compiler specific, but defined
  as descendants of INTEGER_AS and FORMAL_DEC_AS.
* The return type and arguments' type are of type TYPE_A, which help us in removing many calls to
  `actual_type' when the purpose was to get the TYPE_A instance as statically it was a TYPE_AS, but
  dynamically it was TYPE_A.
* Rewritten the way we go from TYPE_AS to TYPE_A. This is now done in two steps.
  1 - convert TYPE_AS into TYPE_A using the AST_TYPE_A_GENERATOR visitor. For Bits symbol and anchors
      we get an UNEVALUATED_XX version.
  2 - evaluate and check validity of TYPE_A we obtained by 1), this is done using TYPE_A_CHECKER.
      TYPE_A_CHECKER is modular in the sense that it can be configured to trigger or not errors.
	  Useful to disable when we are in part of the UI of EiffelStudio who does not care about an
	  error reporting.
* Thanks to the above refactoring, I fixed eweasel tests: test#valid104, test#valid131, test#valid135.
  It was due to a bug that when solving an anchor type, we did not update `feature_id', as a consequence
  a comparison would yield False instead of True, because they were referring to the same anchor.
* In TYPE_A, try to add some preconditions to `associated_class' and fix all incorrect usage of it.
  Use `is_valid' a lot to ensure that we have a valid type (used to check validity of types in
  inheritance clause and constraints).
* Changed formatting so that we see G#x and arg#x (whereas it was Generic #x, Formal #x and arg # x)
  to make things more compact.
* Updated all the other part of EiffelStudio that depended on the above changes.
* New version number 5.7.0806



Revision 56535 - (view) (annotate) - [select for diffs]
Modified Tue Jan 17 01:37:10 2006 UTC (13 years, 10 months ago) by manus
Original Path: trunk/Src/bench/Eiffel/API/evaluated_type/like_type_a.e
File length: 5212 byte(s)
Diff to previous 56027
Added text of the GPL license to all classes of the compiler.


Revision 56027 - (view) (annotate) - [select for diffs]
Modified Tue Dec 6 10:43:09 2005 UTC (14 years ago) by alexk
Original Path: trunk/Src/bench/Eiffel/API/evaluated_type/like_type_a.e
File length: 3807 byte(s)
Diff to previous 55790
Redefined `conformance_type' to call this feature on `actual_type' because `actual_type' may yield another anchored type. This fixes eweasel test valid171.

Revision 55790 - (view) (annotate) - [select for diffs]
Modified Fri Nov 18 08:16:50 2005 UTC (14 years ago) by alexk
Original Path: trunk/Src/bench/Eiffel/API/evaluated_type/like_type_a.e
File length: 3521 byte(s)
Diff to previous 50374
Changed conformance tests to use a new feature `conformance_type'
because now `actual_type' can return LIKE_CURRENT due to changes
in processing of "like Current" type.
Changed signature of `instantiated_in' to accept LIKE_CURRENT that can
now be used during type checking in addition to the previously used
CL_TYPE_A.
Moved declaration of `class_id' into the class LIKE_FEATURE because it
is used only there.


Revision 50374 - (view) (annotate) - [select for diffs]
Modified Sat Apr 23 15:07:18 2005 UTC (14 years, 7 months ago) by manus
Original Path: trunk/Src/bench/Eiffel/API/evaluated_type/like_type_a.e
File length: 3588 byte(s)
Diff to previous 50192
`convert_to' should be called on `actual_type'. This solves eweasel test valid 166.


Revision 50192 - (view) (annotate) - [select for diffs]
Modified Tue Apr 19 04:53:40 2005 UTC (14 years, 7 months ago) by manus
Original Path: trunk/Src/bench/Eiffel/API/evaluated_type/like_type_a.e
File length: 3299 byte(s)
Diff to previous 48822
Added proper definition of `is_none' for anchored types.


Revision 48822 - (view) (annotate) - [select for diffs]
Modified Tue Mar 1 10:37:05 2005 UTC (14 years, 9 months ago) by alexk
Original Path: trunk/Src/bench/Eiffel/API/evaluated_type/like_type_a.e
File length: 3188 byte(s)
Diff to previous 44434
Added a feature to determine whether type is completely fixed or is subject
to changes because of anchored and/or formal generic types that are used
in its definition.


Revision 44434 - (view) (annotate) - [select for diffs]
Modified Wed Jul 21 04:49:24 2004 UTC (15 years, 4 months ago) by manus
Original Path: trunk/Src/bench/Eiffel/API/evaluated_type/like_type_a.e
File length: 3082 byte(s)
Diff to previous 42626
Removed support for `reference' types:
  - removed `reference_actual_type'.
  - added `is_conformant_to' which enables us to find if one type inherits
    from another one in a conformant way. It is needed for checking constraint
	genericity when actual generic is an expanded and constraint is a reference.
	Before we were using `reference_actual_type.conform_to' but since we
	removed it, we need something else and this is `is_conformant_to'.


Revision 42626 - (view) (annotate) - [select for diffs]
Modified Fri Apr 9 02:52:52 2004 UTC (15 years, 8 months ago) by manus
Original Path: trunk/Src/bench/Eiffel/API/evaluated_type/like_type_a.e
File length: 3294 byte(s)
Diff to previous 41738
Implemented constraints that are either reference or expanded.
Added proper redefinition of newly introduced `is_reference' in TYPE_A.
Fixed missing redefinition of `is_expanded' from TYPE_A.


Revision 41738 - (view) (annotate) - [select for diffs]
Modified Fri Mar 5 18:59:26 2004 UTC (15 years, 9 months ago) by manus
Original Path: trunk/Src/bench/Eiffel/API/evaluated_type/like_type_a.e
File length: 3020 byte(s)
Diff to previous 40762
Added definition of `is_external' to find if we are handling an external type.
Added definition of `reference_actual_type' in case we anchor to a basic type.
Renamed `internal_conform_to' into `conform_to' since `internal_conform_to'
  has now been removed from parent.
Fixed `type_i' so that when the type is expanded, there is no need to have
  a CREATE_INFO instance because no redefinition can occur on the anchor type.


Revision 40762 - (view) (annotate) - [select for diffs]
Modified Thu Dec 11 23:17:07 2003 UTC (16 years ago) by manus
Original Path: trunk/Src/bench/Eiffel/API/evaluated_type/like_type_a.e
File length: 2638 byte(s)
Diff to previous 30264
Use `deep_twin' instead of `deep_clone' which is now made obsolete.
Use `twin' instead of `clone' which is now made obsolete.
Use `as_lower' and `as_upper' whenever appropriate instead of cloning and
  then calling `to_lower' or `to_upper'.


Revision 30264 - (view) (annotate) - [select for diffs]
Modified Mon Jan 21 01:39:29 2002 UTC (17 years, 10 months ago) by manus
Original Path: trunk/Src/bench/Eiffel/API/evaluated_type/like_type_a.e
File length: 2649 byte(s)
Diff to previous 26913
Removed `rout_id' as it is only used in the LIKE_FEATURE descendant and therefore
we save a small amount of space.


Revision 26913 - (view) (annotate) - [select for diffs]
Modified Sun Aug 12 23:50:20 2001 UTC (18 years, 4 months ago) by manus
Original Path: trunk/Src/bench/Eiffel/API/evaluated_type/like_type_a.e
File length: 2767 byte(s)
Diff to previous 12165
Merged branch `dev46_manu' to the trunc.


Revision 12165 - (view) (annotate) - [select for diffs]
Modified Sat Dec 5 19:29:49 1998 UTC (21 years ago) by manus
Original Path: trunk/Src/bench/Eiffel/API/evaluated_type/like_type_a.e
File length: 2772 byte(s)
Diff to previous 11302
Before when compiling this code:

	secret: REAL
	guess_history: ARRAY [like secret]

	do_something is
		local
			gh: like guess_history
		do
			gh := guess_history
		end

you got the following error:

Error code: VJAR
Type error: source of assignment does not conform to target.
What to do: make sure that type of source (right-hand side)
  conforms (in the sense of inheritance rule) to type of target.

Class: GUESSBOX
Feature: is_closest
Target name: gh
Target type: ARRAY [[like secret]: REAL]
Source_type: ARRAY [[like secret]: REAL]

because we forget to take the actual type of `other' in internal_conforms_to.


Revision 11302 - (view) (annotate) - [select for diffs]
Modified Sun Sep 13 22:35:07 1998 UTC (21 years, 3 months ago) by manus
Original Path: trunk/Src/bench/Eiffel/API/evaluated_type/like_type_a.e
File length: 2760 byte(s)
Diff to previous 11128
Removed `evaluated_type' and `associated_eclass' from TYPE_A and from their
descendants.

The first one, because it was a synonym to `actual_type'
The second one because it was the same as `associated_class'

Removed also useless precondition which were not exactly doing what their author
expected.


Revision 11128 - (view) (annotate) - [select for diffs]
Modified Mon Aug 24 02:25:56 1998 UTC (21 years, 3 months ago) by manus
Original Path: trunk/Src/bench/Eiffel/API/evaluated_type/like_type_a.e
File length: 2940 byte(s)
Diff to previous 10886
We removed E_CLASS from the system, we should now use CLASS_C instead.


Revision 10886 - (view) (annotate) - [select for diffs]
Modified Mon Aug 10 23:49:22 1998 UTC (21 years, 4 months ago) by manus
Original Path: trunk/Src/bench/Eiffel/API/evaluated_type/like_type_a.e
File length: 2940 byte(s)
Diff to previous 9658
Fixed a bug in the generic conformance when handling with anchored types.


Revision 9658 - (view) (annotate) - [select for diffs]
Added Sun Mar 15 02:27:12 1998 UTC (21 years, 9 months ago) by manus
Original Path: trunk/Src/bench/Eiffel/API/evaluated_type/like_type_a.e
File length: 2771 byte(s)
Add a new class to the system for simplification purpose


This form allows you to request diffs between any two revisions of this file. For each of the two "sides" of the diff, enter a numeric revision.

  Diffs between and
  Type of Diff should be a

  ViewVC Help
Powered by ViewVC 1.1.23