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

Unified Diff: src/arm/assembler-arm.h

Issue 9455088: Remove static initializers in v8. (Closed) Base URL: http://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: Lint. Created 8 years, 10 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 | « no previous file | src/arm/assembler-arm.cc » ('j') | src/arm/code-stubs-arm.cc » ('J')
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/arm/assembler-arm.h
diff --git a/src/arm/assembler-arm.h b/src/arm/assembler-arm.h
index 11e39df682202ebdcd5ec0c24f422ac0807cc8ae..1a3756710020b43ffeceedc4c83326746ba7b607 100644
--- a/src/arm/assembler-arm.h
+++ b/src/arm/assembler-arm.h
@@ -124,24 +124,47 @@ struct Register {
int code_;
};
-const Register no_reg = { -1 };
-
-const Register r0 = { 0 };
-const Register r1 = { 1 };
-const Register r2 = { 2 };
-const Register r3 = { 3 };
-const Register r4 = { 4 };
-const Register r5 = { 5 };
-const Register r6 = { 6 };
-const Register r7 = { 7 };
-const Register r8 = { 8 }; // Used as context register.
-const Register r9 = { 9 }; // Used as lithium codegen scratch register.
-const Register r10 = { 10 }; // Used as roots register.
-const Register fp = { 11 };
-const Register ip = { 12 };
-const Register sp = { 13 };
-const Register lr = { 14 };
-const Register pc = { 15 };
+// These constants are used in several locations, including static initializers
+const int kRegisterNoneCode = -1;
+const int kRegisterR0Code = 0;
+const int kRegisterR1Code = 1;
+const int kRegisterR2Code = 2;
+const int kRegisterR3Code = 3;
+const int kRegisterR4Code = 4;
+const int kRegisterR5Code = 5;
+const int kRegisterR6Code = 6;
+const int kRegisterR7Code = 7;
+const int kRegisterR8Code = 8;
+const int kRegisterR9Code = 9;
+const int kRegisterR10Code = 10;
+const int kRegisterFpCode = 11;
+const int kRegisterIpCode = 12;
+const int kRegisterSpCode = 13;
+const int kRegisterLrCode = 14;
+const int kRegisterPcCode = 15;
+
+const Register no_reg = { kRegisterNoneCode };
+
+const Register r0 = { kRegisterR0Code };
+const Register r1 = { kRegisterR1Code };
+const Register r2 = { kRegisterR2Code };
+const Register r3 = { kRegisterR3Code };
+const Register r4 = { kRegisterR4Code };
+const Register r5 = { kRegisterR5Code };
+const Register r6 = { kRegisterR6Code };
+const Register r7 = { kRegisterR7Code };
+// Used as context register.
+const Register r8 = { kRegisterR8Code };
+// Used as lithium codegen scratch register.
+const Register r9 = { kRegisterR9Code };
+// Used as roots register.
+const Register r10 = { kRegisterR10Code };
+const Register fp = { kRegisterFpCode };
+const Register ip = { kRegisterIpCode };
+const Register sp = { kRegisterSpCode };
+const Register lr = { kRegisterLrCode };
+const Register pc = { kRegisterPcCode };
+
// Single word VFP register.
struct SwVfpRegister {
« no previous file with comments | « no previous file | src/arm/assembler-arm.cc » ('j') | src/arm/code-stubs-arm.cc » ('J')

Powered by Google App Engine
This is Rietveld 408576698