summaryrefslogtreecommitdiff
path: root/Source/JavaScriptCore/runtime/JSGlobalObject.h
diff options
context:
space:
mode:
authorSimon Hausmann <simon.hausmann@nokia.com>2012-06-20 13:01:08 +0200
committerSimon Hausmann <simon.hausmann@nokia.com>2012-06-20 13:01:08 +0200
commit49233e234e5c787396cadb2cea33b31ae0cd65c1 (patch)
tree5410cb9a8fd53168bb60d62c54b654d86f03c38d /Source/JavaScriptCore/runtime/JSGlobalObject.h
parentb211c645d8ab690f713515dfdc84d80b11c27d2c (diff)
downloadqtwebkit-49233e234e5c787396cadb2cea33b31ae0cd65c1.tar.gz
Imported WebKit commit 3a8c29f35d00659d2ce7a0ccdfa8304f14e82327 (http://svn.webkit.org/repository/webkit/trunk@120813)
New snapshot with Windows build fixes
Diffstat (limited to 'Source/JavaScriptCore/runtime/JSGlobalObject.h')
-rw-r--r--Source/JavaScriptCore/runtime/JSGlobalObject.h34
1 files changed, 14 insertions, 20 deletions
diff --git a/Source/JavaScriptCore/runtime/JSGlobalObject.h b/Source/JavaScriptCore/runtime/JSGlobalObject.h
index 1e75b7267..2396142b1 100644
--- a/Source/JavaScriptCore/runtime/JSGlobalObject.h
+++ b/Source/JavaScriptCore/runtime/JSGlobalObject.h
@@ -25,7 +25,7 @@
#include "JSArray.h"
#include "JSGlobalData.h"
#include "JSGlobalThis.h"
-#include "JSVariableObject.h"
+#include "JSSegmentedVariableObject.h"
#include "JSWeakObjectMapRefInternal.h"
#include "NumberPrototype.h"
#include "StringPrototype.h"
@@ -74,7 +74,7 @@ namespace JSC {
JavaScriptExperimentsEnabledFunctionPtr javaScriptExperimentsEnabled;
};
- class JSGlobalObject : public JSVariableObject {
+ class JSGlobalObject : public JSSegmentedVariableObject {
private:
typedef HashSet<RefPtr<OpaqueJSWeakObjectMap> > WeakMapSet;
@@ -90,7 +90,6 @@ namespace JSC {
protected:
- size_t m_registerArraySize;
Register m_globalCallFrame[RegisterFile::CallFrameHeaderSize];
WriteBarrier<ScopeChainNode> m_globalScopeChain;
@@ -164,7 +163,7 @@ namespace JSC {
}
public:
- typedef JSVariableObject Base;
+ typedef JSSegmentedVariableObject Base;
static JSGlobalObject* create(JSGlobalData& globalData, Structure* structure)
{
@@ -177,8 +176,7 @@ namespace JSC {
protected:
explicit JSGlobalObject(JSGlobalData& globalData, Structure* structure, const GlobalObjectMethodTable* globalObjectMethodTable = 0)
- : JSVariableObject(globalData, structure, &m_symbolTable, 0)
- , m_registerArraySize(0)
+ : JSSegmentedVariableObject(globalData, structure, &m_symbolTable)
, m_globalScopeChain()
, m_weakRandom(static_cast<unsigned>(randomNumber() * (std::numeric_limits<unsigned>::max() + 1.0)))
, m_evalEnabled(true)
@@ -308,8 +306,6 @@ namespace JSC {
void setEvalEnabled(bool enabled) { m_evalEnabled = enabled; }
bool evalEnabled() { return m_evalEnabled; }
- void resizeRegisters(size_t newSize);
-
void resetPrototype(JSGlobalData&, JSValue prototype);
JSGlobalData& globalData() const { return *Heap::heap(this)->globalData(); }
@@ -334,7 +330,7 @@ namespace JSC {
double weakRandomNumber() { return m_weakRandom.get(); }
protected:
- static const unsigned StructureFlags = OverridesGetOwnPropertySlot | OverridesVisitChildren | OverridesGetPropertyNames | JSVariableObject::StructureFlags;
+ static const unsigned StructureFlags = OverridesGetOwnPropertySlot | OverridesVisitChildren | OverridesGetPropertyNames | JSSegmentedVariableObject::StructureFlags;
struct GlobalPropertyInfo {
GlobalPropertyInfo(const Identifier& i, JSValue v, unsigned a)
@@ -359,7 +355,6 @@ namespace JSC {
void createThrowTypeError(ExecState*);
- void setRegisters(WriteBarrier<Unknown>* registers, PassOwnArrayPtr<WriteBarrier<Unknown> > registerArray, size_t count);
JS_EXPORT_PRIVATE static void clearRareData(JSCell*);
};
@@ -371,19 +366,13 @@ namespace JSC {
return jsCast<JSGlobalObject*>(asObject(value));
}
- inline void JSGlobalObject::setRegisters(WriteBarrier<Unknown>* registers, PassOwnArrayPtr<WriteBarrier<Unknown> > registerArray, size_t count)
- {
- JSVariableObject::setRegisters(registers, registerArray);
- m_registerArraySize = count;
- }
-
inline bool JSGlobalObject::hasOwnPropertyForWrite(ExecState* exec, PropertyName propertyName)
{
PropertySlot slot;
- if (JSVariableObject::getOwnPropertySlot(this, exec, propertyName, slot))
+ if (JSSegmentedVariableObject::getOwnPropertySlot(this, exec, propertyName, slot))
return true;
bool slotIsWriteable;
- return symbolTableGet(propertyName, slot, slotIsWriteable);
+ return symbolTableGet(this, propertyName, slot, slotIsWriteable);
}
inline bool JSGlobalObject::symbolTableHasProperty(PropertyName propertyName)
@@ -392,13 +381,18 @@ namespace JSC {
return !entry.isNull();
}
- inline JSValue Structure::prototypeForLookup(ExecState* exec) const
+ inline JSValue Structure::prototypeForLookup(JSGlobalObject* globalObject) const
{
if (isObject())
return m_prototype.get();
ASSERT(typeInfo().type() == StringType);
- return exec->lexicalGlobalObject()->stringPrototype();
+ return globalObject->stringPrototype();
+ }
+
+ inline JSValue Structure::prototypeForLookup(ExecState* exec) const
+ {
+ return prototypeForLookup(exec->lexicalGlobalObject());
}
inline StructureChain* Structure::prototypeChain(ExecState* exec) const