JSValue::type now JSType* instead of const JSType*, all predefined JSType objects no longer const as well.

This commit is contained in:
beard%netscape.com 2000-06-23 23:25:14 +00:00
Родитель 38e572778c
Коммит 9f413f408b
4 изменённых файлов: 54 добавлений и 54 удалений

Просмотреть файл

@ -47,18 +47,18 @@ const JSValue kTrue = JSValue(true);
const JSValue kFalse = JSValue(false);
const JSValue kNull = JSValue((JSObject*)NULL);
const JSType Any_Type = JSType(widenCString("any"), NULL);
const JSType Integer_Type = JSType(widenCString("Integer"), &Any_Type);
const JSType Number_Type = JSType(widenCString("Number"), &Integer_Type);
const JSType Character_Type = JSType(widenCString("Character"), &Any_Type);
const JSType String_Type = JSType(widenCString("String"), &Character_Type);
const JSType Function_Type = JSType(widenCString("Function"), &Any_Type);
const JSType Array_Type = JSType(widenCString("Array"), &Any_Type);
const JSType Type_Type = JSType(widenCString("Type"), &Any_Type);
const JSType Boolean_Type = JSType(widenCString("Boolean"), &Any_Type);
const JSType Null_Type = JSType(widenCString("Null"), &Any_Type);
const JSType Void_Type = JSType(widenCString("void"), &Any_Type);
const JSType None_Type = JSType(widenCString("none"), &Any_Type);
JSType Any_Type = JSType(widenCString("any"), NULL);
JSType Integer_Type = JSType(widenCString("Integer"), &Any_Type);
JSType Number_Type = JSType(widenCString("Number"), &Integer_Type);
JSType Character_Type = JSType(widenCString("Character"), &Any_Type);
JSType String_Type = JSType(widenCString("String"), &Character_Type);
JSType Function_Type = JSType(widenCString("Function"), &Any_Type);
JSType Array_Type = JSType(widenCString("Array"), &Any_Type);
JSType Type_Type = JSType(widenCString("Type"), &Any_Type);
JSType Boolean_Type = JSType(widenCString("Boolean"), &Any_Type);
JSType Null_Type = JSType(widenCString("Null"), &Any_Type);
JSType Void_Type = JSType(widenCString("void"), &Any_Type);
JSType None_Type = JSType(widenCString("none"), &Any_Type);
#ifdef IS_LITTLE_ENDIAN

Просмотреть файл

@ -77,7 +77,7 @@ namespace JSTypes {
JSArray* array;
JSFunction *function;
JSString *string;
const JSType *type;
JSType *type;
bool boolean;
};
@ -107,7 +107,7 @@ namespace JSTypes {
explicit JSValue(JSFunction* function) : function(function), tag(function_tag) {}
explicit JSValue(JSString* string) : string(string), tag(string_tag) {}
explicit JSValue(bool boolean) : boolean(boolean), tag(boolean_tag) {}
explicit JSValue(const JSType* type) : type(type), tag(type_tag) {}
explicit JSValue(JSType* type) : type(type), tag(type_tag) {}
int32& operator=(int32 i32) { return (tag = i32_tag, this->i32 = i32); }
uint32& operator=(uint32 u32) { return (tag = u32_tag, this->u32 = u32); }
@ -117,7 +117,7 @@ namespace JSTypes {
JSFunction*& operator=(JSFunction* function) { return (tag = function_tag, this->function = function); }
JSString*& operator=(JSString* string) { return (tag = string_tag, this->string = string); }
bool& operator=(bool boolean) { return (tag = boolean_tag, this->boolean = boolean); }
const JSType*& operator=(const JSType* type) { return (tag = type_tag, this->type = type); }
const JSType*& operator=(JSType* type) { return (tag = type_tag, this->type = type); }
bool isFunction() const { return (tag == function_tag); }
bool isObject() const { return ((tag == object_tag) || (tag == function_tag) || (tag == array_tag) || (tag == type_tag)); }
@ -184,18 +184,18 @@ namespace JSTypes {
extern const JSValue kFalse;
extern const JSValue kNull;
extern const JSType Any_Type;
extern const JSType Integer_Type;
extern const JSType Number_Type;
extern const JSType Character_Type;
extern const JSType String_Type;
extern const JSType Function_Type;
extern const JSType Array_Type;
extern const JSType Type_Type;
extern const JSType Boolean_Type;
extern const JSType Null_Type;
extern const JSType Void_Type;
extern const JSType None_Type;
extern JSType Any_Type;
extern JSType Integer_Type;
extern JSType Number_Type;
extern JSType Character_Type;
extern JSType String_Type;
extern JSType Function_Type;
extern JSType Array_Type;
extern JSType Type_Type;
extern JSType Boolean_Type;
extern JSType Null_Type;
extern JSType Void_Type;
extern JSType None_Type;
/**
* Basic behavior of all JS objects, mapping a name to a value,

Просмотреть файл

@ -47,18 +47,18 @@ const JSValue kTrue = JSValue(true);
const JSValue kFalse = JSValue(false);
const JSValue kNull = JSValue((JSObject*)NULL);
const JSType Any_Type = JSType(widenCString("any"), NULL);
const JSType Integer_Type = JSType(widenCString("Integer"), &Any_Type);
const JSType Number_Type = JSType(widenCString("Number"), &Integer_Type);
const JSType Character_Type = JSType(widenCString("Character"), &Any_Type);
const JSType String_Type = JSType(widenCString("String"), &Character_Type);
const JSType Function_Type = JSType(widenCString("Function"), &Any_Type);
const JSType Array_Type = JSType(widenCString("Array"), &Any_Type);
const JSType Type_Type = JSType(widenCString("Type"), &Any_Type);
const JSType Boolean_Type = JSType(widenCString("Boolean"), &Any_Type);
const JSType Null_Type = JSType(widenCString("Null"), &Any_Type);
const JSType Void_Type = JSType(widenCString("void"), &Any_Type);
const JSType None_Type = JSType(widenCString("none"), &Any_Type);
JSType Any_Type = JSType(widenCString("any"), NULL);
JSType Integer_Type = JSType(widenCString("Integer"), &Any_Type);
JSType Number_Type = JSType(widenCString("Number"), &Integer_Type);
JSType Character_Type = JSType(widenCString("Character"), &Any_Type);
JSType String_Type = JSType(widenCString("String"), &Character_Type);
JSType Function_Type = JSType(widenCString("Function"), &Any_Type);
JSType Array_Type = JSType(widenCString("Array"), &Any_Type);
JSType Type_Type = JSType(widenCString("Type"), &Any_Type);
JSType Boolean_Type = JSType(widenCString("Boolean"), &Any_Type);
JSType Null_Type = JSType(widenCString("Null"), &Any_Type);
JSType Void_Type = JSType(widenCString("void"), &Any_Type);
JSType None_Type = JSType(widenCString("none"), &Any_Type);
#ifdef IS_LITTLE_ENDIAN

Просмотреть файл

@ -77,7 +77,7 @@ namespace JSTypes {
JSArray* array;
JSFunction *function;
JSString *string;
const JSType *type;
JSType *type;
bool boolean;
};
@ -107,7 +107,7 @@ namespace JSTypes {
explicit JSValue(JSFunction* function) : function(function), tag(function_tag) {}
explicit JSValue(JSString* string) : string(string), tag(string_tag) {}
explicit JSValue(bool boolean) : boolean(boolean), tag(boolean_tag) {}
explicit JSValue(const JSType* type) : type(type), tag(type_tag) {}
explicit JSValue(JSType* type) : type(type), tag(type_tag) {}
int32& operator=(int32 i32) { return (tag = i32_tag, this->i32 = i32); }
uint32& operator=(uint32 u32) { return (tag = u32_tag, this->u32 = u32); }
@ -117,7 +117,7 @@ namespace JSTypes {
JSFunction*& operator=(JSFunction* function) { return (tag = function_tag, this->function = function); }
JSString*& operator=(JSString* string) { return (tag = string_tag, this->string = string); }
bool& operator=(bool boolean) { return (tag = boolean_tag, this->boolean = boolean); }
const JSType*& operator=(const JSType* type) { return (tag = type_tag, this->type = type); }
const JSType*& operator=(JSType* type) { return (tag = type_tag, this->type = type); }
bool isFunction() const { return (tag == function_tag); }
bool isObject() const { return ((tag == object_tag) || (tag == function_tag) || (tag == array_tag) || (tag == type_tag)); }
@ -184,18 +184,18 @@ namespace JSTypes {
extern const JSValue kFalse;
extern const JSValue kNull;
extern const JSType Any_Type;
extern const JSType Integer_Type;
extern const JSType Number_Type;
extern const JSType Character_Type;
extern const JSType String_Type;
extern const JSType Function_Type;
extern const JSType Array_Type;
extern const JSType Type_Type;
extern const JSType Boolean_Type;
extern const JSType Null_Type;
extern const JSType Void_Type;
extern const JSType None_Type;
extern JSType Any_Type;
extern JSType Integer_Type;
extern JSType Number_Type;
extern JSType Character_Type;
extern JSType String_Type;
extern JSType Function_Type;
extern JSType Array_Type;
extern JSType Type_Type;
extern JSType Boolean_Type;
extern JSType Null_Type;
extern JSType Void_Type;
extern JSType None_Type;
/**
* Basic behavior of all JS objects, mapping a name to a value,