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

Unified Diff: src/x64/register-allocator-x64-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/ia32/register-allocator-ia32-inl.h ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/x64/register-allocator-x64-inl.h
===================================================================
--- src/x64/register-allocator-x64-inl.h (revision 2489)
+++ src/x64/register-allocator-x64-inl.h (working copy)
@@ -46,7 +46,7 @@
// non-reserved assembler registers.
int RegisterAllocator::ToNumber(Register reg) {
ASSERT(reg.is_valid() && !IsReserved(reg));
- static const int numbers[] = {
+ const int kNumbers[] = {
0, // rax
2, // rcx
3, // rdx
@@ -64,15 +64,15 @@
8, // r14
9 // r15
};
- return numbers[reg.code()];
+ return kNumbers[reg.code()];
}
Register RegisterAllocator::ToRegister(int num) {
ASSERT(num >= 0 && num < kNumRegisters);
- static Register registers[] =
+ const Register kRegisters[] =
{ rax, rbx, rcx, rdx, rdi, r8, r9, r11, r14, r15, r13, r12 };
- return registers[num];
+ return kRegisters[num];
}
« no previous file with comments | « src/ia32/register-allocator-ia32-inl.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698