Enable inlining of functions containing loops.

Review URL: http://codereview.chromium.org/6813107

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@7586 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
This commit is contained in:
fschneider@chromium.org 2011-04-12 10:27:09 +00:00
parent 4618b186ef
commit fee9845599

View File

@ -367,36 +367,11 @@ bool Slot::IsInlineable() const {
}
bool ForStatement::IsInlineable() const {
return false;
}
bool WhileStatement::IsInlineable() const {
return false;
}
bool DoWhileStatement::IsInlineable() const {
return false;
}
bool ForInStatement::IsInlineable() const {
return false;
}
bool ContinueStatement::IsInlineable() const {
return false;
}
bool BreakStatement::IsInlineable() const {
return false;
}
bool WithEnterStatement::IsInlineable() const {
return false;
}
@ -471,6 +446,36 @@ bool ValidLeftHandSideSentinel::IsInlineable() const {
}
bool ForStatement::IsInlineable() const {
return (init() == NULL || init()->IsInlineable())
&& (cond() == NULL || cond()->IsInlineable())
&& (next() == NULL || next()->IsInlineable())
&& body()->IsInlineable();
}
bool WhileStatement::IsInlineable() const {
return cond()->IsInlineable()
&& body()->IsInlineable();
}
bool DoWhileStatement::IsInlineable() const {
return cond()->IsInlineable()
&& body()->IsInlineable();
}
bool ContinueStatement::IsInlineable() const {
return true;
}
bool BreakStatement::IsInlineable() const {
return true;
}
bool EmptyStatement::IsInlineable() const {
return true;
}