1 # This file is part of NIT ( http://www.nitlanguage.org ).
3 # Licensed under the Apache License, Version 2.0 (the "License");
4 # you may not use this file except in compliance with the License.
5 # You may obtain a copy of the License at
7 # http://www.apache.org/licenses/LICENSE-2.0
9 # Unless required by applicable law or agreed to in writing, software
10 # distributed under the License is distributed on an "AS IS" BASIS,
11 # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12 # See the License for the specific language governing permissions and
13 # limitations under the License.
15 # Collect and orchestration of main frontend phases
19 import simple_misc_analysis
24 import serialization_phase
26 import check_annotation
27 import glsl_validation
28 import parallelization_phase
32 redef class ToolContext
33 # FIXME: there is conflict in linex in nitc, so use this trick to force invocation
34 private var dummy
: Bool = do_dummy
37 private fun do_dummy
: Bool
39 # Force no warning before analysing classes
40 phases
.add_edge
(modelize_class_phase
, no_warning_phase
)
41 # Force easy warnings after modelbuilder
42 phases
.add_edge
(simple_misc_analysis_phase
, modelize_property_phase
)
43 # Force easy warnings before intraproc-errors
44 phases
.add_edge
(scope_phase
, simple_misc_analysis_phase
)
45 # Code genrated by the serialization phase must be analyzed for literals
46 phases
.add_edge
(literal_phase
, serialization_phase_pre_model
)
47 phases
.add_edge
(modelize_class_phase
, serialization_phase_pre_model
)
48 phases
.add_edge
(modelize_class_phase
, parallelization_phase
)