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

Unified Diff: src/ia32/register-allocator-ia32-inl.h

Issue 149799: Avoid more static variables in inline functions. (Closed) Base URL: http://v8.googlecode.com/svn/branches/bleeding_edge/
Patch Set: Created 11 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 | « src/arm/register-allocator-arm-inl.h ('k') | src/x64/register-allocator-x64-inl.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/ia32/register-allocator-ia32-inl.h
===================================================================
--- src/ia32/register-allocator-ia32-inl.h (revision 2492)
+++ src/ia32/register-allocator-ia32-inl.h (working copy)
@@ -49,7 +49,7 @@
int RegisterAllocator::ToNumber(Register reg) {
ASSERT(reg.is_valid() && !IsReserved(reg));
- static int numbers[] = {
+ const int kNumbers[] = {
0, // eax
2, // ecx
3, // edx
@@ -59,14 +59,14 @@
-1, // esi
4 // edi
};
- return numbers[reg.code()];
+ return kNumbers[reg.code()];
}
Register RegisterAllocator::ToRegister(int num) {
ASSERT(num >= 0 && num < kNumRegisters);
- const Register registers[] = { eax, ebx, ecx, edx, edi };
- return registers[num];
+ const Register kRegisters[] = { eax, ebx, ecx, edx, edi };
+ return kRegisters[num];
}
« no previous file with comments | « src/arm/register-allocator-arm-inl.h ('k') | src/x64/register-allocator-x64-inl.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698