From afd136e6bf2d13f6719e08e40fc8103b2bacc5aa Mon Sep 17 00:00:00 2001 From: "fur%netscape.com" Date: Fri, 26 Feb 1999 08:40:13 +0000 Subject: [PATCH] + Remove dead code + Make class initialization slightly more efficient git-svn-id: svn://10.0.0.236/trunk@22082 18797224-902f-48f8-a5cc-f745e15eee43 --- mozilla/ef/Runtime/System/JavaObject.cpp | 19 +++++++------------ 1 file changed, 7 insertions(+), 12 deletions(-) diff --git a/mozilla/ef/Runtime/System/JavaObject.cpp b/mozilla/ef/Runtime/System/JavaObject.cpp index 360c9ed36e3..31383630157 100644 --- a/mozilla/ef/Runtime/System/JavaObject.cpp +++ b/mozilla/ef/Runtime/System/JavaObject.cpp @@ -1461,14 +1461,6 @@ void ClassOrInterface::runStaticInitializers() VM::theVM.getNoInvoke()) return; - /* KLUDGE ALERT Because codegen currently does not do longs, floats and - * doubles, we disable static initializers for those classes that - * use longs, floats and doubles. This should go away once codegen - * catches up. - */ - if (forbidden(name)) - return; - /* Let's initially do this the easy way. Linearly search through the * method array for static initializers */ @@ -1478,13 +1470,16 @@ void ClassOrInterface::runStaticInitializers() extern StringPool sp; const char *clinitp = sp.get(""); - const char *sigp = sp.get("()V"); for (Int16 i = 0; i < methodCount; i++) { - if (methodInfos[i]->getName()->getUtfString() == clinitp && - methodInfos[i]->getDescriptor()->getUtfString() == sigp) { - Method &m = summary->getMethod(i); + if (methodInfos[i]->getName()->getUtfString() == clinitp) { +#ifdef DEBUG + const char *sigp = sp.get("()V"); + assert(methodInfos[i]->getDescriptor()->getUtfString() == sigp); +#endif + + Method &m = summary->getMethod(i); m.compile(); m.invoke(0, 0, 0); }