[pypy-svn] pypy default: do nothing if we are trying to cast something into the very same type
antocuni
commits-noreply at bitbucket.org
Mon Apr 11 13:06:06 CEST 2011
Author: Antonio Cuni <anto.cuni at gmail.com>
Branch:
Changeset: r43291:cfa47b6c5890
Date: 2011-04-11 11:05 +0000
http://bitbucket.org/pypy/pypy/changeset/cfa47b6c5890/
Log: do nothing if we are trying to cast something into the very same
type
diff --git a/pypy/translator/jvm/metavm.py b/pypy/translator/jvm/metavm.py
--- a/pypy/translator/jvm/metavm.py
+++ b/pypy/translator/jvm/metavm.py
@@ -105,6 +105,8 @@
def render(self, generator, op):
FROM = op.args[0].concretetype
TO = op.result.concretetype
+ if TO == FROM:
+ return
opcode = CASTS[(FROM, TO)]
if opcode:
generator.emit(opcode)
More information about the Pypy-commit
mailing list