Status: New
Owner: ----
New issue 1784 by [email protected]: Please remove static initializers in
arm-assumer.h
http://code.google.com/p/v8/issues/detail?id=1784
Chrome is trying to remove all static initializers (http://crbug.com/94925)
This file has an easy win; see patch below.
The register aliases are causing _every_ .cc file that uses them to get a
static initializer that creates the copy. (The alias is in a namespace, and
not extern, so not shared across compilation units, AIUI).
Using a static const reference avoids this problem completely.
diff --git a/src/arm/assembler-arm.h b/src/arm/assembler-arm.h
index 97d4226..d1b609a 100644
--- a/src/arm/assembler-arm.h
+++ b/src/arm/assembler-arm.h
@@ -304,9 +304,9 @@ const DwVfpRegister d14 = { 14 };
const DwVfpRegister d15 = { 15 };
// Aliases for double registers.
-const DwVfpRegister kFirstCalleeSavedDoubleReg = d8;
-const DwVfpRegister kLastCalleeSavedDoubleReg = d15;
-const DwVfpRegister kDoubleRegZero = d14;
+static const DwVfpRegister& kFirstCalleeSavedDoubleReg = d8;
+static const DwVfpRegister& kLastCalleeSavedDoubleReg = d15;
+static const DwVfpRegister& kDoubleRegZero = d14;
// Coprocessor register
--
v8-dev mailing list
[email protected]
http://groups.google.com/group/v8-dev