Bug 1574415 - Part 2: Remove no longer used template argument and rename 'StoreToTypedArray'. r=jandem
authorAndré Bargull <andre.bargull@gmail.com>
Mon, 07 Oct 2019 11:56:29 +0000
changeset 496554 6067d1828df8f7ca054c4a57430e466e1987aa75
parent 496553 d2008fdba4af17f45aad4d2ed3f99b21296fb248
child 496555 3f73e398ca61d24ddb9f8de379e1c077452ff9b1
push id97326
push userarchaeopteryx@coole-files.de
push dateMon, 07 Oct 2019 16:46:32 +0000
treeherderautoland@144ebbca6844 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersjandem
bugs1574415
milestone71.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 1574415 - Part 2: Remove no longer used template argument and rename 'StoreToTypedArray'. r=jandem `StoreToTypedArray` is now only used for TypedObjects and always passes `Address` for the `dest` argument. Differential Revision: https://phabricator.services.mozilla.com/D42811
js/src/jit/BaselineCacheIRCompiler.cpp
js/src/jit/BaselineIC.cpp
js/src/jit/BaselineIC.h
js/src/jit/IonCacheIRCompiler.cpp
--- a/js/src/jit/BaselineCacheIRCompiler.cpp
+++ b/js/src/jit/BaselineCacheIRCompiler.cpp
@@ -1151,17 +1151,17 @@ bool BaselineCacheIRCompiler::emitStoreT
     return false;
   }
 
   // Compute the address being written to.
   LoadTypedThingData(masm, layout, obj, scratch1);
   masm.addPtr(offsetAddr, scratch1);
   Address dest(scratch1, 0);
 
-  StoreToTypedArray(cx_, masm, type, val, dest, scratch2, failure->label());
+  StoreToTypedObject(cx_, masm, type, val, dest, scratch2, failure->label());
   return true;
 }
 
 bool BaselineCacheIRCompiler::emitStoreDenseElement() {
   JitSpew(JitSpew_Codegen, __FUNCTION__);
   ObjOperandId objId = reader.objOperandId();
   Int32OperandId indexId = reader.int32OperandId();
 
--- a/js/src/jit/BaselineIC.cpp
+++ b/js/src/jit/BaselineIC.cpp
@@ -2244,20 +2244,19 @@ bool FallbackICCodeCompiler::emit_SetEle
   masm.push(ICStubReg);
   pushStubPayload(masm, R0.scratchReg());
 
   using Fn = bool (*)(JSContext*, BaselineFrame*, ICSetElem_Fallback*, Value*,
                       HandleValue, HandleValue, HandleValue);
   return tailCallVM<Fn, DoSetElemFallback>(masm);
 }
 
-template <typename T>
-void StoreToTypedArray(JSContext* cx, MacroAssembler& masm, Scalar::Type type,
-                       const ValueOperand& value, const T& dest,
-                       Register scratch, Label* failure) {
+void StoreToTypedObject(JSContext* cx, MacroAssembler& masm, Scalar::Type type,
+                        const ValueOperand& value, const Address& dest,
+                        Register scratch, Label* failure) {
   Label done;
 
   if (type == Scalar::Float32 || type == Scalar::Float64) {
     masm.ensureDouble(value, FloatReg0, failure);
     if (type == Scalar::Float32) {
       ScratchFloat32Scope fpscratch(masm);
       masm.convertDoubleToFloat32(FloatReg0, fpscratch);
       masm.storeToTypedFloatArray(type, fpscratch, dest);
@@ -2302,26 +2301,16 @@ void StoreToTypedArray(JSContext* cx, Ma
     masm.unboxDouble(value, FloatReg0);
     masm.branchTruncateDoubleMaybeModUint32(FloatReg0, scratch, failure);
     masm.jump(&isInt32);
   }
 
   masm.bind(&done);
 }
 
-template void StoreToTypedArray(JSContext* cx, MacroAssembler& masm,
-                                Scalar::Type type, const ValueOperand& value,
-                                const Address& dest, Register scratch,
-                                Label* failure);
-
-template void StoreToTypedArray(JSContext* cx, MacroAssembler& masm,
-                                Scalar::Type type, const ValueOperand& value,
-                                const BaseIndex& dest, Register scratch,
-                                Label* failure);
-
 //
 // In_Fallback
 //
 
 bool DoInFallback(JSContext* cx, BaselineFrame* frame, ICIn_Fallback* stub,
                   HandleValue key, HandleValue objValue,
                   MutableHandleValue res) {
   stub->incrementEnteredCount();
--- a/js/src/jit/BaselineIC.h
+++ b/js/src/jit/BaselineIC.h
@@ -1828,23 +1828,22 @@ inline bool IsCacheableDOMProxy(JSObject
 
   // Some DOM proxies have dynamic prototypes.  We can't really cache those very
   // well.
   return obj->hasStaticPrototype();
 }
 
 struct IonOsrTempData;
 
-// Write an arbitrary value to a typed array or typed object address at dest.
+// Write an arbitrary value to a typed object address at dest.
 // If the value could not be converted to the appropriate format, jump to
 // failure.
-template <typename T>
-void StoreToTypedArray(JSContext* cx, MacroAssembler& masm, Scalar::Type type,
-                       const ValueOperand& value, const T& dest,
-                       Register scratch, Label* failure);
+void StoreToTypedObject(JSContext* cx, MacroAssembler& masm, Scalar::Type type,
+                        const ValueOperand& value, const Address& dest,
+                        Register scratch, Label* failure);
 
 extern MOZ_MUST_USE bool TypeMonitorResult(JSContext* cx,
                                            ICMonitoredFallbackStub* stub,
                                            BaselineFrame* frame,
                                            HandleScript script, jsbytecode* pc,
                                            HandleValue val);
 
 extern bool DoTypeUpdateFallback(JSContext* cx, BaselineFrame* frame,
--- a/js/src/jit/IonCacheIRCompiler.cpp
+++ b/js/src/jit/IonCacheIRCompiler.cpp
@@ -1617,17 +1617,17 @@ bool IonCacheIRCompiler::emitStoreTypedO
   if (!addFailurePath(&failure)) {
     return false;
   }
 
   // Compute the address being written to.
   LoadTypedThingData(masm, layout, obj, scratch1);
   Address dest(scratch1, offset);
 
-  StoreToTypedArray(cx_, masm, type, val, dest, scratch2, failure->label());
+  StoreToTypedObject(cx_, masm, type, val, dest, scratch2, failure->label());
   return true;
 }
 
 static void EmitStoreDenseElement(MacroAssembler& masm,
                                   const ConstantOrRegister& value,
                                   Register elements,
                                   BaseObjectElementIndex target) {
   // If the ObjectElements::CONVERT_DOUBLE_ELEMENTS flag is set, int32 values