ViewVC logotype

Revision 39713

Jump to revision: Previous Next
Author: manus
Date: Fri Oct 17 19:27:17 2003 UTC (16 years, 4 months ago)
Changed paths: 10
Log Message:
Fixed eweasel bug `freez026'. By previously fixing the way we handle
creation of generic type using anchored in their specification (e.g. A [like f])
we introduced a bug of type result caching. Indeed before when a `typarr'
had an anchor it contained either LIKE_ARG_TYPE, LIKE_CURRENT_TYPE,
LIKE_PFEATURE_TYPE or LIKE_FEATURE_TYPE. In such cases the C runtime
was preventing the caching of the information.
Now since we do not generate the LIKE_XX constants, but force a computation
of the value in the generated code the caching mechanism was not prevented
therefore in such cases it was giving the proper result the first time around
but not the second time around if the `anchors' were different.

To prevent this we tell the runtime if it can cache it by providing a non NULL
buffer, it cannot if we pass NULL.
To find out if we can pass a non-NULL or NULL, we simply find out if the
generic type is `is_explicit'. When it is `is_explicit, it is known for not
changing during the whole life of the application and we pass a non NULL buffer.
When it is not `is_explicit' then the value would have to be recomputed
each time it is queried, therefore we pass a NULL buffer.

To improve performance in non multithreaded mode we always mark the `typarr'
a static structure. As only one thread at the time can modify it if the
generic type is not explicit. In multithreaded mode, this is not the case
and therefore it is not `static'.

FIXME: we might be better off using `uint16' as on some platforms unsigned
operation are much faster than signed one. The second advantage will be to
increase the number of possible dynamic types from ~32000 to ~65000.

Changed paths

Path Details
Directorytrunk/Src/bench/Eiffel/eiffel/byte_code/byte_node.e modified , text changed
Directorytrunk/Src/bench/Eiffel/eiffel/byte_code/create_feat.e modified , text changed
Directorytrunk/Src/bench/Eiffel/eiffel/byte_code/create_formal_type.e modified , text changed
Directorytrunk/Src/bench/Eiffel/eiffel/byte_code/create_info.e modified , text changed
Directorytrunk/Src/bench/Eiffel/eiffel/byte_code/create_type.e modified , text changed
Directorytrunk/Src/bench/Eiffel/eiffel/genericity/cl_type_i.e modified , text changed
Directorytrunk/Src/bench/Eiffel/eiffel/genericity/gen_type_i.e modified , text changed
Directorytrunk/Src/bench/Eiffel/eiffel/genericity/type_i.e modified , text changed
Directorytrunk/Src/bench/Eiffel/eiffel/interface/class_type.e modified , text changed
Directorytrunk/Src/bench/Eiffel/eiffel/interface/to_special_class_type.e modified , text changed

  ViewVC Help
Powered by ViewVC 1.1.23