forked from KolibriOS/kolibrios
[asmxygen] Implement --stats key
git-svn-id: svn://kolibrios.org@8982 a494cfbc-eb01-0410-851d-a64ba20cac60
This commit is contained in:
parent
4c25714a78
commit
2995e59834
@ -1963,9 +1963,6 @@ if dump_symbols:
|
|||||||
for asm_element in elements:
|
for asm_element in elements:
|
||||||
asm_element.dump()
|
asm_element.dump()
|
||||||
|
|
||||||
if print_stats:
|
|
||||||
print("--stats is not nimplmented")
|
|
||||||
|
|
||||||
if clean_generated_stuff:
|
if clean_generated_stuff:
|
||||||
kernel_files_set = set(kernel_files)
|
kernel_files_set = set(kernel_files)
|
||||||
for file in kernel_files:
|
for file in kernel_files:
|
||||||
@ -1983,5 +1980,32 @@ elif not noemit:
|
|||||||
element.emit(doxygen_src_path)
|
element.emit(doxygen_src_path)
|
||||||
i += 1
|
i += 1
|
||||||
|
|
||||||
|
if print_stats:
|
||||||
|
var_count = 0
|
||||||
|
mac_count = 0
|
||||||
|
lab_count = 0
|
||||||
|
fun_count = 0
|
||||||
|
uni_count = 0
|
||||||
|
str_count = 0
|
||||||
|
for element in elements:
|
||||||
|
if type(element) == AsmVariable:
|
||||||
|
var_count += 1
|
||||||
|
elif type(element) == AsmMacro:
|
||||||
|
mac_count += 1
|
||||||
|
elif type(element) == AsmLabel:
|
||||||
|
lab_count += 1
|
||||||
|
elif type(element) == AsmFunction:
|
||||||
|
fun_count += 1
|
||||||
|
elif type(element) == AsmUnion:
|
||||||
|
uni_count += 1
|
||||||
|
elif type(element) == AsmStruct:
|
||||||
|
str_count += 1
|
||||||
|
print(f'Parsed variable count: {var_count}')
|
||||||
|
print(f'Parsed macro count: {mac_count}')
|
||||||
|
print(f'Parsed label count: {lab_count}')
|
||||||
|
print(f'Parsed function count: {fun_count}')
|
||||||
|
print(f'Parsed union type count: {uni_count}')
|
||||||
|
print(f'Parsed structure type count: {str_count}')
|
||||||
|
|
||||||
if enable_warnings:
|
if enable_warnings:
|
||||||
open('asmxygen.txt', "w", encoding = "utf-8").write(warnings)
|
open('asmxygen.txt', "w", encoding = "utf-8").write(warnings)
|
||||||
|
Loading…
Reference in New Issue
Block a user