forked from enlightenment/efl
eolian: move deferred eo file parsing to the very end
Because of this the cyclic check would occasionally have false positives. By moving deferred eo parsing to the end of the whole parse process, it can no longer affect the cyclic checker. @fix
This commit is contained in:
parent
2001907bfd
commit
f7e09d3570
|
@ -234,7 +234,6 @@ eo_parser_database_fill(const char *filename, Eina_Bool eot)
|
|||
Eina_Iterator *itr;
|
||||
Eolian_Class *cl;
|
||||
Eo_Lexer *ls;
|
||||
const char *dep;
|
||||
|
||||
if (eina_hash_find(_parsedeos, filename))
|
||||
return EINA_TRUE;
|
||||
|
@ -298,20 +297,6 @@ eo_parser_database_fill(const char *filename, Eina_Bool eot)
|
|||
}
|
||||
eina_iterator_free(itr);
|
||||
|
||||
/* parse deferred eos (doc dependencies) */
|
||||
itr = eina_hash_iterator_data_new(_defereos);
|
||||
EINA_ITERATOR_FOREACH(itr, dep)
|
||||
{
|
||||
if (!eina_hash_find(_parsingeos, dep) && !eolian_file_parse(dep))
|
||||
{
|
||||
eina_iterator_free(itr);
|
||||
eina_hash_free_buckets(_defereos);
|
||||
goto error;
|
||||
}
|
||||
}
|
||||
eina_iterator_free(itr);
|
||||
eina_hash_free_buckets(_defereos);
|
||||
|
||||
done:
|
||||
eina_hash_set(_parsedeos, filename, (void *)EINA_TRUE);
|
||||
eina_hash_set(_parsingeos, filename, (void *)EINA_FALSE);
|
||||
|
|
|
@ -288,8 +288,8 @@ database_object_class_fill(const char *class_name, const Eolian_Class **cl)
|
|||
return found;
|
||||
}
|
||||
|
||||
EAPI Eina_Bool
|
||||
eolian_file_parse(const char *filepath)
|
||||
static Eina_Bool
|
||||
_eolian_file_parse_nodep(const char *filepath)
|
||||
{
|
||||
Eina_Bool is_eo;
|
||||
const char *eopath;
|
||||
|
@ -311,6 +311,28 @@ eolian_file_parse(const char *filepath)
|
|||
return eo_parser_database_fill(eopath, !is_eo);
|
||||
}
|
||||
|
||||
EAPI Eina_Bool
|
||||
eolian_file_parse(const char *filepath)
|
||||
{
|
||||
const char *dep;
|
||||
if (!_eolian_file_parse_nodep(filepath))
|
||||
return EINA_FALSE;
|
||||
/* parse doc dependencies (deferred eo files) */
|
||||
Eina_Iterator *itr = eina_hash_iterator_data_new(_defereos);
|
||||
EINA_ITERATOR_FOREACH(itr, dep)
|
||||
{
|
||||
if (!_eolian_file_parse_nodep(dep))
|
||||
{
|
||||
eina_iterator_free(itr);
|
||||
eina_hash_free_buckets(_defereos);
|
||||
return EINA_FALSE;
|
||||
}
|
||||
}
|
||||
eina_iterator_free(itr);
|
||||
eina_hash_free_buckets(_defereos);
|
||||
return EINA_TRUE;
|
||||
}
|
||||
|
||||
static Eina_Bool _tfile_parse(const Eina_Hash *hash EINA_UNUSED, const void *key EINA_UNUSED, void *data, void *fdata)
|
||||
{
|
||||
Eina_Bool *ret = fdata;
|
||||
|
|
Loading…
Reference in New Issue