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.64 app/kern/tel.js
flok-0.0.63 app/kern/tel.js
flok-0.0.62 app/kern/tel.js
flok-0.0.61 app/kern/tel.js
flok-0.0.60 app/kern/tel.js
flok-0.0.57 app/kern/tel.js
flok-0.0.56 app/kern/tel.js
flok-0.0.55 app/kern/tel.js
flok-0.0.54 app/kern/tel.js
flok-0.0.53 app/kern/tel.js
flok-0.0.52 app/kern/tel.js
flok-0.0.51 app/kern/tel.js
flok-0.0.50 app/kern/tel.js
flok-0.0.49 app/kern/tel.js
flok-0.0.48 app/kern/tel.js
flok-0.0.47 app/kern/tel.js
flok-0.0.45 app/kern/tel.js
flok-0.0.44 app/kern/tel.js
flok-0.0.43 app/kern/tel.js
flok-0.0.42 app/kern/tel.js