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

Side by Side Diff: src/compiler/pipeline.cc

Issue 1222843004: [turbofan] Unify various bailout hacks for super call. (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@local_cleanup-frame-constants-1
Patch Set: Fix throwing of reference error. Created 5 years, 5 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
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/adapters.h" 10 #include "src/base/adapters.h"
(...skipping 948 matching lines...) Expand 10 before | Expand all | Expand 10 after
959 if (FLAG_turbo_verify) { 959 if (FLAG_turbo_verify) {
960 Run<VerifyGraphPhase>(untyped); 960 Run<VerifyGraphPhase>(untyped);
961 } 961 }
962 } 962 }
963 963
964 964
965 Handle<Code> Pipeline::GenerateCode() { 965 Handle<Code> Pipeline::GenerateCode() {
966 // TODO(mstarzinger): This is just a temporary hack to make TurboFan work, 966 // TODO(mstarzinger): This is just a temporary hack to make TurboFan work,
967 // the correct solution is to restore the context register after invoking 967 // the correct solution is to restore the context register after invoking
968 // builtins from full-codegen. 968 // builtins from full-codegen.
969 Handle<SharedFunctionInfo> shared = info()->shared_info();
970 for (int i = 0; i < Builtins::NumberOfJavaScriptBuiltins(); i++) { 969 for (int i = 0; i < Builtins::NumberOfJavaScriptBuiltins(); i++) {
971 Builtins::JavaScript id = static_cast<Builtins::JavaScript>(i); 970 Builtins::JavaScript id = static_cast<Builtins::JavaScript>(i);
972 Object* builtin = isolate()->js_builtins_object()->javascript_builtin(id); 971 Object* builtin = isolate()->js_builtins_object()->javascript_builtin(id);
973 if (*info()->closure() == builtin) return Handle<Code>::null(); 972 if (*info()->closure() == builtin) return Handle<Code>::null();
974 } 973 }
975 974
976 // TODO(dslomov): support turbo optimization of subclass constructors.
977 if (IsSubclassConstructor(shared->kind())) {
978 shared->DisableOptimization(kSuperReference);
979 return Handle<Code>::null();
980 }
981
982 ZonePool zone_pool; 975 ZonePool zone_pool;
983 SmartPointer<PipelineStatistics> pipeline_statistics; 976 SmartPointer<PipelineStatistics> pipeline_statistics;
984 977
985 if (FLAG_turbo_stats) { 978 if (FLAG_turbo_stats) {
986 pipeline_statistics.Reset(new PipelineStatistics(info(), &zone_pool)); 979 pipeline_statistics.Reset(new PipelineStatistics(info(), &zone_pool));
987 pipeline_statistics->BeginPhaseKind("initializing"); 980 pipeline_statistics->BeginPhaseKind("initializing");
988 } 981 }
989 982
990 if (FLAG_trace_turbo) { 983 if (FLAG_trace_turbo) {
991 FILE* json_file = OpenVisualizerLogFile(info(), NULL, "json", "w+"); 984 FILE* json_file = OpenVisualizerLogFile(info(), NULL, "json", "w+");
(...skipping 365 matching lines...) Expand 10 before | Expand all | Expand 10 after
1357 tcf << AsC1VRegisterAllocationData("CodeGen", 1350 tcf << AsC1VRegisterAllocationData("CodeGen",
1358 data->register_allocation_data()); 1351 data->register_allocation_data());
1359 } 1352 }
1360 1353
1361 data->DeleteRegisterAllocationZone(); 1354 data->DeleteRegisterAllocationZone();
1362 } 1355 }
1363 1356
1364 } // namespace compiler 1357 } // namespace compiler
1365 } // namespace internal 1358 } // namespace internal
1366 } // namespace v8 1359 } // namespace v8
OLDNEW
« src/compiler/ast-graph-builder.cc ('K') | « src/compiler/ast-graph-builder.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698