switch to 'b' for branches

This commit is contained in:
Vern Paxson 2024-06-09 13:31:52 -07:00
parent 7b65341104
commit 6272db4cdd
15 changed files with 144 additions and 137 deletions

View file

@ -336,8 +336,8 @@ void ZAMCompiler::ComputeFrameLifetimes() {
// Some special-casing.
switch ( inst->op ) {
case OP_NEXT_TABLE_ITER_ii:
case OP_NEXT_TABLE_ITER_VAL_VAR_Vii: {
case OP_NEXT_TABLE_ITER_ib:
case OP_NEXT_TABLE_ITER_VAL_VAR_Vib: {
// These assign to an arbitrary long list of variables.
auto& iter_vars = inst->aux->loop_vars;
auto depth = inst->loop_depth;
@ -361,21 +361,21 @@ void ZAMCompiler::ComputeFrameLifetimes() {
}
// No need to check the additional "var" associated
// with OP_NEXT_TABLE_ITER_VAL_VAR_Vii as that's
// with OP_NEXT_TABLE_ITER_VAL_VAR_Vib as that's
// a slot-1 assignment. However, similar to other
// loop variables, mark this as a usage.
if ( inst->op == OP_NEXT_TABLE_ITER_VAL_VAR_Vii )
if ( inst->op == OP_NEXT_TABLE_ITER_VAL_VAR_Vib )
ExtendLifetime(inst->v1, EndOfLoop(inst, depth));
} break;
case OP_NEXT_TABLE_ITER_NO_VARS_ii: break;
case OP_NEXT_TABLE_ITER_NO_VARS_ib: break;
case OP_NEXT_TABLE_ITER_VAL_VAR_NO_VARS_Vii: {
case OP_NEXT_TABLE_ITER_VAL_VAR_NO_VARS_Vib: {
auto depth = inst->loop_depth;
ExtendLifetime(inst->v1, EndOfLoop(inst, depth));
} break;
case OP_NEXT_VECTOR_ITER_VAL_VAR_VVii: {
case OP_NEXT_VECTOR_ITER_VAL_VAR_VVib: {
CheckSlotAssignment(inst->v2, inst);
auto depth = inst->loop_depth;
@ -383,13 +383,13 @@ void ZAMCompiler::ComputeFrameLifetimes() {
ExtendLifetime(inst->v2, EndOfLoop(inst, depth));
} break;
case OP_NEXT_VECTOR_BLANK_ITER_VAL_VAR_Vii: {
case OP_NEXT_VECTOR_BLANK_ITER_VAL_VAR_Vib: {
auto depth = inst->loop_depth;
ExtendLifetime(inst->v1, EndOfLoop(inst, depth));
} break;
case OP_NEXT_VECTOR_ITER_Vii:
case OP_NEXT_STRING_ITER_Vii:
case OP_NEXT_VECTOR_ITER_Vib:
case OP_NEXT_STRING_ITER_Vib:
// Sometimes loops are written that don't actually
// use the iteration variable. However, we still
// need to mark the variable as having usage
@ -401,8 +401,8 @@ void ZAMCompiler::ComputeFrameLifetimes() {
ExtendLifetime(inst->v1, EndOfLoop(inst, inst->loop_depth));
break;
case OP_NEXT_VECTOR_BLANK_ITER_ii:
case OP_NEXT_STRING_BLANK_ITER_ii: break;
case OP_NEXT_VECTOR_BLANK_ITER_ib:
case OP_NEXT_STRING_BLANK_ITER_ib: break;
case OP_INIT_TABLE_LOOP_Vi:
case OP_INIT_VECTOR_LOOP_Vi:
@ -549,8 +549,8 @@ void ZAMCompiler::ReMapFrame() {
// Handle special cases.
switch ( inst->op ) {
case OP_NEXT_TABLE_ITER_ii:
case OP_NEXT_TABLE_ITER_VAL_VAR_Vii: {
case OP_NEXT_TABLE_ITER_ib:
case OP_NEXT_TABLE_ITER_VAL_VAR_Vib: {
// Rewrite iteration variables.
auto& iter_vars = inst->aux->loop_vars;
for ( auto& v : iter_vars ) {