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

Unified Diff: src/compiler/pipeline.cc

Issue 817293005: Avoid unintentional optimization of hot builtins by TurboFan. (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Fixed. Created 5 years, 11 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/builtins.h ('k') | test/mjsunit/regress/regress-crbug-451016.js » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/compiler/pipeline.cc
diff --git a/src/compiler/pipeline.cc b/src/compiler/pipeline.cc
index 73aa9627b329e5402496309e54896ae4969ea7d4..5233045f1b7cc94263e3f752b1cb3553c2858cc3 100644
--- a/src/compiler/pipeline.cc
+++ b/src/compiler/pipeline.cc
@@ -777,7 +777,13 @@ Handle<Code> Pipeline::GenerateCode() {
// TODO(mstarzinger): This is just a temporary hack to make TurboFan work,
// the correct solution is to restore the context register after invoking
// builtins from full-codegen.
- if (isolate()->bootstrapper()->IsActive()) return Handle<Code>::null();
+ Handle<SharedFunctionInfo> shared = info()->shared_info();
+ if (isolate()->bootstrapper()->IsActive() ||
+ shared->disable_optimization_reason() ==
+ kBuiltinFunctionCannotBeOptimized) {
+ shared->DisableOptimization(kBuiltinFunctionCannotBeOptimized);
+ return Handle<Code>::null();
+ }
ZonePool zone_pool(isolate());
SmartPointer<PipelineStatistics> pipeline_statistics;
« no previous file with comments | « src/builtins.h ('k') | test/mjsunit/regress/regress-crbug-451016.js » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698