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

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

Parent Directory Parent Directory | Revision Log Revision Log


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

Revision 92684 - (view) (annotate) - [select for diffs]
Modified Fri Jun 7 15:28:53 2013 UTC (6 years, 6 months ago) by jasonw
File length: 3602 byte(s)
Diff to previous 89347
<<Merged from trunk#92682.>>

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: 3602 byte(s)
Diff to previous 86354
<<Merged from trunk#89346.>>

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: 6992 byte(s)
Diff to previous 84268
<<Merged from trunk#86353.>>

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: 6694 byte(s)
Diff to previous 83441
<<Merged from trunk#84267.>>

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: 6676 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/renamed_type_a.e
File length: 6676 byte(s)
Diff to previous 83039
<<Breanched from trunk@83330>> Created a branch to upgrade Eiffel Transform library to trunk.

Revision 83039 - (view) (annotate) - [select for diffs]
Modified Sun May 2 11:19:43 2010 UTC (9 years, 7 months ago) by alexk
Original Path: trunk/Src/Eiffel/API/evaluated_type/renamed_type_a.e
File length: 6676 byte(s)
Diff to previous 77402
Implemented `is_computable_using_ancestors' for types that depend on other types.

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/renamed_type_a.e
File length: 6529 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/renamed_type_a.e
File length: 6308 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/renamed_type_a.e
File length: 6356 byte(s)
Diff to previous 72720
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 72720 - (view) (annotate) - [select for diffs]
Modified Wed Mar 12 21:34:38 2008 UTC (11 years, 9 months ago) by manus
Original Path: trunk/Src/Eiffel/API/evaluated_type/renamed_type_a.e
File length: 6313 byte(s)
Diff to previous 72419
Fixed system validity error found when enabling full class checking in the compiler, here it is due to
  insufficiently exported routines.


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/renamed_type_a.e
File length: 6333 byte(s)
Diff to previous 68089
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 68089 - (view) (annotate) - [select for diffs]
Modified Thu May 3 18:36:31 2007 UTC (12 years, 7 months ago) by martins
Original Path: trunk/Src/Eiffel/API/evaluated_type/renamed_type_a.e
File length: 6306 byte(s)
Diff to previous 68030
Refactored RENAMED_TYPE_A to RENAMED_TYPE [G -> TYPE_A]
This change allows us to program type safe if possible.

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/renamed_type_a.e
File length: 6274 byte(s)
Diff to previous 67948
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 67948 - (view) (annotate) - [select for diffs]
Modified Sat Apr 21 00:50:00 2007 UTC (12 years, 7 months ago) by martins
Original Path: trunk/Src/Eiffel/API/evaluated_type/renamed_type_a.e
File length: 6108 byte(s)
Diff to previous 67875
formal_a.e: Added feature to check whether a formals constraint has a renaming or not. This is a necessary adaptation to handle single constraints which have a renaming correctly.
gen_type_a.e: provide location information.
renamed_type_a.e: Fixed bug in is_equivalent
renaming_a.e: Added a feature to map old names onto their new names.
type_a.e: added feature allows to check for certain conditions without a reverse assignment to formal_a.e
formal_constraint_as.e: removed too strong error handling (eweasel tests failed because of this, that's why it is removed)
ast_feature_checker_generator.e: Bug fix for bug#12503 and bug#12504
formal_constraint_as.e: Added a feature to support changes in formal.a and fixed a plain wrong feature.
named_tuple_type_as.e: fixed a bug which printed one comma too much in the `dump' feature



Revision 67875 - (view) (annotate) - [select for diffs]
Modified Wed Apr 18 00:40:15 2007 UTC (12 years, 8 months ago) by martins
Original Path: trunk/Src/Eiffel/API/evaluated_type/renamed_type_a.e
File length: 6144 byte(s)
Diff to previous 67874
Further adapted refactoring away from EXTENDED_TYPE_A to RENAMED_TYPE_A.

Revision 67874 - (view) (annotate) - [select for diffs]
Modified Tue Apr 17 17:00:15 2007 UTC (12 years, 8 months ago) by juliant
Original Path: trunk/Src/Eiffel/API/evaluated_type/renamed_type_a.e
File length: 6115 byte(s)
Diff to previous 67862
changed comment to fit refactoring.


Revision 67862 - (view) (annotate) - [select for diffs]
Modified Tue Apr 17 02:11:27 2007 UTC (12 years, 8 months ago) by martins
Original Path: trunk/Src/Eiffel/API/evaluated_type/renamed_type_a.e
File length: 6116 byte(s)
Copied from: trunk/Src/Eiffel/API/evaluated_type/extended_type_a.e revision 67855
Diff to previous 67649
* Fixed minor bug in FORMAL_CONSTRAINT_AS (renaming of single constraint type was not checked)
* Adapted precondition of conformance features in TYPE_SET_A
* Refactored EXTENDED_TYPE_A into RENAMED_TYPE_A.
* Refactored MC_ERROR_REPORT into MC_FEATURE_INFO

Revision 67649 - (view) (annotate) - [select for diffs]
Modified Sat Mar 31 01:36:09 2007 UTC (12 years, 8 months ago) by martins
Original Path: trunk/Src/Eiffel/API/evaluated_type/extended_type_a.e
File length: 6119 byte(s)
Diff to previous 67428
* Fixed bugs: bug#12316, bug#12420
* Fixed typos and did minor cosmetics

Revision 67428 - (view) (annotate) - [select for diffs]
Modified Wed Mar 21 16:42:51 2007 UTC (12 years, 8 months ago) by manus
Original Path: trunk/Src/Eiffel/API/evaluated_type/extended_type_a.e
File length: 6120 byte(s)
Diff to previous 67298
Fixed bug#12317 where a precondition violation was raised in `{TYPE_A}.to_type_set' becaused it was
  not properly redefined in TYPE_SET_A and EXTENDED_TYPE_A.
Fixed eweasel test#term147 showing a bug in {GEN_TYPE_A}.creation_constraint_check.


Revision 67298 - (view) (annotate) - [select for diffs]
Modified Wed Mar 14 23:38:54 2007 UTC (12 years, 9 months ago) by martins
Original Path: trunk/Src/Eiffel/API/evaluated_type/extended_type_a.e
File length: 6182 byte(s)
Diff to previous 67227
- Fixed bug where TYPE_SET_A was not reporting that it is actually a typeset.
- Fixed bug in invaraint of TYPE_A
- Added invariant to EXTENDED_TYPE_A which ensures that neither another EXTENDED_TYPE_A object or a TYPE_SET_A instance can be set as `type'.

Revision 67227 - (view) (annotate) - [select for diffs]
Added Tue Mar 13 01:32:16 2007 UTC (12 years, 9 months ago) by martins
Original Path: trunk/Src/Eiffel/API/evaluated_type/extended_type_a.e
File length: 5875 byte(s)
Support for multi constraint generics:
- Central new class is TYPE_SET_A: It provides features for type checking and feature lookup.
  (the TYPE_A interface is not perfectly complete until now)
- Added EXTENDED_TYPE_A: It basically encapsulates a type and a feature renaming.
- Changed parser to accept the new syntax.
- Adapted validity checks for generics to reflect the new rules.
- Changed AST_FEATURE_CHECKER_GENERATOR in particular `process_call' and its siblings
  to select the so called `multi_constrained_static'. This is the actual static type
  of the target. It is done for each access on a multi constraint generic.
- Added error classes VTGC*, VTGD* and VTMC*.
- Changed code which called `constrained_type' feature to make it capable
  of handling multi constraints. This is in most cases achieved through handling these cases
  explicitly: Autocompletion, query language and debugger are not yet adapted and don't work
  properly in the presence of multi constraint formals.
- Changed AST_DECORATED_OUTPUT_STRATEGY and the like to pretty print the multi constraints correctly.

Support for recursive formals:
- I added a second pass AST_FORMAL_GENERICS_PASS2 which handles the registration of suppliers
  and transformation of the types into the right class (formal or class type).

The rest of the changes are targeted to either one of these.


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