コード例 #1
0
ファイル: blockinlining.c プロジェクト: RWB01/Code-Translator
static NODE *
new_block(NODE * head, NODE * tail)
{
    head = NEW_BLOCK(head);
    tail = NEW_BLOCK(tail);
    head->nd_next = tail;
    return head;
}
コード例 #2
0
ファイル: module.c プロジェクト: shmulim/ruby-internal
static void set_cref_stack(rb_iseq_t * iseqdat, VALUE klass, VALUE noex)
{
  VALUE thread = rb_thread_current();
  rb_thread_t * th;
  rb_control_frame_t * cfp;

  GetThreadPtr(thread, th);
  cfp = getcfp(th, th->cfp);
  iseqdat->cref_stack = NEW_BLOCK(klass);
  iseqdat->cref_stack->nd_visi = noex;
  iseqdat->cref_stack->nd_next = cfp->iseq->cref_stack; /* TODO: use lfp? */
}
コード例 #3
0
ファイル: SimBlockList.cpp プロジェクト: A-eolus/mysql
void 
SimBlockList::load(EmulatorData& data){
  noOfBlocks = NO_OF_BLOCKS;
  theList = new SimulatedBlock * [noOfBlocks];
  Dbdict* dbdict = 0;
  Dbdih* dbdih = 0;
  Pgman* pg = 0;
  Lgman* lg = 0;
  Tsman* ts = 0;

  Block_context ctx(*data.theConfiguration, *data.m_mem_manager);
  
  SimulatedBlock * fs = 0;
  {
    Uint32 dl;
    const ndb_mgm_configuration_iterator * p = 
      ctx.m_config.getOwnConfigIterator();
    if(p && !ndb_mgm_get_int_parameter(p, CFG_DB_DISCLESS, &dl) && dl){
      fs = NEW_BLOCK(VoidFs)(ctx);
    } else { 
      fs = NEW_BLOCK(Ndbfs)(ctx);
    }
  }
  
  theList[0]  = pg = NEW_BLOCK(Pgman)(ctx);
  theList[1]  = lg = NEW_BLOCK(Lgman)(ctx);
  theList[2]  = ts = NEW_BLOCK(Tsman)(ctx, pg, lg);
  theList[3]  = NEW_BLOCK(Dbacc)(ctx);
  theList[4]  = NEW_BLOCK(Cmvmi)(ctx);
  theList[5]  = fs;
  theList[6]  = dbdict = NEW_BLOCK(Dbdict)(ctx);
  theList[7]  = dbdih = NEW_BLOCK(Dbdih)(ctx);
  theList[8]  = NEW_BLOCK(Dblqh)(ctx);
  theList[9]  = NEW_BLOCK(Dbtc)(ctx);
  theList[10] = NEW_BLOCK(Dbtup)(ctx, pg);
  theList[11] = NEW_BLOCK(Ndbcntr)(ctx);
  theList[12] = NEW_BLOCK(Qmgr)(ctx);
  theList[13] = NEW_BLOCK(Trix)(ctx);
  theList[14] = NEW_BLOCK(Backup)(ctx);
  theList[15] = NEW_BLOCK(DbUtil)(ctx);
  theList[16] = NEW_BLOCK(Suma)(ctx);
  theList[17] = NEW_BLOCK(Dbtux)(ctx);
  theList[18] = NEW_BLOCK(Restore)(ctx);
  assert(NO_OF_BLOCKS == 19);
}