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

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

Parent Directory Parent Directory | Revision Log Revision Log


Revision 74866 - (show annotations)
Mon Sep 29 16:28:32 2008 UTC (11 years, 4 months ago) by manus
Original Path: trunk/Src/Eiffel/API/evaluated_type/real_32_a.e
File size: 2743 byte(s)
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.

1 indexing
2 description: "Actual type for real 32 bits type."
3 legal: "See notice at end of class."
4 status: "See notice at end of class."
5 date: "$Date$"
6 revision: "$Revision $"
7
8 class REAL_32_A
9
10 inherit
11 BASIC_A
12 redefine
13 is_real_32, associated_class, same_as, is_numeric,
14 default_create, process, heaviest
15 end
16
17 create
18 default_create
19
20 feature {NONE} -- Initialization
21
22 default_create is
23 -- Initialize new instance of REAL_32_A.
24 do
25 make (associated_class.class_id)
26 end
27
28 feature -- Visitor
29
30 process (v: TYPE_A_VISITOR) is
31 -- Process current element.
32 do
33 v.process_real_32_a (Current)
34 end
35
36 feature -- Property
37
38 is_real_32: BOOLEAN is True
39 -- Is the current type a real 32 bits type ?
40
41 feature -- Access
42
43 associated_class: CLASS_C is
44 -- Class REAL
45 once
46 Result := System.real_32_class.compiled_class
47 end
48
49 feature -- IL code generation
50
51 heaviest (other: TYPE_A): TYPE_A is
52 -- `other' if `other' is heavier than Current,
53 -- Current otherwise.
54 do
55 if other.is_real_64 then
56 Result := other
57 else
58 Result := Current
59 end
60 end
61
62 feature {COMPILER_EXPORTER}
63
64 is_numeric: BOOLEAN is True
65 -- Is the current type a numeric type ?
66
67 c_type: REAL_32_I is
68 -- C type
69 do
70 Result := real32_c_type
71 end
72
73 same_as (other: TYPE_A): BOOLEAN is
74 -- Is the current type the same as `other' ?
75 do
76 Result := same_type (other)
77 end
78
79 indexing
80 copyright: "Copyright (c) 1984-2007, Eiffel Software"
81 license: "GPL version 2 (see http://www.eiffel.com/licensing/gpl.txt)"
82 licensing_options: "http://www.eiffel.com/licensing"
83 copying: "[
84 This file is part of Eiffel Software's Eiffel Development Environment.
85
86 Eiffel Software's Eiffel Development Environment is free
87 software; you can redistribute it and/or modify it under
88 the terms of the GNU General Public License as published
89 by the Free Software Foundation, version 2 of the License
90 (available at the URL listed under "license" above).
91
92 Eiffel Software's Eiffel Development Environment is
93 distributed in the hope that it will be useful, but
94 WITHOUT ANY WARRANTY; without even the implied warranty
95 of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
96 See the GNU General Public License for more details.
97
98 You should have received a copy of the GNU General Public
99 License along with Eiffel Software's Eiffel Development
100 Environment; if not, write to the Free Software Foundation,
101 Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
102 ]"
103 source: "[
104 Eiffel Software
105 356 Storke Road, Goleta, CA 93117 USA
106 Telephone 805-685-1006, Fax 805-685-6869
107 Website http://www.eiffel.com
108 Customer support http://support.eiffel.com
109 ]"
110
111 end -- class REAL_32_A

Properties

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

  ViewVC Help
Powered by ViewVC 1.1.23