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/lowering-builder.cc

Issue 476733002: Deprecte LoweringBuilder in favor of Reducer. (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: Created 6 years, 4 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 | Annotate | Revision Log
« no previous file with comments | « src/compiler/lowering-builder.h ('k') | src/compiler/pipeline.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
(Empty)
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
3 // found in the LICENSE file.
4
5 #include "src/compiler/graph-inl.h"
6 #include "src/compiler/lowering-builder.h"
7 #include "src/compiler/node-aux-data-inl.h"
8 #include "src/compiler/node-properties-inl.h"
9
10 namespace v8 {
11 namespace internal {
12 namespace compiler {
13
14 class LoweringBuilder::NodeVisitor : public NullNodeVisitor {
15 public:
16 explicit NodeVisitor(LoweringBuilder* lowering) : lowering_(lowering) {}
17
18 GenericGraphVisit::Control Post(Node* node) {
19 if (lowering_->source_positions_ != NULL) {
20 SourcePositionTable::Scope pos(lowering_->source_positions_, node);
21 lowering_->Lower(node);
22 } else {
23 lowering_->Lower(node);
24 }
25 return GenericGraphVisit::CONTINUE;
26 }
27
28 private:
29 LoweringBuilder* lowering_;
30 };
31
32
33 LoweringBuilder::LoweringBuilder(Graph* graph,
34 SourcePositionTable* source_positions)
35 : graph_(graph), source_positions_(source_positions) {}
36
37
38 void LoweringBuilder::LowerAllNodes() {
39 NodeVisitor visitor(this);
40 graph()->VisitNodeInputsFromEnd(&visitor);
41 }
42
43 } // namespace compiler
44 } // namespace internal
45 } // namespace v8
OLDNEW
« no previous file with comments | « src/compiler/lowering-builder.h ('k') | src/compiler/pipeline.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698