implemented new code splitting mechanism (split to equal slices)
[deliverable/titan.core.git] / compiler2 / TypeCompat.cc
index 6f4695b1f24263a8686afa4c097ce4f38d39cb4a..886c211ee78e0ccf4470ffd92fb57f46c1fd87b9 100644 (file)
@@ -8,6 +8,7 @@
  * Contributors:
  *   Balasko, Jeno
  *   Raduly, Csaba
+ *   Szabo, Bence Janos
  *
  ******************************************************************************/
 #include "TypeCompat.hh"
@@ -323,12 +324,12 @@ void TypeConv::gen_conv_func(char **p_prototypes, char **p_bodies,
   string to_name = m_is_temp ? m_to->get_genname_template(p_mod)
     : m_to->get_genname_value(p_mod);
   *p_prototypes = mputprintf(*p_prototypes,
-    "static boolean %s(%s& p_to_v, const %s& p_from_v);\n",
-    get_conv_func(m_from, m_to, p_mod).c_str(), to_name.c_str(),
+    "%sboolean %s(%s& p_to_v, const %s& p_from_v);\n",
+    split_to_slices ? "" : "static ", get_conv_func(m_from, m_to, p_mod).c_str(), to_name.c_str(),
     from_name.c_str());
   *p_bodies = mputprintf(*p_bodies,
-    "static boolean %s(%s& p_to_v, const %s& p_from_v)\n{\n",
-    get_conv_func(m_from, m_to, p_mod).c_str(), to_name.c_str(),
+    "%sboolean %s(%s& p_to_v, const %s& p_from_v)\n{\n",
+    split_to_slices ? "" : "static ", get_conv_func(m_from, m_to, p_mod).c_str(), to_name.c_str(),
     from_name.c_str());
   switch (m_to->get_typetype()) {
   case Type::T_SEQ_A:
This page took 0.023323 seconds and 5 git commands to generate.