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

Unified Diff: runtime/vm/intermediate_language.h

Issue 2974953002: Revise assertions and fix bug in the implementation of shifts (Closed)
Patch Set: Outdated comment corrected Created 3 years, 5 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | runtime/vm/intermediate_language.cc » ('j') | runtime/vm/intermediate_language_arm.cc » ('J')
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: runtime/vm/intermediate_language.h
diff --git a/runtime/vm/intermediate_language.h b/runtime/vm/intermediate_language.h
index afa2f8a41a27023800f4f96e79952ebf3502a6b1..4b2a4eaff1b7d41b1b1ca8d76c84944535ad468b 100644
--- a/runtime/vm/intermediate_language.h
+++ b/runtime/vm/intermediate_language.h
@@ -7244,7 +7244,7 @@ class ShiftMintOpInstr : public BinaryIntegerOpInstr {
Range* shift_range() const { return shift_range_; }
virtual bool ComputeCanDeoptimize() const {
- return has_shift_count_check() ||
+ return (!IsShiftCountInRange()) ||
(can_overflow() && (op_kind() == Token::kSHL));
}
@@ -7262,7 +7262,10 @@ class ShiftMintOpInstr : public BinaryIntegerOpInstr {
private:
static const intptr_t kMintShiftCountLimit = 63;
- bool has_shift_count_check() const;
+
+ // Returns true if the shift amount is guranteed to be in
+ // [0..kMintShiftCountLimit] range.
+ bool IsShiftCountInRange() const;
Range* shift_range_;
« no previous file with comments | « no previous file | runtime/vm/intermediate_language.cc » ('j') | runtime/vm/intermediate_language_arm.cc » ('J')

Powered by Google App Engine
This is Rietveld 408576698