Example #1
0
//creates an object instance from a va list
AWE_OBJECT *awe_create_object_va(AWE_CLASS *pclass, va_list params)
{
    AWE_OBJECT *obj;

    obj = (AWE_OBJECT *)calloc(1, pclass->size);
    if (!obj) return 0;
    _construct_object(obj, pclass);
    awe_set_object_properties_va(obj, params);
    return obj;
}
/* ChapelDistribution.chpl:271 */
static BaseArr _construct_BaseArr(atomic_refcnt* const _arrCnt, BaseArr _arrAlias, BaseArr meme, int64_t _ln, c_string _fn) {
  BaseArr this8 = NULL;
  object T = NULL;
  this8 = meme;
  T = &((this8)->super);
  _construct_object(T);
  (this8)->_arrCnt = *(_arrCnt);
  (this8)->_arrAlias = _arrAlias;
  return this8;
}
/* ChapelDistribution.chpl:119 */
static BaseDom _construct_BaseDom(atomic_refcnt* const _domCnt, list_BaseArr* const _arrs, atomicflag* const _arrsLock, BaseDom meme, int64_t _ln, c_string _fn) {
  BaseDom this8 = NULL;
  object T = NULL;
  this8 = meme;
  T = &((this8)->super);
  _construct_object(T);
  (this8)->_domCnt = *(_domCnt);
  (this8)->_arrs = *(_arrs);
  (this8)->_arrsLock = *(_arrsLock);
  return this8;
}
/* ChapelDistribution.chpl:31 */
static BaseDist _construct_BaseDist(atomic_refcnt* const _distCnt, list_BaseDom* const _doms, atomicflag* const _domsLock, BaseDist meme, int64_t _ln, c_string _fn) {
  BaseDist this8 = NULL;
  object T = NULL;
  this8 = meme;
  T = &((this8)->super);
  _construct_object(T);
  (this8)->_distCnt = *(_distCnt);
  (this8)->_doms = *(_doms);
  (this8)->_domsLock = *(_domsLock);
  return this8;
}
Example #5
0
/* ChapelBase.chpl:776 */
static chpl___EndCount _construct__EndCount(atomic_int64* const i, int64_t taskCnt, chpl_task_list_p taskList, chpl___EndCount meme, int64_t _ln, c_string _fn) {
  chpl___EndCount this8 = NULL;
  object T = NULL;
  this8 = meme;
  T = &((this8)->super);
  _construct_object(T);
  (this8)->i = *(i);
  (this8)->taskCnt = taskCnt;
  (this8)->taskList = taskList;
  return this8;
}
Example #6
0
/* ChapelIO.chpl:290 */
Writer _construct_Writer(Writer meme, int32_t _ln, _string _fn) {
    Writer T2 = NULL;
    chpl_bool T1;
    object T3 = NULL;
    T1 = (nil==meme);
    if (T1) {
        T2 = (Writer)chpl_alloc(sizeof(_Writer), "instance of class Writer", _ln, _fn);
        ((object)T2)->_cid = _e_Writer;
    } else {
        T2 = meme;
    }
    T3 = (&(T2->super));
    _construct_object(T3, _ln, _fn);
    return T2;
}
Example #7
0
/* ChapelArray.chpl:455 */
BaseArray _construct_BaseArray(BaseArray meme, int32_t _ln, _string _fn) {
  BaseArray T2 = NULL;
  chpl_bool T1;
  object T3 = NULL;
  T1 = (nil==meme);
  if (T1) {
    T2 = (BaseArray)chpl_alloc(sizeof(_BaseArray), "instance of class BaseArray", _ln, _fn);
    ((object)T2)->_cid = _e_BaseArray;
  } else {
    T2 = meme;
  }
  T3 = (&(T2->super));
  _construct_object(T3, _ln, _fn);
  return T2;
}
Example #8
0
/* ChapelBase.chpl:574 */
_ddata_locale _construct__ddata(int32_t size, _ddata_locale meme, int32_t _ln, _string _fn) {
  _ddata_locale T2 = NULL;
  chpl_bool T1;
  object T3 = NULL;
  T1 = (nil==meme);
  if (T1) {
    T2 = (_ddata_locale)chpl_alloc(sizeof(__ddata_locale), "instance of class _ddata", _ln, _fn);
    ((object)T2)->_cid = _e__ddata_locale;
  } else {
    T2 = meme;
  }
  T3 = (&(T2->super));
  _construct_object(T3, _ln, _fn);
  T2->size = size;
  return T2;
}
Example #9
0
/* ChapelReduce.chpl:52 */
_min_int64_t _construct__min(int64_t value, _min_int64_t meme, int32_t _ln, _string _fn) {
  _min_int64_t T2 = NULL;
  chpl_bool T1;
  object T3 = NULL;
  T1 = (nil==meme);
  if (T1) {
    T2 = (_min_int64_t)chpl_alloc(sizeof(__min_int64_t), "instance of class _min", _ln, _fn);
    ((object)T2)->_cid = _e__min_int64_t;
  } else {
    T2 = meme;
  }
  T3 = (&(T2->super));
  _construct_object(T3, _ln, _fn);
  T2->value = value;
  return T2;
}
Example #10
0
/* ChapelReduce.chpl:42 */
_max__real64 _construct__max(_real64 value, _max__real64 meme, int32_t _ln, _string _fn) {
  _max__real64 T2 = NULL;
  chpl_bool T1;
  object T3 = NULL;
  T1 = (nil==meme);
  if (T1) {
    T2 = (_max__real64)chpl_alloc(sizeof(__max__real64), "instance of class _max", _ln, _fn);
    ((object)T2)->_cid = _e__max__real64;
  } else {
    T2 = meme;
  }
  T3 = (&(T2->super));
  _construct_object(T3, _ln, _fn);
  T2->value = value;
  return T2;
}
Example #11
0
/* List.chpl:1 */
listNode_BaseArray _construct_listNode(BaseArray data, listNode_BaseArray next, listNode_BaseArray meme, int32_t _ln, _string _fn) {
  listNode_BaseArray T2 = NULL;
  chpl_bool T1;
  object T3 = NULL;
  T1 = (nil==meme);
  if (T1) {
    T2 = (listNode_BaseArray)chpl_alloc(sizeof(_listNode_BaseArray), "instance of class listNode", _ln, _fn);
    ((object)T2)->_cid = _e_listNode_BaseArray;
  } else {
    T2 = meme;
  }
  T3 = (&(T2->super));
  _construct_object(T3, _ln, _fn);
  T2->data = data;
  T2->next = next;
  return T2;
}
Example #12
0
/* ChapelArray.chpl:489 */
BaseDomain _construct_BaseDomain(list_BaseArray* const _arrs, BaseDomain meme, int32_t _ln, _string _fn) {
  list_BaseArray T1;
  BaseDomain T3 = NULL;
  chpl_bool T2;
  object T4 = NULL;
  T1 = __copy_225794(&((*_arrs)));
  T2 = (nil==meme);
  if (T2) {
    T3 = (BaseDomain)chpl_alloc(sizeof(_BaseDomain), "instance of class BaseDomain", _ln, _fn);
    ((object)T3)->_cid = _e_BaseDomain;
  } else {
    T3 = meme;
  }
  T4 = (&(T3->super));
  _construct_object(T4, _ln, _fn);
  T3->_arrs = T1;
  return T3;
}
Example #13
0
/* ChapelBase.chpl:909 */
_EndCount _construct__EndCount(_syncvar_int64_t i, _syncvar_chpl_bool b, _EndCount meme, int32_t _ln, _string _fn) {
  _syncvar_chpl_bool T1 = NULL;
  _syncvar_int64_t T2 = NULL;
  _EndCount T4 = NULL;
  chpl_bool T3;
  object T5 = NULL;
  T1 = __pass_374812(b);
  T2 = __pass_374834(i);
  T3 = (nil==meme);
  if (T3) {
    T4 = (_EndCount)chpl_alloc(sizeof(__EndCount), "instance of class _EndCount", _ln, _fn);
    ((object)T4)->_cid = _e__EndCount;
  } else {
    T4 = meme;
  }
  T5 = (&(T4->super));
  _construct_object(T5, _ln, _fn);
  T4->i = T2;
  T4->b = T1;
  return T4;
}
Example #14
0
//calls constructors
static void _construct_object(AWE_OBJECT *obj, AWE_CLASS *pclass)
{
    if (pclass->super) _construct_object(obj, pclass->super);
    obj->pclass = pclass;
    if (pclass->constructor) pclass->constructor(obj);
}