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

Side by Side Diff: src/compiler/state-values-utils.h

Issue 1015423002: [turbofan] Remember types for deoptimization during simplified lowering. (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Address review comments 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/simplified-lowering.cc ('k') | src/compiler/state-values-utils.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 #ifndef V8_COMPILER_STATE_VALUES_UTILS_H_ 5 #ifndef V8_COMPILER_STATE_VALUES_UTILS_H_
6 #define V8_COMPILER_STATE_VALUES_UTILS_H_ 6 #define V8_COMPILER_STATE_VALUES_UTILS_H_
7 7
8 #include "src/compiler/js-graph.h" 8 #include "src/compiler/js-graph.h"
9 9
10 namespace v8 { 10 namespace v8 {
(...skipping 44 matching lines...) Expand 10 before | Expand all | Expand 10 after
55 Zone* zone() { return graph()->zone(); } 55 Zone* zone() { return graph()->zone(); }
56 56
57 JSGraph* js_graph_; 57 JSGraph* js_graph_;
58 ZoneHashMap hash_map_; 58 ZoneHashMap hash_map_;
59 ZoneVector<NodeVector*> working_space_; // One working space per level. 59 ZoneVector<NodeVector*> working_space_; // One working space per level.
60 Node* empty_state_values_; 60 Node* empty_state_values_;
61 }; 61 };
62 62
63 class StateValuesAccess { 63 class StateValuesAccess {
64 public: 64 public:
65 struct TypedNode {
66 Node* node;
67 MachineType type;
68 TypedNode(Node* node, MachineType type) : node(node), type(type) {}
69 };
70
65 class iterator { 71 class iterator {
66 public: 72 public:
67 // Bare minimum of operators needed for range iteration. 73 // Bare minimum of operators needed for range iteration.
68 bool operator!=(iterator& other); 74 bool operator!=(iterator& other);
69 iterator& operator++(); 75 iterator& operator++();
70 Node* operator*(); 76 TypedNode operator*();
71 77
72 private: 78 private:
73 friend class StateValuesAccess; 79 friend class StateValuesAccess;
74 80
75 iterator() : current_depth_(-1) {} 81 iterator() : current_depth_(-1) {}
76 explicit iterator(Node* node); 82 explicit iterator(Node* node);
77 83
78 Node* node(); 84 Node* node();
85 MachineType type();
79 bool done(); 86 bool done();
80 void Advance(); 87 void Advance();
81 88
82 struct StatePos { 89 struct StatePos {
83 Node* node; 90 Node* node;
84 int index; 91 int index;
85 92
86 explicit StatePos(Node* node) : node(node), index(0) {} 93 explicit StatePos(Node* node) : node(node), index(0) {}
87 StatePos() {} 94 StatePos() {}
88 }; 95 };
(...skipping 15 matching lines...) Expand all
104 111
105 private: 112 private:
106 Node* node_; 113 Node* node_;
107 }; 114 };
108 115
109 } // namespace compiler 116 } // namespace compiler
110 } // namespace internal 117 } // namespace internal
111 } // namespace v8 118 } // namespace v8
112 119
113 #endif // V8_COMPILER_STATE_VALUES_UTILS_H_ 120 #endif // V8_COMPILER_STATE_VALUES_UTILS_H_
OLDNEW
« no previous file with comments | « src/compiler/simplified-lowering.cc ('k') | src/compiler/state-values-utils.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698