Commit 871ffe65 authored by mhahnenberg@apple.com's avatar mhahnenberg@apple.com

Roll out r145838

https://bugs.webkit.org/show_bug.cgi?id=112458

Unreviewed. Requested by Filip Pizlo.


Source/JavaScriptCore:

* CMakeLists.txt:
* DerivedSources.make:
* DerivedSources.pri:
* GNUmakefile.list.am:
* dfg/DFGOperations.cpp:
* interpreter/CallFrame.h:
(JSC::ExecState::objectPrototypeTable):
* jit/JITStubs.cpp:
(JSC::getByVal):
* llint/LLIntSlowPaths.cpp:
(JSC::LLInt::getByVal):
* runtime/CommonIdentifiers.h:
* runtime/JSCell.cpp:
(JSC):
* runtime/JSCell.h:
(JSCell):
* runtime/JSCellInlines.h:
(JSC):
(JSC::JSCell::fastGetOwnProperty):
* runtime/JSGlobalData.cpp:
(JSC):
(JSC::JSGlobalData::JSGlobalData):
(JSC::JSGlobalData::~JSGlobalData):
* runtime/JSGlobalData.h:
(JSGlobalData):
* runtime/JSObject.cpp:
(JSC):
* runtime/JSObject.h:
(JSObject):
(JSC):
* runtime/Lookup.cpp:
(JSC::setUpStaticFunctionSlot):
* runtime/ObjectPrototype.cpp:
(JSC):
(JSC::ObjectPrototype::finishCreation):
(JSC::ObjectPrototype::getOwnPropertySlot):
(JSC::ObjectPrototype::getOwnPropertyDescriptor):
* runtime/ObjectPrototype.h:
(JSC::ObjectPrototype::create):
(ObjectPrototype):
* runtime/PropertyMapHashTable.h:
(JSC::PropertyTable::findWithString):
* runtime/Structure.h:
(Structure):
* runtime/StructureInlines.h:
(JSC::Structure::get):

LayoutTests:

* fast/js/regress/script-tests/string-lookup-hit-identifier.js: Removed.
* fast/js/regress/script-tests/string-lookup-hit.js: Removed.
* fast/js/regress/script-tests/string-lookup-miss.js: Removed.
* fast/js/regress/string-lookup-hit-expected.txt: Removed.
* fast/js/regress/string-lookup-hit-identifier-expected.txt: Removed.
* fast/js/regress/string-lookup-hit-identifier.html: Removed.
* fast/js/regress/string-lookup-hit.html: Removed.
* fast/js/regress/string-lookup-miss-expected.txt: Removed.
* fast/js/regress/string-lookup-miss.html: Removed.


git-svn-id: http://svn.webkit.org/repository/webkit/trunk@145945 268f45cc-cd09-0410-ab3c-d52691b4dbfc
parent 91e368b5
2013-03-15 Mark Hahnenberg <mhahnenberg@apple.com>
Roll out r145838
https://bugs.webkit.org/show_bug.cgi?id=112458
Unreviewed. Requested by Filip Pizlo.
* fast/js/regress/script-tests/string-lookup-hit-identifier.js: Removed.
* fast/js/regress/script-tests/string-lookup-hit.js: Removed.
* fast/js/regress/script-tests/string-lookup-miss.js: Removed.
* fast/js/regress/string-lookup-hit-expected.txt: Removed.
* fast/js/regress/string-lookup-hit-identifier-expected.txt: Removed.
* fast/js/regress/string-lookup-hit-identifier.html: Removed.
* fast/js/regress/string-lookup-hit.html: Removed.
* fast/js/regress/string-lookup-miss-expected.txt: Removed.
* fast/js/regress/string-lookup-miss.html: Removed.
2013-03-15 Rouslan Solomakhin <rouslan@chromium.org> 2013-03-15 Rouslan Solomakhin <rouslan@chromium.org>
Move setAsynchronousSpellCheckingEnabled to internals.settings Move setAsynchronousSpellCheckingEnabled to internals.settings
var result = (function(){
var o = {};
for (var i = 0; i < 100; ++i)
o["a" + i] = 42;
var result = [];
var strings = [];
for (var i = 0; i < 100; ++i)
strings.push("a" + i);
for (var j = 0; j < 1000; ++j) {
for (var i = 0; i < 100; ++i)
result.push(o[strings[i]]);
}
return result.length;
})();
if (result != 100000)
throw "Error: bad result: " + result;
var result = (function(){
var o = {};
for (var i = 0; i < 100; ++i)
o["a" + i] = 42;
var result = [];
for (var j = 0; j < 1000; ++j) {
for (var i = 0; i < 100; ++i)
result.push(o["a" + i]);
}
return result.length;
})();
if (result != 100000)
throw "Error: bad result: " + result;
var result = (function(){
var o = {};
for (var i = 0; i < 100; ++i)
o["a" + i] = 42;
var result = [];
for (var i = 0; i < 100000; ++i)
result.push(o["a" + i]);
return result.length;
})();
if (result != 100000)
throw "Error: bad result: " + result;
JSRegress/string-lookup-hit
On success, you will see a series of "PASS" messages, followed by "TEST COMPLETE".
PASS no exception thrown
PASS successfullyParsed is true
TEST COMPLETE
JSRegress/string-lookup-hit-identifier
On success, you will see a series of "PASS" messages, followed by "TEST COMPLETE".
PASS no exception thrown
PASS successfullyParsed is true
TEST COMPLETE
<!DOCTYPE HTML PUBLIC "-//IETF//DTD HTML//EN">
<html>
<head>
<script src="../resources/js-test-pre.js"></script>
</head>
<body>
<script src="resources/regress-pre.js"></script>
<script src="script-tests/string-lookup-hit-identifier.js"></script>
<script src="resources/regress-post.js"></script>
<script src="../resources/js-test-post.js"></script>
</body>
</html>
<!DOCTYPE HTML PUBLIC "-//IETF//DTD HTML//EN">
<html>
<head>
<script src="../resources/js-test-pre.js"></script>
</head>
<body>
<script src="resources/regress-pre.js"></script>
<script src="script-tests/string-lookup-hit.js"></script>
<script src="resources/regress-post.js"></script>
<script src="../resources/js-test-post.js"></script>
</body>
</html>
JSRegress/string-lookup-miss
On success, you will see a series of "PASS" messages, followed by "TEST COMPLETE".
PASS no exception thrown
PASS successfullyParsed is true
TEST COMPLETE
<!DOCTYPE HTML PUBLIC "-//IETF//DTD HTML//EN">
<html>
<head>
<script src="../resources/js-test-pre.js"></script>
</head>
<body>
<script src="resources/regress-pre.js"></script>
<script src="script-tests/string-lookup-miss.js"></script>
<script src="resources/regress-post.js"></script>
<script src="../resources/js-test-post.js"></script>
</body>
</html>
...@@ -329,6 +329,7 @@ set(JavaScriptCore_LUT_FILES ...@@ -329,6 +329,7 @@ set(JavaScriptCore_LUT_FILES
runtime/NumberConstructor.cpp runtime/NumberConstructor.cpp
runtime/NumberPrototype.cpp runtime/NumberPrototype.cpp
runtime/ObjectConstructor.cpp runtime/ObjectConstructor.cpp
runtime/ObjectPrototype.cpp
runtime/RegExpConstructor.cpp runtime/RegExpConstructor.cpp
runtime/RegExpObject.cpp runtime/RegExpObject.cpp
runtime/RegExpPrototype.cpp runtime/RegExpPrototype.cpp
......
2013-03-15 Mark Hahnenberg <mhahnenberg@apple.com>
Roll out r145838
https://bugs.webkit.org/show_bug.cgi?id=112458
Unreviewed. Requested by Filip Pizlo.
* CMakeLists.txt:
* DerivedSources.make:
* DerivedSources.pri:
* GNUmakefile.list.am:
* dfg/DFGOperations.cpp:
* interpreter/CallFrame.h:
(JSC::ExecState::objectPrototypeTable):
* jit/JITStubs.cpp:
(JSC::getByVal):
* llint/LLIntSlowPaths.cpp:
(JSC::LLInt::getByVal):
* runtime/CommonIdentifiers.h:
* runtime/JSCell.cpp:
(JSC):
* runtime/JSCell.h:
(JSCell):
* runtime/JSCellInlines.h:
(JSC):
(JSC::JSCell::fastGetOwnProperty):
* runtime/JSGlobalData.cpp:
(JSC):
(JSC::JSGlobalData::JSGlobalData):
(JSC::JSGlobalData::~JSGlobalData):
* runtime/JSGlobalData.h:
(JSGlobalData):
* runtime/JSObject.cpp:
(JSC):
* runtime/JSObject.h:
(JSObject):
(JSC):
* runtime/Lookup.cpp:
(JSC::setUpStaticFunctionSlot):
* runtime/ObjectPrototype.cpp:
(JSC):
(JSC::ObjectPrototype::finishCreation):
(JSC::ObjectPrototype::getOwnPropertySlot):
(JSC::ObjectPrototype::getOwnPropertyDescriptor):
* runtime/ObjectPrototype.h:
(JSC::ObjectPrototype::create):
(ObjectPrototype):
* runtime/PropertyMapHashTable.h:
(JSC::PropertyTable::findWithString):
* runtime/Structure.h:
(Structure):
* runtime/StructureInlines.h:
(JSC::Structure::get):
2013-03-15 Michael Saboff <msaboff@apple.com> 2013-03-15 Michael Saboff <msaboff@apple.com>
Cleanup of DFG and Baseline JIT debugging code Cleanup of DFG and Baseline JIT debugging code
......
...@@ -50,6 +50,7 @@ all : \ ...@@ -50,6 +50,7 @@ all : \
NumberConstructor.lut.h \ NumberConstructor.lut.h \
NumberPrototype.lut.h \ NumberPrototype.lut.h \
ObjectConstructor.lut.h \ ObjectConstructor.lut.h \
ObjectPrototype.lut.h \
RegExpConstructor.lut.h \ RegExpConstructor.lut.h \
RegExpPrototype.lut.h \ RegExpPrototype.lut.h \
RegExpJitTables.h \ RegExpJitTables.h \
......
...@@ -20,6 +20,7 @@ LUT_FILES += \ ...@@ -20,6 +20,7 @@ LUT_FILES += \
runtime/NumberConstructor.cpp \ runtime/NumberConstructor.cpp \
runtime/NumberPrototype.cpp \ runtime/NumberPrototype.cpp \
runtime/ObjectConstructor.cpp \ runtime/ObjectConstructor.cpp \
runtime/ObjectPrototype.cpp \
runtime/RegExpConstructor.cpp \ runtime/RegExpConstructor.cpp \
runtime/RegExpObject.cpp \ runtime/RegExpObject.cpp \
runtime/RegExpPrototype.cpp \ runtime/RegExpPrototype.cpp \
......
...@@ -24,6 +24,7 @@ javascriptcore_built_nosources += \ ...@@ -24,6 +24,7 @@ javascriptcore_built_nosources += \
DerivedSources/JavaScriptCore/NumberConstructor.lut.h \ DerivedSources/JavaScriptCore/NumberConstructor.lut.h \
DerivedSources/JavaScriptCore/NumberPrototype.lut.h \ DerivedSources/JavaScriptCore/NumberPrototype.lut.h \
DerivedSources/JavaScriptCore/ObjectConstructor.lut.h \ DerivedSources/JavaScriptCore/ObjectConstructor.lut.h \
DerivedSources/JavaScriptCore/ObjectPrototype.lut.h \
DerivedSources/JavaScriptCore/RegExpConstructor.lut.h \ DerivedSources/JavaScriptCore/RegExpConstructor.lut.h \
DerivedSources/JavaScriptCore/RegExpObject.lut.h \ DerivedSources/JavaScriptCore/RegExpObject.lut.h \
DerivedSources/JavaScriptCore/RegExpPrototype.lut.h \ DerivedSources/JavaScriptCore/RegExpPrototype.lut.h \
......
...@@ -424,17 +424,19 @@ EncodedJSValue DFG_OPERATION operationGetByVal(ExecState* exec, EncodedJSValue e ...@@ -424,17 +424,19 @@ EncodedJSValue DFG_OPERATION operationGetByVal(ExecState* exec, EncodedJSValue e
if (LIKELY(baseValue.isCell())) { if (LIKELY(baseValue.isCell())) {
JSCell* base = baseValue.asCell(); JSCell* base = baseValue.asCell();
if (property.isUInt32()) if (property.isUInt32()) {
return getByVal(exec, base, property.asUInt32()); return getByVal(exec, base, property.asUInt32());
if (property.isDouble()) { } else if (property.isDouble()) {
double propertyAsDouble = property.asDouble(); double propertyAsDouble = property.asDouble();
uint32_t propertyAsUInt32 = static_cast<uint32_t>(propertyAsDouble); uint32_t propertyAsUInt32 = static_cast<uint32_t>(propertyAsDouble);
if (propertyAsUInt32 == propertyAsDouble) if (propertyAsUInt32 == propertyAsDouble)
return getByVal(exec, base, propertyAsUInt32); return getByVal(exec, base, propertyAsUInt32);
} else if (property.isString()) } else if (property.isString()) {
return JSValue::encode(base->getByString(exec, asString(property)->value(exec))); if (JSValue result = base->fastGetOwnProperty(exec, asString(property)->value(exec)))
return JSValue::encode(result);
}
} }
if (isName(property)) if (isName(property))
return JSValue::encode(baseValue.get(exec, jsCast<NameInstance*>(property.asCell())->privateName())); return JSValue::encode(baseValue.get(exec, jsCast<NameInstance*>(property.asCell())->privateName()));
...@@ -451,13 +453,15 @@ EncodedJSValue DFG_OPERATION operationGetByValCell(ExecState* exec, JSCell* base ...@@ -451,13 +453,15 @@ EncodedJSValue DFG_OPERATION operationGetByValCell(ExecState* exec, JSCell* base
if (property.isUInt32()) if (property.isUInt32())
return getByVal(exec, base, property.asUInt32()); return getByVal(exec, base, property.asUInt32());
else if (property.isDouble()) { if (property.isDouble()) {
double propertyAsDouble = property.asDouble(); double propertyAsDouble = property.asDouble();
uint32_t propertyAsUInt32 = static_cast<uint32_t>(propertyAsDouble); uint32_t propertyAsUInt32 = static_cast<uint32_t>(propertyAsDouble);
if (propertyAsUInt32 == propertyAsDouble) if (propertyAsUInt32 == propertyAsDouble)
return getByVal(exec, base, propertyAsUInt32); return getByVal(exec, base, propertyAsUInt32);
} else if (property.isString()) } else if (property.isString()) {
return JSValue::encode(base->getByString(exec, asString(property)->value(exec))); if (JSValue result = base->fastGetOwnProperty(exec, asString(property)->value(exec)))
return JSValue::encode(result);
}
if (isName(property)) if (isName(property))
return JSValue::encode(JSValue(base).get(exec, jsCast<NameInstance*>(property.asCell())->privateName())); return JSValue::encode(JSValue(base).get(exec, jsCast<NameInstance*>(property.asCell())->privateName()));
......
...@@ -90,6 +90,7 @@ namespace JSC { ...@@ -90,6 +90,7 @@ namespace JSC {
static const HashTable* numberConstructorTable(CallFrame* callFrame) { return callFrame->globalData().numberConstructorTable; } static const HashTable* numberConstructorTable(CallFrame* callFrame) { return callFrame->globalData().numberConstructorTable; }
static const HashTable* numberPrototypeTable(CallFrame* callFrame) { return callFrame->globalData().numberPrototypeTable; } static const HashTable* numberPrototypeTable(CallFrame* callFrame) { return callFrame->globalData().numberPrototypeTable; }
static const HashTable* objectConstructorTable(CallFrame* callFrame) { return callFrame->globalData().objectConstructorTable; } static const HashTable* objectConstructorTable(CallFrame* callFrame) { return callFrame->globalData().objectConstructorTable; }
static const HashTable* objectPrototypeTable(CallFrame* callFrame) { return callFrame->globalData().objectPrototypeTable; }
static const HashTable* privateNamePrototypeTable(CallFrame* callFrame) { return callFrame->globalData().privateNamePrototypeTable; } static const HashTable* privateNamePrototypeTable(CallFrame* callFrame) { return callFrame->globalData().privateNamePrototypeTable; }
static const HashTable* regExpTable(CallFrame* callFrame) { return callFrame->globalData().regExpTable; } static const HashTable* regExpTable(CallFrame* callFrame) { return callFrame->globalData().regExpTable; }
static const HashTable* regExpConstructorTable(CallFrame* callFrame) { return callFrame->globalData().regExpConstructorTable; } static const HashTable* regExpConstructorTable(CallFrame* callFrame) { return callFrame->globalData().regExpConstructorTable; }
......
...@@ -2417,8 +2417,10 @@ DEFINE_STUB_FUNCTION(EncodedJSValue, op_construct_NotJSConstruct) ...@@ -2417,8 +2417,10 @@ DEFINE_STUB_FUNCTION(EncodedJSValue, op_construct_NotJSConstruct)
static JSValue getByVal( static JSValue getByVal(
CallFrame* callFrame, JSValue baseValue, JSValue subscript, ReturnAddressPtr returnAddress) CallFrame* callFrame, JSValue baseValue, JSValue subscript, ReturnAddressPtr returnAddress)
{ {
if (LIKELY(baseValue.isCell() && subscript.isString())) if (LIKELY(baseValue.isCell() && subscript.isString())) {
return baseValue.asCell()->getByString(callFrame, asString(subscript)->value(callFrame)); if (JSValue result = baseValue.asCell()->fastGetOwnProperty(callFrame, asString(subscript)->value(callFrame)))
return result;
}
if (subscript.isUInt32()) { if (subscript.isUInt32()) {
uint32_t i = subscript.asUInt32(); uint32_t i = subscript.asUInt32();
......
...@@ -1060,8 +1060,10 @@ LLINT_SLOW_PATH_DECL(slow_path_del_by_id) ...@@ -1060,8 +1060,10 @@ LLINT_SLOW_PATH_DECL(slow_path_del_by_id)
inline JSValue getByVal(ExecState* exec, JSValue baseValue, JSValue subscript) inline JSValue getByVal(ExecState* exec, JSValue baseValue, JSValue subscript)
{ {
if (LIKELY(baseValue.isCell() && subscript.isString())) if (LIKELY(baseValue.isCell() && subscript.isString())) {
return baseValue.asCell()->getByString(exec, asString(subscript)->value(exec)); if (JSValue result = baseValue.asCell()->fastGetOwnProperty(exec, asString(subscript)->value(exec)))
return result;
}
if (subscript.isUInt32()) { if (subscript.isUInt32()) {
uint32_t i = subscript.asUInt32(); uint32_t i = subscript.asUInt32();
......
...@@ -99,11 +99,7 @@ ...@@ -99,11 +99,7 @@
macro(valueOf) \ macro(valueOf) \
macro(writable) \ macro(writable) \
macro(displayName) \ macro(displayName) \
macro(join) \ macro(join)
macro(__defineGetter__) \
macro(__defineSetter__) \
macro(__lookupGetter__) \
macro(__lookupSetter__)
#define JSC_COMMON_IDENTIFIERS_EACH_KEYWORD(macro) \ #define JSC_COMMON_IDENTIFIERS_EACH_KEYWORD(macro) \
macro(null) \ macro(null) \
......
...@@ -227,10 +227,4 @@ bool JSCell::getOwnPropertyDescriptor(JSObject*, ExecState*, PropertyName, Prope ...@@ -227,10 +227,4 @@ bool JSCell::getOwnPropertyDescriptor(JSObject*, ExecState*, PropertyName, Prope
return false; return false;
} }
JSValue JSCell::getByStringSlow(ExecState* exec, const String& name)
{
Identifier ident(&exec->globalData(), name);
return JSValue(this).get(exec, ident);
}
} // namespace JSC } // namespace JSC
...@@ -122,8 +122,7 @@ public: ...@@ -122,8 +122,7 @@ public:
// call this function, not its slower virtual counterpart. (For integer // call this function, not its slower virtual counterpart. (For integer
// property names, we want a similar interface with appropriate optimizations.) // property names, we want a similar interface with appropriate optimizations.)
bool fastGetOwnPropertySlot(ExecState*, PropertyName, PropertySlot&); bool fastGetOwnPropertySlot(ExecState*, PropertyName, PropertySlot&);
JSValue fastGetOwnProperty(ExecState*, const String&);
JSValue getByString(ExecState*, const String&);
static ptrdiff_t structureOffset() static ptrdiff_t structureOffset()
{ {
...@@ -162,10 +161,6 @@ protected: ...@@ -162,10 +161,6 @@ protected:
private: private:
friend class LLIntOffsetsExtractor; friend class LLIntOffsetsExtractor;
template<typename KeyType>
JSValue getByStringAndKey(ExecState*, const String&, const KeyType&);
JSValue getByStringSlow(ExecState*, const String&);
WriteBarrier<Structure> m_structure; WriteBarrier<Structure> m_structure;
}; };
......
...@@ -169,46 +169,20 @@ ALWAYS_INLINE bool JSCell::fastGetOwnPropertySlot(ExecState* exec, PropertyName ...@@ -169,46 +169,20 @@ ALWAYS_INLINE bool JSCell::fastGetOwnPropertySlot(ExecState* exec, PropertyName
return methodTable()->getOwnPropertySlot(this, exec, propertyName, slot); return methodTable()->getOwnPropertySlot(this, exec, propertyName, slot);
} }
template<typename KeyType>
ALWAYS_INLINE JSValue JSCell::getByStringAndKey(ExecState* exec, const String& name, const KeyType& key)
{
JSCell* cell = this;
while (true) {
if (UNLIKELY(cell->structure()->typeInfo().overridesGetOwnPropertySlot()))
return getByStringSlow(exec, name);
unsigned attributes;
PropertyOffset offset = cell->structure()->get(exec->globalData(), key, attributes);
if (offset != invalidOffset) {
if (attributes & Accessor)
return cell->getByStringSlow(exec, name);
return asObject(cell)->getDirect(offset);
}
JSValue prototype = cell->structure()->storedPrototype();
if (!prototype.isObject())
break;
cell = asObject(prototype);
}
// Make sure we aren't going after indexed storage, and if we are, then just use that.
unsigned index = toUInt32FromStringImpl(name.impl());
if (index == PropertyName::NotAnIndex)
return jsUndefined();
return JSValue(this).get(exec, index);
}
// Fast call to get a property where we may not yet have converted the string to an // Fast call to get a property where we may not yet have converted the string to an
// identifier. The first time we perform a property access with a given string, try // identifier. The first time we perform a property access with a given string, try
// performing the property map lookup without forming an identifier. We detect this // performing the property map lookup without forming an identifier. We detect this
// case by checking whether the hash has yet been set for this string. // case by checking whether the hash has yet been set for this string.
ALWAYS_INLINE JSValue JSCell::getByString(ExecState* exec, const String& name) ALWAYS_INLINE JSValue JSCell::fastGetOwnProperty(ExecState* exec, const String& name)
{ {
if (name.impl()->hasHash()) if (!structure()->typeInfo().overridesGetOwnPropertySlot() && !structure()->hasGetterSetterProperties()) {
return getByStringAndKey(exec, name, Identifier(exec, name)); PropertyOffset offset = name.impl()->hasHash()
return getByStringAndKey(exec, name, name); ? structure()->get(exec->globalData(), Identifier(exec, name))
: structure()->get(exec->globalData(), name);
if (offset != invalidOffset)
return asObject(this)->locationForOffset(offset)->get();
}
return JSValue();
} }
inline bool JSCell::toBoolean(ExecState* exec) const inline bool JSCell::toBoolean(ExecState* exec) const
......
...@@ -93,6 +93,7 @@ extern const HashTable mathTable; ...@@ -93,6 +93,7 @@ extern const HashTable mathTable;
extern const HashTable numberConstructorTable; extern const HashTable numberConstructorTable;
extern const HashTable numberPrototypeTable; extern const HashTable numberPrototypeTable;
JS_EXPORTDATA extern const HashTable objectConstructorTable; JS_EXPORTDATA extern const HashTable objectConstructorTable;
extern const HashTable objectPrototypeTable;
extern const HashTable privateNamePrototypeTable; extern const HashTable privateNamePrototypeTable;
extern const HashTable regExpTable; extern const HashTable regExpTable;
extern const HashTable regExpConstructorTable; extern const HashTable regExpConstructorTable;
...@@ -154,6 +155,7 @@ JSGlobalData::JSGlobalData(GlobalDataType globalDataType, HeapType heapType) ...@@ -154,6 +155,7 @@ JSGlobalData::JSGlobalData(GlobalDataType globalDataType, HeapType heapType)
, numberConstructorTable(fastNew<HashTable>(JSC::numberConstructorTable)) , numberConstructorTable(fastNew<HashTable>(JSC::numberConstructorTable))
, numberPrototypeTable(fastNew<HashTable>(JSC::numberPrototypeTable)) , numberPrototypeTable(fastNew<HashTable>(JSC::numberPrototypeTable))
, objectConstructorTable(fastNew<HashTable>(JSC::objectConstructorTable)) , objectConstructorTable(fastNew<HashTable>(JSC::objectConstructorTable))
, objectPrototypeTable(fastNew<HashTable>(JSC::objectPrototypeTable))
, privateNamePrototypeTable(fastNew<HashTable>(JSC::privateNamePrototypeTable)) , privateNamePrototypeTable(fastNew<HashTable>(JSC::privateNamePrototypeTable))
, regExpTable(fastNew<HashTable>(JSC::regExpTable)) , regExpTable(fastNew<HashTable>(JSC::regExpTable))
, regExpConstructorTable(fastNew<HashTable>(JSC::regExpConstructorTable)) , regExpConstructorTable(fastNew<HashTable>(JSC::regExpConstructorTable))
...@@ -284,6 +286,7 @@ JSGlobalData::~JSGlobalData() ...@@ -284,6 +286,7 @@ JSGlobalData::~JSGlobalData()
numberConstructorTable->deleteTable(); numberConstructorTable->deleteTable();
numberPrototypeTable->deleteTable(); numberPrototypeTable->deleteTable();
objectConstructorTable->deleteTable(); objectConstructorTable->deleteTable();
objectPrototypeTable->deleteTable();
privateNamePrototypeTable->deleteTable(); privateNamePrototypeTable->deleteTable();
regExpTable->deleteTable(); regExpTable->deleteTable();
regExpConstructorTable->deleteTable(); regExpConstructorTable->deleteTable();
...@@ -303,6 +306,7 @@ JSGlobalData::~JSGlobalData() ...@@ -303,6 +306,7 @@ JSGlobalData::~JSGlobalData()
fastDelete(const_cast<HashTable*>(numberConstructorTable)); fastDelete(const_cast<HashTable*>(numberConstructorTable));
fastDelete(const_cast<HashTable*>(numberPrototypeTable)); fastDelete(const_cast<HashTable*>(numberPrototypeTable));
fastDelete(const_cast<HashTable*>(objectConstructorTable)); fastDelete(const_cast<HashTable*>(objectConstructorTable));
fastDelete(const_cast<HashTable*>(objectPrototypeTable));
fastDelete(const_cast<HashTable*>(privateNamePrototypeTable)); fastDelete(const_cast<HashTable*>(privateNamePrototypeTable));
fastDelete(const_cast<HashTable*>(regExpTable)); fastDelete(const_cast<HashTable*>(regExpTable));
fastDelete(const_cast<HashTable*>(regExpConstructorTable)); fastDelete(const_cast<HashTable*>(regExpConstructorTable));
......
...@@ -226,6 +226,7 @@ namespace JSC { ...@@ -226,6 +226,7 @@ namespace JSC {
const HashTable* numberConstructorTable; const HashTable* numberConstructorTable;
const HashTable* numberPrototypeTable; const HashTable* numberPrototypeTable;
const HashTable* objectConstructorTable; const HashTable* objectConstructorTable;
const HashTable* objectPrototypeTable;
const HashTable* privateNamePrototypeTable; const HashTable* privateNamePrototypeTable;
const HashTable* regExpTable; const HashTable* regExpTable;
const HashTable* regExpConstructorTable; const HashTable* regExpConstructorTable;
......
...@@ -2202,16 +2202,6 @@ bool JSObject::putDirectIndexBeyondVectorLength(ExecState* exec, unsigned i, JSV ...@@ -2202,16 +2202,6 @@ bool JSObject::putDirectIndexBeyondVectorLength(ExecState* exec, unsigned i, JSV
} }
} }
void JSObject::putDirectNativeFunction(ExecState* exec, JSGlobalObject* globalObject, const PropertyName& propertyName, unsigned functionLength, NativeFunction nativeFunction, Intrinsic intrinsic, unsigned attributes)
{
StringImpl* name = propertyName.publicName();
ASSERT(name);
JSFunction* function =
JSFunction::create(exec, globalObject, functionLength, name, nativeFunction, intrinsic);
putDirect(exec->globalData(), propertyName, function, attributes);
}
ALWAYS_INLINE unsigned JSObject::getNewVectorLength(unsigned currentVectorLength, unsigned currentLength, unsigned desiredLength) ALWAYS_INLINE unsigned JSObject::getNewVectorLength(unsigned currentVectorLength, unsigned currentLength, unsigned desiredLength)
{ {
ASSERT(desiredLength <= MAX_STORAGE_VECTOR_LENGTH); ASSERT(desiredLength <= MAX_STORAGE_VECTOR_LENGTH);
......
...@@ -565,8 +565,6 @@ public: ...@@ -565,8 +565,6 @@ public:
void putDirect(JSGlobalData& globalData, PropertyOffset offset, JSValue value) { locationForOffset(offset)->set(globalData, this, value); } void putDirect(JSGlobalData& globalData, PropertyOffset offset, JSValue value) { locationForOffset(offset)->set(globalData, this, value); }
void putDirectUndefined(PropertyOffset offset) { locationForOffset(offset)->setUndefined(); } void putDirectUndefined(PropertyOffset offset) { locationForOffset(offset)->setUndefined(); }
void putDirectNativeFunction(ExecState*, JSGlobalObject*, const PropertyName&, unsigned functionLength, NativeFunction, Intrinsic, unsigned attributes);
JS_EXPORT_PRIVATE static bool defineOwnProperty(JSObject*, ExecState*, PropertyName, PropertyDescriptor&, bool shouldThrow); JS_EXPORT_PRIVATE static bool defineOwnProperty(JSObject*, ExecState*, PropertyName, PropertyDescriptor&, bool shouldThrow);
bool isGlobalObject() const; bool isGlobalObject() const;
...@@ -702,7 +700,7 @@ protected: ...@@ -702,7 +700,7 @@ protected:
ASSERT(structure()->isObject()); ASSERT(structure()->isObject());