Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(441)

Unified Diff: src/ast.cc

Issue 6976022: Do not allow inlining functions with direct arguments access. (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: Created 9 years, 7 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | src/hydrogen.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/ast.cc
diff --git a/src/ast.cc b/src/ast.cc
index 50045568c931fcadfe3bdf9771b0ce5422674d31..b4abf5416e9fd6692783a4f4875e35a5a0ab7e72 100644
--- a/src/ast.cc
+++ b/src/ast.cc
@@ -544,6 +544,17 @@ bool CallNew::IsInlineable() const {
bool CallRuntime::IsInlineable() const {
+ // Don't try to inline JS runtime calls because we don't (currently) even
+ // optimize them.
+ if (is_jsruntime()) return false;
+ // Don't inline the %_ArgumentsLength or %_Arguments because their
+ // implementation will not work. There is no stack frame to get them
+ // from.
+ if (function()->intrinsic_type == Runtime::INLINE &&
+ (name()->IsEqualTo(CStrVector("_ArgumentsLength")) ||
+ name()->IsEqualTo(CStrVector("_Arguments")))) {
+ return false;
+ }
const int count = arguments()->length();
for (int i = 0; i < count; ++i) {
if (!arguments()->at(i)->IsInlineable()) return false;
« no previous file with comments | « no previous file | src/hydrogen.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698