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

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

Parent Directory Parent Directory | Revision Log Revision Log


Revision 92499 - (show annotations)
Fri Apr 26 23:06:21 2013 UTC (6 years, 7 months ago) by jasonw
File size: 3262 byte(s)
<<Merged from trunk#92492.>>
1 note
2 description: "Descritpion of an actual native array type. Only used for IL code generation."
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
9 NATIVE_ARRAY_TYPE_A
10
11 inherit
12 GEN_TYPE_A
13 redefine
14 process, il_type_name, generic_il_type_name
15 end
16
17 create
18 make
19
20 feature -- Visitor
21
22 process (v: TYPE_A_VISITOR)
23 -- Process current element.
24 do
25 v.process_native_array_type_a (Current)
26 end
27
28 feature -- IL code generation
29
30 il_type_name (a_prefix: STRING; a_context_type: TYPE_A): STRING
31 -- Name of current class
32 do
33 Result := generics.first.il_type_name (a_prefix, a_context_type).twin
34 Result.append ("[]")
35 end
36
37 generic_il_type_name (a_context_type: TYPE_A): STRING
38 -- Name of current class
39 do
40 Result := generics.first.generic_il_type_name (a_context_type).twin
41 Result.append ("[]")
42 end
43
44 deep_il_element_type: CL_TYPE_A
45 -- Find type of array element.
46 -- I.e. if you have NATIVE_ARRAY [NATIVE_ARRAY [INTEGER]], it
47 -- will return INTEGER.
48 require
49 true_generics_not_void: generics /= Void
50 local
51 l_native: NATIVE_ARRAY_TYPE_A
52 do
53 Result ?= generics.first
54 if Result = Void then
55 Result := object_type
56 else
57 l_native ?= Result
58 if l_native /= Void then
59 Result := l_native.deep_il_element_type
60 end
61 end
62 ensure
63 deep_il_element_type_not_void: Result /= Void
64 end
65
66 feature {NONE} -- Implementation
67
68 object_type: CL_TYPE_A
69 -- Type of SYSTEM_OBJECT.
70 require
71 in_il_generation: system.il_generation
72 system_not_void: system /= Void
73 object_class_not_void: system.system_object_class /= Void
74 object_class_compiled: system.system_object_class.is_compiled
75 once
76 Result := system.system_object_class.compiled_class.actual_type
77 ensure
78 object_type_not_void: Result /= Void
79 end
80
81
82 invariant
83 il_generation: System.il_generation
84 count_set: generics.count = 1
85
86 note
87 copyright: "Copyright (c) 1984-2013, Eiffel Software"
88 license: "GPL version 2 (see http://www.eiffel.com/licensing/gpl.txt)"
89 licensing_options: "http://www.eiffel.com/licensing"
90 copying: "[
91 This file is part of Eiffel Software's Eiffel Development Environment.
92
93 Eiffel Software's Eiffel Development Environment is free
94 software; you can redistribute it and/or modify it under
95 the terms of the GNU General Public License as published
96 by the Free Software Foundation, version 2 of the License
97 (available at the URL listed under "license" above).
98
99 Eiffel Software's Eiffel Development Environment is
100 distributed in the hope that it will be useful, but
101 WITHOUT ANY WARRANTY; without even the implied warranty
102 of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
103 See the GNU General Public License for more details.
104
105 You should have received a copy of the GNU General Public
106 License along with Eiffel Software's Eiffel Development
107 Environment; if not, write to the Free Software Foundation,
108 Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
109 ]"
110 source: "[
111 Eiffel Software
112 5949 Hollister Ave., Goleta, CA 93117 USA
113 Telephone 805-685-1006, Fax 805-685-6869
114 Website http://www.eiffel.com
115 Customer support http://support.eiffel.com
116 ]"
117
118 end

Properties

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

  ViewVC Help
Powered by ViewVC 1.1.23