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

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: Removed spurious edit 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
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 295 matching lines...) Expand 10 before | Expand all | Expand 10 after
306 306
307 307
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 stack_check_(!info->IsStub()) {}
317 318
318 bool CreateGraph(bool constant_context) { 319 bool CreateGraph(bool constant_context) {
Michael Starzinger 2015/03/17 17:28:55 nit: Can we add a "bool stack_check" to the Create
Sven Panne 2015/03/18 08:45:55 Done.
319 SourcePositionTable::Scope pos_scope(source_positions_, start_position_); 320 SourcePositionTable::Scope pos_scope(source_positions_, start_position_);
320 return AstGraphBuilder::CreateGraph(constant_context); 321 return AstGraphBuilder::CreateGraph(constant_context, stack_check_);
321 } 322 }
322 323
323 #define DEF_VISIT(type) \ 324 #define DEF_VISIT(type) \
324 void Visit##type(type* node) OVERRIDE { \ 325 void Visit##type(type* node) OVERRIDE { \
325 SourcePositionTable::Scope pos(source_positions_, \ 326 SourcePositionTable::Scope pos(source_positions_, \
326 SourcePosition(node->position())); \ 327 SourcePosition(node->position())); \
327 AstGraphBuilder::Visit##type(node); \ 328 AstGraphBuilder::Visit##type(node); \
328 } 329 }
329 AST_NODE_LIST(DEF_VISIT) 330 AST_NODE_LIST(DEF_VISIT)
330 #undef DEF_VISIT 331 #undef DEF_VISIT
331 332
332 private: 333 private:
333 SourcePositionTable* source_positions_; 334 SourcePositionTable* source_positions_;
334 SourcePosition start_position_; 335 SourcePosition start_position_;
336 bool stack_check_;
Michael Starzinger 2015/03/17 17:28:55 nit: This field is not required once the above com
Sven Panne 2015/03/18 08:45:55 Done.
335 }; 337 };
336 338
337 339
338 namespace { 340 namespace {
339 341
340 class SourcePositionWrapper : public Reducer { 342 class SourcePositionWrapper : public Reducer {
341 public: 343 public:
342 SourcePositionWrapper(Reducer* reducer, SourcePositionTable* table) 344 SourcePositionWrapper(Reducer* reducer, SourcePositionTable* table)
343 : reducer_(reducer), table_(table) {} 345 : reducer_(reducer), table_(table) {}
344 virtual ~SourcePositionWrapper() {} 346 virtual ~SourcePositionWrapper() {}
(...skipping 850 matching lines...) Expand 10 before | Expand all | Expand 10 after
1195 1197
1196 if (FLAG_trace_turbo && !data->MayHaveUnverifiableGraph()) { 1198 if (FLAG_trace_turbo && !data->MayHaveUnverifiableGraph()) {
1197 TurboCfgFile tcf(data->isolate()); 1199 TurboCfgFile tcf(data->isolate());
1198 tcf << AsC1VAllocator("CodeGen", data->register_allocator()); 1200 tcf << AsC1VAllocator("CodeGen", data->register_allocator());
1199 } 1201 }
1200 } 1202 }
1201 1203
1202 } // namespace compiler 1204 } // namespace compiler
1203 } // namespace internal 1205 } // namespace internal
1204 } // namespace v8 1206 } // namespace v8
OLDNEW
« no previous file with comments | « src/compiler/js-intrinsic-lowering.cc ('k') | src/hydrogen.h » ('j') | src/runtime.js » ('J')

Powered by Google App Engine
This is Rietveld 408576698