diff options
author | paltherr <paltherr@epfl.ch> | 2003-06-11 12:34:34 +0000 |
---|---|---|
committer | paltherr <paltherr@epfl.ch> | 2003-06-11 12:34:34 +0000 |
commit | 24259833eb38a89f5b0d6d17e88ec7a4df64d0cc (patch) | |
tree | 6da7f8fcd30c963ab46e8fcdc028b97c90b12882 /sources | |
parent | d8aceb9d8da4130bf4188e6d6f43d59ff187a2e4 (diff) | |
download | scala-24259833eb38a89f5b0d6d17e88ec7a4df64d0cc.tar.gz scala-24259833eb38a89f5b0d6d17e88ec7a4df64d0cc.tar.bz2 scala-24259833eb38a89f5b0d6d17e88ec7a4df64d0cc.zip |
- Replaced use a Code.Box by a Code.Invoke
Diffstat (limited to 'sources')
-rw-r--r-- | sources/scala/tools/scalai/Compiler.java | 21 |
1 files changed, 17 insertions, 4 deletions
diff --git a/sources/scala/tools/scalai/Compiler.java b/sources/scala/tools/scalai/Compiler.java index 8350baff78..3269322f69 100644 --- a/sources/scala/tools/scalai/Compiler.java +++ b/sources/scala/tools/scalai/Compiler.java @@ -33,6 +33,8 @@ import scalac.util.Name; import scalac.util.Names; import scalac.util.Position; +import scala.runtime.RunTime; + public class Compiler { //######################################################################## @@ -165,6 +167,13 @@ public class Compiler { } catch (Exception exception) { throw Debug.abort("$bang", exception); } + java.lang.reflect.Method box_boolean_method = null; + try { + box_boolean_method = + RunTime.class.getMethod("box", new Class[] { boolean.class }); + } catch (Exception exception) { + throw Debug.abort("RunTime.box(boolean)", exception); + } CodePromise eqeq_code = new CodePromise( new CodeContainer( @@ -185,13 +194,17 @@ public class Compiler { new CodeContainer( definitions.BANGEQ, Code.Invoke( - Code.Box( - Code.Invoke( - Code.Self, Function.EqEq, new Code[] { + Code.Invoke( + Code.Null, + Function.JavaMethod(box_boolean_method), + new Code[] { + Code.Invoke( + Code.Self, Function.EqEq, new Code[] { Code.Load( Code.Null, Variable.Argument(0)) }, - Position.NOPOS)), + Position.NOPOS)}, + Position.NOPOS), Function.JavaMethod(bang_method), new Code[0], Position.NOPOS), |