diff options
author | Ben Murdoch <benm@google.com> | 2011-05-24 11:24:40 +0100 |
---|---|---|
committer | Ben Murdoch <benm@google.com> | 2011-06-02 09:53:15 +0100 |
commit | 81bc750723a18f21cd17d1b173cd2a4dda9cea6e (patch) | |
tree | 7a9e5ed86ff429fd347a25153107221543909b19 /Source/JavaScriptCore/runtime/JSFunction.h | |
parent | 94088a6d336c1dd80a1e734af51e96abcbb689a7 (diff) | |
download | external_webkit-81bc750723a18f21cd17d1b173cd2a4dda9cea6e.zip external_webkit-81bc750723a18f21cd17d1b173cd2a4dda9cea6e.tar.gz external_webkit-81bc750723a18f21cd17d1b173cd2a4dda9cea6e.tar.bz2 |
Merge WebKit at r80534: Intial merge by Git
Change-Id: Ia7a83357124c9e1cdb1debf55d9661ec0bd09a61
Diffstat (limited to 'Source/JavaScriptCore/runtime/JSFunction.h')
-rw-r--r-- | Source/JavaScriptCore/runtime/JSFunction.h | 20 |
1 files changed, 8 insertions, 12 deletions
diff --git a/Source/JavaScriptCore/runtime/JSFunction.h b/Source/JavaScriptCore/runtime/JSFunction.h index 3a2fe30..089f42e 100644 --- a/Source/JavaScriptCore/runtime/JSFunction.h +++ b/Source/JavaScriptCore/runtime/JSFunction.h @@ -45,9 +45,7 @@ namespace JSC { public: JSFunction(ExecState*, JSGlobalObject*, NonNullPassRefPtr<Structure>, int length, const Identifier&, NativeFunction); -#if ENABLE(JIT) JSFunction(ExecState*, JSGlobalObject*, NonNullPassRefPtr<Structure>, int length, const Identifier&, PassRefPtr<NativeExecutable>); -#endif JSFunction(ExecState*, NonNullPassRefPtr<FunctionExecutable>, ScopeChainNode*); virtual ~JSFunction(); @@ -55,15 +53,15 @@ namespace JSC { const UString displayName(ExecState*); const UString calculatedDisplayName(ExecState*); - ScopeChain& scope() + ScopeChainNode* scope() { ASSERT(!isHostFunctionNonInline()); - return m_scopeChain; + return m_scopeChain.get(); } - void setScope(const ScopeChain& scopeChain) + void setScope(JSGlobalData& globalData, ScopeChainNode* scopeChain) { ASSERT(!isHostFunctionNonInline()); - m_scopeChain = scopeChain; + m_scopeChain.set(globalData, this, scopeChain); } ExecutableBase* executable() const { return m_executable.get(); } @@ -72,11 +70,11 @@ namespace JSC { inline bool isHostFunction() const; FunctionExecutable* jsExecutable() const; - static JS_EXPORTDATA const ClassInfo info; + static JS_EXPORTDATA const ClassInfo s_info; static PassRefPtr<Structure> createStructure(JSValue prototype) { - return Structure::create(prototype, TypeInfo(ObjectType, StructureFlags), AnonymousSlotCount); + return Structure::create(prototype, TypeInfo(ObjectType, StructureFlags), AnonymousSlotCount, &s_info); } NativeFunction nativeFunction(); @@ -100,21 +98,19 @@ namespace JSC { virtual void markChildren(MarkStack&); - virtual const ClassInfo* classInfo() const { return &info; } - static JSValue argumentsGetter(ExecState*, JSValue, const Identifier&); static JSValue callerGetter(ExecState*, JSValue, const Identifier&); static JSValue lengthGetter(ExecState*, JSValue, const Identifier&); RefPtr<ExecutableBase> m_executable; - ScopeChain m_scopeChain; + WriteBarrier<ScopeChainNode> m_scopeChain; }; JSFunction* asFunction(JSValue); inline JSFunction* asFunction(JSValue value) { - ASSERT(asObject(value)->inherits(&JSFunction::info)); + ASSERT(asObject(value)->inherits(&JSFunction::s_info)); return static_cast<JSFunction*>(asObject(value)); } |