[pypy-svn] r46572 - pypy/dist/pypy/translator/jvm
antocuni at codespeak.net
antocuni at codespeak.net
Fri Sep 14 12:03:07 CEST 2007
Author: antocuni
Date: Fri Sep 14 12:03:06 2007
New Revision: 46572
Modified:
pypy/dist/pypy/translator/jvm/generator.py
pypy/dist/pypy/translator/jvm/node.py
Log:
implement branch_if_not_equal for genjvm; this is needed by
backendopts.
Modified: pypy/dist/pypy/translator/jvm/generator.py
==============================================================================
--- pypy/dist/pypy/translator/jvm/generator.py (original)
+++ pypy/dist/pypy/translator/jvm/generator.py Fri Sep 14 12:03:06 2007
@@ -998,6 +998,9 @@
def branch_if_equal(self, target_label):
self._instr(IF_ICMPEQ, target_label)
+ def branch_if_not_equal(self, target_label):
+ self._instr(IF_ICMPNE, target_label)
+
def call_graph(self, graph):
mthd = self.db.pending_function(graph)
mthd.invoke(self)
Modified: pypy/dist/pypy/translator/jvm/node.py
==============================================================================
--- pypy/dist/pypy/translator/jvm/node.py (original)
+++ pypy/dist/pypy/translator/jvm/node.py Fri Sep 14 12:03:06 2007
@@ -242,6 +242,9 @@
self.jrettype = jrettype
self._block_labels = {}
+ def next_label(self, prefix='label'):
+ return self.generator.unique_label(prefix)
+
def method(self):
""" Returns a jvmgen.Method that can invoke this function """
if not self.is_method:
More information about the pypy-svn
mailing list