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

Unified Diff: src/compiler/pipeline.cc

Issue 981213002: Do not include code objects for functions in the start-up snapshot. (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: fix TF Created 5 years, 9 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
« src/bootstrapper.cc ('K') | « src/bootstrapper.cc ('k') | src/objects.h » ('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 80b19809d338eece87ad6280c1e026e183857df0..3936af0d0c4e8e1ee21b62064cebbe8ca273f829 100644
--- a/src/compiler/pipeline.cc
+++ b/src/compiler/pipeline.cc
@@ -837,11 +837,10 @@ Handle<Code> Pipeline::GenerateCode() {
// the correct solution is to restore the context register after invoking
// builtins from full-codegen.
Handle<SharedFunctionInfo> shared = info()->shared_info();
- if (isolate()->bootstrapper()->IsActive() ||
- shared->disable_optimization_reason() ==
- kBuiltinFunctionCannotBeOptimized) {
- shared->DisableOptimization(kBuiltinFunctionCannotBeOptimized);
- return Handle<Code>::null();
+ for (int i = 0; i < Builtins::NumberOfJavaScriptBuiltins(); i++) {
+ Builtins::JavaScript id = static_cast<Builtins::JavaScript>(i);
+ Object* builtin = isolate()->js_builtins_object()->javascript_builtin(id);
+ if (*info()->closure() == builtin) return Handle<Code>::null();
}
// TODO(dslomov): support turbo optimization of subclass constructors.
« src/bootstrapper.cc ('K') | « src/bootstrapper.cc ('k') | src/objects.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698