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

Unified Diff: src/compiler/js-inlining.cc

Issue 1322203005: [turbofan] Handle stack overflow exceptions in JSInliner. (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Add regression test. Created 5 years, 3 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/mjsunit/regress/regress-crbug-527364.js » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/compiler/js-inlining.cc
diff --git a/src/compiler/js-inlining.cc b/src/compiler/js-inlining.cc
index 03e6384080ccba3dbb4b5b87a2065c78b4b0f036..d676c9e5e5ddc30367e9da4ddac98137204ca1a4 100644
--- a/src/compiler/js-inlining.cc
+++ b/src/compiler/js-inlining.cc
@@ -15,6 +15,7 @@
#include "src/compiler/node-properties.h"
#include "src/compiler/operator-properties.h"
#include "src/full-codegen/full-codegen.h"
+#include "src/isolate-inl.h"
#include "src/parser.h"
#include "src/rewriter.h"
#include "src/scopes.h"
@@ -296,8 +297,22 @@ Reduction JSInliner::Reduce(Node* node) {
CompilationInfo info(&parse_info);
if (info_->is_deoptimization_enabled()) info.MarkAsDeoptimizationEnabled();
- if (!Compiler::ParseAndAnalyze(info.parse_info())) return NoChange();
- if (!Compiler::EnsureDeoptimizationSupport(&info)) return NoChange();
+ if (!Compiler::ParseAndAnalyze(info.parse_info())) {
+ TRACE("Not inlining %s into %s because parsing failed\n",
+ function->shared()->DebugName()->ToCString().get(),
+ info_->shared_info()->DebugName()->ToCString().get());
+ if (info_->isolate()->has_pending_exception()) {
+ info_->isolate()->clear_pending_exception();
+ }
+ return NoChange();
+ }
+
+ if (!Compiler::EnsureDeoptimizationSupport(&info)) {
+ TRACE("Not inlining %s into %s because deoptimization support failed\n",
+ function->shared()->DebugName()->ToCString().get(),
+ info_->shared_info()->DebugName()->ToCString().get());
+ return NoChange();
+ }
if (info.scope()->arguments() != NULL && is_sloppy(info.language_mode())) {
// For now do not inline functions that use their arguments array.
« no previous file with comments | « no previous file | test/mjsunit/regress/regress-crbug-527364.js » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698