Bug 1127169 - Use self-hosting internal List type for TypedObject functions' internal bookkeeping. r=nmatsakis

--HG--
extra : rebase_source : de08f4c63f55b91e35066a94ce4f05b9f3028a3b
This commit is contained in:
Till Schneidereit 2015-01-29 16:40:49 +01:00
parent 348ef34fe4
commit 7a4a2758f6

View File

@ -740,7 +740,8 @@ function BuildTypedSeqImpl(arrayType, len, depth, func) {
// Create a zeroed instance with no data
var result = new arrayType();
var indices = NewDenseArray(depth);
var indices = new List();
indices.length = depth;
for (var i = 0; i < depth; i++) {
indices[i] = 0;
}
@ -772,7 +773,8 @@ function ComputeIterationSpace(arrayType, depth, len) {
assert(IsObject(arrayType) && ObjectIsTypeDescr(arrayType), "ComputeIterationSpace called on non-type-object");
assert(TypeDescrIsArrayType(arrayType), "ComputeIterationSpace called on non-array-type");
assert(depth > 0, "ComputeIterationSpace called on non-positive depth");
var iterationSpace = NewDenseArray(depth);
var iterationSpace = new List();
iterationSpace.length = depth;
iterationSpace[0] = len;
var totalLength = len;
var grainType = arrayType.elementType;