Optimized ASSIGN_DIM and related opcodes