efl js: Update Javascript binding to compile with new Eolian API

Reword test method names to check naming convention.
This commit is contained in:
Vitor Sousa 2016-03-14 13:14:37 -03:00
parent bd200cefc4
commit a85348b70b
13 changed files with 528 additions and 435 deletions

View File

@ -38,28 +38,37 @@ inline std::string type_class_name(Eolian_Type const* tp)
if (tp)
{
Eolian_Type_Type tpt = ::eolian_type_type_get(tp);
if (tpt == EOLIAN_TYPE_POINTER || tpt == EOLIAN_TYPE_ALIAS || tpt == EOLIAN_TYPE_REGULAR)
if (tpt == EOLIAN_TYPE_POINTER)
{
return type_class_name(::eolian_type_base_type_get(tp));
}
else if(tpt == EOLIAN_TYPE_CLASS)
else
{
Eolian_Class const* klass = ::eolian_type_class_get(tp);
if (klass)
tp = ::eolian_type_aliased_base_get(tp);
tpt = ::eolian_type_type_get(tp);
if (tpt == EOLIAN_TYPE_CLASS)
{
Eina_Stringshare* klass_name = ::eolian_class_full_name_get(klass);
if (!klass_name)
throw std::runtime_error("Could not get Eo class name");
Eolian_Class const* klass = ::eolian_type_class_get(tp);
if (klass)
{
Eina_Stringshare* klass_name = ::eolian_class_full_name_get(klass);
if (!klass_name)
throw std::runtime_error("Could not get Eo class name");
return klass_name;
} // TODO: else should throw std::runtime_error("Could not get Eo class");
}
else if(tpt == EOLIAN_TYPE_STRUCT)
{
auto struct_type_full_name = ::eolian_type_full_name_get(tp);
if (!struct_type_full_name)
throw std::runtime_error("Could not get struct name");
return struct_type_full_name;
return klass_name;
} // TODO: else should throw std::runtime_error("Could not get Eo class");
}
else if (tpt == EOLIAN_TYPE_REGULAR)
{
auto tpd = eolian_type_typedecl_get(tp);
if (tpd && eolian_typedecl_type_get(tpd) == EOLIAN_TYPEDECL_STRUCT)
{
auto struct_type_full_name = ::eolian_type_full_name_get(tp);
if (!struct_type_full_name)
throw std::runtime_error("Could not get struct name");
return struct_type_full_name;
}
}
}
}
return "";

View File

@ -152,7 +152,21 @@ std::string format_method(std::string const& in)
std::string format_field(std::string const& in)
{
return format_method(in);
std::string r;
bool up = false;
for (char c : in)
{
if (c == '_')
up = true;
else if (!up)
r += c;
else
{
r += std::toupper(c);
up = false;
}
}
return r;
}
std::string format_class(std::string const& in)

View File

@ -66,13 +66,19 @@ _final_type_and_type_type_get(Eolian_Type const* tp_in, Eolian_Type const*& tp_o
{
tp_out = tp_in;
tpt_out = eolian_type_type_get(tp_in);
while ((tpt_out == EOLIAN_TYPE_REGULAR || tpt_out == EOLIAN_TYPE_ALIAS) && !eolian_type_is_extern(tp_out))
if (tpt_out == EOLIAN_TYPE_REGULAR)
{
auto t = eolian_type_base_type_get(tp_out);
// TODO: shouldn't __undefined_type be flagged as external???
if (!t || !eolian_type_full_name_get(t) || strcmp(eolian_type_full_name_get(t), "__undefined_type") == 0) break;
tp_out = t;
tpt_out = eolian_type_type_get(t);
auto tpd = eolian_type_typedecl_get(tp_out);
if (tpd && eolian_typedecl_type_get(tpd) == EOLIAN_TYPEDECL_ALIAS &&
!eolian_typedecl_is_extern(tpd))
{
auto btp = eolian_typedecl_aliased_base_get(tpd);
if (btp && eolian_type_full_name_get(btp) &&
strcmp(eolian_type_full_name_get(btp), "__undefined_type") != 0)
{
_final_type_and_type_type_get(btp, tp_out, tpt_out);
}
}
}
}
@ -84,7 +90,7 @@ _eolian_type_cpp_type_named_get(const Eolian_Type *tp, std::string const& caller
Eolian_Type_Type tpt = EOLIAN_TYPE_UNKNOWN_TYPE;
_final_type_and_type_type_get(tp, tp, tpt);
if (tpt == EOLIAN_TYPE_UNKNOWN_TYPE)
if (tpt == EOLIAN_TYPE_UNKNOWN_TYPE || tpt == EOLIAN_TYPE_UNDEFINED)
return "error";
std::string result;
@ -92,10 +98,6 @@ _eolian_type_cpp_type_named_get(const Eolian_Type *tp, std::string const& caller
if ((tpt == EOLIAN_TYPE_VOID
|| tpt == EOLIAN_TYPE_REGULAR
|| tpt == EOLIAN_TYPE_COMPLEX
|| tpt == EOLIAN_TYPE_STRUCT
|| tpt == EOLIAN_TYPE_STRUCT_OPAQUE
|| tpt == EOLIAN_TYPE_ENUM
|| tpt == EOLIAN_TYPE_ALIAS
|| tpt == EOLIAN_TYPE_CLASS)
&& is_const)
{
@ -105,10 +107,6 @@ _eolian_type_cpp_type_named_get(const Eolian_Type *tp, std::string const& caller
if (tpt == EOLIAN_TYPE_REGULAR
|| tpt == EOLIAN_TYPE_COMPLEX
|| tpt == EOLIAN_TYPE_STRUCT
|| tpt == EOLIAN_TYPE_STRUCT_OPAQUE
|| tpt == EOLIAN_TYPE_ENUM
|| tpt == EOLIAN_TYPE_ALIAS
|| tpt == EOLIAN_TYPE_CLASS)
{
for (efl::eina::iterator<const char> first(::eolian_type_namespaces_get(tp)), last; first != last; ++first)
@ -164,14 +162,15 @@ _eolian_type_cpp_type_named_get(const Eolian_Type *tp, std::string const& caller
type_name = it->second;
result += type_name;
if (tpt == EOLIAN_TYPE_STRUCT)
auto tpd = eolian_type_typedecl_get(tp);
if (tpd && eolian_typedecl_type_get(tpd) == EOLIAN_TYPEDECL_STRUCT)
{
result = "efl::eina::js::make_struct_tag<" + result + ">";
}
}
else if (tpt == EOLIAN_TYPE_VOID)
result += "void";
else // tpt == EOLIAN_TYPE_POINTER
else if (tpt == EOLIAN_TYPE_POINTER)
{
auto btp = eolian_type_base_type_get(tp);
result += _eolian_type_cpp_type_named_get(btp, caller_class_prefix, need_name_getter);
@ -180,8 +179,9 @@ _eolian_type_cpp_type_named_get(const Eolian_Type *tp, std::string const& caller
Eolian_Type_Type btpt = EOLIAN_TYPE_UNKNOWN_TYPE;
_final_type_and_type_type_get(btp, btp, btpt);
auto btpd = eolian_type_typedecl_get(btp);
if (btpt == EOLIAN_TYPE_STRUCT)
if (btpd && eolian_typedecl_type_get(btpd) == EOLIAN_TYPEDECL_STRUCT)
{
std::string f = "::make_struct_tag";
auto p = result.find(f);
@ -230,6 +230,10 @@ _eolian_type_cpp_type_named_get(const Eolian_Type *tp, std::string const& caller
result += ">";
}
}
else
{
throw std::runtime_error("unhandled Eolian_Type_Type value");
}
/*if (!name.empty())
{
@ -303,6 +307,10 @@ void separate_functions(Eolian_Class const* klass, Eolian_Function_Type t, bool
strcmp("constructor", ::eolian_function_name_get(function)) != 0 && // TODO: remove this
strcmp("render_updates", ::eolian_function_name_get(function)) != 0 && // TODO: remove this
strcmp("render2_updates", ::eolian_function_name_get(function)) != 0 && // TODO: remove this
strcmp("efl_canvas_surface_x11_pixmap_set", ::eolian_function_full_c_name_get(function, t, EINA_FALSE)) != 0 && // TODO: remove this
strcmp("efl_canvas_surface_x11_pixmap_get", ::eolian_function_full_c_name_get(function, t, EINA_FALSE)) != 0 && // TODO: remove this
strcmp("efl_canvas_surface_native_buffer_set", ::eolian_function_full_c_name_get(function, t, EINA_FALSE)) != 0 && // TODO: remove this
strcmp("efl_canvas_surface_native_buffer_get", ::eolian_function_full_c_name_get(function, t, EINA_FALSE)) != 0 && // TODO: remove this
strcmp("event_callback_priority_add", ::eolian_function_name_get(function)) != 0 && // TODO: remove this
strcmp("event_callback_array_priority_add", ::eolian_function_name_get(function)) != 0 && // TODO: remove this
strcmp("event_callback_array_del", ::eolian_function_name_get(function)) != 0 && // TODO: remove this
@ -591,16 +599,16 @@ int main(int argc, char** argv)
// generate all structs parsed in this file
std::stringstream structs_ss;
for (efl::eina::iterator<Eolian_Type> first(::eolian_type_structs_get_by_file(file_basename.c_str()))
for (efl::eina::iterator<Eolian_Typedecl> first(::eolian_typedecl_structs_get_by_file(file_basename.c_str()))
, last; first != last; ++first)
{
std::stringstream ss;
auto tp = &*first;
if (::eolian_type_type_get(tp) == EOLIAN_TYPE_STRUCT_OPAQUE)
auto tpd = &*first;
if (!tpd || ::eolian_typedecl_type_get(tpd) == EOLIAN_TYPEDECL_STRUCT_OPAQUE)
continue;
auto struct_name = ::eolian_type_name_get(tp);
auto struct_type_full_name = ::eolian_type_full_name_get(tp);
auto struct_name = ::eolian_typedecl_name_get(tpd);
auto struct_type_full_name = ::eolian_typedecl_full_name_get(tpd);
if (!struct_name || !struct_type_full_name)
{
EINA_CXX_DOM_LOG_ERR(eolian::js::domain) << "Could not get struct type name";
@ -613,11 +621,11 @@ int main(int argc, char** argv)
ss << " {\n";
ss << " auto fields_func = [](v8::Isolate* isolate_, v8::Local<v8::ObjectTemplate> prototype_)\n";
ss << " {\n";
for (efl::eina::iterator<Eolian_Struct_Type_Field> sf(::eolian_type_struct_fields_get(tp))
for (efl::eina::iterator<Eolian_Struct_Type_Field> sf(::eolian_typedecl_struct_fields_get(tpd))
, sf_end; sf != sf_end; ++sf)
{
auto field_type = ::eolian_type_struct_field_type_get(&*sf);
auto field_name = ::eolian_type_struct_field_name_get(&*sf);
auto field_type = ::eolian_typedecl_struct_field_type_get(&*sf);
auto field_name = ::eolian_typedecl_struct_field_name_get(&*sf);
if (!field_name)
{
EINA_CXX_DOM_LOG_ERR(eolian::js::domain) << "Could not get struct field name";
@ -654,7 +662,7 @@ int main(int argc, char** argv)
ss << " };\n";
ss << " auto to_export = ::efl::eo::js::get_namespace({";
bool comma = false;
for (efl::eina::iterator<const char> ns_it(::eolian_type_namespaces_get(tp)), ns_end; ns_it != ns_end; ++ns_it)
for (efl::eina::iterator<const char> ns_it(::eolian_typedecl_namespaces_get(tpd)), ns_end; ns_it != ns_end; ++ns_it)
{
if (comma)
ss << ", ";
@ -1042,17 +1050,17 @@ int main(int argc, char** argv)
os << structs_ss.str();
// generate enumerations
for (efl::eina::iterator<Eolian_Type> first(::eolian_type_enums_get_by_file(file_basename.c_str()))
for (efl::eina::iterator<Eolian_Typedecl> first(::eolian_typedecl_enums_get_by_file(file_basename.c_str()))
, last; first != last; ++first)
{
auto tp = &*first;
if (::eolian_type_is_extern(tp))
auto tpd = &*first;
if (::eolian_typedecl_is_extern(tpd))
continue;
std::string enum_name = ::eolian_type_name_get(tp);
std::string enum_name = ::eolian_typedecl_name_get(tpd);
os << " {\n";
os << " auto to_export = ::efl::eo::js::get_namespace({";
bool comma = false;
for (efl::eina::iterator<const char> ns_it(::eolian_type_namespaces_get(tp)), ns_end; ns_it != ns_end; ++ns_it)
for (efl::eina::iterator<const char> ns_it(::eolian_typedecl_namespaces_get(tpd)), ns_end; ns_it != ns_end; ++ns_it)
{
if (comma)
os << ", ";
@ -1063,11 +1071,11 @@ int main(int argc, char** argv)
os << " v8::Handle<v8::Object> enum_obj = efl::eina::js::compatibility_new<v8::Object>(isolate);\n";
os << " to_export->Set(efl::eina::js::compatibility_new<v8::String>(isolate, \""
<< format::format_enum(enum_name) << "\"), enum_obj);\n";
for (efl::eina::iterator<Eolian_Enum_Type_Field> ef(::eolian_type_enum_fields_get(tp))
for (efl::eina::iterator<Eolian_Enum_Type_Field> ef(::eolian_typedecl_enum_fields_get(tpd))
, ef_end; ef != ef_end; ++ef)
{
auto field_name = ::eolian_type_enum_field_name_get(&*ef);
auto field_c_name = ::eolian_type_enum_field_c_name_get(&*ef);
auto field_name = ::eolian_typedecl_enum_field_name_get(&*ef);
auto field_c_name = ::eolian_typedecl_enum_field_c_name_get(&*ef);
if (!field_name || !field_c_name)
{
EINA_CXX_DOM_LOG_ERR(eolian::js::domain) << "Could not get enum field name";

View File

@ -51,15 +51,13 @@ EAPI void register_job(v8::Handle<v8::Object> global, v8::Isolate* isolate);
EAPI void register_parent(v8::Handle<v8::Object> global, v8::Isolate* isolate);
EAPI void register_poller(v8::Handle<v8::Object> global, v8::Isolate* isolate);
EAPI void register_timer(v8::Handle<v8::Object> global, v8::Isolate* isolate);
namespace con {
EAPI void register_base(v8::Handle<v8::Object> global, v8::Isolate* isolate);
EAPI void register_client(v8::Handle<v8::Object> global, v8::Isolate* isolate);
EAPI void register_server(v8::Handle<v8::Object> global, v8::Isolate* isolate);
}
}
namespace efl { namespace network {
EAPI void register_base(v8::Handle<v8::Object> global, v8::Isolate* isolate);
EAPI void register_server(v8::Handle<v8::Object> global, v8::Isolate* isolate);
EAPI void register_connector(v8::Handle<v8::Object> global, v8::Isolate* isolate);
EAPI void register_client(v8::Handle<v8::Object> global, v8::Isolate* isolate);
EAPI void register_url(v8::Handle<v8::Object> global, v8::Isolate* isolate);
}}
@ -97,7 +95,6 @@ EAPI void register_line(v8::Handle<v8::Object> global, v8::Isolate* isolate);
EAPI void register_object(v8::Handle<v8::Object> global, v8::Isolate* isolate);
EAPI void register_object_smart(v8::Handle<v8::Object> global, v8::Isolate* isolate);
EAPI void register_out(v8::Handle<v8::Object> global, v8::Isolate* isolate);
EAPI void register_polygon(v8::Handle<v8::Object> global, v8::Isolate* isolate);
EAPI void register_rectangle(v8::Handle<v8::Object> global, v8::Isolate* isolate);
EAPI void register_scrollable_interface(v8::Handle<v8::Object> global, v8::Isolate* isolate);
EAPI void register_selectable_interface(v8::Handle<v8::Object> global, v8::Isolate* isolate);
@ -120,6 +117,10 @@ EAPI void register_scene(v8::Handle<v8::Object> global, v8::Isolate* isolate);
EAPI void register_texture(v8::Handle<v8::Object> global, v8::Isolate* isolate);
} }
namespace efl { namespace canvas {
EAPI void register_polygon(v8::Handle<v8::Object> global, v8::Isolate* isolate);
}}
namespace edje {
EAPI void register_edit(v8::Handle<v8::Object> global, v8::Isolate* isolate);
EAPI void register_object(v8::Handle<v8::Object> global, v8::Isolate* isolate);
@ -165,10 +166,10 @@ EAPI void init(v8::Handle<v8::Object> exports)
ecore::register_parent(exports, v8::Isolate::GetCurrent());
ecore::register_poller(exports, v8::Isolate::GetCurrent());
ecore::register_timer(exports, v8::Isolate::GetCurrent());
ecore::con::register_base(exports, v8::Isolate::GetCurrent());
ecore::con::register_client(exports, v8::Isolate::GetCurrent());
efl::network::register_base(exports, v8::Isolate::GetCurrent());
efl::network::register_client(exports, v8::Isolate::GetCurrent());
efl::network::register_connector(exports, v8::Isolate::GetCurrent());
ecore::con::register_server(exports, v8::Isolate::GetCurrent());
efl::network::register_server(exports, v8::Isolate::GetCurrent());
efl::network::register_url(exports, v8::Isolate::GetCurrent());
#if 1
register_ecore_audio(exports, v8::Isolate::GetCurrent());
@ -199,7 +200,6 @@ EAPI void init(v8::Handle<v8::Object> exports)
evas::register_object(exports, v8::Isolate::GetCurrent());
evas::register_object_smart(exports, v8::Isolate::GetCurrent());
evas::register_out(exports, v8::Isolate::GetCurrent());
evas::register_polygon(exports, v8::Isolate::GetCurrent());
evas::register_rectangle(exports, v8::Isolate::GetCurrent());
evas::register_scrollable_interface(exports, v8::Isolate::GetCurrent());
evas::register_selectable_interface(exports, v8::Isolate::GetCurrent());
@ -218,6 +218,7 @@ EAPI void init(v8::Handle<v8::Object> exports)
evas::canvas3d::register_object(exports, v8::Isolate::GetCurrent());
evas::canvas3d::register_scene(exports, v8::Isolate::GetCurrent());
evas::canvas3d::register_texture(exports, v8::Isolate::GetCurrent());
efl::canvas::register_polygon(exports, v8::Isolate::GetCurrent());
#endif
#if 1
edje::register_edit(exports, v8::Isolate::GetCurrent());

View File

@ -829,12 +829,11 @@ struct _v8_get_current_context<T, true> : T
}
};
template <typename T>
inline v8::Local<v8::Value>
new_v8_external_instance(v8::Handle<v8::Function>& ctor, T v, v8::Isolate* isolate)
new_v8_external_instance(v8::Handle<v8::Function>& ctor, void const* v, v8::Isolate* isolate)
{
// TODO: ensure v8::External ownership ??? (memory leak in case NewInstance throws)
v8::Handle<v8::Value> a[] = {efl::eina::js::compatibility_new<v8::External>(isolate, v)};
v8::Handle<v8::Value> a[] = {efl::eina::js::compatibility_new<v8::External>(isolate, const_cast<void*>(v))};
return ctor->NewInstance(1, a);
}
@ -842,10 +841,10 @@ inline
compatibility_return_type cast_function(compatibility_callback_info_type args);
inline v8::Local<v8::Value>
new_v8_external_instance(v8::Handle<v8::Function>& ctor, Eo* v, v8::Isolate* isolate)
new_v8_external_instance(v8::Handle<v8::Function>& ctor, Eo const* v, v8::Isolate* isolate)
{
// TODO: ensure v8::External ownership ??? (memory leak in case NewInstance throws)
v8::Handle<v8::Value> a[] = {efl::eina::js::compatibility_new<v8::External>(isolate, v)};
v8::Handle<v8::Value> a[] = {efl::eina::js::compatibility_new<v8::External>(isolate, const_cast<Eo*>(v))};
auto obj = ctor->NewInstance(1, a);
obj->Set(compatibility_new<v8::String>(isolate, "cast"),
compatibility_new<v8::FunctionTemplate>(isolate, &cast_function)->GetFunction());

View File

@ -221,17 +221,17 @@ get_value_from_c(efl::eina::js::complex_tag<const Eina_Iterator *, T, K>, v8::Is
std::abort();
}
template <typename T, typename U, typename K>
template <typename T, typename KT, typename U, typename KU>
inline v8::Local<v8::Value>
get_value_from_c(efl::eina::js::complex_tag<Eina_Hash *, T, U, K>, v8::Isolate*, const char*)
get_value_from_c(efl::eina::js::complex_tag<Eina_Hash *, T, KT, U, KU>, v8::Isolate*, const char*)
{
std::cerr << "get_value_from_c for Eina_Hash not implemented. Aborting..." << std::endl;
std::abort();
}
template <typename T, typename U, typename K>
template <typename T, typename KT, typename U, typename KU>
inline v8::Local<v8::Value>
get_value_from_c(efl::eina::js::complex_tag<const Eina_Hash *, T, U, K>, v8::Isolate*, const char*)
get_value_from_c(efl::eina::js::complex_tag<const Eina_Hash *, T, KT, U, KU>, v8::Isolate*, const char*)
{
std::cerr << "get_value_from_c for Eina_Hash not implemented. Aborting..." << std::endl;
std::abort();

View File

@ -38,7 +38,7 @@ struct arg_index<In, 0> : std::integral_constant<std::size_t, 0>
template <typename In, typename Out, typename Ownership, typename F, typename Return, typename Parameters>
struct method_caller
{
typedef typename eina::_mpl::function_params<F>::type parameters_t;
typedef typename eo::js::eo_function_params<F>::type parameters_t;
template <std::size_t I>
struct is_out : eina::_mpl::tuple_contains<std::integral_constant<std::size_t, I>, Out>
@ -190,7 +190,7 @@ struct method_caller
template <typename OutParameters, std::size_t... I>
eina::js::compatibility_return_type
aux(eina::js::compatibility_callback_info_type args, eina::index_sequence<I...>
aux(Eo* eo, eina::js::compatibility_callback_info_type args, eina::index_sequence<I...>
, std::true_type) const
{
typename eina::_mpl::tuple_transform<Out, out_transform<parameters_t> >::type outs {};
@ -200,13 +200,13 @@ struct method_caller
{(init_inout<I>(args, outs, args.GetIsolate(), class_names[I], typename is_inout<I>::type()), 0)...};
static_cast<void>(l);
function(get_value<I>(args, outs, args.GetIsolate(), class_names[I], typename is_out<I>::type())...);
function(eo, get_value<I>(args, outs, args.GetIsolate(), class_names[I], typename is_out<I>::type())...);
return create_return_value<OutParameters>(args, outs);
}
template <typename OutParameters, std::size_t... I>
eina::js::compatibility_return_type
aux(eina::js::compatibility_callback_info_type args, eina::index_sequence<I...>
aux(Eo* eo, eina::js::compatibility_callback_info_type args, eina::index_sequence<I...>
, std::false_type) const
{
typename eina::_mpl::tuple_transform<Out, out_transform<parameters_t> >::type outs {};
@ -217,7 +217,7 @@ struct method_caller
static_cast<void>(l);
typename eina::_mpl::function_return<F>::type r =
function(get_value<I>(args, outs, args.GetIsolate(), class_names[I], typename is_out<I>::type())...);
function(eo, get_value<I>(args, outs, args.GetIsolate(), class_names[I], typename is_out<I>::type())...);
return create_return_value<OutParameters>(args, r, outs);
}
@ -243,13 +243,9 @@ struct method_caller
Eo* eo = static_cast<Eo*>(v8::External::Cast(*external)->Value());
try
{
eo_do
(eo,
aux<OutParameters>(
args,
eina::make_index_sequence<std::tuple_size<parameters_t>::value>(),
std::is_same<void, Return>())
);
aux<OutParameters>(eo, args,
eina::make_index_sequence<std::tuple_size<parameters_t>::value>(),
std::is_same<void, Return>());
}
catch(std::logic_error const&)
{

View File

@ -15,6 +15,21 @@
namespace efl { namespace eo { namespace js {
template <typename T>
struct eo_function_params;
template <typename R, typename... P>
struct eo_function_params<R(*)(Eo*, P...)>
{
typedef std::tuple<P...> type;
};
template <typename R, typename... P>
struct eo_function_params<R(*)(Eo const*, P...)>
{
typedef std::tuple<P...> type;
};
inline eina::js::compatibility_return_type constructor(eina::js::compatibility_callback_info_type args)
{
if(args.IsConstructCall())
@ -45,7 +60,7 @@ struct constructor_caller
void operator()(T function) const
{
int const parameters
= std::tuple_size<typename eina::_mpl::function_params<T>::type>::value;
= std::tuple_size<typename eo::js::eo_function_params<T>::type>::value;
if(*current + parameters <= args->Length())
{
aux(function, eina::make_index_sequence<parameters>());
@ -62,24 +77,25 @@ struct constructor_caller
template <typename U, std::size_t I>
static
typename std::tuple_element<I, typename eina::_mpl::function_params<U>::type>::type
typename std::tuple_element<I, typename eo::js::eo_function_params<U>::type>::type
get_value(v8::Local<v8::Value> v, v8::Isolate* isolate)
{
typename std::tuple_element<I, typename eina::_mpl::function_params<U>::type>::type
typename std::tuple_element<I, typename eo::js::eo_function_params<U>::type>::type
tmp =
eina::js::get_value_from_javascript
(v, isolate, ""
, eina::js::value_tag<typename std::tuple_element
<I, typename eina::_mpl::function_params<U>::type>::type>());
<I, typename eo::js::eo_function_params<U>::type>::type>());
return tmp;
}
template <typename T, std::size_t... I>
void aux(T function, eina::index_sequence<I...>) const
{
function(get_value<T, I>((*args)[I + *current], args->GetIsolate())...);
function(obj_eo_self, get_value<T, I>((*args)[I + *current], args->GetIsolate())...);
}
Eo* obj_eo_self;
int* current;
eina::js::compatibility_callback_info_pointer args;
};
@ -96,7 +112,7 @@ struct constructor_caller
Eo* eo = eo_add
(klass
, parent
, eina::_mpl::for_each(constructors, call{&current_index, &args})
, eina::_mpl::for_each(constructors, call{eo_self, &current_index, &args})
);
assert(eo != 0);
v8::Local<v8::Object> self = args.This();

View File

@ -54,18 +54,17 @@ inline v8::Local<v8::Value> get_event_info<void>(void*, v8::Isolate* isolate, co
}
template <typename T>
inline Eina_Bool event_callback(void* data, Eo* obj, Eo_Event_Description const*
, void* event_info)
inline Eina_Bool event_callback(void* data, Eo_Event const* eo_event)
{
v8::Isolate* isolate = v8::Isolate::GetCurrent();
v8::HandleScope handle_scope(isolate);
event_callback_information* event = static_cast<event_callback_information*>(data);
v8::Handle<v8::Value> a[] = {eina::js::compatibility_new<v8::External>(isolate, obj)};
v8::Handle<v8::Value> a[] = {eina::js::compatibility_new<v8::External>(isolate, eo_event->obj)};
v8::Local<v8::Object> self = (event->event_info->constructor->handle())->NewInstance(1, a);
v8::Local<v8::Value> call_args[] = {
self,
get_event_info<T>(event_info, isolate, event->event_info->class_name)
get_event_info<T>(eo_event->event_info, isolate, event->event_info->class_name)
};
event->function.handle()->Call(eina::js::compatibility_global(), 2, call_args);
@ -100,8 +99,7 @@ inline eina::js::compatibility_return_type on_event(eina::js::compatibility_call
event_callback_information* i = new event_callback_information
{event, {isolate, eina::js::compatibility_cast<v8::Function>(f)}};
eo_do(eo, eo_event_callback_priority_add
(event->event, EO_CALLBACK_PRIORITY_DEFAULT, event->event_callback, i));
eo_event_callback_add(eo, event->event, event->event_callback, i);
}
else
{

View File

@ -42,9 +42,9 @@ using efl::eina::js::compatibility_return;
using efl::eina::js::compatibility_new;
#define JS_BENCHMARK_ARGS0(v)
#define JS_BENCHMARK_ARGS1(v) v
#define JS_BENCHMARK_ARGS2(v) v,v
#define JS_BENCHMARK_ARGS10(v) v,v,v,v,v,v,v,v,v,v
#define JS_BENCHMARK_ARGS1(v) ,v
#define JS_BENCHMARK_ARGS2(v) ,v,v
#define JS_BENCHMARK_ARGS10(v) ,v,v,v,v,v,v,v,v,v,v
#define JS_BENCHMARK_FUNC(name, number, v) \
compatibility_return_type js_benchmark_object_##name##arg(compatibility_callback_info_type) \
{ \
@ -55,13 +55,13 @@ using efl::eina::js::compatibility_new;
/* Warm */ \
for(int i = 0; i != 10; i++) \
{ \
eo_do(object, benchmark_object_##name##arg(JS_BENCHMARK_ARGS##number(v))); \
benchmark_object_##name##arg(object JS_BENCHMARK_ARGS##number(v)); \
} \
/* Real loop */ \
eina_counter_start(counter); \
for(int i = 0; i != 20000; i++) \
{ \
eo_do(object, benchmark_object_##name##arg(JS_BENCHMARK_ARGS##number(v))); \
benchmark_object_##name##arg(object JS_BENCHMARK_ARGS##number(v)); \
} \
eina_counter_stop(counter, 20000); \
fprintf(stderr, "%s", eina_counter_dump(counter)); \

View File

@ -31,7 +31,7 @@ if(typeof process !== 'undefined')
}
else
{
assert = function(test, message) { if (test !== true) throw message; };
assert = function(test, message) { if (!test) throw message; };
print('running from libv8')
//FIXME Add levels to v8 tests
printError = print
@ -99,9 +99,9 @@ startTest("integral_in_and_out_parameters", function() {
var obj = new TestObject(null);
var expectedValue = 1234;
obj.methodIntegralInA(expectedValue);
obj.checkMethodIntegralInA(expectedValue);
var actualValue = obj.methodIntegralOutA();
var actualValue = obj.checkMethodIntegralOutA();
assert(actualValue == expectedValue, actualValue + " == " + expectedValue);
});
@ -109,11 +109,11 @@ startTest("integral_inout_parameter", function() {
var obj = new TestObject(null);
var expectedValue = 1234;
var actualValue = obj.methodIntegralInout(-expectedValue);
var actualValue = obj.checkMethodIntegralInout(-expectedValue);
assert(actualValue == expectedValue, actualValue + " == " + expectedValue);
var expectedValue = -4321;
var actualValue = obj.methodIntegralInout(-expectedValue);
var actualValue = obj.checkMethodIntegralInout(-expectedValue);
assert(actualValue == expectedValue, actualValue + " == " + expectedValue);
});
@ -121,38 +121,38 @@ startTest("integral_return_value", function() {
var obj = new TestObject(null);
var expectedValue = 1234;
obj.methodIntegralInA(expectedValue);
obj.checkMethodIntegralInA(expectedValue);
var actualValue = obj.methodIntegralReturnA();
var actualValue = obj.checkMethodIntegralReturnA();
assert(actualValue == expectedValue, actualValue + " == " + expectedValue);
});
startTest("more_parameters_than_expected_is_ok", function() {
var obj = new TestObject(null);
var expectedValue = 1234;
obj.methodIntegralInA(expectedValue, 4321);
obj.checkMethodIntegralInA(expectedValue, 4321);
var actualValue = obj.methodIntegralOutA();
var actualValue = obj.checkMethodIntegralOutA();
assert(actualValue == expectedValue, actualValue + " == " + expectedValue);
});
startTest("less_parameters_that_expected_fails", function() {
var obj = new TestObject(null);
expectException(function() {
obj.methodIntegralInA();
obj.checkMethodIntegralInA();
});
});
startTest("wrong_parameter_type_fails", function() {
var obj = new TestObject(null);
expectException(function() {
obj.methodIntegralInA('string');
obj.checkMethodIntegralInA('string');
});
});
startTest("mixed_in_out_and_result", function() {
var obj = new TestObject(null);
var ret = obj.methodDivMod(7, 3);
var ret = obj.checkMethodDivMod(7, 3);
var success = ret[0];
var quotient = ret[1];
var remainder = ret[2];
@ -160,46 +160,46 @@ startTest("mixed_in_out_and_result", function() {
assert(2 == quotient);
assert(1 == remainder);
ret = obj.methodDivMod(42, 0);
ret = obj.checkMethodDivMod(42, 0);
success = ret[0];
assert(!success);
});
startTest("boolean", function() {
var obj = new TestObject(null);
var ret = obj.methodAnd(false, false);
var ret = obj.checkMethodAnd(false, false);
assert(ret == false);
ret = obj.methodAnd(false, true);
ret = obj.checkMethodAnd(false, true);
assert(ret == false);
ret = obj.methodAnd(true, false);
ret = obj.checkMethodAnd(true, false);
assert(ret == false);
ret = obj.methodAnd(true, true);
ret = obj.checkMethodAnd(true, true);
assert(ret);
});
startTest("floating_point", function() {
var obj = new TestObject(null);
var ret = obj.methodModf(3.14159);
var ret = obj.checkMethodModf(3.14159);
assert(Math.abs(ret[0] - 0.14159) < 0.00001, "Math.abs(ret[0] - 0.14159) < 0.00001 (" + Math.abs(ret[0] - 0.14159) + " < 0.00001)");
assert(ret[1] == 3, "ret[1] == 3 (" + ret[1] + " == 3)");
});
startTest("string_inout", function() {
var obj = new TestObject(null);
var ret = obj.methodUppercase('hello world');
var ret = obj.checkMethodUppercase('hello world');
assert(ret == "HELLO WORLD", "ret == " + ret);
});
startTest("in_null_string", function() {
var obj = new TestObject(null);
var success = obj.methodInNull(null);
var success = obj.checkMethodInNull(null);
assert(success, "success == " + success);
});
startTest("out_null_string", function() {
var obj = new TestObject(null);
var ret = obj.methodOutNull();
var ret = obj.checkMethodOutNull();
assert(ret[0], "success == " + ret[0]);
assert(ret[1] === null, "output == " + ret[1]);
});
@ -207,7 +207,7 @@ startTest("out_null_string", function() {
startTest("inout_null_string", function() {
var obj = new TestObject(null);
var ret = obj.methodInoutNull(null);
var ret = obj.checkMethodInoutNull(null);
assert(ret[0], "success == " + ret[0]);
assert(ret[1] === null, "output == " + ret[1]);
});
@ -215,14 +215,14 @@ startTest("inout_null_string", function() {
startTest("return_null_string", function() {
var obj = new TestObject(null);
var ret = obj.methodReturnNull();
var ret = obj.checkMethodReturnNull();
assert(ret === null, "ret == " + ret);
});
startTest("null_values", function() {
var obj = new TestObject(null);
var ret = obj.methodNull(null, null);
var ret = obj.checkMethodNull(null, null);
assert(ret[0] === null, "ret == " + ret[0]);
assert(ret[1] === null, "ret == " + ret[1]);
assert(ret[2] === null, "ret == " + ret[2]);
@ -230,11 +230,11 @@ startTest("null_values", function() {
startTest("enum_values", function() {
var obj = new TestObject(null);
var ret = obj.methodInEnumReturnEnum(suite.Test.EnumEx.SECOND);
var ret = obj.checkMethodInEnumReturnEnum(suite.Test.EnumEx.SECOND);
assert(ret === suite.Test.EnumEx.SECOND);
var value = suite.Test.EnumEx.THIRD;
assert(value === 2);
ret = obj.methodInEnumReturnEnum(value);
ret = obj.checkMethodInEnumReturnEnum(value);
assert(ret === value);
});
@ -247,7 +247,7 @@ startTest("struct_values", function() {
assert(ret === 42);
ret = newStruct.valueEnum;
assert(ret === suite.Test.EnumEx.FOURTH);
ret = obj.methodInStructReturnStruct(newStruct);
ret = obj.checkMethodInStructReturnStruct(newStruct);
assert(ret.valueInt === 42);
assert(ret.valueEnum === suite.Test.EnumEx.FOURTH);
});
@ -264,7 +264,7 @@ startTest("event_simple", function() {
}
);
printInfo('going to call event');
obj.callEvent();
obj.emitEvent();
printInfo('is event called?');
assert(v);
});
@ -280,14 +280,14 @@ startTest("event_object_call", function() {
var o = arguments[0];
assert(o != null);
var expectedValue = 1234;
o.methodIntegralInA(expectedValue);
var actualValue = o.methodIntegralOutA();
o.checkMethodIntegralInA(expectedValue);
var actualValue = o.checkMethodIntegralOutA();
assert(actualValue == expectedValue, actualValue + " == " + expectedValue);
v = true;
}
);
printInfo('going to call event');
obj.callEvent();
obj.emitEvent();
printInfo('is event called?');
assert(v);
});
@ -296,7 +296,7 @@ startTest("event_structarg", function() {
var v = false;
var obj = new TestObject(null);
var ret = obj.on
("test_structarg",
("test,structarg",
function()
{
printInfo('Event called');
@ -308,7 +308,7 @@ startTest("event_structarg", function() {
}
);
printInfo('going to call event');
obj.callEvent();
obj.emitEvent();
printInfo('is event called?');
assert(v);
});
@ -317,7 +317,7 @@ startTest("event_stringarg", function() {
var v = false;
var obj = new TestObject(null);
var ret = obj.on
("test_stringarg",
("test,stringarg",
function()
{
printInfo('Event called');
@ -327,7 +327,7 @@ startTest("event_stringarg", function() {
}
);
printInfo('going to call event');
obj.callEvent();
obj.emitEvent();
printInfo('is event called?');
assert(v);
});
@ -335,15 +335,15 @@ startTest("event_stringarg", function() {
// // TODO: disabled. Not implemented yet
// startTest("integral_array", function() {
// var obj = new TestObject(null);
// var ret = obj.methodArrayAt([1, 2, 3, 4, 5], 1);
// var ret = obj.checkMethodArrayAt([1, 2, 3, 4, 5], 1);
// assert(ret == 2, "ret == " + ret);
// });
startTest("array_in_array_out", function() {
var obj = new TestObject(null);
var newArray = obj.methodArrayWith42();
var newArray = obj.checkMethodArrayWith42();
assert(newArray != null);
var arr = obj.methodArrayInArrayOut(newArray);
var arr = obj.checkMethodArrayInArrayOut(newArray);
assert(arr != null);
assert(arr[0] === 42);
assert(newArray[0] === arr[0]);
@ -351,80 +351,80 @@ startTest("array_in_array_out", function() {
startTest("method_array_of_objects", function() {
var obj = new TestObject(null);
var arr = obj.methodArrayOfObjects(null);
var arr = obj.checkMethodArrayOfObjects(null);
assert(arr != null);
assert(arr[0] != null);
arr = obj.methodArrayOfObjects(arr);
arr = obj.checkMethodArrayOfObjects(arr);
assert(arr != null);
var v = arr[0];
assert(v != null);
// assert(v == obj); // TODO: check if same Eo object pointer?
var expectedValue = 1234;
v.methodIntegralInA(expectedValue);
var actualValue = v.methodIntegralOutA();
v.checkMethodIntegralInA(expectedValue);
var actualValue = v.checkMethodIntegralOutA();
assert(actualValue == expectedValue, actualValue + " == " + expectedValue);
});
// FIXME
// startTest("method_array_of_strings", function() {
// var obj = new TestObject(null);
// var arr = obj.methodArrayOfStrings(null);
// var arr = obj.checkMethodArrayOfStrings(null);
// assert(arr != null);
// assert(arr[0] === "foo");
// arr = obj.methodArrayOfStrings(arr);
// arr = obj.checkMethodArrayOfStrings(arr);
// assert(arr != null);
// assert(arr[0] === "foo");
// });
startTest("method_array_of_ints", function() {
var obj = new TestObject(null);
var arr = obj.methodArrayOfInts(null);
var arr = obj.checkMethodArrayOfInts(null);
assert(arr != null);
assert(arr[0] === 42);
arr = obj.methodArrayOfInts(arr);
arr = obj.checkMethodArrayOfInts(arr);
assert(arr != null);
assert(arr[0] === 42);
});
startTest("method_array_of_bools", function() {
var obj = new TestObject(null);
var arr = obj.methodArrayOfBools(null);
var arr = obj.checkMethodArrayOfBools(null);
assert(arr != null);
assert(arr[0] === true);
arr = obj.methodArrayOfBools(arr);
arr = obj.checkMethodArrayOfBools(arr);
assert(arr != null);
assert(arr[0] === true);
});
startTest("method_array_of_doubles", function() {
var obj = new TestObject(null);
var arr = obj.methodArrayOfDoubles(null);
var arr = obj.checkMethodArrayOfDoubles(null);
assert(arr != null);
assert(arr[0] === 42.0);
arr = obj.methodArrayOfDoubles(arr);
arr = obj.checkMethodArrayOfDoubles(arr);
assert(arr != null);
assert(arr[0] === 42.0);
});
startTest("method_array_of_enums", function() {
var obj = new TestObject(null);
var arr = obj.methodArrayOfEnums(null);
var arr = obj.checkMethodArrayOfEnums(null);
assert(arr != null);
assert(arr[0] === suite.Test.EnumEx.THIRD);
arr = obj.methodArrayOfEnums(arr);
arr = obj.checkMethodArrayOfEnums(arr);
assert(arr != null);
assert(arr[0] === suite.Test.EnumEx.THIRD);
});
startTest("method_array_of_structs", function() {
var obj = new TestObject(null);
var arr = obj.methodArrayOfStructs(null);
var arr = obj.checkMethodArrayOfStructs(null);
assert(arr != null);
var s = arr[0];
assert(s != null);
assert(s.valueInt === 42);
assert(s.valueEnum === suite.Test.EnumEx.THIRD);
arr = obj.methodArrayOfStructs(arr);
arr = obj.checkMethodArrayOfStructs(arr);
s = arr[0];
assert(s != null);
assert(s.valueInt === 42);
@ -433,9 +433,9 @@ startTest("method_array_of_structs", function() {
startTest("list_in_list_out", function() {
var obj = new TestObject(null);
var newList = obj.methodListWith42();
var newList = obj.checkMethodListWith42();
assert(newList != null);
var lis = obj.methodListInListOut(newList);
var lis = obj.checkMethodListInListOut(newList);
assert(lis != null);
// assert(lis == newList); // TODO: check same list pointer?
assert(lis[0] === 42);
@ -444,80 +444,80 @@ startTest("list_in_list_out", function() {
startTest("method_list_of_objects", function() {
var obj = new TestObject(null);
var lis = obj.methodListOfObjects(null);
var lis = obj.checkMethodListOfObjects(null);
assert(lis != null);
assert(lis[0] != null);
lis = obj.methodListOfObjects(lis);
lis = obj.checkMethodListOfObjects(lis);
assert(lis != null);
var v = lis[0];
assert(v != null);
// assert(v == obj); // TODO: check if same Eo object pointer?
var expectedValue = 1234;
v.methodIntegralInA(expectedValue);
var actualValue = v.methodIntegralOutA();
v.checkMethodIntegralInA(expectedValue);
var actualValue = v.checkMethodIntegralOutA();
assert(actualValue == expectedValue, actualValue + " == " + expectedValue);
});
// FIXME
// startTest("method_list_of_strings", function() {
// var obj = new TestObject(null);
// var lis = obj.methodListOfStrings(null);
// var lis = obj.checkMethodListOfStrings(null);
// assert(lis != null);
// assert(lis[0] === "foo");
// lis = obj.methodListOfStrings(lis);
// lis = obj.checkMethodListOfStrings(lis);
// assert(lis != null);
// assert(lis[0] === "foo");
// });
startTest("method_list_of_ints", function() {
var obj = new TestObject(null);
var lis = obj.methodListOfInts(null);
var lis = obj.checkMethodListOfInts(null);
assert(lis != null);
assert(lis[0] === 42);
lis = obj.methodListOfInts(lis);
lis = obj.checkMethodListOfInts(lis);
assert(lis != null);
assert(lis[0] === 42);
});
startTest("method_list_of_bools", function() {
var obj = new TestObject(null);
var lis = obj.methodListOfBools(null);
var lis = obj.checkMethodListOfBools(null);
assert(lis != null);
assert(lis[0] === true);
lis = obj.methodListOfBools(lis);
lis = obj.checkMethodListOfBools(lis);
assert(lis != null);
assert(lis[0] === true);
});
startTest("method_list_of_doubles", function() {
var obj = new TestObject(null);
var lis = obj.methodListOfDoubles(null);
var lis = obj.checkMethodListOfDoubles(null);
assert(lis != null);
assert(lis[0] === 42.0);
lis = obj.methodListOfDoubles(lis);
lis = obj.checkMethodListOfDoubles(lis);
assert(lis != null);
assert(lis[0] === 42.0);
});
startTest("method_list_of_enums", function() {
var obj = new TestObject(null);
var lis = obj.methodListOfEnums(null);
var lis = obj.checkMethodListOfEnums(null);
assert(lis != null);
assert(lis[0] === suite.Test.EnumEx.THIRD);
lis = obj.methodListOfEnums(lis);
lis = obj.checkMethodListOfEnums(lis);
assert(lis != null);
assert(lis[0] === suite.Test.EnumEx.THIRD);
});
startTest("method_list_of_structs", function() {
var obj = new TestObject(null);
var lis = obj.methodListOfStructs(null);
var lis = obj.checkMethodListOfStructs(null);
assert(lis != null);
var s = lis[0];
assert(s != null);
assert(s.valueInt === 42);
assert(s.valueEnum === suite.Test.EnumEx.THIRD);
lis = obj.methodListOfStructs(lis);
lis = obj.checkMethodListOfStructs(lis);
s = lis[0];
assert(s != null);
assert(s.valueInt === 42);
@ -526,79 +526,79 @@ startTest("method_list_of_structs", function() {
startTest("method_accessor_of_objects", function() {
var obj = new TestObject(null);
var acc = obj.methodAccessorOfObjects(null);
var acc = obj.checkMethodAccessorOfObjects(null);
assert(acc != null);
assert(acc.get(0) != null);
acc = obj.methodAccessorOfObjects(acc);
acc = obj.checkMethodAccessorOfObjects(acc);
assert(acc != null);
var v = acc.get(0);
assert(v != null);
var expectedValue = 1234;
v.methodIntegralInA(expectedValue);
var actualValue = v.methodIntegralOutA();
v.checkMethodIntegralInA(expectedValue);
var actualValue = v.checkMethodIntegralOutA();
assert(actualValue == expectedValue, actualValue + " == " + expectedValue);
});
// FIXME
// startTest("method_accessor_of_strings", function() {
// var obj = new TestObject(null);
// var acc = obj.methodAccessorOfStrings(null);
// var acc = obj.checkMethodAccessorOfStrings(null);
// assert(acc != null);
// assert(acc.get(0) === "foo");
// acc = obj.methodAccessorOfStrings(acc);
// acc = obj.checkMethodAccessorOfStrings(acc);
// assert(acc != null);
// assert(acc.get(0) === "foo");
// });
startTest("method_accessor_of_ints", function() {
var obj = new TestObject(null);
var acc = obj.methodAccessorOfInts(null);
var acc = obj.checkMethodAccessorOfInts(null);
assert(acc != null);
assert(acc.get(0) === 42);
acc = obj.methodAccessorOfInts(acc);
acc = obj.checkMethodAccessorOfInts(acc);
assert(acc != null);
assert(acc.get(0) === 42);
});
startTest("method_accessor_of_bools", function() {
var obj = new TestObject(null);
var acc = obj.methodAccessorOfBools(null);
var acc = obj.checkMethodAccessorOfBools(null);
assert(acc != null);
assert(acc.get(0) === true);
acc = obj.methodAccessorOfBools(acc);
acc = obj.checkMethodAccessorOfBools(acc);
assert(acc != null);
assert(acc.get(0) === true);
});
startTest("method_accessor_of_doubles", function() {
var obj = new TestObject(null);
var acc = obj.methodAccessorOfDoubles(null);
var acc = obj.checkMethodAccessorOfDoubles(null);
assert(acc != null);
assert(acc.get(0) === 42.0);
acc = obj.methodAccessorOfDoubles(acc);
acc = obj.checkMethodAccessorOfDoubles(acc);
assert(acc != null);
assert(acc.get(0) === 42.0);
});
startTest("method_accessor_of_enums", function() {
var obj = new TestObject(null);
var acc = obj.methodAccessorOfEnums(null);
var acc = obj.checkMethodAccessorOfEnums(null);
assert(acc != null);
assert(acc.get(0) === suite.Test.EnumEx.THIRD);
acc = obj.methodAccessorOfEnums(acc);
acc = obj.checkMethodAccessorOfEnums(acc);
assert(acc != null);
assert(acc.get(0) === suite.Test.EnumEx.THIRD);
});
startTest("method_accessor_of_structs", function() {
var obj = new TestObject(null);
var acc = obj.methodAccessorOfStructs(null);
var acc = obj.checkMethodAccessorOfStructs(null);
assert(acc != null);
var s = acc.get(0);
assert(s != null);
assert(s.valueInt === 42);
assert(s.valueEnum === suite.Test.EnumEx.THIRD);
acc = obj.methodAccessorOfStructs(acc);
acc = obj.checkMethodAccessorOfStructs(acc);
assert(acc != null);
s = acc.get(0);
assert(s != null);
@ -611,12 +611,12 @@ startTest("method_accessor_of_structs", function() {
// FIXME
// startTest("method_array_of_arrays_of_ints", function() {
// var obj = new TestObject(null);
// var arr = obj.methodArrayOfArraysOfInts(null);
// var arr = obj.checkMethodArrayOfArraysOfInts(null);
// assert(arr != null);
// var a = arr[0];
// assert(a != null);
// assert(a[0] === 42);
// arr = obj.methodArrayOfArraysOfInts(arr);
// arr = obj.checkMethodArrayOfArraysOfInts(arr);
// assert(arr != null);
// a = arr[0];
// assert(a != null);
@ -626,12 +626,12 @@ startTest("method_accessor_of_structs", function() {
// FIXME
// startTest("method_list_of_lists_of_ints", function() {
// var obj = new TestObject(null);
// var lis = obj.methodListOfListsOfInts(null);
// var lis = obj.checkMethodListOfListsOfInts(null);
// assert(lis != null);
// var l = lis[0];
// assert(l != null);
// assert(l[0] === 42);
// lis = obj.methodListOfListsOfInts(lis);