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

Unified Diff: runtime/vm/intermediate_language.cc

Issue 415513002: - Fix a lot of warnings generated by -Wshorten-64-to-32 (Closed) Base URL: http://dart.googlecode.com/svn/branches/bleeding_edge/dart/
Patch Set: Created 6 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 | « runtime/vm/intermediate_language.h ('k') | runtime/vm/object.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: runtime/vm/intermediate_language.cc
===================================================================
--- runtime/vm/intermediate_language.cc (revision 38492)
+++ runtime/vm/intermediate_language.cc (working copy)
@@ -2729,11 +2729,11 @@
ASSERT(value_boundary.IsConstant());
ASSERT(shift_count >= 0);
int64_t limit = 64 - shift_count;
- int64_t value = static_cast<int64_t>(value_boundary.ConstantValue());
+ int64_t value = value_boundary.ConstantValue();
if ((value == 0) ||
(shift_count == 0) ||
- ((limit > 0) && (Utils::IsInt(limit, value)))) {
+ ((limit > 0) && Utils::IsInt(static_cast<int>(limit), value))) {
// Result stays in 64 bit range.
int64_t result = value << shift_count;
return RangeBoundary(result);
@@ -3696,10 +3696,10 @@
// Product of left and right max values stays in 64 bit range.
const int64_t mul_max = left_max * right_max;
if (Smi::IsValid(mul_max) && Smi::IsValid(-mul_max)) {
- const intptr_t r_min =
+ const int64_t r_min =
OnlyPositiveOrZero(*left_range, *right_range) ? 0 : -mul_max;
*result_min = RangeBoundary::FromConstant(r_min);
- const intptr_t r_max =
+ const int64_t r_max =
OnlyNegativeOrZero(*left_range, *right_range) ? 0 : mul_max;
*result_max = RangeBoundary::FromConstant(r_max);
return true;
« no previous file with comments | « runtime/vm/intermediate_language.h ('k') | runtime/vm/object.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698