JavaScriptCore:
2008-09-21 Maciej Stachowiak <mjs@apple.com>
Reviewed by Darin.
- introduce a TypeInfo class, for holding per-type (in the C++ class sense) date in StructureID
https://bugs.webkit.org/show_bug.cgi?id=20981
* JavaScriptCore.exp:
* JavaScriptCore.xcodeproj/project.pbxproj:
* VM/CTI.cpp:
(JSC::CTI::privateCompileMainPass):
(JSC::CTI::privateCompilePutByIdTransition):
* VM/Machine.cpp:
(JSC::jsIsObjectType):
(JSC::Machine::Machine):
* kjs/AllInOneFile.cpp:
* kjs/JSCell.h:
(JSC::JSCell::isObject):
(JSC::JSCell::isString):
* kjs/JSGlobalData.cpp:
(JSC::JSGlobalData::JSGlobalData):
* kjs/JSGlobalObject.cpp:
(JSC::JSGlobalObject::reset):
* kjs/JSGlobalObject.h:
(JSC::StructureID::prototypeForLookup):
* kjs/JSNumberCell.h:
(JSC::JSNumberCell::createStructureID):
* kjs/JSObject.cpp:
(JSC::JSObject::createInheritorID):
* kjs/JSObject.h:
(JSC::JSObject::createStructureID):
* kjs/JSString.h:
(JSC::JSString::createStructureID):
* kjs/NativeErrorConstructor.cpp:
(JSC::NativeErrorConstructor::NativeErrorConstructor):
* kjs/RegExpConstructor.cpp:
* kjs/RegExpMatchesArray.h: Added.
(JSC::RegExpMatchesArray::getOwnPropertySlot):
(JSC::RegExpMatchesArray::put):
(JSC::RegExpMatchesArray::deleteProperty):
(JSC::RegExpMatchesArray::getPropertyNames):
* kjs/StructureID.cpp:
(JSC::StructureID::StructureID):
(JSC::StructureID::addPropertyTransition):
(JSC::StructureID::toDictionaryTransition):
(JSC::StructureID::changePrototypeTransition):
(JSC::StructureID::getterSetterTransition):
* kjs/StructureID.h:
(JSC::StructureID::create):
(JSC::StructureID::typeInfo):
* kjs/TypeInfo.h: Added.
(JSC::TypeInfo::TypeInfo):
(JSC::TypeInfo::type):
WebCore:
2008-09-21 Maciej Stachowiak <mjs@apple.com>
Reviewed by Darin.
- introduce a TypeInfo class, for holding per-type (in the C++ class sense) date in StructureID
https://bugs.webkit.org/show_bug.cgi?id=20981
* bindings/js/JSAudioConstructor.cpp:
(WebCore::JSAudioConstructor::JSAudioConstructor):
* bindings/js/JSCSSStyleDeclarationCustom.cpp:
(WebCore::JSCSSStyleDeclaration::nameGetter):
* bindings/js/JSDOMBinding.cpp:
(WebCore::createDOMStructure):
* bindings/js/JSDOMBinding.h:
(WebCore::getDOMStructure):
* bindings/js/JSDOMWindowShell.cpp:
(WebCore::JSDOMWindowShell::JSDOMWindowShell):
(WebCore::JSDOMWindowShell::setWindow):
* bindings/js/JSEventTargetNode.cpp:
(WebCore::JSEventTargetNode::createPrototype):
* bindings/js/JSHTMLOptionElementConstructor.cpp:
(WebCore::JSHTMLOptionElementConstructor::JSHTMLOptionElementConstructor):
* bindings/js/JSImageConstructor.cpp:
(WebCore::JSImageConstructor::JSImageConstructor):
* bindings/js/JSXMLHttpRequestConstructor.cpp:
(WebCore::JSXMLHttpRequestConstructor::JSXMLHttpRequestConstructor):
* bindings/js/JSXSLTProcessorConstructor.cpp:
(WebCore::JSXSLTProcessorConstructor::JSXSLTProcessorConstructor):
* bindings/scripts/CodeGeneratorJS.pm:
git-svn-id: http://svn.webkit.org/repository/webkit/trunk@36755 268f45cc-cd09-0410-ab3c-d52691b4dbfc
diff --git a/JavaScriptCore/kjs/RegExpMatchesArray.h b/JavaScriptCore/kjs/RegExpMatchesArray.h
new file mode 100644
index 0000000..e341e77
--- /dev/null
+++ b/JavaScriptCore/kjs/RegExpMatchesArray.h
@@ -0,0 +1,46 @@
+/*
+ * Copyright (C) 2008 Apple Inc. All Rights Reserved.
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License as published by the Free Software Foundation; either
+ * version 2 of the License, or (at your option) any later version.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
+ *
+ */
+
+#ifndef RegExpMatchesArray_h
+#define RegExpMatchesArray_h
+
+#include "JSArray.h"
+
+namespace JSC {
+
+class RegExpMatchesArray : public JSArray {
+public:
+ RegExpMatchesArray(ExecState*, RegExpConstructorPrivate*);
+ virtual ~RegExpMatchesArray();
+
+private:
+ virtual bool getOwnPropertySlot(ExecState* exec, const Identifier& propertyName, PropertySlot& slot) { if (lazyCreationData()) fillArrayInstance(exec); return JSArray::getOwnPropertySlot(exec, propertyName, slot); }
+ virtual bool getOwnPropertySlot(ExecState* exec, unsigned propertyName, PropertySlot& slot) { if (lazyCreationData()) fillArrayInstance(exec); return JSArray::getOwnPropertySlot(exec, propertyName, slot); }
+ virtual void put(ExecState* exec, const Identifier& propertyName, JSValue* v, PutPropertySlot& slot) { if (lazyCreationData()) fillArrayInstance(exec); JSArray::put(exec, propertyName, v, slot); }
+ virtual void put(ExecState* exec, unsigned propertyName, JSValue* v) { if (lazyCreationData()) fillArrayInstance(exec); JSArray::put(exec, propertyName, v); }
+ virtual bool deleteProperty(ExecState* exec, const Identifier& propertyName) { if (lazyCreationData()) fillArrayInstance(exec); return JSArray::deleteProperty(exec, propertyName); }
+ virtual bool deleteProperty(ExecState* exec, unsigned propertyName) { if (lazyCreationData()) fillArrayInstance(exec); return JSArray::deleteProperty(exec, propertyName); }
+ virtual void getPropertyNames(ExecState* exec, PropertyNameArray& arr) { if (lazyCreationData()) fillArrayInstance(exec); JSArray::getPropertyNames(exec, arr); }
+
+ void fillArrayInstance(ExecState*);
+};
+
+}
+
+#endif // RegExpMatchesArray_h