bc: avoid bc_vec_item() calls in bc_vm_run()

function                                             old     new   delta
bc_vm_run                                            124     112     -12

Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
This commit is contained in:
Denys Vlasenko 2018-12-19 18:09:31 +01:00
parent eac0de55d6
commit ea5cad2a0d

View File

@ -6926,6 +6926,7 @@ static const char bc_lib[] ALIGN1 = {
static BC_STATUS zbc_vm_exec(void) static BC_STATUS zbc_vm_exec(void)
{ {
char **fname;
BcStatus s; BcStatus s;
size_t i; size_t i;
@ -6941,13 +6942,16 @@ static BC_STATUS zbc_vm_exec(void)
#endif #endif
s = BC_STATUS_SUCCESS; s = BC_STATUS_SUCCESS;
for (i = 0; !s && i < G.files.len; ++i) fname = (void*)G.files.v;
s = zbc_vm_file(*((char **) bc_vec_item(&G.files, i))); for (i = 0; i < G.files.len; i++) {
if (ENABLE_FEATURE_CLEAN_UP && s && !G_ttyin) { s = zbc_vm_file(*fname++);
// Debug config, non-interactive mode: if (ENABLE_FEATURE_CLEAN_UP && !G_ttyin && s) {
// return all the way back to main. // Debug config, non-interactive mode:
// Non-debug builds do not come here, they exit. // return all the way back to main.
RETURN_STATUS(s); // Non-debug builds do not come here
// in non-interactive mode, they exit.
RETURN_STATUS(s);
}
} }
if (IS_BC || (option_mask32 & BC_FLAG_I)) if (IS_BC || (option_mask32 & BC_FLAG_I))