Bug 823080 - Fix warning spam on MSVC. r=sphink

This commit is contained in:
Masatoshi Kimura 2012-12-22 09:16:50 +09:00
parent 2393413478
commit fd507ef09f
24 changed files with 45 additions and 42 deletions

View File

@ -320,7 +320,7 @@ BarrieredSetPair(JSCompartment *comp,
v2.post();
}
struct Shape;
class Shape;
class BaseShape;
namespace types { struct TypeObject; }

View File

@ -18,9 +18,9 @@
extern "C" {
struct JSContext;
struct JSFunction;
class JSFunction;
struct JSObject;
struct JSScript;
class JSScript;
}
class JSAtom;
@ -32,7 +32,7 @@ class ArgumentsObject;
class BaseShape;
class GlobalObject;
class UnownedBaseShape;
struct Shape;
class Shape;
template<class, typename> class HeapPtr;

View File

@ -12,8 +12,8 @@
#include "TypeOracle.h"
#include "Registers.h"
struct JSFunction;
struct JSScript;
class JSFunction;
class JSScript;
namespace js {
namespace ion {

View File

@ -18,7 +18,7 @@ namespace JSC {
class ExecutablePool;
}
struct JSScript;
class JSScript;
namespace js {
namespace ion {

View File

@ -12,8 +12,8 @@
#include "IonCode.h"
#include "SnapshotReader.h"
struct JSFunction;
struct JSScript;
class JSFunction;
class JSScript;
namespace js {
namespace ion {

View File

@ -17,8 +17,8 @@
#include "IonCode.h"
#include "IonFrameIterator.h"
struct JSFunction;
struct JSScript;
class JSFunction;
class JSScript;
namespace js {
namespace ion {

View File

@ -13,7 +13,7 @@
#include "gc/Root.h"
#include "jsscript.h"
struct JSScript;
class JSScript;
namespace js {
namespace ion {

View File

@ -19,7 +19,7 @@
#include "js/TemplateLib.h"
#include "vm/ScopeObject.h"
struct JSScript;
class JSScript;
/* Forward declaration of downstream register allocations computed for join points. */
namespace js { namespace mjit { struct RegisterAllocation; } }

View File

@ -320,7 +320,8 @@ struct BaseShape {
JSObject *parent;
};
struct Shape {
class Shape {
public:
shadow::BaseShape *base;
jsid _1;
uint32_t slotInfo;

View File

@ -21,8 +21,9 @@ ForwardDeclareJS(Script);
namespace js { class FunctionExtended; }
struct JSFunction : public JSObject
class JSFunction : public JSObject
{
public:
enum Flags {
INTERPRETED = 0x0001, /* function has a JSScript and environment. */
NATIVE_CTOR = 0x0002, /* native that can be called as a constructor */
@ -58,7 +59,7 @@ struct JSFunction : public JSObject
uint16_t flags; /* bitfield composed of the above Flags enum */
union U {
class Native {
friend struct JSFunction;
friend class JSFunction;
js::Native native; /* native method pointer or null */
const JSJitInfo *jitinfo; /* Information about this function to be
used by the JIT;
@ -335,7 +336,7 @@ namespace js {
*/
class FunctionExtended : public JSFunction
{
friend struct JSFunction;
friend class JSFunction;
/* Reserved slots available for storage by particular native functions. */
HeapValue extendedSlots[2];

View File

@ -34,7 +34,7 @@ struct JSCompartment;
namespace js {
class GCHelperThread;
struct Shape;
class Shape;
struct SliceBudget;
enum HeapState {

View File

@ -22,7 +22,7 @@ using JS::AssertCanGC;
namespace js {
struct Shape;
class Shape;
/*
* This auto class should be used around any code that might cause a mark bit to

View File

@ -1114,7 +1114,7 @@ struct TypeCallsite
/* Persistent type information for a script, retained across GCs. */
class TypeScript
{
friend struct ::JSScript;
friend class ::JSScript;
/* Analysis information for the script, cleared on each GC. */
analyze::ScriptAnalysis *analysis;

View File

@ -271,7 +271,7 @@ class WithObject;
struct JSObject : public js::ObjectImpl
{
private:
friend struct js::Shape;
friend class js::Shape;
friend struct js::GCMarker;
friend class js::NewObjectCache;
@ -657,7 +657,7 @@ struct JSObject : public js::ObjectImpl
* Function-specific getters and setters.
*/
friend struct JSFunction;
friend class JSFunction;
inline JSFunction *toFunction();
inline const JSFunction *toFunction() const;

View File

@ -525,7 +525,7 @@ IsSetterPC(jsbytecode *pc)
*/
class PCCounts
{
friend struct ::JSScript;
friend class ::JSScript;
double *counts;
#ifdef DEBUG
size_t capacity;

View File

@ -67,7 +67,7 @@ class KidsPointer {
class PropertyTree
{
friend struct ::JSFunction;
friend class ::JSFunction;
JSCompartment *compartment;

View File

@ -134,7 +134,7 @@ class InlineMap;
class LifoAlloc;
struct Shape;
class Shape;
class Breakpoint;
class BreakpointSite;

View File

@ -172,7 +172,7 @@ typedef enum {
JSTRACE_LAST = JSTRACE_TYPE_OBJECT
} JSGCTraceKind;
/* Struct typedefs. */
/* Struct typedefs and class forward declarations. */
typedef struct JSClass JSClass;
typedef struct JSCompartment JSCompartment;
typedef struct JSConstDoubleSpec JSConstDoubleSpec;
@ -180,7 +180,6 @@ typedef struct JSContext JSContext;
typedef struct JSCrossCompartmentCall JSCrossCompartmentCall;
typedef struct JSErrorReport JSErrorReport;
typedef struct JSExceptionState JSExceptionState;
typedef struct JSFunction JSFunction;
typedef struct JSFunctionSpec JSFunctionSpec;
typedef struct JSIdArray JSIdArray;
typedef struct JSLocaleCallbacks JSLocaleCallbacks;
@ -193,7 +192,6 @@ typedef struct JSPropertySpec JSPropertySpec;
typedef struct JSRuntime JSRuntime;
typedef struct JSSecurityCallbacks JSSecurityCallbacks;
typedef struct JSStackFrame JSStackFrame;
typedef struct JSScript JSScript;
typedef struct JSStructuredCloneCallbacks JSStructuredCloneCallbacks;
typedef struct JSStructuredCloneReader JSStructuredCloneReader;
typedef struct JSStructuredCloneWriter JSStructuredCloneWriter;
@ -201,10 +199,14 @@ typedef struct JSTracer JSTracer;
#ifdef __cplusplus
class JSFlatString;
class JSFunction;
class JSScript;
class JSStableString; // long story
class JSString;
#else
typedef struct JSFlatString JSFlatString;
typedef struct JSFunction JSFunction;
typedef struct JSScript JSScript;
typedef struct JSString JSString;
#endif /* !__cplusplus */

View File

@ -230,7 +230,7 @@ struct StackBaseShape;
class BaseShape : public js::gc::Cell
{
public:
friend struct Shape;
friend class Shape;
friend struct StackBaseShape;
friend struct StackShape;
@ -438,10 +438,10 @@ typedef HashSet<ReadBarriered<UnownedBaseShape>,
StackBaseShape,
SystemAllocPolicy> BaseShapeSet;
struct Shape : public js::gc::Cell
class Shape : public js::gc::Cell
{
friend struct ::JSObject;
friend struct ::JSFunction;
friend class ::JSFunction;
friend class js::Bindings;
friend class js::ObjectImpl;
friend class js::PropertyTree;
@ -549,7 +549,7 @@ struct Shape : public js::gc::Cell
class Range {
protected:
friend struct Shape;
friend class Shape;
/* |cursor| is rooted manually when necessary using Range::AutoRooter. */
RawShape cursor;

View File

@ -30,7 +30,7 @@ namespace ion {
# define ION_DISABLED_SCRIPT ((js::ion::IonScript *)0x1)
# define ION_COMPILING_SCRIPT ((js::ion::IonScript *)0x2)
struct Shape;
class Shape;
class BindingIter;
@ -216,7 +216,7 @@ struct RootMethods<Bindings> {
class ScriptCounts
{
friend struct ::JSScript;
friend class ::JSScript;
friend struct ScriptAndCounts;
/*
@ -247,7 +247,7 @@ typedef HashMap<RawScript,
class DebugScript
{
friend struct ::JSScript;
friend class ::JSScript;
/*
* When non-zero, compile script in single-step mode. The top bit is set and
@ -277,9 +277,8 @@ struct ScriptSource;
} /* namespace js */
struct JSScript : public js::gc::Cell
class JSScript : public js::gc::Cell
{
private:
static const uint32_t stepFlagMask = 0x80000000U;
static const uint32_t stepCountMask = 0x7fffffffU;

View File

@ -495,7 +495,7 @@ class Debugger : private mozilla::LinkedListElement<Debugger>
class BreakpointSite {
friend class Breakpoint;
friend struct ::JSCompartment;
friend struct ::JSScript;
friend class ::JSScript;
friend class Debugger;
public:

View File

@ -916,7 +916,7 @@ extern HeapSlot *emptyObjectElements;
struct Class;
struct GCMarker;
struct ObjectOps;
struct Shape;
class Shape;
class NewObjectCache;
@ -1060,7 +1060,7 @@ class ObjectImpl : public gc::Cell
protected:
friend struct GCMarker;
friend struct Shape;
friend class Shape;
friend class NewObjectCache;
inline void invalidateSlotRange(uint32_t start, uint32_t count);

View File

@ -103,7 +103,7 @@
* from a signal handler when the JIT code is executing.
*/
struct JSFunction;
class JSFunction;
namespace js {

View File

@ -22,7 +22,7 @@
struct JSContext;
struct JSRuntime;
struct JSCompartment;
struct JSScript;
class JSScript;
namespace js {