diff options
author | paltherr <paltherr@epfl.ch> | 2003-12-19 18:58:25 +0000 |
---|---|---|
committer | paltherr <paltherr@epfl.ch> | 2003-12-19 18:58:25 +0000 |
commit | 5f8752e96cb8bb24e6550641fc9f1c9fd68630f2 (patch) | |
tree | dc5ba15029a032e04c99fad7a85c5a76874e7513 | |
parent | f22dc6124da3463c0264bf5f2d2cc9a950928e64 (diff) | |
download | scala-5f8752e96cb8bb24e6550641fc9f1c9fd68630f2.tar.gz scala-5f8752e96cb8bb24e6550641fc9f1c9fd68630f2.tar.bz2 scala-5f8752e96cb8bb24e6550641fc9f1c9fd68630f2.zip |
- Replaced comparisons with CONSTRUCTOR_NAME by...
- Replaced comparisons with CONSTRUCTOR_NAME by isInitializer calls
- Removed constant CONSTRUCTOR_NAME
-rw-r--r-- | sources/scalac/backend/jvm/GenJVM.java | 6 |
1 files changed, 2 insertions, 4 deletions
diff --git a/sources/scalac/backend/jvm/GenJVM.java b/sources/scalac/backend/jvm/GenJVM.java index 450f331ee3..e702c3e30d 100644 --- a/sources/scalac/backend/jvm/GenJVM.java +++ b/sources/scalac/backend/jvm/GenJVM.java @@ -68,8 +68,6 @@ class GenJVM { protected final static String CONSTRUCTOR_STRING = "<init>"; // TODO get it from FJBG - protected final static Name CONSTRUCTOR_NAME = - Name.fromString(CONSTRUCTOR_STRING); protected final JObjectType JAVA_LANG_OBJECT_T = new JObjectType(JAVA_LANG_OBJECT); @@ -397,7 +395,7 @@ class GenJVM { JMethodType funType = (JMethodType)typeStoJ(funSym.info()); JType[] argTypes = funType.getArgumentTypes(); - boolean isConstrCall = (funSym.name == CONSTRUCTOR_NAME); + boolean isConstrCall = funSym.isInitializer(); boolean isSuperCall = false; switch (fun) { case Select(Super(_, _), _): isSuperCall = true; @@ -1654,7 +1652,7 @@ class GenJVM { * sense) member of its owner. */ protected boolean isStaticMember(Symbol sym) { - return (sym.name != CONSTRUCTOR_NAME) + return !sym.isInitializer() && sym.owner().isModuleClass() && sym.owner().isJava(); } |