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.41 app/kern/tel.js
flok-0.0.40 app/kern/tel.js
flok-0.0.39 app/kern/tel.js
flok-0.0.38 app/kern/tel.js
flok-0.0.36 app/kern/tel.js
flok-0.0.35 app/kern/tel.js
flok-0.0.34 app/kern/tel.js
flok-0.0.33 app/kern/tel.js
flok-0.0.32 app/kern/tel.js
flok-0.0.31 app/kern/tel.js
flok-0.0.30 app/kern/tel.js
flok-0.0.29 app/kern/tel.js
flok-0.0.28 app/kern/tel.js
flok-0.0.27 app/kern/tel.js
flok-0.0.26 app/kern/tel.js
flok-0.0.25 app/kern/tel.js
flok-0.0.24 app/kern/tel.js
flok-0.0.23 app/kern/tel.js
flok-0.0.21 app/kern/tel.js
flok-0.0.20 app/kern/tel.js