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

Unified Diff: src/hydrogen.cc

Issue 619863002: Introduce flag --allocation-site-transitioning Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: Removed extra work happening when !transitioning && pretenuring. Created 6 years, 2 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 | « src/flag-definitions.h ('k') | src/ia32/code-stubs-ia32.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/hydrogen.cc
diff --git a/src/hydrogen.cc b/src/hydrogen.cc
index e2508e76dcd66fd02a2526461abd73b655f54294..f7ecdf85251ac5ded1b202b5bb8f52ee00f205b5 100644
--- a/src/hydrogen.cc
+++ b/src/hydrogen.cc
@@ -8995,6 +8995,12 @@ bool HOptimizedGraphBuilder::TryHandleArrayCallNew(CallNew* expr,
return false;
}
+ // Special handling for array construction only makes sense if we are
+ // using allocation sites.
+ if (!FLAG_allocation_site_transitioning) {
+ return false;
+ }
+
BuildArrayCall(expr,
expr->arguments()->length(),
function,
@@ -9245,10 +9251,9 @@ bool HOptimizedGraphBuilder::IsCallArrayInlineable(
Handle<JSFunction> target = array_function();
// We should have the function plus array arguments on the environment stack.
DCHECK(environment()->length() >= (argument_count + 1));
- DCHECK(!site.is_null());
bool inline_ok = false;
- if (site->CanInlineCall()) {
+ if (!site.is_null() && site->CanInlineCall()) {
// We also want to avoid inlining in certain 1 argument scenarios.
if (argument_count == 1) {
HValue* argument = Top();
« no previous file with comments | « src/flag-definitions.h ('k') | src/ia32/code-stubs-ia32.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698