summaryrefslogtreecommitdiff
path: root/src/bin/eolian_mono/eolian/mono/klass.hh
diff options
context:
space:
mode:
authorLauro Moura <lauromoura@expertisesolutions.com.br>2019-07-11 10:19:53 +0200
committerXavi Artigas <xavierartigas@yahoo.es>2019-07-11 10:19:53 +0200
commitfa333608b78eefa836b858eca6fbd9718521d143 (patch)
treedf72232df837e9f8484365b7e2d6d782bfd28428 /src/bin/eolian_mono/eolian/mono/klass.hh
parent15e5d29f886b296ce2e0d084367e529f550c3307 (diff)
csharp: Respect beta for implementable functions
Summary: Build fix (remove warnings) Instead of returning the beta functions in the vector and relying on function generators to skip them, filter them out when filling the implementable methods vector. This will make the code return the actual number of implementable function, skipping some unused fields in places like the NativeMethods implementations. Depends on D9258 Reviewers: vitor.sousa, felipealmeida, segfaultxavi Reviewed By: vitor.sousa Subscribers: cedric, #reviewers, #committers Tags: #efl, #expertise_solutions Differential Revision: https://phab.enlightenment.org/D9259
Diffstat (limited to 'src/bin/eolian_mono/eolian/mono/klass.hh')
-rw-r--r--src/bin/eolian_mono/eolian/mono/klass.hh8
1 files changed, 4 insertions, 4 deletions
diff --git a/src/bin/eolian_mono/eolian/mono/klass.hh b/src/bin/eolian_mono/eolian/mono/klass.hh
index c34d7c0..831f48d 100644
--- a/src/bin/eolian_mono/eolian/mono/klass.hh
+++ b/src/bin/eolian_mono/eolian/mono/klass.hh
@@ -36,7 +36,7 @@ template<typename Context>
36static std::size_t 36static std::size_t
37get_implementable_function_count(grammar::attributes::klass_def const& cls, Context context) 37get_implementable_function_count(grammar::attributes::klass_def const& cls, Context context)
38{ 38{
39 auto methods = helpers::get_all_implementable_methods(cls); 39 auto methods = helpers::get_all_implementable_methods(cls, context);
40 return std::count_if(methods.cbegin(), methods.cend(), [&context](grammar::attributes::function_def const& func) 40 return std::count_if(methods.cbegin(), methods.cend(), [&context](grammar::attributes::function_def const& func)
41 { 41 {
42 return !blacklist::is_function_blacklisted(func, context) && !func.is_static; 42 return !blacklist::is_function_blacklisted(func, context) && !func.is_static;
@@ -230,7 +230,7 @@ struct klass
230 .generate(sink, cls.parts, concrete_cxt)) return false; 230 .generate(sink, cls.parts, concrete_cxt)) return false;
231 231
232 // Concrete function definitions 232 // Concrete function definitions
233 auto implemented_methods = helpers::get_all_implementable_methods(cls); 233 auto implemented_methods = helpers::get_all_implementable_methods(cls, concrete_cxt);
234 if(!as_generator(*(function_definition)) 234 if(!as_generator(*(function_definition))
235 .generate(sink, implemented_methods, concrete_cxt)) return false; 235 .generate(sink, implemented_methods, concrete_cxt)) return false;
236 236
@@ -302,7 +302,7 @@ struct klass
302 .generate(sink, cls.parts, inherit_cxt)) return false; 302 .generate(sink, cls.parts, inherit_cxt)) return false;
303 303
304 // Inherit function definitions 304 // Inherit function definitions
305 auto implemented_methods = helpers::get_all_implementable_methods(cls); 305 auto implemented_methods = helpers::get_all_implementable_methods(cls, inherit_cxt);
306 if(!as_generator(*(function_definition(true))) 306 if(!as_generator(*(function_definition(true)))
307 .generate(sink, implemented_methods, inherit_cxt)) return false; 307 .generate(sink, implemented_methods, inherit_cxt)) return false;
308 308
@@ -354,7 +354,7 @@ struct klass
354 context); 354 context);
355 auto native_inherit_name = name_helpers::klass_native_inherit_name(cls); 355 auto native_inherit_name = name_helpers::klass_native_inherit_name(cls);
356 auto inherit_name = name_helpers::klass_inherit_name(cls); 356 auto inherit_name = name_helpers::klass_inherit_name(cls);
357 auto implementable_methods = helpers::get_all_implementable_methods(cls); 357 auto implementable_methods = helpers::get_all_implementable_methods(cls, context);
358 bool root = !helpers::has_regular_ancestor(cls); 358 bool root = !helpers::has_regular_ancestor(cls);
359 auto const& indent = current_indentation(inative_cxt); 359 auto const& indent = current_indentation(inative_cxt);
360 360