Bug 1468749 trackAttached method added for TypeOfIrGenerator in CacheIR.cpp r=tcampbell
authorhyperion <shivambalikondwar101@gmail.com>
Mon, 10 Dec 2018 19:28:36 +0000
changeset 449727 616d351dbe7b95077c1b8e167405a7793c97f0d4
parent 449726 3e79eda819cc35a8d3d6e4beb0186bc4770127d6
child 449728 8869368a3f30f51879322b4aebd66d03a35ea2ce
push id74443
push usertcampbell@mozilla.com
push dateMon, 10 Dec 2018 19:29:34 +0000
treeherderautoland@616d351dbe7b [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewerstcampbell
bugs1468749
milestone65.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 1468749 trackAttached method added for TypeOfIrGenerator in CacheIR.cpp r=tcampbell Differential Revision: https://phabricator.services.mozilla.com/D13874
js/src/jit/CacheIR.cpp
js/src/jit/CacheIR.h
--- a/js/src/jit/CacheIR.cpp
+++ b/js/src/jit/CacheIR.cpp
@@ -4743,16 +4743,24 @@ void InstanceOfIRGenerator::trackAttache
 #endif
 }
 
 TypeOfIRGenerator::TypeOfIRGenerator(JSContext* cx, HandleScript script,
                                      jsbytecode* pc, ICState::Mode mode,
                                      HandleValue value)
     : IRGenerator(cx, script, pc, CacheKind::TypeOf, mode), val_(value) {}
 
+void TypeOfIRGenerator::trackAttached(const char* name) {
+#ifdef JS_CACHEIR_SPEW
+  if (const CacheIRSpewer::Guard& sp = CacheIRSpewer::Guard(*this, name)) {
+    sp.valueProperty("val", val_);
+  }
+#endif
+}
+
 bool TypeOfIRGenerator::tryAttachStub() {
   MOZ_ASSERT(cacheKind_ == CacheKind::TypeOf);
 
   AutoAssertNoPendingException aanpe(cx_);
 
   ValOperandId valId(writer.setInputOperandId(0));
 
   if (tryAttachPrimitive(valId)) {
@@ -4771,29 +4779,29 @@ bool TypeOfIRGenerator::tryAttachPrimiti
   if (val_.isNumber()) {
     writer.guardIsNumber(valId);
   } else {
     writer.guardType(valId, val_.extractNonDoubleType());
   }
 
   writer.loadStringResult(TypeName(js::TypeOfValue(val_), cx_->names()));
   writer.returnFromIC();
-
+  trackAttached("Primitive");
   return true;
 }
 
 bool TypeOfIRGenerator::tryAttachObject(ValOperandId valId) {
   if (!val_.isObject()) {
     return false;
   }
 
   ObjOperandId objId = writer.guardIsObject(valId);
   writer.loadTypeOfObjectResult(objId);
   writer.returnFromIC();
-
+  trackAttached("Object");
   return true;
 }
 
 GetIteratorIRGenerator::GetIteratorIRGenerator(JSContext* cx,
                                                HandleScript script,
                                                jsbytecode* pc,
                                                ICState::Mode mode,
                                                HandleValue value)
--- a/js/src/jit/CacheIR.h
+++ b/js/src/jit/CacheIR.h
@@ -1902,16 +1902,17 @@ class MOZ_RAII InstanceOfIRGenerator : p
   bool tryAttachStub();
 };
 
 class MOZ_RAII TypeOfIRGenerator : public IRGenerator {
   HandleValue val_;
 
   bool tryAttachPrimitive(ValOperandId valId);
   bool tryAttachObject(ValOperandId valId);
+  void trackAttached(const char* name);
 
  public:
   TypeOfIRGenerator(JSContext* cx, HandleScript, jsbytecode* pc,
                     ICState::Mode mode, HandleValue value);
 
   bool tryAttachStub();
 };