Chromium Code Reviews| Index: src/compiler/store-store-elimination.cc |
| diff --git a/src/compiler/store-store-elimination.cc b/src/compiler/store-store-elimination.cc |
| index 98904b05b5d045c561c2d045cb6e2ee151f8473a..73efb5bd0ee9fbb8f9221f1c0b96220efeab062b 100644 |
| --- a/src/compiler/store-store-elimination.cc |
| +++ b/src/compiler/store-store-elimination.cc |
| @@ -72,9 +72,8 @@ namespace compiler { |
| namespace { |
| -// 16 bits was chosen fairly arbitrarily; it seems enough now. 8 bits is too |
| -// few. |
| -typedef uint16_t StoreOffset; |
| +// 4GiB ought to be enough for anybody. |
|
Jarin
2016/08/19 09:30:35
Just remove the comment.
bgeron
2016/08/19 10:42:10
Done.
|
| +typedef uint32_t StoreOffset; |
| struct UnobservableStore { |
| NodeId id_; |
| @@ -171,10 +170,10 @@ class RedundantStoreFinder final { |
| const UnobservablesSet unobservables_visited_empty_; |
| }; |
| -// To safely cast an offset from a FieldAccess, which has a wider range |
| -// (namely int). |
| +// To safely cast an offset from a FieldAccess, which has a potentially wider |
| +// range (namely int). |
| StoreOffset ToOffset(int offset) { |
| - CHECK(0 <= offset && offset < (1 << 8 * sizeof(StoreOffset))); |
| + CHECK(0 <= offset && (int64_t)offset < (1ll << 8 * sizeof(StoreOffset))); |
|
Jarin
2016/08/19 09:30:35
At this point, the upper bound check is useless, j
bgeron
2016/08/19 10:42:10
Done.
|
| return (StoreOffset)offset; |
|
Jarin
2016/08/19 09:30:35
static_cast, please.
bgeron
2016/08/19 10:42:10
Done.
|
| } |