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

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

Issue 983153002: [turbofan] Add an extra frame state for deoptimization before binary op. (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Tweak 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/node-properties.h ('k') | src/compiler/operator-properties.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 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-properties.h" 5 #include "src/compiler/node-properties.h"
6 6
7 #include "src/compiler/common-operator.h" 7 #include "src/compiler/common-operator.h"
8 #include "src/compiler/operator-properties.h" 8 #include "src/compiler/operator-properties.h"
9 9
10 namespace v8 { 10 namespace v8 {
(...skipping 40 matching lines...) Expand 10 before | Expand all | Expand 10 after
51 51
52 52
53 // static 53 // static
54 Node* NodeProperties::GetContextInput(Node* node) { 54 Node* NodeProperties::GetContextInput(Node* node) {
55 DCHECK(OperatorProperties::HasContextInput(node->op())); 55 DCHECK(OperatorProperties::HasContextInput(node->op()));
56 return node->InputAt(FirstContextIndex(node)); 56 return node->InputAt(FirstContextIndex(node));
57 } 57 }
58 58
59 59
60 // static 60 // static
61 Node* NodeProperties::GetFrameStateInput(Node* node) { 61 Node* NodeProperties::GetFrameStateInput(Node* node, int index) {
62 DCHECK(OperatorProperties::HasFrameStateInput(node->op())); 62 DCHECK_LT(index, OperatorProperties::GetFrameStateInputCount(node->op()));
63 return node->InputAt(FirstFrameStateIndex(node)); 63 return node->InputAt(FirstFrameStateIndex(node) + index);
64 } 64 }
65 65
66 66
67 // static 67 // static
68 Node* NodeProperties::GetEffectInput(Node* node, int index) { 68 Node* NodeProperties::GetEffectInput(Node* node, int index) {
69 DCHECK(0 <= index && index < node->op()->EffectInputCount()); 69 DCHECK(0 <= index && index < node->op()->EffectInputCount());
70 return node->InputAt(FirstEffectIndex(node) + index); 70 return node->InputAt(FirstEffectIndex(node) + index);
71 } 71 }
72 72
73 73
(...skipping 57 matching lines...) Expand 10 before | Expand all | Expand 10 after
131 131
132 132
133 // static 133 // static
134 void NodeProperties::ReplaceEffectInput(Node* node, Node* effect, int index) { 134 void NodeProperties::ReplaceEffectInput(Node* node, Node* effect, int index) {
135 DCHECK(index < node->op()->EffectInputCount()); 135 DCHECK(index < node->op()->EffectInputCount());
136 return node->ReplaceInput(FirstEffectIndex(node) + index, effect); 136 return node->ReplaceInput(FirstEffectIndex(node) + index, effect);
137 } 137 }
138 138
139 139
140 // static 140 // static
141 void NodeProperties::ReplaceFrameStateInput(Node* node, Node* frame_state) { 141 void NodeProperties::ReplaceFrameStateInput(Node* node, int index,
142 DCHECK(OperatorProperties::HasFrameStateInput(node->op())); 142 Node* frame_state) {
143 node->ReplaceInput(FirstFrameStateIndex(node), frame_state); 143 DCHECK_LT(index, OperatorProperties::GetFrameStateInputCount(node->op()));
144 node->ReplaceInput(FirstFrameStateIndex(node) + index, frame_state);
144 } 145 }
145 146
146 147
147 // static 148 // static
148 void NodeProperties::RemoveNonValueInputs(Node* node) { 149 void NodeProperties::RemoveNonValueInputs(Node* node) {
149 node->TrimInputCount(node->op()->ValueInputCount()); 150 node->TrimInputCount(node->op()->ValueInputCount());
150 } 151 }
151 152
152 153
153 // static 154 // static
(...skipping 99 matching lines...) Expand 10 before | Expand all | Expand 10 after
253 // static 254 // static
254 bool NodeProperties::IsInputRange(Edge edge, int first, int num) { 255 bool NodeProperties::IsInputRange(Edge edge, int first, int num) {
255 if (num == 0) return false; 256 if (num == 0) return false;
256 int const index = edge.index(); 257 int const index = edge.index();
257 return first <= index && index < first + num; 258 return first <= index && index < first + num;
258 } 259 }
259 260
260 } // namespace compiler 261 } // namespace compiler
261 } // namespace internal 262 } // namespace internal
262 } // namespace v8 263 } // namespace v8
OLDNEW
« no previous file with comments | « src/compiler/node-properties.h ('k') | src/compiler/operator-properties.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698