Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Commits on Dec 6, 2011
  1. @BourgerieQuentin

    [fix] jsimp: Fixing "Object.prototype leaks into Opa land", Credit:Bu…

    BourgerieQuentin authored
    …g reported by Erling Ellingsen <reg.opa@alf.nu>
    
    Original bug report:
    
    Opa records are represented as ordinary JS objects on the client, with
    the property names used as-is -- this might end up causing some
    interesting bugs given that even simple JS objects made with {} come
    with a set of default properties inherited from Object.prototype.
    
    // using build 1025
    
    type dummy = int;
    type holder('in, 'out) = { dummy constructor, 'out val } or { 'in val };
    
    client function 'out cast('in v) {
     holder('in, 'out) h = {val:v};
     match(h) {
     case { constructor:_, val:x }: x;
     default: error("Not so much.");
     }
    }
    
    client function dummy getconstructor(holder('a,'b) h) {
     match(h) {
     case { constructor:c, val:_ }: c;
     default: error("Not so much.");
     }
    }
    
    client function string eval(string code) {
     cast(getconstructor(cast(cast)))(code)();
    }
    
    function page() {
     <div id=here onclick={function(_) { #here = <p>{eval("alert('Hello');
    return 2+2;")}</p> }}>
       click me
     </div>
    }
Commits on Aug 5, 2011
  1. [doc] jslang: adding some comments in the js lexer/parser

    Valentin Gatien-Baron authored
Commits on Jun 21, 2011
  1. Initial open-source release

    MLstate authored
Something went wrong with that request. Please try again.