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

Contents of /branches/eth/eve/Src/Eiffel/API/evaluated_type/none_a.e

Parent Directory Parent Directory | Revision Log Revision Log


Revision 11722 - (show annotations)
Fri Oct 23 23:37:34 1998 UTC (21 years, 3 months ago) by manus
Original Path: trunk/Src/bench/Eiffel/API/evaluated_type/none_a.e
File size: 1798 byte(s)
The function `type_i' is does not create the once itself, it is taking the value
from SHARED_TYPE_ID. This enable to remove the use of deep_equal at some points
in the compiler (Cf `is_equal' from PATTERN and C_PATTERN)

1 indexing
2 description: "Actual type for integer type."
3 date: "$Date$"
4 revision: "$Revision $"
5
6 class
7 NONE_A
8
9 inherit
10 TYPE_A
11 redefine
12 is_none, dump, type_i, same_as,
13 internal_conform_to, append_to,
14 storage_info, storage_info_with_name
15 end
16
17 feature -- Comparison
18
19 is_equivalent (other: like Current): BOOLEAN is
20 -- Is `other' equivalent to the current object ?
21 do
22 Result := True
23 end
24
25 feature -- Properties
26
27 is_none: BOOLEAN is True
28 -- Is the current type a none type ?
29
30 feature -- Access
31
32 same_as (other: TYPE_A): BOOLEAN is
33 -- Is the current type the same as `other' ?
34 do
35 Result := other.is_none
36 end
37
38 associated_class: CLASS_C is
39 do
40 -- No associated class
41 end
42
43 feature -- Output
44
45 dump: STRING is "NONE"
46 -- Dumped trace
47
48 append_to (st: STRUCTURED_TEXT) is
49 do
50 st.add_string ("NONE")
51 end
52
53 feature {COMPILER_EXPORTER}
54
55 create_info: CREATE_TYPE is
56 -- Byte code information for entity type creation
57 do
58 !! Result
59 Result.set_type (type_i)
60 end
61
62 type_i: NONE_I is
63 -- Void C type
64 once
65 Result := None_c_type
66 end
67
68 internal_conform_to (other: TYPE_A in_generics: BOOLEAN): BOOLEAN is
69 -- Does `other' conform to Current ?
70 do
71 -- If `other' is a basic, a BIT or an expanded type, it is not
72 -- conform to NONE.
73 --| When doing the check for `is_basic', we also check that `other'
74 --| can be a BIT type, so we do not need to add the check `other.is_bits'.
75 Result := not (other.is_basic or else other.is_expanded)
76 end
77
78 storage_info, storage_info_with_name (classc: CLASS_C): S_CLASS_TYPE_INFO is
79 -- Storage info for Current type in class `classc'
80 -- and store the name of the class for Current
81 do
82 !! Result.make ("NONE", 0)
83 end
84
85 end -- class NONE_A

Properties

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

  ViewVC Help
Powered by ViewVC 1.1.23