void Decision::setWriteIns(QVariantList newWriteIns) { if (newWriteIns == writeIns()) return; auto writeInList = m_decision.initWriteIns(newWriteIns.size()); for (::UnsignedContest::Contestant::Builder writeInBuilder : writeInList) { auto writeIn = newWriteIns.takeFirst().toMap(); writeInBuilder.setName(writeIn["name"].toString().toStdString()); writeInBuilder.setDescription(writeIn["description"].toString().toStdString()); } emit writeInsChanged(); }
static void deQueue // TAKE (FIFO) INSTRUCTION FROM QUEUE ( void ) { PP_INS* ins; // - queued instruction ins = ins_queue->next; DbgVerify( NULL != ins, "Empty instruction queue" ); RingPrune( &ins_queue, ins ); IfDbgToggle( browse ) { DbgStmt( printf( "dequeued %s %x\n " , DbgIcOpcode( ins->opcode ) , ins->parm ) ); DbgStmt( DbgDumpTokenLocn( &ins->locn ) ); DbgStmt( printf( "\n" ) ); } writeIns( ins->opcode, ins->parm, &ins->locn ); CarveFree( carvePpIns, ins ); }
static void queue // PLACE INSTRUCTION ON QUEUE ( CGINTEROP opcode // - opcode , void const * parm // - parm for instruction , TOKEN_LOCN const * locn ) // - location for instruction { if( cursor.src_file == locn->src_file && NULL != cursor.src_file && opcode != IC_BR_SRC_END ) { writeIns( opcode, parm, locn ); } else { PP_INS* ins = RingCarveAlloc( carvePpIns, &ins_queue ); ins->opcode = opcode; ins->parm = parm; TokenLocnAssign( ins->locn, *locn ); IfDbgToggle( browse ) { DbgStmt( printf( "queued %s %x\n ", DbgIcOpcode( opcode ), parm ) ); DbgStmt( DbgDumpTokenLocn( locn ) ); DbgStmt( printf( "\n" ) ); } } }