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

Side by Side 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: remove inlcude 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 unified diff | Download patch
« no previous file with comments | « src/bootstrapper.cc ('k') | src/objects.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2014 the V8 project authors. All rights reserved. 1 // Copyright 2014 the V8 project authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #include "src/compiler/pipeline.h" 5 #include "src/compiler/pipeline.h"
6 6
7 #include <fstream> // NOLINT(readability/streams) 7 #include <fstream> // NOLINT(readability/streams)
8 #include <sstream> 8 #include <sstream>
9 9
10 #include "src/base/platform/elapsed-timer.h" 10 #include "src/base/platform/elapsed-timer.h"
11 #include "src/bootstrapper.h" // TODO(mstarzinger): Only temporary.
12 #include "src/compiler/ast-graph-builder.h" 11 #include "src/compiler/ast-graph-builder.h"
13 #include "src/compiler/ast-loop-assignment-analyzer.h" 12 #include "src/compiler/ast-loop-assignment-analyzer.h"
14 #include "src/compiler/basic-block-instrumentor.h" 13 #include "src/compiler/basic-block-instrumentor.h"
15 #include "src/compiler/change-lowering.h" 14 #include "src/compiler/change-lowering.h"
16 #include "src/compiler/code-generator.h" 15 #include "src/compiler/code-generator.h"
17 #include "src/compiler/common-operator-reducer.h" 16 #include "src/compiler/common-operator-reducer.h"
18 #include "src/compiler/control-flow-optimizer.h" 17 #include "src/compiler/control-flow-optimizer.h"
19 #include "src/compiler/control-reducer.h" 18 #include "src/compiler/control-reducer.h"
20 #include "src/compiler/graph-replay.h" 19 #include "src/compiler/graph-replay.h"
21 #include "src/compiler/graph-visualizer.h" 20 #include "src/compiler/graph-visualizer.h"
(...skipping 808 matching lines...) Expand 10 before | Expand all | Expand 10 after
830 if (info()->is_osr() && !FLAG_turbo_osr) { 829 if (info()->is_osr() && !FLAG_turbo_osr) {
831 // TODO(turbofan): remove this flag and always handle OSR 830 // TODO(turbofan): remove this flag and always handle OSR
832 info()->RetryOptimization(kOsrCompileFailed); 831 info()->RetryOptimization(kOsrCompileFailed);
833 return Handle<Code>::null(); 832 return Handle<Code>::null();
834 } 833 }
835 834
836 // TODO(mstarzinger): This is just a temporary hack to make TurboFan work, 835 // TODO(mstarzinger): This is just a temporary hack to make TurboFan work,
837 // the correct solution is to restore the context register after invoking 836 // the correct solution is to restore the context register after invoking
838 // builtins from full-codegen. 837 // builtins from full-codegen.
839 Handle<SharedFunctionInfo> shared = info()->shared_info(); 838 Handle<SharedFunctionInfo> shared = info()->shared_info();
840 if (isolate()->bootstrapper()->IsActive() || 839 for (int i = 0; i < Builtins::NumberOfJavaScriptBuiltins(); i++) {
841 shared->disable_optimization_reason() == 840 Builtins::JavaScript id = static_cast<Builtins::JavaScript>(i);
842 kBuiltinFunctionCannotBeOptimized) { 841 Object* builtin = isolate()->js_builtins_object()->javascript_builtin(id);
843 shared->DisableOptimization(kBuiltinFunctionCannotBeOptimized); 842 if (*info()->closure() == builtin) return Handle<Code>::null();
844 return Handle<Code>::null();
845 } 843 }
846 844
847 // TODO(dslomov): support turbo optimization of subclass constructors. 845 // TODO(dslomov): support turbo optimization of subclass constructors.
848 if (IsSubclassConstructor(shared->kind())) { 846 if (IsSubclassConstructor(shared->kind())) {
849 shared->DisableOptimization(kSuperReference); 847 shared->DisableOptimization(kSuperReference);
850 return Handle<Code>::null(); 848 return Handle<Code>::null();
851 } 849 }
852 850
853 ZonePool zone_pool; 851 ZonePool zone_pool;
854 SmartPointer<PipelineStatistics> pipeline_statistics; 852 SmartPointer<PipelineStatistics> pipeline_statistics;
(...skipping 342 matching lines...) Expand 10 before | Expand all | Expand 10 after
1197 1195
1198 if (FLAG_trace_turbo && !data->MayHaveUnverifiableGraph()) { 1196 if (FLAG_trace_turbo && !data->MayHaveUnverifiableGraph()) {
1199 TurboCfgFile tcf(data->isolate()); 1197 TurboCfgFile tcf(data->isolate());
1200 tcf << AsC1VAllocator("CodeGen", data->register_allocator()); 1198 tcf << AsC1VAllocator("CodeGen", data->register_allocator());
1201 } 1199 }
1202 } 1200 }
1203 1201
1204 } // namespace compiler 1202 } // namespace compiler
1205 } // namespace internal 1203 } // namespace internal
1206 } // namespace v8 1204 } // namespace v8
OLDNEW
« no previous file with comments | « src/bootstrapper.cc ('k') | src/objects.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698