Sha256: 6219f81f1bfb6c1ce86ff1ee13792fc43f4cc50048f45f414278237dcc347f8d

Contents?: true

Size: 901 Bytes

Versions: 85

Compression:

Stored size: 901 Bytes

Contents

//Support for the telepathy protocol
tel_idx = 3;

//Global table linking telepointers to objects (like functions)
tel_table = {};

//This function creates N telepathic pointers and returns the starting index
//of the first pointer returned.  Successive pointers are just increments
//of the base value by one. Should be used as much as possible as it
//reduces the communication overhead (by allowing pipelining on futures), 
//and prevents native pointers from entering the system (which allows more
//interesting abstractions like slaves)
function tels(n) {
  var o = tel_idx;
  tel_idx += n;
  return o;
}

function tel_reg(e) {
  var tp = tels(1);
  tel_table[tp] = e;

  return tp;
}

function tel_reg_ptr(e, tp) {
  tel_table[tp] = e;
}

function tel_del(tp) {
  delete tel_table[tp];
}

function tel_deref(tp) {
  return tel_table[tp];
}

function tel_exists(tp) {
  return tp in tel_table;
}

Version data entries

85 entries across 85 versions & 1 rubygems

Version Path
flok-0.0.105 app/kern/tel.js
flok-0.0.103 app/kern/tel.js
flok-0.0.102 app/kern/tel.js
flok-0.0.101 app/kern/tel.js
flok-0.0.100 app/kern/tel.js
flok-0.0.99 app/kern/tel.js
flok-0.0.98 app/kern/tel.js
flok-0.0.97 app/kern/tel.js
flok-0.0.96 app/kern/tel.js
flok-0.0.95 app/kern/tel.js
flok-0.0.94 app/kern/tel.js
flok-0.0.93 app/kern/tel.js
flok-0.0.92 app/kern/tel.js
flok-0.0.91 app/kern/tel.js
flok-0.0.90 app/kern/tel.js
flok-0.0.89 app/kern/tel.js
flok-0.0.88 app/kern/tel.js
flok-0.0.87 app/kern/tel.js
flok-0.0.86 app/kern/tel.js
flok-0.0.85 app/kern/tel.js