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;
 }
Esempio 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;
 }
 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);
 }