src: add new hub modules to regroup related things together.
authorJean Privat <jean@pryen.org>
Wed, 3 Sep 2014 14:18:21 +0000 (10:18 -0400)
committerJean Privat <jean@pryen.org>
Wed, 3 Sep 2014 14:18:21 +0000 (10:18 -0400)
modelize: for modelize_*
semantize: for typing/auto_super_init/scope/flow/etc.
compiler: for compiler related things
interpreter: for interpreter related things

Signed-off-by: Jean Privat <jean@pryen.org>

24 files changed:
src/abstract_compiler.nit
src/android_annotations.nit
src/astprinter.nit
src/cached.nit
src/compiler.nit [new file with mode: 0644]
src/div_by_zero.nit
src/frontend.nit
src/highlight.nit
src/interpreter.nit [new file with mode: 0644]
src/metrics/nullables_metrics.nit
src/metrics/static_types_metrics.nit
src/modelize.nit [new file with mode: 0644]
src/nit.nit
src/nitg.nit
src/nith.nit
src/nitvm.nit
src/nitx.nit
src/platform.nit
src/rapid_type_analysis.nit
src/semantize.nit [new file with mode: 0644]
src/serialization_phase.nit
src/test_markdown.nit
src/testing/testing_base.nit
src/typing.nit

index 9d441cc..eb0d1d5 100644 (file)
@@ -18,8 +18,7 @@
 module abstract_compiler
 
 import literal
-import typing
-import auto_super_init
+import semantize
 import platform
 import c_tools
 
index ec0d2dc..b3ffcee 100644 (file)
@@ -20,9 +20,9 @@ module android_annotations
 
 import parser_util
 import modelbuilder
-import modelize_property
+import modelize
 import literal
-import typing
+import semantize
 private import annotation
 
 # Metadata associated to an Android project
index 97ff1fd..a1fd48e 100644 (file)
@@ -17,8 +17,8 @@
 # print AST in an human form
 module astprinter
 
-import typing
 import phase
+import semantize
 intrude import parser
 import literal
 
index ead285f..67d7b98 100644 (file)
@@ -18,8 +18,8 @@
 # complex annotation that modify both the model and the AST of a Nit program
 module cached
 
-import modelize_property
 import parser_util
+import modelize
 import simple_misc_analysis
 private import annotation
 
diff --git a/src/compiler.nit b/src/compiler.nit
new file mode 100644 (file)
index 0000000..902a656
--- /dev/null
@@ -0,0 +1,24 @@
+# This file is part of NIT ( http://www.nitlanguage.org ).
+#
+# Licensed under the Apache License, Version 2.0 (the "License");
+# you may not use this file except in compliance with the License.
+# You may obtain a copy of the License at
+#
+#     http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS,
+# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+# See the License for the specific language governing permissions and
+# limitations under the License.
+
+# Compilation to C
+module compiler
+
+import separate_erasure_compiler
+import global_compiler
+import compiler_ffi
+
+import android_platform
+import pnacl_platform
+import emscripten_platform
index 6debbd0..318b33e 100644 (file)
@@ -18,7 +18,7 @@ module div_by_zero
 
 import phase
 import literal # Because we need the real value of literal in the AST
-import typing # Because we need the static type of receivers
+import semantize # Because we need the static type of receivers
 
 # Note, `ToolContext` is the main overlord class
 # Among its jobs, it orchestrates and executes the various phases
index 9b6e84b..cfdf85b 100644 (file)
 # Collect and orchestration of main frontend phases
 module frontend
 
-import phase
 import simple_misc_analysis
 import literal
-import scope
-import flow
-import local_var_init
-import typing
-import auto_super_init
+import modelize
+import semantize
 import div_by_zero
 import cached
 import serialization_phase
index bfa0d0f..a93fec9 100644 (file)
@@ -15,7 +15,6 @@
 # Highliting of Nit AST
 module highlight
 
-import modelize_property
 import frontend
 import html
 import pipeline
diff --git a/src/interpreter.nit b/src/interpreter.nit
new file mode 100644 (file)
index 0000000..2063760
--- /dev/null
@@ -0,0 +1,20 @@
+# This file is part of NIT ( http://www.nitlanguage.org ).
+#
+# Licensed under the Apache License, Version 2.0 (the "License");
+# you may not use this file except in compliance with the License.
+# You may obtain a copy of the License at
+#
+#     http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS,
+# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+# See the License for the specific language governing permissions and
+# limitations under the License.
+
+# Interpretation of Nit programs
+module interpreter
+
+import naive_interpreter
+import debugger
+import debugger_socket
index 895f7d5..a101be9 100644 (file)
 # Statistics about the usage of nullables
 module nullables_metrics
 
-import modelbuilder
-private import typing
 import model_utils
 import mclasses_metrics
-import frontend
+import semantize
 
 redef class ToolContext
        var nullables_metrics_phase: Phase = new NullablesMetricsPhase(self, null)
index 888c8e2..88e9555 100644 (file)
@@ -18,8 +18,6 @@
 module static_types_metrics
 
 private import metrics_base
-import modelbuilder
-import modelize_class
 import frontend
 
 redef class ToolContext
diff --git a/src/modelize.nit b/src/modelize.nit
new file mode 100644 (file)
index 0000000..c0ed4c9
--- /dev/null
@@ -0,0 +1,18 @@
+# This file is part of NIT ( http://www.nitlanguage.org ).
+#
+# Licensed under the Apache License, Version 2.0 (the "License");
+# you may not use this file except in compliance with the License.
+# You may obtain a copy of the License at
+#
+#     http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS,
+# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+# See the License for the specific language governing permissions and
+# limitations under the License.
+
+# Create a model from nit source files
+module modelize
+
+import modelize_property
index 2481ce8..6e24920 100644 (file)
@@ -17,9 +17,8 @@
 # A naive Nit interpreter
 module nit
 
-import naive_interpreter
-import debugger
-import debugger_socket
+import interpreter
+import frontend
 
 # Create a tool context to handle options and paths
 var toolcontext = new ToolContext
index 66cd891..69b99f0 100644 (file)
 # A global Nit compiler
 module nitg
 
-import modelbuilder
 import frontend
+import compiler
 import transform
-import rapid_type_analysis
-import global_compiler
-import separate_erasure_compiler
-import separate_compiler
-import android_platform
-import compiler_ffi
-import pnacl_platform
-import emscripten_platform
 
 redef class ToolContext
        redef fun process_options(args)
index 6fb477d..8a052ac 100644 (file)
 # A ligHt Nit compiler
 module nith
 
-import phase
-import literal
-import scope
-import flow
-import local_var_init
-import typing
-import auto_super_init
-import modelbuilder
+import modelize
+import transform
+
 import rapid_type_analysis
 import separate_erasure_compiler
-import transform
 
 redef class ToolContext
        redef fun process_options(args)
index c0887db..fe12c15 100644 (file)
@@ -18,6 +18,7 @@
 module nitvm
 
 import vm
+import frontend
 
 # Create a tool context to handle options and paths
 var toolcontext = new ToolContext
index 29be82b..218f47b 100644 (file)
@@ -16,7 +16,7 @@
 module nitx
 
 import model_utils
-import modelize_property
+import modelize
 
 # Main class of the nit index tool
 # NitIndex build the model using the toolcontext argument
index 9e3e92e..99d67a0 100644 (file)
@@ -16,9 +16,9 @@
 # to the target platform. Also detects conflicts between targetted platforms.
 module platform
 
-import modelize_property
 import parser_util
 import modelbuilder
+import modelize
 private import annotation
 
 redef class ToolContext
index 6518860..418bc15 100644 (file)
@@ -25,8 +25,7 @@ module rapid_type_analysis
 
 import model
 import modelbuilder
-import typing
-import auto_super_init
+import semantize
 
 import csv # for live_types_to_csv
 import ordered_tree # for live_methods_to_tree
diff --git a/src/semantize.nit b/src/semantize.nit
new file mode 100644 (file)
index 0000000..cf01ce9
--- /dev/null
@@ -0,0 +1,18 @@
+# This file is part of NIT ( http://www.nitlanguage.org ).
+#
+# Licensed under the Apache License, Version 2.0 (the "License");
+# you may not use this file except in compliance with the License.
+# You may obtain a copy of the License at
+#
+#     http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS,
+# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+# See the License for the specific language governing permissions and
+# limitations under the License.
+
+# Process bodies of methods in regard with the model.
+module semantize
+
+import auto_super_init
index ec472c2..1847298 100644 (file)
@@ -21,8 +21,7 @@ module serialization_phase
 
 import phase
 import parser_util
-import modelize_property
-intrude import modelize_class
+import modelize
 
 redef class ToolContext
        var serialization_phase_pre_model: Phase = new SerializationPhasePreModel(self, null)
index 6e6ccc3..9d73b67 100644 (file)
@@ -15,7 +15,7 @@
 # Program to test the `markdown` module on real source files.
 module test_markdown
 
-import modelize_property
+import modelize
 import highlight
 import markdown
 
index 243a51e..ef9e7fe 100644 (file)
@@ -15,8 +15,8 @@
 # Base options for testing tools.
 module testing_base
 
-import modelize_property
 import parser_util
+import modelize
 
 redef class ToolContext
        # opt --full
index a415667..3dd9024 100644 (file)
@@ -19,8 +19,8 @@
 module typing
 
 import flow
-import modelize_property
 import phase
+import modelize
 import local_var_init
 
 redef class ToolContext