Reorder initializers in class Package to remove warnings.

This commit is contained in:
beard%netscape.com 2002-01-16 16:12:36 +00:00
parent 83fc380ff9
commit 6bfa45b16d

View File

@ -115,8 +115,8 @@ static const double two31 = 2147483648.0;
extern JSType *Unit_Type;
extern JSType *Function_Type;
extern JSType *Attribute_Type; // used to define 'prototype' 'static' etc & Namespace values
extern JSType *Package_Type;
extern JSType *Attribute_Type; // used to define 'prototype' 'static' etc & Namespace values
extern JSType *Package_Type;
extern JSType *NamedArgument_Type;
extern JSType *Date_Type;
@ -241,7 +241,7 @@ static const double two31 = 2147483648.0;
static Collector::InstanceOwner<JSValue> owner;
return gc.allocateObject(n, &owner);
}
#ifdef DEBUG
void* operator new(size_t s) { void *t = STD::malloc(s); trace_alloc("JSValue", s, t); return t; }
void operator delete(void* t) { trace_release("JSValue", t); STD::free(t); }
@ -605,7 +605,7 @@ XXX ...couldn't get this to work...
virtual Property *defineVariable(Context *cx, const String &name, AttributeStmtNode *attr, JSType *type, const JSValue v);
virtual Property *defineVariable(Context *cx, const String &name, NamespaceList *names, PropertyAttribute attrFlags, JSType *type, const JSValue v);
virtual Property *defineAlias(Context *cx, const String &name, NamespaceList *names, PropertyAttribute attrFlags, JSType *type, JSValue *vp);
virtual Property *defineAlias(Context *cx, const String &name, NamespaceList *names, PropertyAttribute attrFlags, JSType *type, JSValue *vp);
virtual Reference *genReference(bool hasBase, const String& name, NamespaceList *names, Access acc, uint32 depth);
@ -630,8 +630,8 @@ XXX ...couldn't get this to work...
}
}
protected:
typedef Collector::InstanceOwner<JSObject> JSObjectOwner;
protected:
typedef Collector::InstanceOwner<JSObject> JSObjectOwner;
friend class Collector::InstanceOwner<JSObject>;
/**
* Scans through the object, and copies all references.
@ -652,9 +652,9 @@ XXX ...couldn't get this to work...
static JSObjectOwner owner;
return gc.allocateObject(n, &owner);
}
#ifdef DEBUG
public:
public:
void* operator new(size_t s) { void *t = STD::malloc(s); trace_alloc("JSObject", s, t); return t; }
void operator delete(void* t) { trace_release("JSObject", t); STD::free(t); }
#endif
@ -727,9 +727,9 @@ XXX ...couldn't get this to work...
static JSInstanceOwner owner;
return gc.allocateObject(n, &owner);
}
#ifdef DEBUG
public:
public:
void* operator new(size_t s) { void *t = STD::malloc(s); trace_alloc("JSInstance", s, t); return t; }
void operator delete(void* t) { trace_release("JSInstance", t); STD::free(t); }
#endif
@ -880,7 +880,7 @@ XXX ...couldn't get this to work...
mPrototypeObject = (JSObject*) collector->copy(mPrototypeObject);
return sizeof(JSType);
}
public:
void* operator new(size_t n, Collector& gc)
{
@ -889,7 +889,7 @@ XXX ...couldn't get this to work...
}
#ifdef DEBUG
public:
public:
void* operator new(size_t s) { void *t = STD::malloc(s); trace_alloc("JSType", s, t); return t; }
void operator delete(void* t) { trace_release("JSType", t); STD::free(t); }
#endif
@ -997,7 +997,7 @@ XXX ...couldn't get this to work...
};
@ -1129,11 +1129,11 @@ XXX ...couldn't get this to work...
{
JSObject *top = mScopeStack.back();
return top->defineVariable(cx, name, attr, type, v);
}
Property *defineAlias(Context *cx, const String &name, NamespaceList *names, PropertyAttribute attrFlags, JSType *type, JSValue *vp)
{
JSObject *top = mScopeStack.back();
return top->defineAlias(cx, name, names, attrFlags, type, vp);
}
Property *defineAlias(Context *cx, const String &name, NamespaceList *names, PropertyAttribute attrFlags, JSType *type, JSValue *vp)
{
JSObject *top = mScopeStack.back();
return top->defineAlias(cx, name, names, attrFlags, type, vp);
}
Property *defineStaticVariable(Context *cx, const String& name, AttributeStmtNode *attr, JSType *type)
{
@ -1288,9 +1288,9 @@ XXX ...couldn't get this to work...
// Get a type from an ExprNode
JSType *extractType(ExprNode *t);
// concoct a package name from an id list
String ScopeChain::getPackageName(IdentifierList *packageIdList);
String ScopeChain::getPackageName(IdentifierList *packageIdList);
};
@ -1433,7 +1433,7 @@ XXX ...couldn't get this to work...
}
#ifdef DEBUG
public:
public:
void* operator new(size_t s) { void *t = STD::malloc(s); trace_alloc("JSFunction", s, t); return t; }
void operator delete(void* t) { trace_release("JSFunction", t); STD::free(t); }
#endif
@ -1524,7 +1524,7 @@ XXX ...couldn't get this to work...
}
#ifdef DEBUG
public:
public:
void* operator new(size_t s) { void *t = STD::malloc(s); trace_alloc("JSBoundFunction", s, t); return t; }
void operator delete(void* t) { trace_release("JSBoundFunction", t); STD::free(t); }
#endif
@ -1576,22 +1576,22 @@ XXX ...couldn't get this to work...
// called directly by String.match
extern JSValue RegExp_exec(Context *cx, const JSValue& thisValue, JSValue *argv, uint32 argc);
class Attribute;
class Package : public JSObject {
public:
typedef enum { OnItsWay, InHand } PackageStatus;
Package(const String &name) : mName(name), mStatus(OnItsWay), JSObject(Package_Type) { }
String mName;
PackageStatus mStatus;
};
class Attribute;
typedef std::vector<Package *> PackageList;
#define PACKAGE_NAME(pi) ((*pi)->mName)
#define PACKAGE_STATUS(pi) ((*pi)->mStatus)
class Package : public JSObject {
public:
typedef enum { OnItsWay, InHand } PackageStatus;
Package(const String &name) : JSObject(Package_Type), mName(name), mStatus(OnItsWay) { }
String mName;
PackageStatus mStatus;
};
typedef std::vector<Package *> PackageList;
#define PACKAGE_NAME(pi) ((*pi)->mName)
#define PACKAGE_STATUS(pi) ((*pi)->mStatus)
class Context {
public:
@ -1828,8 +1828,8 @@ XXX ...couldn't get this to work...
PackageList mPackages; // the currently loaded packages, mPackages.back() is the current package
bool checkForPackage(const String &packageName); // return true if loaded, throw exception if loading
void loadPackage(const String &packageName, const String &filename); // load package from file
bool checkForPackage(const String &packageName); // return true if loaded, throw exception if loading
void loadPackage(const String &packageName, const String &filename); // load package from file
JSValue readEvalFile(const String& fileName);
JSValue readEvalString(const String &str, const String& fileName, ScopeChain *scopeChain, const JSValue& thisValue);
@ -1934,7 +1934,7 @@ XXX ...couldn't get this to work...
}
#ifdef DEBUG
public:
public:
void* operator new(size_t s) { void *t = STD::malloc(s); trace_alloc("NamedArgument", s, t); return t; }
void operator delete(void* t) { trace_release("NamedArgument", t); STD::free(t); }
#endif
@ -1973,7 +1973,7 @@ XXX ...couldn't get this to work...
}
#ifdef DEBUG
public:
public:
void* operator new(size_t s) { void *t = STD::malloc(s); trace_alloc("Attribute", s, t); return t; }
void operator delete(void* t) { trace_release("Attribute", t); STD::free(t); }
#endif