/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
- -- This file is part of Liberty Eiffel.
- --
- -- Liberty Eiffel is free software: you can redistribute it and/or modify
- -- it under the terms of the GNU General Public License as published by
- -- the Free Software Foundation, version 3 of the License.
- --
- -- Liberty Eiffel is distributed in the hope that it will be useful,
- -- but WITHOUT ANY WARRANTY; without even the implied warranty of
- -- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- -- GNU General Public License for more details.
- --
- -- You should have received a copy of the GNU General Public License
- -- along with Liberty Eiffel. If not, see <http://www.gnu.org/licenses/>.
- --
- class LIBERTY_ASM_NEW
- --
- -- New object creation
- --
- inherit
- LIBERTY_ASM_INSTRUCTION
- redefine
- is_equal
- end
- create {ANY}
- make
- feature {ANY}
- type: LIBERTY_ASM_TYPE
- is_equal (other: like Current): BOOLEAN is
- do
- Result := type.is_equal(other.type)
- and then Precursor(other)
- end
- accept (visitor: LIBERTY_ASM_VISITOR) is
- local
- v: LIBERTY_ASM_INSTRUCTION_VISITOR
- do
- v ::= visitor
- v.visit_new(Current)
- end
- feature {}
- make (a_type: like type) is
- require
- a_type /= Void
- do
- type := a_type
- ensure
- type = a_type
- end
- invariant
- type /= Void
- end -- class LIBERTY_ASM_NEW