Exemplo n.º 1
0
 private Stmt StoreElem(Instruction inst) {
     var value = this.stack.Pop();
     var index = this.stack.Pop();
     var array = this.stack.Pop();
     var arrayAccess = new ExprVarArrayAccess(this.ctx, array, index);
     var assignment = new StmtAssignment(this.ctx, arrayAccess, value);
     return assignment;
 }
Exemplo n.º 2
0
 protected override ICode VisitVarArrayAccess(ExprVarArrayAccess e) {
     this.Visit(e.Array);
     this.js.Append("[");
     this.Visit(e.Index);
     this.js.Append("]");
     return e;
 }
Exemplo n.º 3
0
 private Stmt LoadElem(Instruction inst) {
     var index = this.stack.Pop();
     var array = this.stack.Pop();
     var arrayAccess = new ExprVarArrayAccess(this.ctx, array, index);
     return this.SsaLocalAssignment(arrayAccess);
 }