Commit a845d282 authored by weinig@apple.com's avatar weinig@apple.com

JavaScriptCore:

        Reviewed by Oliver.

        Remove dummy variable from ClassInfo reducing the size of the struct by 1 word.
        The variable had been kept around for binary compatibility, but since nothing
        else is there is no point in continuing to keep it around.

        * API/JSCallbackConstructor.cpp:
        (KJS::):
        * API/JSCallbackFunction.cpp:
        (KJS::):
        * API/JSCallbackObject.cpp:
        (KJS::):
        * bindings/objc/objc_runtime.mm:
        * bindings/runtime_array.cpp:
        * bindings/runtime_object.cpp:
        * kjs/array_instance.cpp:
        (KJS::):
        * kjs/array_object.cpp:
        (KJS::):
        * kjs/bool_object.cpp:
        * kjs/date_object.cpp:
        (KJS::):
        * kjs/error_object.cpp:
        * kjs/function.cpp:
        (KJS::):
        * kjs/internal.cpp:
        (KJS::):
        * kjs/lookup.h:
        * kjs/math_object.cpp:
        * kjs/number_object.cpp:
        * kjs/object.h:
        * kjs/regexp_object.cpp:
        * kjs/string_object.cpp:
        (KJS::):

WebCore:

        Reviewed by Oliver.

        Remove dummy variable from ClassInfo reducing the size of the struct by 1 word.
        The variable had been kept around for binary compatibility, but since nothing
        else is there is no point in continuing to keep it around.

        * bindings/js/JSDOMExceptionConstructor.cpp:
        (WebCore::):
        * bindings/js/JSHTMLInputElementBase.cpp:
        (WebCore::):
        * bindings/js/JSNamedNodesCollection.cpp:
        (WebCore::):
        * bindings/js/JSXMLHttpRequest.cpp:
        (KJS::):
        * bindings/js/JSXSLTProcessor.cpp:
        (KJS::):
        * bindings/js/kjs_css.cpp:
        (WebCore::):
        * bindings/js/kjs_events.cpp:
        (WebCore::):
        * bindings/js/kjs_navigator.cpp:
        (KJS::):
        * bindings/js/kjs_window.cpp:
        (KJS::):
        * bindings/scripts/CodeGeneratorJS.pm:



git-svn-id: http://svn.webkit.org/repository/webkit/trunk@27413 268f45cc-cd09-0410-ab3c-d52691b4dbfc
parent 92087888
......@@ -32,7 +32,7 @@
namespace KJS {
const ClassInfo JSCallbackConstructor::info = { "CallbackConstructor", 0, 0, 0 };
const ClassInfo JSCallbackConstructor::info = { "CallbackConstructor", 0, 0};
JSCallbackConstructor::JSCallbackConstructor(ExecState* exec, JSClassRef jsClass, JSObjectCallAsConstructorCallback callback)
: JSObject(exec->lexicalInterpreter()->builtinObjectPrototype())
......
......@@ -34,7 +34,7 @@
namespace KJS {
const ClassInfo JSCallbackFunction::info = { "CallbackFunction", &InternalFunctionImp::info, 0, 0 };
const ClassInfo JSCallbackFunction::info = { "CallbackFunction", &InternalFunctionImp::info, 0};
JSCallbackFunction::JSCallbackFunction(ExecState* exec, JSObjectCallAsFunctionCallback callback, const Identifier& name)
: InternalFunctionImp(static_cast<FunctionPrototype*>(exec->lexicalInterpreter()->builtinFunctionPrototype()), name)
......
......@@ -31,7 +31,7 @@
namespace KJS {
// Define the two types of JSCallbackObjects we support.
template <> const ClassInfo JSCallbackObject<JSObject>::info = { "CallbackObject", 0, 0, 0 };
template <> const ClassInfo JSCallbackObject<JSGlobalObject>::info = { "CallbackGlobalObject", 0, 0, 0 };
template <> const ClassInfo JSCallbackObject<JSObject>::info = { "CallbackObject", 0, 0 };
template <> const ClassInfo JSCallbackObject<JSGlobalObject>::info = { "CallbackGlobalObject", 0, 0 };
} // namespace KJS
2007-11-03 Sam Weinig <sam@webkit.org>
Reviewed by Oliver.
Remove dummy variable from ClassInfo reducing the size of the struct by 1 word.
The variable had been kept around for binary compatibility, but since nothing
else is there is no point in continuing to keep it around.
* API/JSCallbackConstructor.cpp:
(KJS::):
* API/JSCallbackFunction.cpp:
(KJS::):
* API/JSCallbackObject.cpp:
(KJS::):
* bindings/objc/objc_runtime.mm:
* bindings/runtime_array.cpp:
* bindings/runtime_object.cpp:
* kjs/array_instance.cpp:
(KJS::):
* kjs/array_object.cpp:
(KJS::):
* kjs/bool_object.cpp:
* kjs/date_object.cpp:
(KJS::):
* kjs/error_object.cpp:
* kjs/function.cpp:
(KJS::):
* kjs/internal.cpp:
(KJS::):
* kjs/lookup.h:
* kjs/math_object.cpp:
* kjs/number_object.cpp:
* kjs/object.h:
* kjs/regexp_object.cpp:
* kjs/string_object.cpp:
(KJS::):
2007-11-03 Kevin McCullough <kmccullough@apple.com>
- Updated testkjs results to make the build bots green until we
......
......@@ -196,7 +196,7 @@ unsigned int ObjcArray::getLength() const
return [_array.get() count];
}
const ClassInfo ObjcFallbackObjectImp::info = {"ObjcFallbackObject", 0, 0, 0};
const ClassInfo ObjcFallbackObjectImp::info = { "ObjcFallbackObject", 0, 0 };
ObjcFallbackObjectImp::ObjcFallbackObjectImp(ObjcInstance* i, const KJS::Identifier propertyName)
: _instance(i)
......
......@@ -28,7 +28,7 @@
using namespace KJS;
const ClassInfo RuntimeArray::info = {"RuntimeArray", &ArrayInstance::info, 0, 0};
const ClassInfo RuntimeArray::info = { "RuntimeArray", &ArrayInstance::info, 0 };
RuntimeArray::RuntimeArray(ExecState *exec, Bindings::Array *a)
: JSObject(exec->lexicalInterpreter()->builtinArrayPrototype())
......
......@@ -34,7 +34,7 @@
using namespace KJS;
using namespace Bindings;
const ClassInfo RuntimeObjectImp::info = {"RuntimeObject", 0, 0, 0};
const ClassInfo RuntimeObjectImp::info = { "RuntimeObject", 0, 0 };
RuntimeObjectImp::RuntimeObjectImp(Bindings::Instance *i)
: instance(i)
......
......@@ -51,7 +51,7 @@ static const unsigned minDensityMultiplier = 8;
static const unsigned mergeSortCutoff = 10000;
const ClassInfo ArrayInstance::info = {"Array", 0, 0, 0};
const ClassInfo ArrayInstance::info = {"Array", 0, 0};
static inline size_t storageSize(unsigned vectorLength)
{
......
......@@ -36,7 +36,7 @@ namespace KJS {
// ------------------------------ ArrayPrototype ----------------------------
const ClassInfo ArrayPrototype::info = {"Array", &ArrayInstance::info, &arrayTable, 0};
const ClassInfo ArrayPrototype::info = {"Array", &ArrayInstance::info, &arrayTable};
/* Source for array_object.lut.h
@begin arrayTable 16
......
......@@ -31,7 +31,7 @@ using namespace KJS;
// ------------------------------ BooleanInstance ---------------------------
const ClassInfo BooleanInstance::info = {"Boolean", 0, 0, 0};
const ClassInfo BooleanInstance::info = {"Boolean", 0, 0};
BooleanInstance::BooleanInstance(JSObject *proto)
: JSWrapperObject(proto)
......
......@@ -313,7 +313,7 @@ static void fillStructuresUsingDateArgs(ExecState *exec, const List &args, int m
// ------------------------------ DateInstance ------------------------------
const ClassInfo DateInstance::info = {"Date", 0, 0, 0};
const ClassInfo DateInstance::info = {"Date", 0, 0};
DateInstance::DateInstance(JSObject *proto)
: JSWrapperObject(proto)
......@@ -370,7 +370,7 @@ static inline bool isTime_tSigned()
// ------------------------------ DatePrototype -----------------------------
const ClassInfo DatePrototype::info = {"Date", &DateInstance::info, &dateTable, 0};
const ClassInfo DatePrototype::info = {"Date", &DateInstance::info, &dateTable};
/* Source for date_object.lut.h
We use a negative ID to denote the "UTC" variant.
......
......@@ -33,7 +33,7 @@ using namespace KJS;
// ------------------------------ ErrorInstance ----------------------------
const ClassInfo ErrorInstance::info = {"Error", 0, 0, 0};
const ClassInfo ErrorInstance::info = {"Error", 0, 0};
ErrorInstance::ErrorInstance(JSObject *proto)
: JSObject(proto)
......@@ -127,7 +127,7 @@ NativeErrorPrototype::NativeErrorPrototype(ExecState* exec, ErrorPrototype* erro
// ------------------------------ NativeErrorImp -------------------------------
const ClassInfo NativeErrorImp::info = {"Function", &InternalFunctionImp::info, 0, 0};
const ClassInfo NativeErrorImp::info = {"Function", &InternalFunctionImp::info, 0};
NativeErrorImp::NativeErrorImp(ExecState* exec, FunctionPrototype* funcProto, JSObject* prot)
: InternalFunctionImp(funcProto)
......
......@@ -51,7 +51,7 @@ namespace KJS {
// ----------------------------- FunctionImp ----------------------------------
const ClassInfo FunctionImp::info = { "Function", &InternalFunctionImp::info, 0, 0 };
const ClassInfo FunctionImp::info = { "Function", &InternalFunctionImp::info, 0 };
FunctionImp::FunctionImp(ExecState* exec, const Identifier& name, FunctionBodyNode* b, const ScopeChain& sc)
: InternalFunctionImp(static_cast<FunctionPrototype*>(exec->lexicalInterpreter()->builtinFunctionPrototype()), name)
......@@ -326,7 +326,7 @@ Identifier& IndexToNameMap::operator[](const Identifier& index)
// ------------------------------ Arguments ---------------------------------
const ClassInfo Arguments::info = {"Arguments", 0, 0, 0};
const ClassInfo Arguments::info = { "Arguments", 0, 0 };
// ECMA 10.1.8
Arguments::Arguments(ExecState* exec, FunctionImp* func, const List& args, ActivationImp* act)
......@@ -390,7 +390,7 @@ bool Arguments::deleteProperty(ExecState* exec, const Identifier& propertyName)
// ------------------------------ ActivationImp --------------------------------
const ClassInfo ActivationImp::info = {"Activation", 0, 0, 0};
const ClassInfo ActivationImp::info = { "Activation", 0, 0 };
ActivationImp::ActivationImp(ExecState* exec)
: d(new ActivationImpPrivate(exec))
......
......@@ -217,7 +217,7 @@ bool LabelStack::contains(const Identifier &id) const
// ------------------------------ InternalFunctionImp --------------------------
const ClassInfo InternalFunctionImp::info = {"Function", 0, 0, 0};
const ClassInfo InternalFunctionImp::info = { "Function", 0, 0 };
InternalFunctionImp::InternalFunctionImp()
{
......
......@@ -326,7 +326,7 @@ namespace KJS {
};
#define KJS_IMPLEMENT_PROTOTYPE(ClassName, ClassPrototype, ClassFunction) \
const ClassInfo ClassPrototype::info = { ClassName"Prototype", 0, &ClassPrototype##Table, 0 }; \
const ClassInfo ClassPrototype::info = { ClassName"Prototype", 0, &ClassPrototype##Table }; \
JSObject* ClassPrototype::self(ExecState* exec) \
{ \
static Identifier* prototypeIdentifier = new Identifier("[[" ClassName ".prototype]]"); \
......
......@@ -32,7 +32,7 @@ using namespace KJS;
// ------------------------------ MathObjectImp --------------------------------
const ClassInfo MathObjectImp::info = { "Math", 0, &mathTable, 0 };
const ClassInfo MathObjectImp::info = { "Math", 0, &mathTable };
/* Source for math_object.lut.h
@begin mathTable 21
......
......@@ -35,7 +35,7 @@ using namespace KJS;
// ------------------------------ NumberInstance ----------------------------
const ClassInfo NumberInstance::info = {"Number", 0, 0, 0};
const ClassInfo NumberInstance::info = { "Number", 0, 0 };
NumberInstance::NumberInstance(JSObject *proto)
: JSWrapperObject(proto)
......@@ -410,7 +410,7 @@ JSValue *NumberProtoFunc::callAsFunction(ExecState *exec, JSObject *thisObj, con
// ------------------------------ NumberObjectImp ------------------------------
const ClassInfo NumberObjectImp::info = {"Function", &InternalFunctionImp::info, &numberTable, 0};
const ClassInfo NumberObjectImp::info = { "Function", &InternalFunctionImp::info, &numberTable };
/* Source for number_object.lut.h
@begin numberTable 5
......
......@@ -62,15 +62,11 @@ namespace KJS {
* Pointer to the class information of the base class.
* 0L if there is none.
*/
const ClassInfo *parentClass;
const ClassInfo* parentClass;
/**
* Static hash-table of properties.
*/
const HashTable *propHashTable;
/**
* Reserved for future extension.
*/
void *dummy;
const HashTable* propHashTable;
};
// This is an internal value object which stores getter and setter functions
......@@ -149,8 +145,8 @@ namespace KJS {
* And in your source file:
*
* \code
* const ClassInfo BarImp::info = {"Bar", 0, 0, 0}; // no parent class
* const ClassInfo FooImp::info = {"Foo", &BarImp::info, 0, 0};
* const ClassInfo BarImp::info = { "Bar", 0, 0 }; // no parent class
* const ClassInfo FooImp::info = { "Foo", &BarImp::info, 0 };
* \endcode
*
* @see inherits()
......
......@@ -40,7 +40,7 @@ namespace KJS {
// ECMA 15.10.5
const ClassInfo RegExpPrototype::info = {"RegExpPrototype", 0, 0, 0};
const ClassInfo RegExpPrototype::info = { "RegExpPrototype", 0, 0 };
RegExpPrototype::RegExpPrototype(ExecState *exec,
ObjectPrototype *objProto,
......@@ -151,7 +151,7 @@ JSValue *RegExpProtoFunc::callAsFunction(ExecState *exec, JSObject *thisObj, con
// ------------------------------ RegExpImp ------------------------------------
const ClassInfo RegExpImp::info = {"RegExp", 0, 0, 0};
const ClassInfo RegExpImp::info = { "RegExp", 0, 0 };
RegExpImp::RegExpImp(RegExpPrototype* regexpProto, RegExp* exp)
: JSObject(regexpProto)
......@@ -225,7 +225,7 @@ JSValue* RegExpImp::callAsFunction(ExecState* exec, JSObject*, const List& args)
// ------------------------------ RegExpObjectImp ------------------------------
const ClassInfo RegExpObjectImp::info = {"Function", &InternalFunctionImp::info, &RegExpTable, 0};
const ClassInfo RegExpObjectImp::info = { "Function", &InternalFunctionImp::info, &RegExpTable };
/* Source for regexp_object.lut.h
@begin RegExpTable 20
......
......@@ -43,7 +43,7 @@ namespace KJS {
// ------------------------------ StringInstance ----------------------------
const ClassInfo StringInstance::info = {"String", 0, 0, 0};
const ClassInfo StringInstance::info = { "String", 0, 0 };
StringInstance::StringInstance(JSObject *proto)
: JSWrapperObject(proto)
......@@ -126,7 +126,7 @@ void StringInstance::getPropertyNames(ExecState* exec, PropertyNameArray& proper
}
// ------------------------------ StringPrototype ---------------------------
const ClassInfo StringPrototype::info = {"String", &StringInstance::info, &stringTable, 0};
const ClassInfo StringPrototype::info = { "String", &StringInstance::info, &stringTable };
/* Source for string_object.lut.h
@begin stringTable 26
toString StringProtoFunc::ToString DontEnum|Function 0
......
2007-11-03 Sam Weinig <sam@webkit.org>
Reviewed by Oliver.
Remove dummy variable from ClassInfo reducing the size of the struct by 1 word.
The variable had been kept around for binary compatibility, but since nothing
else is there is no point in continuing to keep it around.
* bindings/js/JSDOMExceptionConstructor.cpp:
(WebCore::):
* bindings/js/JSHTMLInputElementBase.cpp:
(WebCore::):
* bindings/js/JSNamedNodesCollection.cpp:
(WebCore::):
* bindings/js/JSXMLHttpRequest.cpp:
(KJS::):
* bindings/js/JSXSLTProcessor.cpp:
(KJS::):
* bindings/js/kjs_css.cpp:
(WebCore::):
* bindings/js/kjs_events.cpp:
(WebCore::):
* bindings/js/kjs_navigator.cpp:
(KJS::):
* bindings/js/kjs_window.cpp:
(KJS::):
* bindings/scripts/CodeGeneratorJS.pm:
2007-11-03 Kevin Ollivier <kevino@theolliviers.com>
Build fixes to get wx impls. building on trunk.
......
......@@ -34,7 +34,7 @@ namespace WebCore {
using namespace KJS;
const ClassInfo JSDOMExceptionConstructor::info = { "DOMExceptionConstructor", 0, 0, 0 };
const ClassInfo JSDOMExceptionConstructor::info = { "DOMExceptionConstructor", 0, 0 };
/* Source for DOMExceptionConstructorTable. Use "make hashtables" to regenerate.
@begin JSDOMExceptionConstructorTable 15
......
......@@ -75,7 +75,7 @@ JSValue* JSHTMLInputElementBaseFunction::callAsFunction(ExecState* exec, JSObjec
return jsUndefined();
}
const ClassInfo JSHTMLInputElementBase::info = { "JSHTMLInputElementBase", &JSHTMLElement::info, &JSHTMLInputElementBaseTable, 0 };
const ClassInfo JSHTMLInputElementBase::info = { "JSHTMLInputElementBase", &JSHTMLElement::info, &JSHTMLInputElementBaseTable };
JSHTMLInputElementBase::JSHTMLInputElementBase(ExecState* exec, PassRefPtr<HTMLInputElement> e)
: JSHTMLElement(exec, e.get())
......
......@@ -35,7 +35,7 @@ namespace WebCore {
using namespace KJS;
const ClassInfo JSNamedNodesCollection::info = { "Collection", 0, 0, 0 };
const ClassInfo JSNamedNodesCollection::info = { "Collection", 0, 0 };
// Such a collection is usually very short-lived, it only exists
// for constructs like document.forms.<name>[1],
......
......@@ -76,7 +76,7 @@ JSObject* JSXMLHttpRequestConstructorImp::construct(ExecState* exec, const List&
return new JSXMLHttpRequest(exec, doc.get());
}
const ClassInfo JSXMLHttpRequest::info = { "JSXMLHttpRequest", 0, &JSXMLHttpRequestTable, 0 };
const ClassInfo JSXMLHttpRequest::info = { "JSXMLHttpRequest", 0, &JSXMLHttpRequestTable };
/* Source for JSXMLHttpRequestTable.
@begin JSXMLHttpRequestTable 7
......
......@@ -40,7 +40,7 @@ using namespace WebCore;
namespace KJS {
const ClassInfo JSXSLTProcessor::info = { "XSLTProcessor", 0, 0, 0 };
const ClassInfo JSXSLTProcessor::info = { "XSLTProcessor", 0, 0 };
/*
@begin XSLTProcessorPrototypeTable 7
......
......@@ -34,7 +34,7 @@ namespace WebCore {
using namespace KJS;
const ClassInfo JSRGBColor::info = { "RGBColor", 0, &JSRGBColorTable, 0 };
const ClassInfo JSRGBColor::info = { "RGBColor", 0, &JSRGBColorTable };
/*
@begin JSRGBColorTable 3
......
......@@ -350,7 +350,7 @@ JSValue* getNodeEventListener(EventTargetNode* n, const AtomicString& eventType)
// -------------------------------------------------------------------------
const ClassInfo JSClipboard::info = { "Clipboard", 0, &JSClipboardTable, 0 };
const ClassInfo JSClipboard::info = { "Clipboard", 0, &JSClipboardTable };
/* Source for JSClipboardTable. Use "make hashtables" to regenerate.
@begin JSClipboardTable 3
......
......@@ -141,16 +141,16 @@ namespace KJS {
namespace KJS {
const ClassInfo Plugins::info = { "PluginArray", 0, &PluginsTable, 0 };
const ClassInfo MimeTypes::info = { "MimeTypeArray", 0, &MimeTypesTable, 0 };
const ClassInfo Plugin::info = { "Plugin", 0, &PluginTable, 0 };
const ClassInfo MimeType::info = { "MimeType", 0, &MimeTypeTable, 0 };
const ClassInfo Plugins::info = { "PluginArray", 0, &PluginsTable };
const ClassInfo MimeTypes::info = { "MimeTypeArray", 0, &MimeTypesTable };
const ClassInfo Plugin::info = { "Plugin", 0, &PluginTable };
const ClassInfo MimeType::info = { "MimeType", 0, &MimeTypeTable };
Vector<PluginInfo*> *KJS::PluginBase::plugins = 0;
Vector<MimeClassInfo*> *KJS::PluginBase::mimes = 0;
int KJS::PluginBase::m_plugInCacheRefCount = 0;
const ClassInfo Navigator::info = { "Navigator", 0, &NavigatorTable, 0 };
const ClassInfo Navigator::info = { "Navigator", 0, &NavigatorTable };
/*
@begin NavigatorTable 13
appCodeName Navigator::AppCodeName DontDelete|ReadOnly
......
......@@ -146,7 +146,7 @@ namespace KJS {
////////////////////// Window Object ////////////////////////
const ClassInfo Window::info = { "Window", 0, &WindowTable, 0 };
const ClassInfo Window::info = { "Window", 0, &WindowTable };
/*
@begin WindowTable 118
......@@ -1682,7 +1682,7 @@ Window::UnprotectedListenersMap& Window::jsUnprotectedHTMLEventListeners()
////////////////////// Location Object ////////////////////////
const ClassInfo Location::info = { "Location", 0, &LocationTable, 0 };
const ClassInfo Location::info = { "Location", 0, &LocationTable };
/*
@begin LocationTable 12
assign Location::Assign DontDelete|Function 1
......
......@@ -742,7 +742,7 @@ sub GenerateImplementation
\@hashKeys, \@hashValues,
\@hashSpecials, \@hashParameters);
push(@implContent, "const ClassInfo ${className}Prototype::info = { \"${interfaceName}Prototype\", 0, &${className}PrototypeTable, 0 };\n\n");
push(@implContent, "const ClassInfo ${className}Prototype::info = { \"${interfaceName}Prototype\", 0, &${className}PrototypeTable };\n\n");
if ($dataNode->extendedAttributes->{"DoNotCache"}) {
push(@implContent, "JSObject* ${className}Prototype::self()\n");
push(@implContent, "{\n");
......@@ -781,11 +781,11 @@ sub GenerateImplementation
}
if ($numAttributes > 0) {
push(@implContent, "&${className}Table, ");
push(@implContent, "&${className}Table ");
} else {
push(@implContent, "0, ")
push(@implContent, "0 ")
}
push(@implContent, "0 };\n\n");
push(@implContent, "};\n\n");
# Get correct pass/store types respecting PODType flag
my $podType = $dataNode->extendedAttributes->{"PODType"};
......@@ -1789,7 +1789,7 @@ EOF
$implContent .= << "EOF";
};
const ClassInfo ${className}Constructor::info = { "${interfaceName}Constructor", 0, &${className}ConstructorTable, 0 };
const ClassInfo ${className}Constructor::info = { "${interfaceName}Constructor", 0, &${className}ConstructorTable };
bool ${className}Constructor::getOwnPropertySlot(ExecState* exec, const Identifier& propertyName, PropertySlot& slot)
{
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment