Bug 1020655 - Fix comments about LLoadElementHole and MLoadTypedArrayElementHole. r=nbp
authorVincent St-Amour <stamourv@racket-lang.org>
Wed, 04 Jun 2014 15:56:00 -0400
changeset 206092 f0e12744b2a9833e0ad283b7411f02f13f884a7d
parent 206091 7991c0d11413a43b39bd5dd0ee39753fc252646f
child 206093 846ee7c7debfc1405079b2f981e061b7ec5598b3
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)
reviewersnbp
bugs1020655
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 1020655 - Fix comments about LLoadElementHole and MLoadTypedArrayElementHole. r=nbp
js/src/jit/LIR-Common.h
js/src/jit/MIR.h
--- a/js/src/jit/LIR-Common.h
+++ b/js/src/jit/LIR-Common.h
@@ -3851,17 +3851,18 @@ class LInArray : public LInstructionHelp
         return getOperand(2);
     }
     const LAllocation *object() {
         return getOperand(3);
     }
 };
 
 
-// Load a value from a dense array's elements vector. Bail out if it's the hole value.
+// Load a value from an array's elements vector, loading |undefined| if we hit a hole.
+// Bail out if we get a negative index.
 class LLoadElementHole : public LInstructionHelper<BOX_PIECES, 3, 0>
 {
   public:
     LIR_HEADER(LoadElementHole)
 
     LLoadElementHole(const LAllocation &elements, const LAllocation &index, const LAllocation &initLength) {
         setOperand(0, elements);
         setOperand(1, index);
--- a/js/src/jit/MIR.h
+++ b/js/src/jit/MIR.h
@@ -6637,18 +6637,17 @@ class MLoadTypedArrayElement
 
     void printOpcode(FILE *fp) const;
 
     void computeRange(TempAllocator &alloc);
 
     bool canProduceFloat32() const { return arrayType_ == ScalarTypeDescr::TYPE_FLOAT32; }
 };
 
-// Load a value from a typed array. Out-of-bounds accesses are handled using
-// a VM call.
+// Load a value from a typed array. Out-of-bounds accesses are handled in-line.
 class MLoadTypedArrayElementHole
   : public MBinaryInstruction,
     public SingleObjectPolicy
 {
     int arrayType_;
     bool allowDouble_;
 
     MLoadTypedArrayElementHole(MDefinition *object, MDefinition *index, int arrayType, bool allowDouble)