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

Annotation of /branches/eth/eve/Src/Eiffel/API/evaluated_type/real_a.e

Parent Directory Parent Directory | Revision Log Revision Log


Revision 32079 - (hide annotations)
Wed May 15 02:41:16 2002 UTC (17 years, 8 months ago) by manus
Original Path: trunk/Src/bench/Eiffel/API/evaluated_type/real_a.e
File size: 1135 byte(s)
Made sure that `type_i' from BASIC_A and descendants always returns a new
instance of its associated TYPE_I object. This is necessary as we might
set the `cr_info' attribute and if we use the once from SHARED_TYPE_I
then all basic type share this `cr_info' and can result in incorrect
code generation (at least for .NET where it is now used)

1 dinov 3375 indexing
2 grator 18
3 dinov 3375 description:
4 manus 9656 "Actual type for real type."
5     date: "$Date$"
6 dinov 3375 revision: "$Revision $"
7    
8 grator 18 class REAL_A
9    
10     inherit
11     BASIC_A
12     redefine
13 manus 26913 is_real, associated_class, same_as, is_numeric, weight,
14 manus 11302 internal_conform_to
15 grator 18 end
16    
17 dinov 3078 feature -- Property
18    
19 manus 9656 is_real: BOOLEAN is True
20 dinov 3078 -- Is the current type a real type ?
21    
22 manus 11302 associated_class: CLASS_C is
23     -- Class REAL
24 dinov 3078 once
25 manus 11128 Result := System.real_class.compiled_class
26 manus 9656 end
27 dinov 3078
28 dinov 3181 feature {COMPILER_EXPORTER}
29 grator 18
30     internal_conform_to (other: TYPE_A; in_generics: BOOLEAN): BOOLEAN is
31     -- Does `other' conform to Current ?
32     do
33     if in_generics then
34 manus 9656 Result := other.is_real
35 grator 18 else
36 manus 9656 Result := {BASIC_A} precursor (other, False)
37 grator 18 or else
38     other.actual_type.is_double
39 manus 9656 end
40     end
41 grator 18
42 manus 9656 is_numeric: BOOLEAN is True
43 grator 18 -- Is the current type a numeric type ?
44    
45 manus 26913 weight: INTEGER is 8
46     -- Weight of Current.
47     -- Used to evaluate type of an expression with balancing rule.
48 grator 18
49     type_i: FLOAT_I is
50     -- C type
51 manus 32079 do
52     create Result
53 manus 9656 end
54 grator 18
55     same_as (other: TYPE_A): BOOLEAN is
56     -- Is the current type the same as `other' ?
57     do
58 manus 9656 Result := other.is_real
59     end
60 grator 18
61 dinov 3375 end -- class REAL_A

Properties

Name Value
svn:eol-style native
svn:keywords Author Date Id Revision

  ViewVC Help
Powered by ViewVC 1.1.23