PageRenderTime 16ms CodeModel.GetById 10ms app.highlight 2ms RepoModel.GetById 1ms app.codeStats 1ms

/src/tools/compiler/asm/data/liberty_asm_native_value.e

http://github.com/tybor/Liberty
Specman e | 62 lines | 35 code | 10 blank | 17 comment | 0 complexity | c11650849de6a714d5add1a24df95d77 MD5 | raw file
 1-- This file is part of Liberty Eiffel.
 2--
 3-- Liberty Eiffel is free software: you can redistribute it and/or modify
 4-- it under the terms of the GNU General Public License as published by
 5-- the Free Software Foundation, version 3 of the License.
 6--
 7-- Liberty Eiffel is distributed in the hope that it will be useful,
 8-- but WITHOUT ANY WARRANTY; without even the implied warranty of
 9-- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
10-- GNU General Public License for more details.
11--
12-- You should have received a copy of the GNU General Public License
13-- along with Liberty Eiffel.  If not, see <http://www.gnu.org/licenses/>.
14--
15class LIBERTY_ASM_NATIVE_VALUE
16   --
17   -- A native value (either argument or result type)
18   --
19
20insert
21   ANY
22      redefine
23         is_equal
24      end
25
26create {ANY}
27   integer, pointer
28
29feature {ANY}
30   is_equal (other: like Current): BOOLEAN is
31      do
32         Result := kind = other.kind
33      end
34
35   is_integer: BOOLEAN is
36      do
37         Result := kind = kind_integer
38      end
39
40   is_pointer: BOOLEAN is
41      do
42         Result := kind = kind_pointer
43      end
44
45feature {LIBERTY_ASM_NATIVE_VALUE}
46   kind: INTEGER_8
47
48feature {}
49   integer is
50      do
51         kind := kind_integer
52      end
53
54   pointer is
55      do
56         kind := kind_pointer
57      end
58
59   kind_integer: INTEGER_8 is 1
60   kind_pointer: INTEGER_8 is 2
61
62end -- class LIBERTY_ASM_NATIVE_VALUE