mirror of
https://github.com/mozilla/gecko-dev.git
synced 2024-11-05 08:35:26 +00:00
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:
parent
348ef34fe4
commit
7a4a2758f6
@ -740,7 +740,8 @@ function BuildTypedSeqImpl(arrayType, len, depth, func) {
|
|||||||
// Create a zeroed instance with no data
|
// Create a zeroed instance with no data
|
||||||
var result = new arrayType();
|
var result = new arrayType();
|
||||||
|
|
||||||
var indices = NewDenseArray(depth);
|
var indices = new List();
|
||||||
|
indices.length = depth;
|
||||||
for (var i = 0; i < depth; i++) {
|
for (var i = 0; i < depth; i++) {
|
||||||
indices[i] = 0;
|
indices[i] = 0;
|
||||||
}
|
}
|
||||||
@ -772,7 +773,8 @@ function ComputeIterationSpace(arrayType, depth, len) {
|
|||||||
assert(IsObject(arrayType) && ObjectIsTypeDescr(arrayType), "ComputeIterationSpace called on non-type-object");
|
assert(IsObject(arrayType) && ObjectIsTypeDescr(arrayType), "ComputeIterationSpace called on non-type-object");
|
||||||
assert(TypeDescrIsArrayType(arrayType), "ComputeIterationSpace called on non-array-type");
|
assert(TypeDescrIsArrayType(arrayType), "ComputeIterationSpace called on non-array-type");
|
||||||
assert(depth > 0, "ComputeIterationSpace called on non-positive depth");
|
assert(depth > 0, "ComputeIterationSpace called on non-positive depth");
|
||||||
var iterationSpace = NewDenseArray(depth);
|
var iterationSpace = new List();
|
||||||
|
iterationSpace.length = depth;
|
||||||
iterationSpace[0] = len;
|
iterationSpace[0] = len;
|
||||||
var totalLength = len;
|
var totalLength = len;
|
||||||
var grainType = arrayType.elementType;
|
var grainType = arrayType.elementType;
|
||||||
|
Loading…
Reference in New Issue
Block a user