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.84 app/kern/tel.js
flok-0.0.83 app/kern/tel.js
flok-0.0.82 app/kern/tel.js
flok-0.0.81 app/kern/tel.js
flok-0.0.80 app/kern/tel.js
flok-0.0.79 app/kern/tel.js
flok-0.0.78 app/kern/tel.js
flok-0.0.77 app/kern/tel.js
flok-0.0.76 app/kern/tel.js
flok-0.0.75 app/kern/tel.js
flok-0.0.74 app/kern/tel.js
flok-0.0.73 app/kern/tel.js
flok-0.0.72 app/kern/tel.js
flok-0.0.71 app/kern/tel.js
flok-0.0.70 app/kern/tel.js
flok-0.0.69 app/kern/tel.js
flok-0.0.68 app/kern/tel.js
flok-0.0.67 app/kern/tel.js
flok-0.0.66 app/kern/tel.js
flok-0.0.65 app/kern/tel.js