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

Unified Diff: src/deoptimizer.h

Issue 501323002: Replace our homegrown ARRAY_SIZE() with Chrome's arraysize(). (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: Created 6 years, 4 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
« src/base/macros.h ('K') | « src/debug.cc ('k') | src/execution.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/deoptimizer.h
diff --git a/src/deoptimizer.h b/src/deoptimizer.h
index a0cc6975c3c95862cf284591d593124dd8995106..c5094838e5504d44ec6e0eac983c47890f65c662 100644
--- a/src/deoptimizer.h
+++ b/src/deoptimizer.h
@@ -494,7 +494,7 @@ class FrameDescription {
// This convoluted DCHECK is needed to work around a gcc problem that
// improperly detects an array bounds overflow in optimized debug builds
// when using a plain DCHECK.
- if (n >= ARRAY_SIZE(registers_)) {
+ if (n >= arraysize(registers_)) {
DCHECK(false);
return 0;
}
@@ -503,17 +503,17 @@ class FrameDescription {
}
double GetDoubleRegister(unsigned n) const {
- DCHECK(n < ARRAY_SIZE(double_registers_));
+ DCHECK(n < arraysize(double_registers_));
return double_registers_[n];
}
void SetRegister(unsigned n, intptr_t value) {
- DCHECK(n < ARRAY_SIZE(registers_));
+ DCHECK(n < arraysize(registers_));
registers_[n] = value;
}
void SetDoubleRegister(unsigned n, double value) {
- DCHECK(n < ARRAY_SIZE(double_registers_));
+ DCHECK(n < arraysize(double_registers_));
double_registers_[n] = value;
}
« src/base/macros.h ('K') | « src/debug.cc ('k') | src/execution.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698