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

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

Issue 1010673004: Tweak the TurboFan pipeline for stub compilation. (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Addressed feedback 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/compiler/js-intrinsic-lowering.cc ('k') | src/hydrogen.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"
(...skipping 297 matching lines...) Expand 10 before | Expand all | Expand 10 after
308 class AstGraphBuilderWithPositions : public AstGraphBuilder { 308 class AstGraphBuilderWithPositions : public AstGraphBuilder {
309 public: 309 public:
310 AstGraphBuilderWithPositions(Zone* local_zone, CompilationInfo* info, 310 AstGraphBuilderWithPositions(Zone* local_zone, CompilationInfo* info,
311 JSGraph* jsgraph, 311 JSGraph* jsgraph,
312 LoopAssignmentAnalysis* loop_assignment, 312 LoopAssignmentAnalysis* loop_assignment,
313 SourcePositionTable* source_positions) 313 SourcePositionTable* source_positions)
314 : AstGraphBuilder(local_zone, info, jsgraph, loop_assignment), 314 : AstGraphBuilder(local_zone, info, jsgraph, loop_assignment),
315 source_positions_(source_positions), 315 source_positions_(source_positions),
316 start_position_(info->shared_info()->start_position()) {} 316 start_position_(info->shared_info()->start_position()) {}
317 317
318 bool CreateGraph(bool constant_context) { 318 bool CreateGraph(bool constant_context, bool stack_check) {
319 SourcePositionTable::Scope pos_scope(source_positions_, start_position_); 319 SourcePositionTable::Scope pos_scope(source_positions_, start_position_);
320 return AstGraphBuilder::CreateGraph(constant_context); 320 return AstGraphBuilder::CreateGraph(constant_context, stack_check);
321 } 321 }
322 322
323 #define DEF_VISIT(type) \ 323 #define DEF_VISIT(type) \
324 void Visit##type(type* node) OVERRIDE { \ 324 void Visit##type(type* node) OVERRIDE { \
325 SourcePositionTable::Scope pos(source_positions_, \ 325 SourcePositionTable::Scope pos(source_positions_, \
326 SourcePosition(node->position())); \ 326 SourcePosition(node->position())); \
327 AstGraphBuilder::Visit##type(node); \ 327 AstGraphBuilder::Visit##type(node); \
328 } 328 }
329 AST_NODE_LIST(DEF_VISIT) 329 AST_NODE_LIST(DEF_VISIT)
330 #undef DEF_VISIT 330 #undef DEF_VISIT
(...skipping 82 matching lines...) Expand 10 before | Expand all | Expand 10 after
413 }; 413 };
414 414
415 415
416 struct GraphBuilderPhase { 416 struct GraphBuilderPhase {
417 static const char* phase_name() { return "graph builder"; } 417 static const char* phase_name() { return "graph builder"; }
418 418
419 void Run(PipelineData* data, Zone* temp_zone, bool constant_context) { 419 void Run(PipelineData* data, Zone* temp_zone, bool constant_context) {
420 AstGraphBuilderWithPositions graph_builder( 420 AstGraphBuilderWithPositions graph_builder(
421 temp_zone, data->info(), data->jsgraph(), data->loop_assignment(), 421 temp_zone, data->info(), data->jsgraph(), data->loop_assignment(),
422 data->source_positions()); 422 data->source_positions());
423 if (!graph_builder.CreateGraph(constant_context)) { 423 bool stack_check = !data->info()->IsStub();
424 if (!graph_builder.CreateGraph(constant_context, stack_check)) {
424 data->set_compilation_failed(); 425 data->set_compilation_failed();
425 } 426 }
426 } 427 }
427 }; 428 };
428 429
429 430
430 struct ContextSpecializerPhase { 431 struct ContextSpecializerPhase {
431 static const char* phase_name() { return "context specializing"; } 432 static const char* phase_name() { return "context specializing"; }
432 433
433 void Run(PipelineData* data, Zone* temp_zone) { 434 void Run(PipelineData* data, Zone* temp_zone) {
(...skipping 761 matching lines...) Expand 10 before | Expand all | Expand 10 after
1195 1196
1196 if (FLAG_trace_turbo && !data->MayHaveUnverifiableGraph()) { 1197 if (FLAG_trace_turbo && !data->MayHaveUnverifiableGraph()) {
1197 TurboCfgFile tcf(data->isolate()); 1198 TurboCfgFile tcf(data->isolate());
1198 tcf << AsC1VAllocator("CodeGen", data->register_allocator()); 1199 tcf << AsC1VAllocator("CodeGen", data->register_allocator());
1199 } 1200 }
1200 } 1201 }
1201 1202
1202 } // namespace compiler 1203 } // namespace compiler
1203 } // namespace internal 1204 } // namespace internal
1204 } // namespace v8 1205 } // namespace v8
OLDNEW
« no previous file with comments | « src/compiler/js-intrinsic-lowering.cc ('k') | src/hydrogen.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698