- JavaScriptCore/ChangeLog +33 lines
Lines 1-3 JavaScriptCore/ChangeLog_sec1
1
2010-05-19  Gavin Barraclough  <barraclough@apple.com>
2
3
        Reviewed by NOBODY (OOPS!).
4
5
        Bug 39393 - JSFunction need not be a subclass of InternalFunction.
6
7
        This may prevent us from introducing a more useful parent class to
8
        JSFunction, e.g. a JSObject that holds an executable, which could
9
        also reference an eval or program executable.
10
11
        * JavaScriptCore.exp:
12
        * interpreter/Interpreter.cpp:
13
        (JSC::Interpreter::retrieveCaller):
14
        (JSC::Interpreter::findFunctionCallFrame):
15
        * interpreter/Interpreter.h:
16
        * profiler/Profiler.cpp:
17
        (JSC::Profiler::createCallIdentifier):
18
        * runtime/FunctionPrototype.cpp:
19
        (JSC::functionProtoFuncToString):
20
        * runtime/JSFunction.cpp:
21
        (JSC::):
22
        (JSC::JSFunction::JSFunction):
23
        (JSC::JSFunction::name):
24
        (JSC::JSFunction::displayName):
25
        (JSC::JSFunction::calculatedDisplayName):
26
        * runtime/JSFunction.h:
27
        * runtime/JSObject.cpp:
28
        (JSC::JSObject::putDirectFunction):
29
        (JSC::JSObject::putDirectFunctionWithoutTransition):
30
        * runtime/JSObject.h:
31
        * runtime/Lookup.cpp:
32
        (JSC::setUpStaticFunctionSlot):
33
1
2010-05-19  Oliver Hunt  <oliver@apple.com>
34
2010-05-19  Oliver Hunt  <oliver@apple.com>
2
35
3
        Reviewed by Geoffrey Garen.
36
        Reviewed by Geoffrey Garen.
- JavaScriptCore/JavaScriptCore.exp -1 / +1 lines
Lines 264-269 __ZN3JSC8JSObject15unwrappedObjectEv JavaScriptCore/JavaScriptCore.exp_sec1
264
__ZN3JSC8JSObject16getPropertyNamesEPNS_9ExecStateERNS_17PropertyNameArrayENS_15EnumerationModeE
264
__ZN3JSC8JSObject16getPropertyNamesEPNS_9ExecStateERNS_17PropertyNameArrayENS_15EnumerationModeE
265
__ZN3JSC8JSObject17createInheritorIDEv
265
__ZN3JSC8JSObject17createInheritorIDEv
266
__ZN3JSC8JSObject17defineOwnPropertyEPNS_9ExecStateERKNS_10IdentifierERNS_18PropertyDescriptorEb
266
__ZN3JSC8JSObject17defineOwnPropertyEPNS_9ExecStateERKNS_10IdentifierERNS_18PropertyDescriptorEb
267
__ZN3JSC8JSObject17putDirectFunctionEPNS_9ExecStateEPNS_10JSFunctionEj
267
__ZN3JSC8JSObject17putDirectFunctionEPNS_9ExecStateEPNS_16InternalFunctionEj
268
__ZN3JSC8JSObject17putDirectFunctionEPNS_9ExecStateEPNS_16InternalFunctionEj
268
__ZN3JSC8JSObject17putWithAttributesEPNS_9ExecStateERKNS_10IdentifierENS_7JSValueEj
269
__ZN3JSC8JSObject17putWithAttributesEPNS_9ExecStateERKNS_10IdentifierENS_7JSValueEj
269
__ZN3JSC8JSObject17putWithAttributesEPNS_9ExecStateERKNS_10IdentifierENS_7JSValueEjbRNS_15PutPropertySlotE
270
__ZN3JSC8JSObject17putWithAttributesEPNS_9ExecStateERKNS_10IdentifierENS_7JSValueEjbRNS_15PutPropertySlotE
Lines 452-458 __ZN7WebCoreplEPKcRKNS_6StringE JavaScriptCore/JavaScriptCore.exp_sec2
452
__ZN7WebCoreplERKNS_6StringEPKc
453
__ZN7WebCoreplERKNS_6StringEPKc
453
__ZN7WebCoreplERKNS_6StringES2_
454
__ZN7WebCoreplERKNS_6StringES2_
454
__ZNK3JSC10JSFunction23isHostFunctionNonInlineEv
455
__ZNK3JSC10JSFunction23isHostFunctionNonInlineEv
455
__ZNK3JSC11Interpreter14retrieveCallerEPNS_9ExecStateEPNS_16InternalFunctionE
456
__ZNK3JSC11Interpreter18retrieveLastCallerEPNS_9ExecStateERiRlRNS_7UStringERNS_7JSValueE
456
__ZNK3JSC11Interpreter18retrieveLastCallerEPNS_9ExecStateERiRlRNS_7UStringERNS_7JSValueE
457
__ZNK3JSC12PropertySlot14functionGetterEPNS_9ExecStateE
457
__ZNK3JSC12PropertySlot14functionGetterEPNS_9ExecStateE
458
__ZNK3JSC14JSGlobalObject14isDynamicScopeERb
458
__ZNK3JSC14JSGlobalObject14isDynamicScopeERb
- JavaScriptCore/interpreter/Interpreter.cpp -2 / +2 lines
Lines 4424-4430 JSValue Interpreter::retrieveArguments(C JavaScriptCore/interpreter/Interpreter.cpp_sec1
4424
    return arguments;
4424
    return arguments;
4425
}
4425
}
4426
4426
4427
JSValue Interpreter::retrieveCaller(CallFrame* callFrame, InternalFunction* function) const
4427
JSValue Interpreter::retrieveCaller(CallFrame* callFrame, JSFunction* function) const
4428
{
4428
{
4429
    CallFrame* functionCallFrame = findFunctionCallFrame(callFrame, function);
4429
    CallFrame* functionCallFrame = findFunctionCallFrame(callFrame, function);
4430
    if (!functionCallFrame)
4430
    if (!functionCallFrame)
Lines 4462-4468 void Interpreter::retrieveLastCaller(Cal JavaScriptCore/interpreter/Interpreter.cpp_sec2
4462
    function = callerFrame->callee();
4462
    function = callerFrame->callee();
4463
}
4463
}
4464
4464
4465
CallFrame* Interpreter::findFunctionCallFrame(CallFrame* callFrame, InternalFunction* function)
4465
CallFrame* Interpreter::findFunctionCallFrame(CallFrame* callFrame, JSFunction* function)
4466
{
4466
{
4467
    for (CallFrame* candidate = callFrame; candidate; candidate = candidate->callerFrame()->removeHostCallFrameFlag()) {
4467
    for (CallFrame* candidate = callFrame; candidate; candidate = candidate->callerFrame()->removeHostCallFrameFlag()) {
4468
        if (candidate->callee() == function)
4468
        if (candidate->callee() == function)
- JavaScriptCore/interpreter/Interpreter.h -3 / +2 lines
Lines 44-50 namespace JSC { JavaScriptCore/interpreter/Interpreter.h_sec1
44
    class CodeBlock;
44
    class CodeBlock;
45
    class EvalExecutable;
45
    class EvalExecutable;
46
    class FunctionExecutable;
46
    class FunctionExecutable;
47
    class InternalFunction;
48
    class JSFunction;
47
    class JSFunction;
49
    class JSGlobalObject;
48
    class JSGlobalObject;
50
    class ProgramExecutable;
49
    class ProgramExecutable;
Lines 101-107 namespace JSC { JavaScriptCore/interpreter/Interpreter.h_sec2
101
        JSValue execute(EvalExecutable* evalNode, CallFrame* exec, JSObject* thisObj, ScopeChainNode* scopeChain, JSValue* exception);
100
        JSValue execute(EvalExecutable* evalNode, CallFrame* exec, JSObject* thisObj, ScopeChainNode* scopeChain, JSValue* exception);
102
101
103
        JSValue retrieveArguments(CallFrame*, JSFunction*) const;
102
        JSValue retrieveArguments(CallFrame*, JSFunction*) const;
104
        JSValue retrieveCaller(CallFrame*, InternalFunction*) const;
103
        JSValue retrieveCaller(CallFrame*, JSFunction*) const;
105
        void retrieveLastCaller(CallFrame*, int& lineNumber, intptr_t& sourceID, UString& sourceURL, JSValue& function) const;
104
        void retrieveLastCaller(CallFrame*, int& lineNumber, intptr_t& sourceID, UString& sourceURL, JSValue& function) const;
106
        
105
        
107
        void getArgumentsData(CallFrame*, JSFunction*&, ptrdiff_t& firstParameterIndex, Register*& argv, int& argc);
106
        void getArgumentsData(CallFrame*, JSFunction*&, ptrdiff_t& firstParameterIndex, Register*& argv, int& argc);
Lines 143-149 namespace JSC { JavaScriptCore/interpreter/Interpreter.h_sec3
143
142
144
        static ALWAYS_INLINE CallFrame* slideRegisterWindowForCall(CodeBlock*, RegisterFile*, CallFrame*, size_t registerOffset, int argc);
143
        static ALWAYS_INLINE CallFrame* slideRegisterWindowForCall(CodeBlock*, RegisterFile*, CallFrame*, size_t registerOffset, int argc);
145
144
146
        static CallFrame* findFunctionCallFrame(CallFrame*, InternalFunction*);
145
        static CallFrame* findFunctionCallFrame(CallFrame*, JSFunction*);
147
146
148
        JSValue privateExecute(ExecutionFlag, RegisterFile*, CallFrame*, JSValue* exception);
147
        JSValue privateExecute(ExecutionFlag, RegisterFile*, CallFrame*, JSValue* exception);
149
148
- JavaScriptCore/profiler/Profiler.cpp +3 lines
Lines 32-37 JavaScriptCore/profiler/Profiler.cpp_sec1
32
#include "CommonIdentifiers.h"
32
#include "CommonIdentifiers.h"
33
#include "CallFrame.h"
33
#include "CallFrame.h"
34
#include "CodeBlock.h"
34
#include "CodeBlock.h"
35
#include "InternalFunction.h"
35
#include "JSFunction.h"
36
#include "JSFunction.h"
36
#include "JSGlobalObject.h"
37
#include "JSGlobalObject.h"
37
#include "Nodes.h"
38
#include "Nodes.h"
Lines 146-151 CallIdentifier Profiler::createCallIdent JavaScriptCore/profiler/Profiler.cpp_sec2
146
        if (!function->executable()->isHostFunction())
147
        if (!function->executable()->isHostFunction())
147
            return createCallIdentifierFromFunctionImp(exec, function);
148
            return createCallIdentifierFromFunctionImp(exec, function);
148
    }
149
    }
150
    if (asObject(functionValue)->inherits(&JSFunction::info))
151
        return CallIdentifier(static_cast<JSFunction*>(asObject(functionValue))->name(exec), defaultSourceURL, defaultLineNumber);
149
    if (asObject(functionValue)->inherits(&InternalFunction::info))
152
    if (asObject(functionValue)->inherits(&InternalFunction::info))
150
        return CallIdentifier(static_cast<InternalFunction*>(asObject(functionValue))->name(exec), defaultSourceURL, defaultLineNumber);
153
        return CallIdentifier(static_cast<InternalFunction*>(asObject(functionValue))->name(exec), defaultSourceURL, defaultLineNumber);
151
    return CallIdentifier(makeString("(", asObject(functionValue)->className(), " object)"), defaultSourceURL, defaultLineNumber);
154
    return CallIdentifier(makeString("(", asObject(functionValue)->className(), " object)"), defaultSourceURL, defaultLineNumber);
- JavaScriptCore/runtime/FunctionPrototype.cpp -1 / +3 lines
Lines 87-93 JSValue JSC_HOST_CALL functionProtoFuncT JavaScriptCore/runtime/FunctionPrototype.cpp_sec1
87
{
87
{
88
    if (thisValue.inherits(&JSFunction::info)) {
88
    if (thisValue.inherits(&JSFunction::info)) {
89
        JSFunction* function = asFunction(thisValue);
89
        JSFunction* function = asFunction(thisValue);
90
        if (!function->isHostFunction()) {
90
        if (function->isHostFunction())
91
            return jsMakeNontrivialString(exec, "function ", function->name(exec), "() {\n    [native code]\n}");
92
        else {
91
            FunctionExecutable* executable = function->jsExecutable();
93
            FunctionExecutable* executable = function->jsExecutable();
92
            UString sourceString = executable->source().toString();
94
            UString sourceString = executable->source().toString();
93
            insertSemicolonIfNeeded(sourceString);
95
            insertSemicolonIfNeeded(sourceString);
- JavaScriptCore/runtime/JSFunction.cpp -4 / +33 lines
Lines 43-49 namespace JSC { JavaScriptCore/runtime/JSFunction.cpp_sec1
43
43
44
ASSERT_CLASS_FITS_IN_CELL(JSFunction);
44
ASSERT_CLASS_FITS_IN_CELL(JSFunction);
45
45
46
const ClassInfo JSFunction::info = { "Function", &InternalFunction::info, 0, 0 };
46
const ClassInfo JSFunction::info = { "Function", 0, 0, 0 };
47
47
48
bool JSFunction::isHostFunctionNonInline() const
48
bool JSFunction::isHostFunctionNonInline() const
49
{
49
{
Lines 58-69 JSFunction::JSFunction(NonNullPassRefPtr JavaScriptCore/runtime/JSFunction.cpp_sec2
58
}
58
}
59
59
60
JSFunction::JSFunction(ExecState* exec, NonNullPassRefPtr<Structure> structure, int length, const Identifier& name, PassRefPtr<NativeExecutable> thunk)
60
JSFunction::JSFunction(ExecState* exec, NonNullPassRefPtr<Structure> structure, int length, const Identifier& name, PassRefPtr<NativeExecutable> thunk)
61
    : Base(&exec->globalData(), structure, name)
61
    : Base(structure)
62
#if ENABLE(JIT)
62
#if ENABLE(JIT)
63
    , m_executable(thunk)
63
    , m_executable(thunk)
64
#endif
64
#endif
65
    , m_scopeChain(NoScopeChain())
65
    , m_scopeChain(NoScopeChain())
66
{
66
{
67
    putDirect(exec->globalData().propertyNames->name, jsString(exec, name.isNull() ? "" : name.ustring()), DontDelete | ReadOnly | DontEnum);
67
#if ENABLE(JIT)
68
#if ENABLE(JIT)
68
    putDirect(exec->propertyNames().length, jsNumber(exec, length), DontDelete | ReadOnly | DontEnum);
69
    putDirect(exec->propertyNames().length, jsNumber(exec, length), DontDelete | ReadOnly | DontEnum);
69
#else
70
#else
Lines 74-85 JSFunction::JSFunction(ExecState* exec, JavaScriptCore/runtime/JSFunction.cpp_sec3
74
}
75
}
75
76
76
JSFunction::JSFunction(ExecState* exec, NonNullPassRefPtr<Structure> structure, int length, const Identifier& name, NativeFunction func)
77
JSFunction::JSFunction(ExecState* exec, NonNullPassRefPtr<Structure> structure, int length, const Identifier& name, NativeFunction func)
77
    : Base(&exec->globalData(), structure, name)
78
    : Base(structure)
78
#if ENABLE(JIT)
79
#if ENABLE(JIT)
79
    , m_executable(exec->globalData().getHostFunction(func))
80
    , m_executable(exec->globalData().getHostFunction(func))
80
#endif
81
#endif
81
    , m_scopeChain(NoScopeChain())
82
    , m_scopeChain(NoScopeChain())
82
{
83
{
84
    putDirect(exec->globalData().propertyNames->name, jsString(exec, name.isNull() ? "" : name.ustring()), DontDelete | ReadOnly | DontEnum);
83
#if ENABLE(JIT)
85
#if ENABLE(JIT)
84
    putDirect(exec->propertyNames().length, jsNumber(exec, length), DontDelete | ReadOnly | DontEnum);
86
    putDirect(exec->propertyNames().length, jsNumber(exec, length), DontDelete | ReadOnly | DontEnum);
85
#else
87
#else
Lines 90-99 JSFunction::JSFunction(ExecState* exec, JavaScriptCore/runtime/JSFunction.cpp_sec4
90
}
92
}
91
93
92
JSFunction::JSFunction(ExecState* exec, NonNullPassRefPtr<FunctionExecutable> executable, ScopeChainNode* scopeChainNode)
94
JSFunction::JSFunction(ExecState* exec, NonNullPassRefPtr<FunctionExecutable> executable, ScopeChainNode* scopeChainNode)
93
    : Base(&exec->globalData(), exec->lexicalGlobalObject()->functionStructure(), executable->name())
95
    : Base(exec->lexicalGlobalObject()->functionStructure())
94
    , m_executable(executable)
96
    , m_executable(executable)
95
    , m_scopeChain(scopeChainNode)
97
    , m_scopeChain(scopeChainNode)
96
{
98
{
99
    const Identifier& name = static_cast<FunctionExecutable*>(m_executable.get())->name();
100
    putDirect(exec->globalData().propertyNames->name, jsString(exec, name.isNull() ? "" : name.ustring()), DontDelete | ReadOnly | DontEnum);
97
}
101
}
98
102
99
JSFunction::~JSFunction()
103
JSFunction::~JSFunction()
Lines 114-119 JSFunction::~JSFunction() JavaScriptCore/runtime/JSFunction.cpp_sec5
114
    }
118
    }
115
}
119
}
116
120
121
const UString& JSFunction::name(ExecState* exec)
122
{
123
    return asString(getDirect(exec->globalData().propertyNames->name))->value(exec);
124
}
125
126
const UString JSFunction::displayName(ExecState* exec)
127
{
128
    JSValue displayName = getDirect(exec->globalData().propertyNames->displayName);
129
    
130
    if (displayName && isJSString(&exec->globalData(), displayName))
131
        return asString(displayName)->value(exec);
132
    
133
    return UString::null();
134
}
135
136
const UString JSFunction::calculatedDisplayName(ExecState* exec)
137
{
138
    const UString explicitName = displayName(exec);
139
    
140
    if (!explicitName.isEmpty())
141
        return explicitName;
142
    
143
    return name(exec);
144
}
145
117
void JSFunction::markChildren(MarkStack& markStack)
146
void JSFunction::markChildren(MarkStack& markStack)
118
{
147
{
119
    Base::markChildren(markStack);
148
    Base::markChildren(markStack);
- JavaScriptCore/runtime/JSFunction.h -4 / +8 lines
Lines 24-30 JavaScriptCore/runtime/JSFunction.h_sec1
24
#ifndef JSFunction_h
24
#ifndef JSFunction_h
25
#define JSFunction_h
25
#define JSFunction_h
26
26
27
#include "InternalFunction.h"
27
#include "JSObject.h"
28
28
29
namespace JSC {
29
namespace JSC {
30
30
Lines 35-45 namespace JSC { JavaScriptCore/runtime/JSFunction.h_sec2
35
    class JSGlobalObject;
35
    class JSGlobalObject;
36
    class NativeExecutable;
36
    class NativeExecutable;
37
37
38
    class JSFunction : public InternalFunction {
38
    class JSFunction : public JSObject {
39
        friend class JIT;
39
        friend class JIT;
40
        friend class JSGlobalData;
40
        friend class JSGlobalData;
41
41
42
        typedef InternalFunction Base;
42
        typedef JSObject Base;
43
43
44
    public:
44
    public:
45
        JSFunction(ExecState*, NonNullPassRefPtr<Structure>, int length, const Identifier&, NativeFunction);
45
        JSFunction(ExecState*, NonNullPassRefPtr<Structure>, int length, const Identifier&, NativeFunction);
Lines 50-55 namespace JSC { JavaScriptCore/runtime/JSFunction.h_sec3
50
        JSObject* construct(ExecState*, const ArgList&);
50
        JSObject* construct(ExecState*, const ArgList&);
51
        JSValue call(ExecState*, JSValue thisValue, const ArgList&);
51
        JSValue call(ExecState*, JSValue thisValue, const ArgList&);
52
52
53
        const UString& name(ExecState*);
54
        const UString displayName(ExecState*);
55
        const UString calculatedDisplayName(ExecState*);
56
53
        ScopeChain& scope()
57
        ScopeChain& scope()
54
        {
58
        {
55
            ASSERT(!isHostFunctionNonInline());
59
            ASSERT(!isHostFunctionNonInline());
Lines 80-86 namespace JSC { JavaScriptCore/runtime/JSFunction.h_sec4
80
        virtual CallType getCallData(CallData&);
84
        virtual CallType getCallData(CallData&);
81
85
82
    protected:
86
    protected:
83
        const static unsigned StructureFlags = OverridesGetOwnPropertySlot | ImplementsHasInstance | OverridesMarkChildren | OverridesGetPropertyNames | InternalFunction::StructureFlags;
87
        const static unsigned StructureFlags = OverridesGetOwnPropertySlot | ImplementsHasInstance | OverridesMarkChildren | OverridesGetPropertyNames | JSObject::StructureFlags;
84
88
85
    private:
89
    private:
86
        JSFunction(NonNullPassRefPtr<Structure>);
90
        JSFunction(NonNullPassRefPtr<Structure>);
- JavaScriptCore/runtime/JSObject.cpp +11 lines
Lines 27-32 JavaScriptCore/runtime/JSObject.cpp_sec1
27
#include "DatePrototype.h"
27
#include "DatePrototype.h"
28
#include "ErrorConstructor.h"
28
#include "ErrorConstructor.h"
29
#include "GetterSetter.h"
29
#include "GetterSetter.h"
30
#include "JSFunction.h"
30
#include "JSGlobalObject.h"
31
#include "JSGlobalObject.h"
31
#include "NativeErrorConstructor.h"
32
#include "NativeErrorConstructor.h"
32
#include "ObjectPrototype.h"
33
#include "ObjectPrototype.h"
Lines 509-519 void JSObject::putDirectFunction(ExecSta JavaScriptCore/runtime/JSObject.cpp_sec2
509
    putDirectFunction(Identifier(exec, function->name(exec)), function, attr);
510
    putDirectFunction(Identifier(exec, function->name(exec)), function, attr);
510
}
511
}
511
512
513
void JSObject::putDirectFunction(ExecState* exec, JSFunction* function, unsigned attr)
514
{
515
    putDirectFunction(Identifier(exec, function->name(exec)), function, attr);
516
}
517
512
void JSObject::putDirectFunctionWithoutTransition(ExecState* exec, InternalFunction* function, unsigned attr)
518
void JSObject::putDirectFunctionWithoutTransition(ExecState* exec, InternalFunction* function, unsigned attr)
513
{
519
{
514
    putDirectFunctionWithoutTransition(Identifier(exec, function->name(exec)), function, attr);
520
    putDirectFunctionWithoutTransition(Identifier(exec, function->name(exec)), function, attr);
515
}
521
}
516
522
523
void JSObject::putDirectFunctionWithoutTransition(ExecState* exec, JSFunction* function, unsigned attr)
524
{
525
    putDirectFunctionWithoutTransition(Identifier(exec, function->name(exec)), function, attr);
526
}
527
517
NEVER_INLINE void JSObject::fillGetterPropertySlot(PropertySlot& slot, JSValue* location)
528
NEVER_INLINE void JSObject::fillGetterPropertySlot(PropertySlot& slot, JSValue* location)
518
{
529
{
519
    if (JSObject* getterFunction = asGetterSetter(*location)->getter()) {
530
    if (JSObject* getterFunction = asGetterSetter(*location)->getter()) {
- JavaScriptCore/runtime/JSObject.h +2 lines
Lines 176-185 namespace JSC { JavaScriptCore/runtime/JSObject.h_sec1
176
        void putDirectFunction(const Identifier& propertyName, JSCell* value, unsigned attr = 0);
176
        void putDirectFunction(const Identifier& propertyName, JSCell* value, unsigned attr = 0);
177
        void putDirectFunction(const Identifier& propertyName, JSCell* value, unsigned attr, bool checkReadOnly, PutPropertySlot& slot);
177
        void putDirectFunction(const Identifier& propertyName, JSCell* value, unsigned attr, bool checkReadOnly, PutPropertySlot& slot);
178
        void putDirectFunction(ExecState* exec, InternalFunction* function, unsigned attr = 0);
178
        void putDirectFunction(ExecState* exec, InternalFunction* function, unsigned attr = 0);
179
        void putDirectFunction(ExecState* exec, JSFunction* function, unsigned attr = 0);
179
180
180
        void putDirectWithoutTransition(const Identifier& propertyName, JSValue value, unsigned attr = 0);
181
        void putDirectWithoutTransition(const Identifier& propertyName, JSValue value, unsigned attr = 0);
181
        void putDirectFunctionWithoutTransition(const Identifier& propertyName, JSCell* value, unsigned attr = 0);
182
        void putDirectFunctionWithoutTransition(const Identifier& propertyName, JSCell* value, unsigned attr = 0);
182
        void putDirectFunctionWithoutTransition(ExecState* exec, InternalFunction* function, unsigned attr = 0);
183
        void putDirectFunctionWithoutTransition(ExecState* exec, InternalFunction* function, unsigned attr = 0);
184
        void putDirectFunctionWithoutTransition(ExecState* exec, JSFunction* function, unsigned attr = 0);
183
185
184
        // Fast access to known property offsets.
186
        // Fast access to known property offsets.
185
        JSValue getDirectOffset(size_t offset) const { return JSValue::decode(propertyStorage()[offset]); }
187
        JSValue getDirectOffset(size_t offset) const { return JSValue::decode(propertyStorage()[offset]); }
- JavaScriptCore/runtime/Lookup.cpp -1 / +1 lines
Lines 75-81 void setUpStaticFunctionSlot(ExecState* JavaScriptCore/runtime/Lookup.cpp_sec1
75
    JSValue* location = thisObj->getDirectLocation(propertyName);
75
    JSValue* location = thisObj->getDirectLocation(propertyName);
76
76
77
    if (!location) {
77
    if (!location) {
78
        InternalFunction* function;
78
        NativeFunctionWrapper* function;
79
#if ENABLE(JIT)
79
#if ENABLE(JIT)
80
        if (entry->generator())
80
        if (entry->generator())
81
            function = new (exec) NativeFunctionWrapper(exec, exec->lexicalGlobalObject()->prototypeFunctionStructure(), entry->functionLength(), propertyName, exec->globalData().getHostFunction(entry->function(), entry->generator()));
81
            function = new (exec) NativeFunctionWrapper(exec, exec->lexicalGlobalObject()->prototypeFunctionStructure(), entry->functionLength(), propertyName, exec->globalData().getHostFunction(entry->function(), entry->generator()));

Return to Bug 39393