Bug 973238 Part 8 -- Remove dead code (FillTypedArrayWithValue) r=sfink
authorNicholas D. Matsakis <nmatsakis@mozilla.com>
Wed, 26 Mar 2014 14:33:55 -0400
changeset 206612 880fd861075fb7d434080053bd5863dc1fe5a720
parent 206611 3e9ea27401838363e58d8908bd320ef13fd8d04f
child 206613 731411eebd0ada53b7d7a6329dde5bd5f7be3019
push id3741
push userasasaki@mozilla.com
push dateMon, 21 Jul 2014 20:25:18 +0000
treeherdermozilla-beta@4d6f46f5af68 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewerssfink
bugs973238
milestone32.0a1
first release with
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
last release without
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
Bug 973238 Part 8 -- Remove dead code (FillTypedArrayWithValue) r=sfink
CLOBBER
js/src/builtin/TypedObject.js
js/src/vm/CommonPropertyNames.h
--- a/CLOBBER
+++ b/CLOBBER
@@ -17,9 +17,9 @@
 #
 # Modifying this file will now automatically clobber the buildbot machines \o/
 #
 
 # Are you updating CLOBBER because you think it's needed for your WebIDL
 # changes to stick? As of bug 928195, this shouldn't be necessary! Please
 # don't change CLOBBER for WebIDL changes any more.
 
-Bug 973238 part 7 needs clobber due to self-hosted code (bug 1019955).
+Bug 973238 part 8 needs clobber due to self-hosted code (bug 1019955).
--- a/js/src/builtin/TypedObject.js
+++ b/js/src/builtin/TypedObject.js
@@ -384,36 +384,16 @@ function Reify(sourceDescr,
          "Reify: not type typedObj");
 
   if (!TypedObjectIsAttached(sourceTypedObj))
     ThrowError(JSMSG_TYPEDOBJECT_HANDLE_UNATTACHED);
 
   return TypedObjectGet(sourceDescr, sourceTypedObj, sourceOffset);
 }
 
-function FillTypedArrayWithValue(destArray, fromValue) {
-  assert(IsObject(handle) && ObjectIsTypedObject(destArray),
-         "FillTypedArrayWithValue: not typed handle");
-
-  var descr = TypedObjectTypeDescr(destArray);
-  var length = DESCR_SIZED_ARRAY_LENGTH(descr);
-  if (length === 0)
-    return;
-
-  // Use convert and copy to to produce the first element:
-  var elemDescr = DESCR_ARRAY_ELEMENT_TYPE(descr);
-  TypedObjectSet(elemDescr, destArray, 0, fromValue);
-
-  // Stamp out the remaining copies:
-  var elemSize = DESCR_SIZE(elemDescr);
-  var totalSize = length * elemSize;
-  for (var offset = elemSize; offset < totalSize; offset += elemSize)
-    Memcpy(destArray, offset, destArray, 0, elemSize);
-}
-
 // Warning: user exposed!
 function TypeDescrEquivalent(otherDescr) {
   if (!IsObject(this) || !ObjectIsTypeDescr(this))
     ThrowError(JSMSG_TYPEDOBJECT_BAD_ARGS);
   if (!IsObject(otherDescr) || !ObjectIsTypeDescr(otherDescr))
     ThrowError(JSMSG_TYPEDOBJECT_BAD_ARGS);
   return DescrsEquiv(this, otherDescr);
 }
--- a/js/src/vm/CommonPropertyNames.h
+++ b/js/src/vm/CommonPropertyNames.h
@@ -64,17 +64,16 @@
     macro(enumerable, enumerable, "enumerable") \
     macro(enumerate, enumerate, "enumerate") \
     macro(escape, escape, "escape") \
     macro(eval, eval, "eval") \
     macro(false, false_, "false") \
     macro(fieldOffsets, fieldOffsets, "fieldOffsets") \
     macro(fieldTypes, fieldTypes, "fieldTypes") \
     macro(fileName, fileName, "fileName") \
-    macro(FillTypedArrayWithValue, FillTypedArrayWithValue, "FillTypedArrayWithValue") \
     macro(fix, fix, "fix") \
     macro(float32, float32, "float32") \
     macro(float32x4, float32x4, "float32x4") \
     macro(float64, float64, "float64") \
     macro(format, format, "format") \
     macro(from, from, "from") \
     macro(get, get, "get") \
     macro(getInternals, getInternals, "getInternals") \