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

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

Issue 2333973003: [turbofan] Remove remnants from JavaScript stubs support. (Closed)
Patch Set: Created 4 years, 3 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 | « no previous file | no next file » | 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 <memory> 8 #include <memory>
9 #include <sstream> 9 #include <sstream>
10 10
(...skipping 430 matching lines...) Expand 10 before | Expand all | Expand 10 after
441 AstGraphBuilderWithPositions(Zone* local_zone, CompilationInfo* info, 441 AstGraphBuilderWithPositions(Zone* local_zone, CompilationInfo* info,
442 JSGraph* jsgraph, 442 JSGraph* jsgraph,
443 LoopAssignmentAnalysis* loop_assignment, 443 LoopAssignmentAnalysis* loop_assignment,
444 TypeHintAnalysis* type_hint_analysis, 444 TypeHintAnalysis* type_hint_analysis,
445 SourcePositionTable* source_positions) 445 SourcePositionTable* source_positions)
446 : AstGraphBuilder(local_zone, info, jsgraph, loop_assignment, 446 : AstGraphBuilder(local_zone, info, jsgraph, loop_assignment,
447 type_hint_analysis), 447 type_hint_analysis),
448 source_positions_(source_positions), 448 source_positions_(source_positions),
449 start_position_(info->shared_info()->start_position()) {} 449 start_position_(info->shared_info()->start_position()) {}
450 450
451 bool CreateGraph(bool stack_check) { 451 bool CreateGraph() {
452 SourcePositionTable::Scope pos_scope(source_positions_, start_position_); 452 SourcePositionTable::Scope pos_scope(source_positions_, start_position_);
453 return AstGraphBuilder::CreateGraph(stack_check); 453 return AstGraphBuilder::CreateGraph();
454 } 454 }
455 455
456 #define DEF_VISIT(type) \ 456 #define DEF_VISIT(type) \
457 void Visit##type(type* node) override { \ 457 void Visit##type(type* node) override { \
458 SourcePositionTable::Scope pos(source_positions_, \ 458 SourcePositionTable::Scope pos(source_positions_, \
459 SourcePosition(node->position())); \ 459 SourcePosition(node->position())); \
460 AstGraphBuilder::Visit##type(node); \ 460 AstGraphBuilder::Visit##type(node); \
461 } 461 }
462 AST_NODE_LIST(DEF_VISIT) 462 AST_NODE_LIST(DEF_VISIT)
463 #undef DEF_VISIT 463 #undef DEF_VISIT
(...skipping 293 matching lines...) Expand 10 before | Expand all | Expand 10 after
757 data->set_type_hint_analysis(type_hint_analysis); 757 data->set_type_hint_analysis(type_hint_analysis);
758 } 758 }
759 } 759 }
760 }; 760 };
761 761
762 762
763 struct GraphBuilderPhase { 763 struct GraphBuilderPhase {
764 static const char* phase_name() { return "graph builder"; } 764 static const char* phase_name() { return "graph builder"; }
765 765
766 void Run(PipelineData* data, Zone* temp_zone) { 766 void Run(PipelineData* data, Zone* temp_zone) {
767 bool stack_check = !data->info()->IsStub();
768 bool succeeded = false; 767 bool succeeded = false;
769 768
770 if (data->info()->is_optimizing_from_bytecode()) { 769 if (data->info()->is_optimizing_from_bytecode()) {
771 BytecodeGraphBuilder graph_builder(temp_zone, data->info(), 770 BytecodeGraphBuilder graph_builder(temp_zone, data->info(),
772 data->jsgraph()); 771 data->jsgraph());
773 succeeded = graph_builder.CreateGraph(); 772 succeeded = graph_builder.CreateGraph();
774 } else { 773 } else {
775 AstGraphBuilderWithPositions graph_builder( 774 AstGraphBuilderWithPositions graph_builder(
776 temp_zone, data->info(), data->jsgraph(), data->loop_assignment(), 775 temp_zone, data->info(), data->jsgraph(), data->loop_assignment(),
777 data->type_hint_analysis(), data->source_positions()); 776 data->type_hint_analysis(), data->source_positions());
778 succeeded = graph_builder.CreateGraph(stack_check); 777 succeeded = graph_builder.CreateGraph();
779 } 778 }
780 779
781 if (!succeeded) { 780 if (!succeeded) {
782 data->set_compilation_failed(); 781 data->set_compilation_failed();
783 } 782 }
784 } 783 }
785 }; 784 };
786 785
787 786
788 struct InliningPhase { 787 struct InliningPhase {
(...skipping 1160 matching lines...) Expand 10 before | Expand all | Expand 10 after
1949 data->DeleteRegisterAllocationZone(); 1948 data->DeleteRegisterAllocationZone();
1950 } 1949 }
1951 1950
1952 CompilationInfo* PipelineImpl::info() const { return data_->info(); } 1951 CompilationInfo* PipelineImpl::info() const { return data_->info(); }
1953 1952
1954 Isolate* PipelineImpl::isolate() const { return info()->isolate(); } 1953 Isolate* PipelineImpl::isolate() const { return info()->isolate(); }
1955 1954
1956 } // namespace compiler 1955 } // namespace compiler
1957 } // namespace internal 1956 } // namespace internal
1958 } // namespace v8 1957 } // namespace v8
OLDNEW
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698