Changeset 47089 in webkit for trunk/JavaScriptCore/interpreter/Interpreter.cpp
- Timestamp:
- Aug 11, 2009, 10:22:33 PM (16 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/JavaScriptCore/interpreter/Interpreter.cpp
r46766 r47089 852 852 for (DeclarationStacks::FunctionStack::const_iterator it = functionStack.begin(); it != functionStackEnd; ++it) { 853 853 PutPropertySlot slot; 854 variableObject->put(callFrame, (*it)-> m_ident, (*it)->makeFunction(callFrame, scopeChain), slot);854 variableObject->put(callFrame, (*it)->ident(), (*it)->make(callFrame, scopeChain), slot); 855 855 } 856 856 … … 2920 2920 */ 2921 2921 int dst = (++vPC)->u.operand; 2922 int func = (++vPC)->u.operand; 2923 2924 callFrame->r(dst) = JSValue(callFrame->codeBlock()->function(func)->makeFunction(callFrame, callFrame->scopeChain())); 2922 int funcIndex = (++vPC)->u.operand; 2923 2924 FunctionBodyNode* body = callFrame->codeBlock()->function(funcIndex); 2925 JSFunction* func = body->make(callFrame, callFrame->scopeChain()); 2926 2927 /* 2928 The Identifier in a FunctionExpression can be referenced from inside 2929 the FunctionExpression's FunctionBody to allow the function to call 2930 itself recursively. However, unlike in a FunctionDeclaration, the 2931 Identifier in a FunctionExpression cannot be referenced from and 2932 does not affect the scope enclosing the FunctionExpression. 2933 */ 2934 if (!body->ident().isNull()) { 2935 JSStaticScopeObject* functionScopeObject = new (callFrame) JSStaticScopeObject(callFrame, body->ident(), func, ReadOnly | DontDelete); 2936 func->scope().push(functionScopeObject); 2937 } 2938 2939 callFrame->r(dst) = JSValue(func); 2925 2940 2926 2941 ++vPC; … … 2938 2953 int func = (++vPC)->u.operand; 2939 2954 2940 callFrame->r(dst) = JSValue(callFrame->codeBlock()->function Expression(func)->makeFunction(callFrame, callFrame->scopeChain()));2955 callFrame->r(dst) = JSValue(callFrame->codeBlock()->function(func)->make(callFrame, callFrame->scopeChain())); 2941 2956 2942 2957 ++vPC;
Note:
See TracChangeset
for help on using the changeset viewer.