[gjs/mozjs78: 16/22] js: Update header includes for SpiderMonkey 78




commit 3923a0cc31175d72d292ad5ce360ab8f8d470580
Author: Philip Chimento <philip chimento gmail com>
Date:   Wed Aug 5 22:14:16 2020 -0700

    js: Update header includes for SpiderMonkey 78
    
    Adapt the IWYU processing script to the contents of the new version of
    js/TypeDecls.h, and adjust the includes where necessary.
    
    See: GNOME/gjs#329.

 gi/arg.cpp                  | 1 -
 gi/fundamental.cpp          | 2 --
 gi/wrapperutils.h           | 1 +
 gjs/context.cpp             | 4 +++-
 gjs/jsapi-dynamic-class.cpp | 1 +
 gjs/jsapi-util-string.cpp   | 1 +
 modules/print.cpp           | 1 -
 tools/process_iwyu.py       | 5 +++--
 8 files changed, 9 insertions(+), 7 deletions(-)
---
diff --git a/gi/arg.cpp b/gi/arg.cpp
index d945a38a..e9870de9 100644
--- a/gi/arg.cpp
+++ b/gi/arg.cpp
@@ -26,7 +26,6 @@
 
 #include <string.h>  // for strcmp, strlen, memcpy
 
-#include <cmath>   // for std::abs
 #include <limits>  // for numeric_limits
 #include <string>
 #include <type_traits>
diff --git a/gi/fundamental.cpp b/gi/fundamental.cpp
index 0f5c3551..ac31e7ea 100644
--- a/gi/fundamental.cpp
+++ b/gi/fundamental.cpp
@@ -24,8 +24,6 @@
 
 #include <config.h>
 
-#include <utility>  // for (implicit) move
-
 #include <girepository.h>
 #include <glib.h>
 
diff --git a/gi/wrapperutils.h b/gi/wrapperutils.h
index 912ab36e..5eaf955e 100644
--- a/gi/wrapperutils.h
+++ b/gi/wrapperutils.h
@@ -37,6 +37,7 @@
 #include <glib.h>
 
 #include <js/CallArgs.h>
+#include <js/ComparisonOperators.h>
 #include <js/Id.h>
 #include <js/MemoryFunctions.h>
 #include <js/RootingAPI.h>
diff --git a/gjs/context.cpp b/gjs/context.cpp
index ea12fbca..30d79823 100644
--- a/gjs/context.cpp
+++ b/gjs/context.cpp
@@ -24,6 +24,7 @@
 #include <config.h>
 
 #include <signal.h>  // for sigaction, SIGUSR1, sa_handler
+#include <stdint.h>
 #include <stdio.h>      // for FILE, fclose, size_t
 #include <string.h>     // for memset
 
@@ -34,7 +35,8 @@
 #endif
 
 #include <new>
-#include <string>  // for u16string
+#include <string>       // for u16string
+#include <type_traits>  // for remove_reference<>::type
 #include <unordered_map>
 #include <utility>  // for move
 #include <vector>
diff --git a/gjs/jsapi-dynamic-class.cpp b/gjs/jsapi-dynamic-class.cpp
index eb7d98d3..d5a48cf6 100644
--- a/gjs/jsapi-dynamic-class.cpp
+++ b/gjs/jsapi-dynamic-class.cpp
@@ -30,6 +30,7 @@
 
 #include <js/CallArgs.h>  // for JSNative
 #include <js/Class.h>
+#include <js/ComparisonOperators.h>
 #include <js/PropertyDescriptor.h>  // for JSPROP_GETTER
 #include <js/Realm.h>  // for GetRealmObjectPrototype
 #include <js/RootingAPI.h>
diff --git a/gjs/jsapi-util-string.cpp b/gjs/jsapi-util-string.cpp
index 425911ba..9e97ead8 100644
--- a/gjs/jsapi-util-string.cpp
+++ b/gjs/jsapi-util-string.cpp
@@ -36,6 +36,7 @@
 
 #include <js/CharacterEncoding.h>
 #include <js/Class.h>
+#include <js/ComparisonOperators.h>
 #include <js/GCAPI.h>  // for AutoCheckCannotGC
 #include <js/Id.h>     // for JSID_IS_STRING...
 #include <js/RootingAPI.h>
diff --git a/modules/print.cpp b/modules/print.cpp
index 5c82c5c7..bccbcfed 100644
--- a/modules/print.cpp
+++ b/modules/print.cpp
@@ -17,7 +17,6 @@
 #include <js/RootingAPI.h>
 #include <js/TypeDecls.h>
 #include <js/Utility.h>  // for UniqueChars
-#include <js/Value.h>
 #include <jsapi.h>
 
 #include "gjs/jsapi-util.h"
diff --git a/tools/process_iwyu.py b/tools/process_iwyu.py
index 786bb67f..6515cce6 100755
--- a/tools/process_iwyu.py
+++ b/tools/process_iwyu.py
@@ -36,17 +36,18 @@ FWD_HEADER = '#include <js/TypeDecls.h>'
 FWD_DECLS_IN_HEADER = (
     'class JSAtom;',
     'struct JSContext;',
+    'struct JSClass;',
     'class JSFunction;',
+    'class JSFreeOp;',
     'class JSObject;',
     'struct JSRuntime;',
     'class JSScript;',
     'class JSString;',
-    'struct JSFreeOp;',
     'namespace js { class TempAllocPolicy; }'
     'namespace JS { struct PropertyKey; }',
     'namespace JS { class Symbol; }',
     'namespace JS { class BigInt; }',
-    'namespace JS { union Value; }',
+    'namespace JS { class Value; }',
     'namespace JS { class Compartment; }',
     'namespace JS { class Realm; }',
     'namespace JS { struct Runtime; }',


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]