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

http://github.com/tybor/Liberty · Specman e · 56 lines · 34 code · 8 blank · 14 comment · 0 complexity · d6f9435b17dfe45c6d0298b1efff9e6a 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. --
  15. class LIBERTY_ASM_INVOKE
  16. inherit
  17. LIBERTY_ASM_INSTRUCTION
  18. redefine
  19. is_equal
  20. end
  21. create {ANY}
  22. make
  23. feature {ANY}
  24. method: LIBERTY_ASM_METHOD
  25. is_equal (other: like Current): BOOLEAN is
  26. do
  27. Result := other.method.is_equal(method)
  28. and then Precursor(other)
  29. end
  30. accept (visitor: LIBERTY_ASM_VISITOR) is
  31. local
  32. v: LIBERTY_ASM_INSTRUCTION_VISITOR
  33. do
  34. v ::= visitor
  35. v.visit_invoke(Current)
  36. end
  37. feature {}
  38. make (a_method: like method) is
  39. require
  40. a_method /= Void
  41. do
  42. method := a_method
  43. ensure
  44. method = a_method
  45. end
  46. invariant
  47. method /= Void
  48. end -- class LIBERTY_ASM_INVOKE