summaryrefslogtreecommitdiff
path: root/Source/JavaScriptCore/runtime/JSScope.h
diff options
context:
space:
mode:
authorSimon Hausmann <simon.hausmann@digia.com>2012-10-22 15:40:17 +0200
committerSimon Hausmann <simon.hausmann@digia.com>2012-10-22 15:40:17 +0200
commit43a42f108af6bcbd91f2672731c3047c26213af1 (patch)
tree7fa092e5f5d873c72f2486a70e26be26f7a38bec /Source/JavaScriptCore/runtime/JSScope.h
parentd9cf437c840c6eb7417bdd97e6c40979255d3158 (diff)
downloadqtwebkit-43a42f108af6bcbd91f2672731c3047c26213af1.tar.gz
Imported WebKit commit 302e7806bff028bd1167a1ec7c86a1ee00ecfb49 (http://svn.webkit.org/repository/webkit/trunk@132067)
New snapshot that fixes build without QtWidgets
Diffstat (limited to 'Source/JavaScriptCore/runtime/JSScope.h')
-rw-r--r--Source/JavaScriptCore/runtime/JSScope.h36
1 files changed, 17 insertions, 19 deletions
diff --git a/Source/JavaScriptCore/runtime/JSScope.h b/Source/JavaScriptCore/runtime/JSScope.h
index 011aff57e..a9a9dd8d8 100644
--- a/Source/JavaScriptCore/runtime/JSScope.h
+++ b/Source/JavaScriptCore/runtime/JSScope.h
@@ -27,6 +27,7 @@
#define JSScope_h
#include "JSObject.h"
+#include "ResolveOperation.h"
namespace JSC {
@@ -41,25 +42,12 @@ public:
JS_EXPORT_PRIVATE static JSObject* objectAtScope(JSScope*);
- static JSValue resolve(CallFrame*, const Identifier&);
- static JSValue resolveSkip(CallFrame*, const Identifier&, int skip);
- static JSValue resolveGlobal(
- CallFrame*,
- const Identifier&,
- JSGlobalObject* globalObject,
- WriteBarrierBase<Structure>* cachedStructure,
- PropertyOffset* cachedOffset
- );
- static JSValue resolveGlobalDynamic(
- CallFrame*,
- const Identifier&,
- int skip,
- WriteBarrierBase<Structure>* cachedStructure,
- PropertyOffset* cachedOffset
- );
- static JSValue resolveBase(CallFrame*, const Identifier&, bool isStrict);
- static JSValue resolveWithBase(CallFrame*, const Identifier&, Register* base);
- static JSValue resolveWithThis(CallFrame*, const Identifier&, Register* base);
+ static JSValue resolve(CallFrame*, const Identifier&, ResolveOperations*);
+ static JSValue resolveBase(CallFrame*, const Identifier&, bool isStrict, ResolveOperations*, PutToBaseOperation*);
+ static JSValue resolveWithBase(CallFrame*, const Identifier&, Register* base, ResolveOperations*, PutToBaseOperation*);
+ static JSValue resolveWithThis(CallFrame*, const Identifier&, Register* base, ResolveOperations*);
+ static JSValue resolveGlobal(CallFrame*, const Identifier&, JSGlobalObject*, ResolveOperation*);
+ static void resolvePut(CallFrame*, JSValue base, const Identifier&, JSValue, PutToBaseOperation*);
static void visitChildren(JSCell*, SlotVisitor&);
@@ -80,6 +68,16 @@ protected:
private:
WriteBarrier<JSScope> m_next;
+ enum ReturnValues {
+ ReturnValue = 1,
+ ReturnBase = 2,
+ ReturnThis = 4,
+ ReturnBaseAndValue = ReturnValue | ReturnBase,
+ ReturnThisAndValue = ReturnValue | ReturnThis,
+ };
+ enum LookupMode { UnknownResolve, KnownResolve };
+ template <LookupMode, ReturnValues> static JSObject* resolveContainingScopeInternal(CallFrame*, const Identifier&, PropertySlot&, ResolveOperations*, PutToBaseOperation*, bool isStrict);
+ template <ReturnValues> static JSObject* resolveContainingScope(CallFrame*, const Identifier&, PropertySlot&, ResolveOperations*, PutToBaseOperation*, bool isStrict);
};
inline JSScope::JSScope(JSGlobalData& globalData, Structure* structure, JSScope* next)