[pypy-svn] r33545 - in pypy/dist/pypy/translator: js oosupport
fijal at codespeak.net
fijal at codespeak.net
Mon Oct 23 12:00:24 CEST 2006
Author: fijal
Date: Mon Oct 23 12:00:22 2006
New Revision: 33545
Modified:
pypy/dist/pypy/translator/js/asmgen.py
pypy/dist/pypy/translator/oosupport/metavm.py
Log:
Re-reverted my stupid revert + JS backend fix. Now all CLI/JVM/JS tests seems to be passing together.
Modified: pypy/dist/pypy/translator/js/asmgen.py
==============================================================================
--- pypy/dist/pypy/translator/js/asmgen.py (original)
+++ pypy/dist/pypy/translator/js/asmgen.py Mon Oct 23 12:00:22 2006
@@ -44,8 +44,7 @@
self.subst_table = subst_table
def pop(self):
- if len(self.l) == 0:
- return "sth"
+ #if len(self.l) == 0:
el = self.l.pop()
return self.subst_table.get(el, el)
@@ -218,6 +217,8 @@
self.right_hand.append("this")
def store_void(self):
+ if len(self.right_hand) == 0:
+ return
v = self.right_hand.pop()
if v is not None:
self.codegenerator.writeline(v+";")
Modified: pypy/dist/pypy/translator/oosupport/metavm.py
==============================================================================
--- pypy/dist/pypy/translator/oosupport/metavm.py (original)
+++ pypy/dist/pypy/translator/oosupport/metavm.py Mon Oct 23 12:00:22 2006
@@ -127,8 +127,8 @@
## if field.value == 'meta':
## return # TODO
- #if value.concretetype is ootype.Void:
- # return
+ if value.concretetype is ootype.Void:
+ return
generator.load(this)
generator.load(value)
generator.set_field(this.concretetype, field.value)
@@ -136,9 +136,8 @@
class _GetField(MicroInstruction):
def render(self, generator, op):
# OOType produces void values on occassion that can safely be ignored
- # XXX: That's not true
- #if op.result.concretetype is ootype.Void:
- # return
+ if op.result.concretetype is ootype.Void:
+ return
this, field = op.args
generator.load(this)
generator.get_field(this.concretetype, field.value)
More information about the Pypy-commit
mailing list