コード例 #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;
 }
コード例 #2
0
 protected override ICode VisitVarArrayAccess(ExprVarArrayAccess e) {
     this.Visit(e.Array);
     this.js.Append("[");
     this.Visit(e.Index);
     this.js.Append("]");
     return e;
 }
コード例 #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);
 }