/src/tools/semantics/liberty_tags.e

http://github.com/tybor/Liberty · Specman e · 50 lines · 24 code · 6 blank · 20 comment · 0 complexity · 4863930cbfdd0f9e223e185551917e3e 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. expanded class LIBERTY_TAGS
  16. feature {ANY} -- Tags on expressions
  17. is_void: LIBERTY_TAG_REF[TRISTATE] is
  18. -- This tag checks if the expression is always Void.
  19. once
  20. create Result.make("is void".intern)
  21. end
  22. has_side_effect: LIBERTY_TAG_REF[TRISTATE] is
  23. -- This tag checks if the expression has side effects (useful to drop targets when optimizing).
  24. once
  25. create Result.make("has side effect".intern)
  26. end
  27. runtime_set: LIBERTY_TAG_REF[COLLECTION[LIBERTY_ACTUAL_TYPE]] is
  28. -- This tag contains the complete set of actual types an expression may have at runtime.
  29. once
  30. create Result.make("runtime set".intern)
  31. end
  32. feature {ANY} -- Tags on features (used by the interpreter)
  33. once_flag: LIBERTY_TAG_REF[LIBERTY_INTERPRETER_OBJECT] is
  34. -- This tag indicates that the once feature has already been called; it contains the feature's Result
  35. -- if it exists.
  36. once
  37. create Result.make("once flag".intern)
  38. end
  39. plugin_agent: LIBERTY_TAG_REF[FOREIGN_AGENT] is
  40. -- The low-level foreign function to call
  41. once
  42. create Result.make("plugin agent".intern)
  43. end
  44. end