Bug 1491736 - Remove an unnecessary #include from "jit/IonCode.h". r=jandem
authorJeff Walden <jwalden@mit.edu>
Sat, 15 Sep 2018 20:24:30 -0700
changeset 436690 d9300e88eb74b637f44f98dfa6ce3b30b17eb642
parent 436689 06c3e3d28ece1da9f62fcf7038dbf9ee0e22f248
child 436691 dc0ae19801fc749501c426ca0b34e8cd7083a439
push id107905
push userjwalden@mit.edu
push dateMon, 17 Sep 2018 13:09:15 +0000
treeherdermozilla-inbound@3ef024a29617 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersjandem
bugs1491736
milestone64.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 1491736 - Remove an unnecessary #include from "jit/IonCode.h". r=jandem
js/src/jit/IonCode.h
js/src/jit/IonTypes.h
js/src/vm/TypeInference.h
--- a/js/src/jit/IonCode.h
+++ b/js/src/jit/IonCode.h
@@ -14,27 +14,27 @@
 
 #include "gc/Heap.h"
 #include "jit/ExecutableAllocator.h"
 #include "jit/ICStubSpace.h"
 #include "jit/IonOptimizationLevels.h"
 #include "jit/IonTypes.h"
 #include "js/UbiNode.h"
 #include "vm/TraceLogging.h"
-#include "vm/TypeInference.h"
 
 namespace js {
 namespace jit {
 
-class MacroAssembler;
 class IonBuilder;
+class JitAllocPolicy;
 class JitCode;
+class MacroAssembler;
 
-typedef Vector<JSObject*, 4, JitAllocPolicy> ObjectVector;
-typedef Vector<TraceLoggerEvent, 0, SystemAllocPolicy> TraceLoggerEventVector;
+using ObjectVector = Vector<JSObject*, 4, JitAllocPolicy>;
+using TraceLoggerEventVector = Vector<TraceLoggerEvent, 0, SystemAllocPolicy>;
 
 // Header at start of raw code buffer
 struct JitCodeHeader
 {
     // Link back to corresponding gcthing
     JitCode*    jitCode_;
 
     // !!! NOTE !!!
--- a/js/src/jit/IonTypes.h
+++ b/js/src/jit/IonTypes.h
@@ -5,24 +5,48 @@
  * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
 
 #ifndef jit_IonTypes_h
 #define jit_IonTypes_h
 
 #include "mozilla/HashFunctions.h"
 
 #include <algorithm>
+#include <stdint.h>
 
 #include "jsfriendapi.h"
 #include "jstypes.h"
 
 #include "js/Value.h"
 #include "vm/StringType.h"
 
 namespace js {
+
+// Each IonScript has a unique compilation id. This is used to sweep/ignore
+// constraints for IonScripts that have been invalidated/destroyed.
+class IonCompilationId
+{
+    // Use two 32-bit integers instead of uint64_t to avoid 8-byte alignment on
+    // some 32-bit platforms.
+    uint32_t idLo_;
+    uint32_t idHi_;
+
+  public:
+    explicit IonCompilationId(uint64_t id)
+      : idLo_(id & UINT32_MAX),
+        idHi_(id >> 32)
+    {}
+    bool operator==(const IonCompilationId& other) const {
+        return idLo_ == other.idLo_ && idHi_ == other.idHi_;
+    }
+    bool operator!=(const IonCompilationId& other) const {
+        return !operator==(other);
+    }
+};
+
 namespace jit {
 
 typedef uint32_t RecoverOffset;
 typedef uint32_t SnapshotOffset;
 typedef uint32_t BailoutId;
 
 // The maximum size of any buffer associated with an assembler or code object.
 // This is chosen to not overflow a signed integer, leaving room for an extra
--- a/js/src/vm/TypeInference.h
+++ b/js/src/vm/TypeInference.h
@@ -1183,38 +1183,16 @@ class TypeNewScript
 };
 
 /* Is this a reasonable PC to be doing inlining on? */
 inline bool isInlinableCall(jsbytecode* pc);
 
 bool
 ClassCanHaveExtraProperties(const Class* clasp);
 
-// Each IonScript has a unique compilation id. This is used to sweep/ignore
-// constraints for IonScripts that have been invalidated/destroyed.
-class IonCompilationId
-{
-    // Use two 32-bit integers instead of uint64_t to avoid 8-byte alignment on
-    // some 32-bit platforms.
-    uint32_t idLo_;
-    uint32_t idHi_;
-
-  public:
-    explicit IonCompilationId(uint64_t id)
-      : idLo_(id & UINT32_MAX),
-        idHi_(id >> 32)
-    {}
-    bool operator==(const IonCompilationId& other) const {
-        return idLo_ == other.idLo_ && idHi_ == other.idHi_;
-    }
-    bool operator!=(const IonCompilationId& other) const {
-        return !operator==(other);
-    }
-};
-
 class RecompileInfo
 {
     JSScript* script_;
     IonCompilationId id_;
 
   public:
     RecompileInfo(JSScript* script, IonCompilationId id)
       : script_(script),