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

Unified Diff: src/hydrogen.cc

Issue 1063373003: Prevent overzealous bailout due to script context. (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Adapt tests. Created 5 years, 8 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 | test/cctest/cctest.status » ('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 5e9673aaebdf9fdc42695fd026a670cc14851779..7a723c57dbb6a45cc4c1a14c0eac85ee62b20808 100644
--- a/src/hydrogen.cc
+++ b/src/hydrogen.cc
@@ -4220,7 +4220,8 @@ bool HOptimizedGraphBuilder::BuildGraph() {
return false;
}
- if (current_info()->scope()->is_script_scope()) {
+ int slots = current_info()->num_heap_slots() - Context::MIN_CONTEXT_SLOTS;
+ if (current_info()->scope()->is_script_scope() && slots > 0) {
Bailout(kScriptContext);
return false;
}
« no previous file with comments | « no previous file | test/cctest/cctest.status » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698