Changeset 37859 in webkit for trunk/JavaScriptCore/kjs/nodes.cpp
- Timestamp:
- Oct 24, 2008, 1:44:58 PM (17 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/JavaScriptCore/kjs/nodes.cpp
r37763 r37859 1872 1872 JSFunction* FuncDeclNode::makeFunction(ExecState* exec, ScopeChainNode* scopeChain) 1873 1873 { 1874 return new (exec) JSFunction(exec, m_ident, m_body.get(), scopeChain); 1875 } 1876 1877 RegisterID* FuncDeclNode::emitCode(CodeGenerator&, RegisterID* dst) 1878 { 1879 return dst; 1880 } 1881 1882 // ------------------------------ FuncExprNode --------------------------------- 1883 1884 RegisterID* FuncExprNode::emitCode(CodeGenerator& generator, RegisterID* dst) 1885 { 1886 return generator.emitNewFunctionExpression(generator.finalDestination(dst), this); 1887 } 1888 1889 JSFunction* FuncExprNode::makeFunction(ExecState* exec, ScopeChainNode* scopeChain) 1890 { 1874 1891 JSFunction* func = new (exec) JSFunction(exec, m_ident, m_body.get(), scopeChain); 1875 1876 JSObject* proto = constructEmptyObject(exec);1877 proto->putDirect(exec->propertyNames().constructor, func, DontEnum);1878 func->putDirect(exec->propertyNames().prototype, proto, DontDelete);1879 return func;1880 }1881 1882 RegisterID* FuncDeclNode::emitCode(CodeGenerator&, RegisterID* dst)1883 {1884 return dst;1885 }1886 1887 // ------------------------------ FuncExprNode ---------------------------------1888 1889 RegisterID* FuncExprNode::emitCode(CodeGenerator& generator, RegisterID* dst)1890 {1891 return generator.emitNewFunctionExpression(generator.finalDestination(dst), this);1892 }1893 1894 JSFunction* FuncExprNode::makeFunction(ExecState* exec, ScopeChainNode* scopeChain)1895 {1896 JSFunction* func = new (exec) JSFunction(exec, m_ident, m_body.get(), scopeChain);1897 JSObject* proto = constructEmptyObject(exec);1898 proto->putDirect(exec->propertyNames().constructor, func, DontEnum);1899 func->putDirect(exec->propertyNames().prototype, proto, DontDelete);1900 1892 1901 1893 /*
Note:
See TracChangeset
for help on using the changeset viewer.