Author: Spenser Bauman <saba...@gmail.com> Branch: value-classes Changeset: r87333:36ea15125469 Date: 2016-09-22 16:54 -0400 http://bitbucket.org/pypy/pypy/changeset/36ea15125469/
Log: Fix some translation errors diff --git a/rpython/jit/metainterp/optimizeopt/virtualstate.py b/rpython/jit/metainterp/optimizeopt/virtualstate.py --- a/rpython/jit/metainterp/optimizeopt/virtualstate.py +++ b/rpython/jit/metainterp/optimizeopt/virtualstate.py @@ -65,7 +65,7 @@ descr)) class AbstractVirtualStateInfo(object): - _attrs_ = ('position',) + _attrs_ = ('position', 'fieldstate') position = -1 def generate_guards(self, other, op, runtime_op, state): @@ -177,8 +177,8 @@ fieldbox, fieldbox_runtime, state) - def _generalization_of_structpart(self, other): - return type(self) is type(other) and self.typedescr is other.typedescr + def _generate_guards_non_virtual(self, other, box, runtime_box, state): + pass def enum_forced_boxes(self, boxes, box, optimizer, force_boxes=False): box = optimizer.get_box_replacement(box) @@ -203,7 +203,6 @@ if s: s.enum(virtual_state) - class VirtualStateInfo(AbstractVirtualStructStateInfo): _attrs_ = ('known_class',) @@ -211,16 +210,22 @@ AbstractVirtualStructStateInfo.__init__(self, typedescr, fielddescrs) self.known_class = ConstInt(typedescr.get_vtable()) + def _generalization_of_structpart(self, other): + return (isinstance(other, VirtualStateInfo) and + self.typedescr is other.typedescr) + def debug_header(self, indent): debug_print(indent + 'VirtualStateInfo(%d):' % self.position) +class VStructStateInfo(AbstractVirtualStructStateInfo): -class VStructStateInfo(AbstractVirtualStructStateInfo): + def _generalization_of_structpart(self, other): + return (isinstance(other, VStructStateInfo) and + self.typedescr is other.typedescr) def debug_header(self, indent): debug_print(indent + 'VStructStateInfo(%d):' % self.position) - class VArrayStateInfo(AbstractVirtualStateInfo): def __init__(self, arraydescr): _______________________________________________ pypy-commit mailing list pypy-commit@python.org https://mail.python.org/mailman/listinfo/pypy-commit