PageRenderTime 47ms CodeModel.GetById 43ms app.highlight 1ms RepoModel.GetById 2ms app.codeStats 0ms

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

http://github.com/tybor/Liberty
Specman e | 61 lines | 35 code | 8 blank | 18 comment | 0 complexity | ecf11b58c33363b83f641358f9292146 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_JUMP
16   --
17   -- Some conditional jump
18   --
19
20inherit
21   LIBERTY_ASM_INSTRUCTION
22      redefine
23         is_equal
24      end
25
26create {ANY}
27   make, set_target
28
29feature {ANY}
30   target: LIBERTY_ASM_INSTRUCTION
31         -- the jump target
32
33   is_equal (other: like Current): BOOLEAN is
34      local
35         eq: SAFE_EQUAL[LIBERTY_ASM_INSTRUCTION]
36      do
37         Result := eq.test(target, other.target)
38            and then Precursor(other)
39      end
40
41   set_target (a_target: like target) is
42      do
43         target := a_target
44      ensure
45         target = a_target
46      end
47
48   accept (visitor: LIBERTY_ASM_VISITOR) is
49      local
50         v: LIBERTY_ASM_INSTRUCTION_VISITOR
51      do
52         v ::= visitor
53         v.visit_jump(Current)
54      end
55
56feature {}
57   make is
58      do
59      end
60
61end -- class LIBERTY_ASM_JUMP