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

Side by Side Diff: src/compiler/node-marker.cc

Issue 1188433010: [turbofan] Move graph trimming functionality to dedicated GraphTrimmer. (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Created 5 years, 6 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/node-marker.h ('k') | src/compiler/osr.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 2015 the V8 project authors. All rights reserved. 1 // Copyright 2015 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/node-marker.h" 5 #include "src/compiler/node-marker.h"
6 6
7 #include "src/compiler/graph.h" 7 #include "src/compiler/graph.h"
8 8
9 namespace v8 { 9 namespace v8 {
10 namespace internal { 10 namespace internal {
11 namespace compiler { 11 namespace compiler {
12 12
13 NodeMarkerBase::NodeMarkerBase(Graph* graph, uint32_t num_states) 13 NodeMarkerBase::NodeMarkerBase(Graph* graph, uint32_t num_states)
14 : mark_min_(graph->mark_max_), mark_max_(graph->mark_max_ += num_states) { 14 : mark_min_(graph->mark_max_), mark_max_(graph->mark_max_ += num_states) {
15 DCHECK_NE(0u, num_states); // user error! 15 DCHECK_NE(0u, num_states); // user error!
16 DCHECK_LT(mark_min_, mark_max_); // check for wraparound. 16 DCHECK_LT(mark_min_, mark_max_); // check for wraparound.
17 } 17 }
18 18
19
20 void NodeMarkerBase::Reset(Graph* graph) {
21 uint32_t const num_states = mark_max_ - mark_min_;
22 mark_min_ = graph->mark_max_;
23 mark_max_ = graph->mark_max_ += num_states;
24 DCHECK_LT(mark_min_, mark_max_); // check for wraparound.
25 }
26
27 } // namespace compiler 19 } // namespace compiler
28 } // namespace internal 20 } // namespace internal
29 } // namespace v8 21 } // namespace v8
OLDNEW
« no previous file with comments | « src/compiler/node-marker.h ('k') | src/compiler/osr.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698