PageRenderTime 13ms CodeModel.GetById 11ms app.highlight 1ms RepoModel.GetById 1ms app.codeStats 0ms

/src/tools/compiler/asm/instruction/liberty_asm_new.e

http://github.com/tybor/Liberty
Specman e | 59 lines | 34 code | 8 blank | 17 comment | 0 complexity | f5ebd5eeb72fbf81300ad45ffd736338 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_NEW
16   --
17   -- New object creation
18   --
19
20inherit
21   LIBERTY_ASM_INSTRUCTION
22      redefine
23         is_equal
24      end
25
26create {ANY}
27   make
28
29feature {ANY}
30   type: LIBERTY_ASM_TYPE
31
32   is_equal (other: like Current): BOOLEAN is
33      do
34         Result := type.is_equal(other.type)
35            and then Precursor(other)
36      end
37
38   accept (visitor: LIBERTY_ASM_VISITOR) is
39      local
40         v: LIBERTY_ASM_INSTRUCTION_VISITOR
41      do
42         v ::= visitor
43         v.visit_new(Current)
44      end
45
46feature {}
47   make (a_type: like type) is
48      require
49         a_type /= Void
50      do
51         type := a_type
52      ensure
53         type = a_type
54      end
55
56invariant
57   type /= Void
58
59end -- class LIBERTY_ASM_NEW