summaryrefslogtreecommitdiff
path: root/sources/scalac/backend
diff options
context:
space:
mode:
authorschinz <schinz@epfl.ch>2003-08-29 11:18:18 +0000
committerschinz <schinz@epfl.ch>2003-08-29 11:18:18 +0000
commit6ba693de0240339e231e62fd565bf082c48c208b (patch)
tree06388fea71deb766a0e1c3e2a73a7f60a172d992 /sources/scalac/backend
parent41af0bf85b59c395ac83121b473c52c90acf988b (diff)
downloadscala-6ba693de0240339e231e62fd565bf082c48c208b.tar.gz
scala-6ba693de0240339e231e62fd565bf082c48c208b.tar.bz2
scala-6ba693de0240339e231e62fd565bf082c48c208b.zip
- removed the code to handle variable definitio...
- removed the code to handle variable definitions with empty right-hand sides, as these are now handled by previous phases
Diffstat (limited to 'sources/scalac/backend')
-rw-r--r--sources/scalac/backend/jvm/GenJVM.java22
1 files changed, 2 insertions, 20 deletions
diff --git a/sources/scalac/backend/jvm/GenJVM.java b/sources/scalac/backend/jvm/GenJVM.java
index 30f8ee3f9b..dbf25a0dc2 100644
--- a/sources/scalac/backend/jvm/GenJVM.java
+++ b/sources/scalac/backend/jvm/GenJVM.java
@@ -152,26 +152,8 @@ class GenJVM {
ctx.method.addNewLocalVariable(valType, name.toString());
ctx.locals.put(sym, new Integer(var.getIndex()));
- if (rhs != Tree.Empty)
- genLoad(ctx, rhs, valType);
- else {
- switch (valType.getTag()) {
- case JType.T_BOOLEAN:
- case JType.T_BYTE:
- case JType.T_CHAR:
- case JType.T_SHORT:
- case JType.T_INT:
- ctx.code.emitPUSH(0); break;
- case JType.T_LONG:
- ctx.code.emitPUSH(0L); break;
- case JType.T_FLOAT:
- ctx.code.emitPUSH(0F); break;
- case JType.T_DOUBLE:
- ctx.code.emitPUSH(0D); break;
- default:
- ctx.code.emitACONST_NULL(); break;
- }
- }
+ assert (rhs != Tree.Empty) : Debug.show(sym);
+ genLoad(ctx, rhs, valType);
ctx.code.emitSTORE(var);
} break;