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

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

Issue 2037673002: [turbofan] Remove frame state input from speculative ops. (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@local_turbofan-checkpoint-5
Patch Set: Created 4 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/js-typed-lowering.cc ('k') | src/compiler/representation-change.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 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/operator-properties.h" 5 #include "src/compiler/operator-properties.h"
6 6
7 #include "src/compiler/js-operator.h" 7 #include "src/compiler/js-operator.h"
8 #include "src/compiler/linkage.h" 8 #include "src/compiler/linkage.h"
9 #include "src/compiler/opcodes.h" 9 #include "src/compiler/opcodes.h"
10 10
(...skipping 62 matching lines...) Expand 10 before | Expand all | Expand 10 after
73 case IrOpcode::kJSCallConstruct: 73 case IrOpcode::kJSCallConstruct:
74 case IrOpcode::kJSCallFunction: 74 case IrOpcode::kJSCallFunction:
75 75
76 // Misc operations 76 // Misc operations
77 case IrOpcode::kJSConvertReceiver: 77 case IrOpcode::kJSConvertReceiver:
78 case IrOpcode::kJSForInNext: 78 case IrOpcode::kJSForInNext:
79 case IrOpcode::kJSForInPrepare: 79 case IrOpcode::kJSForInPrepare:
80 case IrOpcode::kJSStackCheck: 80 case IrOpcode::kJSStackCheck:
81 return 1; 81 return 1;
82 82
83 // We record the frame state immediately before and immediately after
84 // every property or global variable access.
85
86 return 2;
87
88 // Binary operators that can deopt in the middle the operation (e.g., 83 // Binary operators that can deopt in the middle the operation (e.g.,
89 // as a result of lazy deopt in ToNumber conversion) need a second frame 84 // as a result of lazy deopt in ToNumber conversion) need a second frame
90 // state so that we can resume before the operation. 85 // state so that we can resume before the operation.
91 case IrOpcode::kJSMultiply: 86 case IrOpcode::kJSMultiply:
92 case IrOpcode::kJSAdd: 87 case IrOpcode::kJSAdd:
93 case IrOpcode::kJSBitwiseAnd: 88 case IrOpcode::kJSBitwiseAnd:
94 case IrOpcode::kJSBitwiseOr: 89 case IrOpcode::kJSBitwiseOr:
95 case IrOpcode::kJSBitwiseXor: 90 case IrOpcode::kJSBitwiseXor:
96 case IrOpcode::kJSDivide: 91 case IrOpcode::kJSDivide:
97 case IrOpcode::kJSModulus: 92 case IrOpcode::kJSModulus:
98 case IrOpcode::kJSShiftLeft: 93 case IrOpcode::kJSShiftLeft:
99 case IrOpcode::kJSShiftRight: 94 case IrOpcode::kJSShiftRight:
100 case IrOpcode::kJSShiftRightLogical: 95 case IrOpcode::kJSShiftRightLogical:
101 case IrOpcode::kJSSubtract: 96 case IrOpcode::kJSSubtract:
102 return 2; 97 return 2;
103 98
104 // Compare operators that can deopt in the middle the operation (e.g., 99 // Compare operators that can deopt in the middle the operation (e.g.,
105 // as a result of lazy deopt in ToNumber conversion) need a second frame 100 // as a result of lazy deopt in ToNumber conversion) need a second frame
106 // state so that we can resume before the operation. 101 // state so that we can resume before the operation.
107 case IrOpcode::kJSGreaterThan: 102 case IrOpcode::kJSGreaterThan:
108 case IrOpcode::kJSGreaterThanOrEqual: 103 case IrOpcode::kJSGreaterThanOrEqual:
109 case IrOpcode::kJSLessThan: 104 case IrOpcode::kJSLessThan:
110 case IrOpcode::kJSLessThanOrEqual: 105 case IrOpcode::kJSLessThanOrEqual:
111 return 2; 106 return 2;
112 107
113 // Simplified operators with type feedback.
114 case IrOpcode::kSpeculativeNumberAdd:
115 case IrOpcode::kSpeculativeNumberSubtract:
116 // Checked conversions. 108 // Checked conversions.
117 case IrOpcode::kCheckedUint32ToInt32: 109 case IrOpcode::kCheckedUint32ToInt32:
118 case IrOpcode::kCheckedFloat64ToInt32: 110 case IrOpcode::kCheckedFloat64ToInt32:
119 case IrOpcode::kCheckedTaggedToInt32: 111 case IrOpcode::kCheckedTaggedToInt32:
120 case IrOpcode::kCheckedTaggedToFloat64: 112 case IrOpcode::kCheckedTaggedToFloat64:
121 return 1; 113 return 1;
122 114
123 default: 115 default:
124 return 0; 116 return 0;
125 } 117 }
(...skipping 15 matching lines...) Expand all
141 opcode == IrOpcode::kDead || opcode == IrOpcode::kLoop || 133 opcode == IrOpcode::kDead || opcode == IrOpcode::kLoop ||
142 opcode == IrOpcode::kMerge || opcode == IrOpcode::kIfTrue || 134 opcode == IrOpcode::kMerge || opcode == IrOpcode::kIfTrue ||
143 opcode == IrOpcode::kIfFalse || opcode == IrOpcode::kIfSuccess || 135 opcode == IrOpcode::kIfFalse || opcode == IrOpcode::kIfSuccess ||
144 opcode == IrOpcode::kIfException || opcode == IrOpcode::kIfValue || 136 opcode == IrOpcode::kIfException || opcode == IrOpcode::kIfValue ||
145 opcode == IrOpcode::kIfDefault; 137 opcode == IrOpcode::kIfDefault;
146 } 138 }
147 139
148 } // namespace compiler 140 } // namespace compiler
149 } // namespace internal 141 } // namespace internal
150 } // namespace v8 142 } // namespace v8
OLDNEW
« no previous file with comments | « src/compiler/js-typed-lowering.cc ('k') | src/compiler/representation-change.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698