Skip to content

Commit

Permalink
added link to paper, and reformatted code a bit
Browse files Browse the repository at this point in the history
  • Loading branch information
Tom Van Cutsem committed Apr 4, 2013
1 parent cd74ed3 commit ca4b525
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 8 deletions.
11 changes: 7 additions & 4 deletions examples/membrane.js
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,9 @@
* Inspired by the original membrane example code by Mark S. Miller:
* http://wiki.ecmascript.org/doku.php?id=harmony:proxies#an_identity-preserving_membrane
*
* For a detailed rationale of this membrane design, and the interaction
* with ES5 invariants, see http://soft.vub.ac.be/Publications/2013/vub-soft-tr-13-03.pdf
*
* @author tvcutsem
*/

Expand Down Expand Up @@ -345,13 +348,13 @@
var dryToWetRef = {val:null};
var wetToDryRef = {val:null};

dryToWetRef.val =
dryToWetMaker(dryToWetCache, wetToDryCache, dryToWetRef, wetToDryRef);
dryToWetRef.val = dryToWetMaker(dryToWetCache, wetToDryCache,
dryToWetRef, wetToDryRef);

// note the reversed order of wetToDry and dryToWet:

wetToDryRef.val =
dryToWetMaker(wetToDryCache, dryToWetCache, wetToDryRef, dryToWetRef);
wetToDryRef.val = dryToWetMaker(wetToDryCache, dryToWetCache,
wetToDryRef, dryToWetRef);

return {
target: wetToDryRef.val(initWetTarget),
Expand Down
11 changes: 7 additions & 4 deletions notification/membrane.js
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,9 @@
* Inspired by the original membrane example code by Mark S. Miller:
* http://wiki.ecmascript.org/doku.php?id=harmony:proxies#an_identity-preserving_membrane
*
* For a detailed rationale of this membrane design, and the interaction
* with ES5 invariants, see http://soft.vub.ac.be/Publications/2013/vub-soft-tr-13-03.pdf
*
* @author tvcutsem
*/

Expand Down Expand Up @@ -354,13 +357,13 @@
var dryToWetRef = {val:null};
var wetToDryRef = {val:null};

dryToWetRef.val =
dryToWetMaker(dryToWetCache, wetToDryCache, dryToWetRef, wetToDryRef);
dryToWetRef.val = dryToWetMaker(dryToWetCache, wetToDryCache,
dryToWetRef, wetToDryRef);

// note the reversed order of wetToDry and dryToWet:

wetToDryRef.val =
dryToWetMaker(wetToDryCache, dryToWetCache, wetToDryRef, dryToWetRef);
wetToDryRef.val = dryToWetMaker(wetToDryCache, dryToWetCache,
wetToDryRef, dryToWetRef);

return {
target: wetToDryRef.val(initWetTarget),
Expand Down

0 comments on commit ca4b525

Please sign in to comment.