summaryrefslogtreecommitdiff
path: root/Source/JavaScriptCore/runtime/JSFunction.h
diff options
context:
space:
mode:
authorSimon Hausmann <simon.hausmann@nokia.com>2012-09-10 19:10:20 +0200
committerSimon Hausmann <simon.hausmann@nokia.com>2012-09-10 19:10:20 +0200
commit284837daa07b29d6a63a748544a90b1f5842ac5c (patch)
treeecd258180bde91fe741e0cfd2638beb3c6da7e8e /Source/JavaScriptCore/runtime/JSFunction.h
parent2e2ba8ff45915f40ed3e014101269c175f2a89a0 (diff)
downloadqtwebkit-284837daa07b29d6a63a748544a90b1f5842ac5c.tar.gz
Imported WebKit commit 68645295d2e3e09af2c942f092556f06aa5f8b0d (http://svn.webkit.org/repository/webkit/trunk@128073)
New snapshot
Diffstat (limited to 'Source/JavaScriptCore/runtime/JSFunction.h')
-rw-r--r--Source/JavaScriptCore/runtime/JSFunction.h40
1 files changed, 20 insertions, 20 deletions
diff --git a/Source/JavaScriptCore/runtime/JSFunction.h b/Source/JavaScriptCore/runtime/JSFunction.h
index 56faf00de..4bd5f46fa 100644
--- a/Source/JavaScriptCore/runtime/JSFunction.h
+++ b/Source/JavaScriptCore/runtime/JSFunction.h
@@ -25,7 +25,7 @@
#define JSFunction_h
#include "InternalFunction.h"
-#include "JSObject.h"
+#include "JSScope.h"
namespace JSC {
@@ -44,7 +44,7 @@ namespace JSC {
JS_EXPORT_PRIVATE EncodedJSValue JSC_HOST_CALL callHostFunctionAsConstructor(ExecState*);
- JS_EXPORT_PRIVATE UString getCalculatedDisplayName(CallFrame*, JSObject*);
+ JS_EXPORT_PRIVATE String getCalculatedDisplayName(CallFrame*, JSObject*);
class JSFunction : public JSNonFinalObject {
friend class JIT;
@@ -55,38 +55,38 @@ namespace JSC {
public:
typedef JSNonFinalObject Base;
- JS_EXPORT_PRIVATE static JSFunction* create(ExecState*, JSGlobalObject*, int length, const UString& name, NativeFunction, Intrinsic = NoIntrinsic, NativeFunction nativeConstructor = callHostFunctionAsConstructor);
+ JS_EXPORT_PRIVATE static JSFunction* create(ExecState*, JSGlobalObject*, int length, const String& name, NativeFunction, Intrinsic = NoIntrinsic, NativeFunction nativeConstructor = callHostFunctionAsConstructor);
- static JSFunction* create(ExecState* exec, FunctionExecutable* executable, ScopeChainNode* scopeChain)
+ static JSFunction* create(ExecState* exec, FunctionExecutable* executable, JSScope* scope)
{
- JSFunction* function = new (NotNull, allocateCell<JSFunction>(*exec->heap())) JSFunction(exec, executable, scopeChain);
+ JSFunction* function = new (NotNull, allocateCell<JSFunction>(*exec->heap())) JSFunction(exec, executable, scope);
ASSERT(function->structure()->globalObject());
- function->finishCreation(exec, executable, scopeChain);
+ function->finishCreation(exec, executable, scope);
return function;
}
- JS_EXPORT_PRIVATE const UString& name(ExecState*);
- JS_EXPORT_PRIVATE const UString displayName(ExecState*);
- const UString calculatedDisplayName(ExecState*);
+ JS_EXPORT_PRIVATE const String& name(ExecState*);
+ JS_EXPORT_PRIVATE const String displayName(ExecState*);
+ const String calculatedDisplayName(ExecState*);
- ScopeChainNode* scope()
+ JSScope* scope()
{
ASSERT(!isHostFunctionNonInline());
- return m_scopeChain.get();
+ return m_scope.get();
}
// This method may be called for host functins, in which case it
// will return an arbitrary value. This should only be used for
// optimized paths in which the return value does not matter for
// host functions, and checking whether the function is a host
// function is deemed too expensive.
- ScopeChainNode* scopeUnchecked()
+ JSScope* scopeUnchecked()
{
- return m_scopeChain.get();
+ return m_scope.get();
}
- void setScope(JSGlobalData& globalData, ScopeChainNode* scopeChain)
+ void setScope(JSGlobalData& globalData, JSScope* scope)
{
ASSERT(!isHostFunctionNonInline());
- m_scopeChain.set(globalData, this, scopeChain);
+ m_scope.set(globalData, this, scope);
}
ExecutableBase* executable() const { return m_executable.get(); }
@@ -113,7 +113,7 @@ namespace JSC {
static inline size_t offsetOfScopeChain()
{
- return OBJECT_OFFSETOF(JSFunction, m_scopeChain);
+ return OBJECT_OFFSETOF(JSFunction, m_scope);
}
static inline size_t offsetOfExecutable()
@@ -137,10 +137,10 @@ namespace JSC {
const static unsigned StructureFlags = OverridesGetOwnPropertySlot | ImplementsHasInstance | OverridesVisitChildren | OverridesGetPropertyNames | JSObject::StructureFlags;
JS_EXPORT_PRIVATE JSFunction(ExecState*, JSGlobalObject*, Structure*);
- JSFunction(ExecState*, FunctionExecutable*, ScopeChainNode*);
+ JSFunction(ExecState*, FunctionExecutable*, JSScope*);
- void finishCreation(ExecState*, NativeExecutable*, int length, const UString& name);
- void finishCreation(ExecState*, FunctionExecutable*, ScopeChainNode*);
+ void finishCreation(ExecState*, NativeExecutable*, int length, const String& name);
+ void finishCreation(ExecState*, FunctionExecutable*, JSScope*);
Structure* cacheInheritorID(ExecState*);
@@ -165,7 +165,7 @@ namespace JSC {
static JSValue lengthGetter(ExecState*, JSValue, PropertyName);
WriteBarrier<ExecutableBase> m_executable;
- WriteBarrier<ScopeChainNode> m_scopeChain;
+ WriteBarrier<JSScope> m_scope;
WriteBarrier<Structure> m_cachedInheritorID;
};