Revision: 6499 Author: [email protected] Date: Wed Jan 26 09:30:22 2011 Log: Use more detailed compilation info for inlined functions.
Construct the statically-known compilation info for inlined functions using the target closure (which knows about its scope chain) and not from the shared function info (which doesn't). Review URL: http://codereview.chromium.org/6397004 http://code.google.com/p/v8/source/detail?r=6499 Modified: /branches/bleeding_edge/src/hydrogen.cc ======================================= --- /branches/bleeding_edge/src/hydrogen.cc Wed Jan 26 02:25:43 2011 +++ /branches/bleeding_edge/src/hydrogen.cc Wed Jan 26 09:30:22 2011 @@ -3964,8 +3964,7 @@ int count_before = AstNode::Count(); // Parse and allocate variables. - Handle<SharedFunctionInfo> shared(target->shared()); - CompilationInfo inner_info(shared); + CompilationInfo inner_info(target); if (!ParserApi::Parse(&inner_info) || !Scope::Analyze(&inner_info)) { return false; @@ -3988,9 +3987,10 @@ // Don't inline functions that uses the arguments object or that // have a mismatching number of parameters. + Handle<SharedFunctionInfo> shared(target->shared()); int arity = expr->arguments()->length(); if (function->scope()->arguments() != NULL || - arity != target->shared()->formal_parameter_count()) { + arity != shared->formal_parameter_count()) { return false; } -- v8-dev mailing list [email protected] http://groups.google.com/group/v8-dev
