Sync with 5.2.0
[deliverable/titan.core.git] / compiler2 / AST.cc
index 3f45141d064e8cd8cfe8b9fb0ceaba396eed3413..4cfcad260ae88a849d24f460d1d723f72b87bd29 100644 (file)
@@ -263,17 +263,10 @@ namespace Common {
     return versions;
   }
   
-  void Modules::add_types_to_json_schema(JSON_Tokenizer& json)
+  void Modules::generate_json_schema(JSON_Tokenizer& json, map<Type*, JSON_Tokenizer>& json_refs)
   {
     for(size_t i = 0; i < mods_v.size(); ++i) {
-      mods_v[i]->add_types_to_json_schema(json);
-    }
-  }
-  
-  void Modules::add_func_to_json_schema(map<Type*, JSON_Tokenizer>& json_refs)
-  {
-    for(size_t i = 0; i < mods_v.size(); ++i) {
-      mods_v[i]->add_func_to_json_schema(json_refs);
+      mods_v[i]->generate_json_schema(json, json_refs);
     }
   }
 
@@ -807,6 +800,12 @@ namespace Common {
               mputprintf(effective_module_functions, "%s\"%s\"",
                           (effective_module_functions ? ", " : ""), get_modid().get_dispname().c_str());
         }
+        if (profiler_enabled && MOD_TTCN == get_moduletype()) {
+          output->source.static_function_bodies = mputprintf(output->source.static_function_bodies,
+            "TTCN3_Stack_Depth stack_depth;\n"
+            "ttcn3_prof.enter_function(\"%s\", 0, \"%s\");\n",
+            get_filename(), get_modid().get_dispname().c_str());
+        }
       }
       output->source.static_function_bodies =
         mputstr(output->source.static_function_bodies, output->functions.pre_init);
@@ -844,6 +843,12 @@ namespace Common {
             mputprintf(effective_module_functions, "%s\"%s\"",
                           (effective_module_functions ? ", " : ""), get_modid().get_dispname().c_str());
         }
+        if (profiler_enabled && MOD_TTCN == get_moduletype()) {
+          output->source.static_function_bodies = mputprintf(output->source.static_function_bodies,
+            "TTCN3_Stack_Depth stack_depth;\n"
+            "ttcn3_prof.enter_function(\"%s\", 0, \"%s\");\n",
+            get_filename(), get_modid().get_dispname().c_str());
+        }
       }
       output->source.static_function_bodies =
         mputstr(output->source.static_function_bodies, output->functions.post_init);
This page took 0.045895 seconds and 5 git commands to generate.