Permalink
Browse files

Perlito5 - js - p5ArrayOfAlias - fix internal indexes

  • Loading branch information...
fglock committed Oct 15, 2012
1 parent 1a8d3e4 commit d59adda62d815c59c398e08906c8b3a12a030b56
Showing with 35 additions and 35 deletions.
  1. +17 −17 html/perlito5.js
  2. +1 −1 perlito5.pl
  3. +17 −17 src5/lib/Perlito5/Javascript2/Array.pm
View
@@ -1004,48 +1004,48 @@ function p5ArrayOfAlias(o) {
this.p5aget = function (i) {
if (i < 0) { i = this.length + i };
- return this._array_[i+i][this._array_[i+i]+1];
+ return this._array_[i+i][this._array_[i+i+1]];
}
this.p5aset = function (i, v) {
if (i < 0) { i = this.length + i };
- this._array_[i+i][this._array_[i+i]+1] = v;
- return this._array_[i+i][this._array_[i+i]+1]
+ this._array_[i+i][this._array_[i+i+1]] = v;
+ return this._array_[i+i][this._array_[i+i+1]]
}
this.p5incr = function (i) {
if (i < 0) { i = this.length + i };
- this._array_[i+i][this._array_[i+i]+1] = p5incr(this._array_[i+i][this._array_[i+i]+1]);
- return this._array_[i+i][this._array_[i+i]+1];
+ this._array_[i+i][this._array_[i+i+1]] = p5incr(this._array_[i+i][this._array_[i+i+1]]);
+ return this._array_[i+i][this._array_[i+i+1]];
}
this.p5postincr = function (i) {
if (i < 0) { i = this.length + i };
- var v = this._array_[i+i][this._array_[i+i]+1];
- this._array_[i+i][this._array_[i+i]+1] = p5incr(this._array_[i+i][this._array_[i+i]+1]);
+ var v = this._array_[i+i][this._array_[i+i+1]];
+ this._array_[i+i][this._array_[i+i+1]] = p5incr(this._array_[i+i][this._array_[i+i+1]]);
return v;
}
this.p5decr = function (i) {
if (i < 0) { i = this.length + i };
- this._array_[i+i][this._array_[i+i]+1] = p5decr(this._array_[i+i][this._array_[i+i]+1]);
- return this._array_[i+i][this._array_[i+i]+1];
+ this._array_[i+i][this._array_[i+i+1]] = p5decr(this._array_[i+i][this._array_[i+i+1]]);
+ return this._array_[i+i][this._array_[i+i+1]];
}
this.p5postdecr = function (i) {
if (i < 0) { i = this.length + i };
- var v = this._array_[i+i][this._array_[i+i]+1];
- this._array_[i+i][this._array_[i+i]+1] = p5decr(this._array_[i+i][this._array_[i+i]+1]);
+ var v = this._array_[i+i][this._array_[i+i+1]];
+ this._array_[i+i][this._array_[i+i+1]] = p5decr(this._array_[i+i][this._array_[i+i+1]]);
return v;
}
this.p5aget_array = function (i) {
if (i < 0) { i = this.length + i };
- if (this._array_[i+i][this._array_[i+i]+1] == null) {
- this._array_[i+i][this._array_[i+i]+1] = new p5ArrayRef([])
+ if (this._array_[i+i][this._array_[i+i+1]] == null) {
+ this._array_[i+i][this._array_[i+i+1]] = new p5ArrayRef([])
}
- return this._array_[i+i][this._array_[i+i]+1]
+ return this._array_[i+i][this._array_[i+i+1]]
}
this.p5aget_hash = function (i) {
if (i < 0) { i = this.length + i };
- if (this._array_[i+i][this._array_[i+i]+1] == null) {
- this._array_[i+i][this._array_[i+i]+1] = new p5HashRef({})
+ if (this._array_[i+i][this._array_[i+i+1]] == null) {
+ this._array_[i+i][this._array_[i+i+1]] = new p5HashRef({})
}
- return this._array_[i+i][this._array_[i+i]+1]
+ return this._array_[i+i][this._array_[i+i+1]]
}
this.p5unshift = function (args) {
for(var i = args.length-1; i >= 0; i--) {
Oops, something went wrong.

0 comments on commit d59adda

Please sign in to comment.