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

Side by Side Diff: src/crankshaft/hydrogen-instructions.h

Issue 2412853002: [crankshaft] Range analysis should not rely on overflowed ranges. (Closed)
Patch Set: Created 4 years, 2 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 | « no previous file | src/crankshaft/hydrogen-instructions.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 2012 the V8 project authors. All rights reserved. 1 // Copyright 2012 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_CRANKSHAFT_HYDROGEN_INSTRUCTIONS_H_ 5 #ifndef V8_CRANKSHAFT_HYDROGEN_INSTRUCTIONS_H_
6 #define V8_CRANKSHAFT_HYDROGEN_INSTRUCTIONS_H_ 6 #define V8_CRANKSHAFT_HYDROGEN_INSTRUCTIONS_H_
7 7
8 #include <cstring> 8 #include <cstring>
9 #include <iosfwd> 9 #include <iosfwd>
10 10
(...skipping 217 matching lines...) Expand 10 before | Expand all | Expand 10 after
228 bool IsMostGeneric() const { 228 bool IsMostGeneric() const {
229 return lower_ == kMinInt && upper_ == kMaxInt && CanBeMinusZero(); 229 return lower_ == kMinInt && upper_ == kMaxInt && CanBeMinusZero();
230 } 230 }
231 bool IsInSmiRange() const { 231 bool IsInSmiRange() const {
232 return lower_ >= Smi::kMinValue && upper_ <= Smi::kMaxValue; 232 return lower_ >= Smi::kMinValue && upper_ <= Smi::kMaxValue;
233 } 233 }
234 void ClampToSmi() { 234 void ClampToSmi() {
235 lower_ = Max(lower_, Smi::kMinValue); 235 lower_ = Max(lower_, Smi::kMinValue);
236 upper_ = Min(upper_, Smi::kMaxValue); 236 upper_ = Min(upper_, Smi::kMaxValue);
237 } 237 }
238 void Clear();
238 void KeepOrder(); 239 void KeepOrder();
239 #ifdef DEBUG 240 #ifdef DEBUG
240 void Verify() const; 241 void Verify() const;
241 #endif 242 #endif
242 243
243 void StackUpon(Range* other) { 244 void StackUpon(Range* other) {
244 Intersect(other); 245 Intersect(other);
245 next_ = other; 246 next_ = other;
246 } 247 }
247 248
(...skipping 6700 matching lines...) Expand 10 before | Expand all | Expand 10 after
6948 bool IsDeletable() const override { return true; } 6949 bool IsDeletable() const override { return true; }
6949 }; 6950 };
6950 6951
6951 #undef DECLARE_INSTRUCTION 6952 #undef DECLARE_INSTRUCTION
6952 #undef DECLARE_CONCRETE_INSTRUCTION 6953 #undef DECLARE_CONCRETE_INSTRUCTION
6953 6954
6954 } // namespace internal 6955 } // namespace internal
6955 } // namespace v8 6956 } // namespace v8
6956 6957
6957 #endif // V8_CRANKSHAFT_HYDROGEN_INSTRUCTIONS_H_ 6958 #endif // V8_CRANKSHAFT_HYDROGEN_INSTRUCTIONS_H_
OLDNEW
« no previous file with comments | « no previous file | src/crankshaft/hydrogen-instructions.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698