/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. --
  15. class LIBERTY_ASM_NATIVE_VALUE
  16. --
  17. -- A native value (either argument or result type)
  18. --
  19. insert
  20. ANY
  21. redefine
  22. is_equal
  23. end
  24. create {ANY}
  25. integer, pointer
  26. feature {ANY}
  27. is_equal (other: like Current): BOOLEAN is
  28. do
  29. Result := kind = other.kind
  30. end
  31. is_integer: BOOLEAN is
  32. do
  33. Result := kind = kind_integer
  34. end
  35. is_pointer: BOOLEAN is
  36. do
  37. Result := kind = kind_pointer
  38. end
  39. feature {LIBERTY_ASM_NATIVE_VALUE}
  40. kind: INTEGER_8
  41. feature {}
  42. integer is
  43. do
  44. kind := kind_integer
  45. end
  46. pointer is
  47. do
  48. kind := kind_pointer
  49. end
  50. kind_integer: INTEGER_8 is 1
  51. kind_pointer: INTEGER_8 is 2
  52. end -- class LIBERTY_ASM_NATIVE_VALUE