PageRenderTime 29ms CodeModel.GetById 26ms app.highlight 1ms RepoModel.GetById 1ms app.codeStats 0ms

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