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

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

Issue 1883403002: [compiler] Move ensuring deoptimization support to backends. (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Addressed comments. Created 4 years, 8 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/compiler.cc ('k') | src/crankshaft/hydrogen.cc » ('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/adapters.h" 10 #include "src/base/adapters.h"
(...skipping 486 matching lines...) Expand 10 before | Expand all | Expand 10 after
497 info()->MarkAsBailoutOnUninitialized(); 497 info()->MarkAsBailoutOnUninitialized();
498 } 498 }
499 if (FLAG_native_context_specialization) { 499 if (FLAG_native_context_specialization) {
500 info()->MarkAsNativeContextSpecializing(); 500 info()->MarkAsNativeContextSpecializing();
501 } 501 }
502 } 502 }
503 if (!info()->shared_info()->asm_function() || FLAG_turbo_asm_deoptimization) { 503 if (!info()->shared_info()->asm_function() || FLAG_turbo_asm_deoptimization) {
504 info()->MarkAsDeoptimizationEnabled(); 504 info()->MarkAsDeoptimizationEnabled();
505 } 505 }
506 506
507 if (!info()->shared_info()->HasBytecodeArray()) {
508 if (!Compiler::EnsureDeoptimizationSupport(info())) return FAILED;
509 }
510
507 Pipeline pipeline(info()); 511 Pipeline pipeline(info());
508 pipeline.GenerateCode(); 512 pipeline.GenerateCode();
509 if (isolate()->has_pending_exception()) return FAILED; // Stack overflowed. 513 if (isolate()->has_pending_exception()) return FAILED; // Stack overflowed.
510 if (info()->code().is_null()) return AbortOptimization(kGraphBuildingFailed); 514 if (info()->code().is_null()) return AbortOptimization(kGraphBuildingFailed);
511 515
512 return SUCCEEDED; 516 return SUCCEEDED;
513 } 517 }
514 518
515 PipelineCompilationJob::Status PipelineCompilationJob::OptimizeGraphImpl() { 519 PipelineCompilationJob::Status PipelineCompilationJob::OptimizeGraphImpl() {
516 // TODO(turbofan): Currently everything is done in the first phase. 520 // TODO(turbofan): Currently everything is done in the first phase.
(...skipping 1043 matching lines...) Expand 10 before | Expand all | Expand 10 after
1560 } 1564 }
1561 1565
1562 data->DeleteRegisterAllocationZone(); 1566 data->DeleteRegisterAllocationZone();
1563 } 1567 }
1564 1568
1565 Isolate* Pipeline::isolate() const { return info()->isolate(); } 1569 Isolate* Pipeline::isolate() const { return info()->isolate(); }
1566 1570
1567 } // namespace compiler 1571 } // namespace compiler
1568 } // namespace internal 1572 } // namespace internal
1569 } // namespace v8 1573 } // namespace v8
OLDNEW
« no previous file with comments | « src/compiler.cc ('k') | src/crankshaft/hydrogen.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698