Did I find the right examples for you? yes no

All Samples(0)  |  Call(0)  |  Derive(0)  |  Import(0)

src/s/y/Sypy-HEAD/jit/metainterp/pyjitpl.py   Sypy(Download)
            # This is GUARD_VALUE because GUARD_TRUE assumes the existance
            # of a label when computing resumepc
            self.generate_guard(rop.GUARD_VALUE, resbox, [promoted_box],
                                resumepc=orgpc)
            self.metainterp.replace_box(box, constbox)
        else:
            promoted_box = box.constbox()
            self.generate_guard(rop.GUARD_VALUE, box, [promoted_box],
                                resumepc=orgpc)
            self.metainterp.replace_box(box, promoted_box)
        elif opnum == rop.GUARD_FALSE:     # a goto_if_not that stops jumping
            pass
        elif opnum == rop.GUARD_VALUE or opnum == rop.GUARD_CLASS:
            pass        # the pc is already set to the *start* of the opcode
        elif (opnum == rop.GUARD_NONNULL or

src/s/y/Sypy-HEAD/jit/metainterp/blackhole.py   Sypy(Download)
            pass
        #
        elif opnum == rop.GUARD_VALUE or opnum == rop.GUARD_CLASS:
            # Produced by guard_class(), xxx_guard_value(), or a few other
            # opcodes like switch().  The pc is at the start of the opcode

src/s/y/Sypy-HEAD/jit/metainterp/optimizeopt/optimizer.py   Sypy(Download)
    def make_guards(self, box):
        guards = []
        if self.level == LEVEL_CONSTANT:
            op = ResOperation(rop.GUARD_VALUE, [box, self.box], None)
            guards.append(op)
        descr.store_final_boxes(op, newboxes)
        #
        if op.getopnum() == rop.GUARD_VALUE:
            if self.getvalue(op.getarg(0)) in self.bool_boxes:
                # Hack: turn guard_value(bool) into guard_true/guard_false.

src/p/l/plexnet-HEAD/third_party/generic/pypy/pypy/jit/metainterp/pyjitpl.py   plexnet(Download)
        else:
            promoted_box = box.constbox()
            self.generate_guard(pc, rop.GUARD_VALUE, box, [promoted_box])
            self.metainterp.replace_box(box, promoted_box)
            return promoted_box

src/s/y/Sypy-HEAD/jit/metainterp/optimizeopt/rewrite.py   Sypy(Download)
            # replace the original guard with a guard_value
            old_guard_op = value.last_guard
            op = old_guard_op.copy_and_change(rop.GUARD_VALUE,
                                      args = [old_guard_op.getarg(0), op.getarg(1)])
            self.optimizer.replaces_guard[op] = old_guard_op
            descr = op.getdescr()
            assert isinstance(descr, compile.ResumeGuardDescr)
            descr.guard_opnum = rop.GUARD_VALUE
            descr.make_a_counter_per_value(op)
        constbox = op.getarg(1)

src/s/y/Sypy-HEAD/jit/metainterp/compile.py   Sypy(Download)
    def make_a_counter_per_value(self, guard_value_op):
        assert guard_value_op.getopnum() == rop.GUARD_VALUE
        box = guard_value_op.getarg(0)
        try:
            i = guard_value_op.getfailargs().index(box)

src/s/y/Sypy-HEAD/jit/backend/test/test_random.py   Sypy(Download)
OPERATIONS.append(GuardPtrOperation(rop.GUARD_NONNULL))
OPERATIONS.append(GuardPtrOperation(rop.GUARD_ISNULL))
OPERATIONS.append(GuardValueOperation(rop.GUARD_VALUE))
 
for _op in [rop.INT_NEG,

src/p/l/plexnet-HEAD/third_party/generic/pypy/pypy/jit/backend/test/test_random.py   plexnet(Download)
OPERATIONS.append(GuardOperation(rop.GUARD_FALSE))
OPERATIONS.append(GuardOperation(rop.GUARD_FALSE))
OPERATIONS.append(GuardValueOperation(rop.GUARD_VALUE))
 
for _op in [rop.INT_NEG,

src/s/y/Sypy-HEAD/jit/backend/test/runner_test.py   Sypy(Download)
        all = [(rop.GUARD_TRUE, [BoxInt(1)]),
               (rop.GUARD_FALSE, [BoxInt(0)]),
               (rop.GUARD_VALUE, [BoxInt(42), ConstInt(42)]),
               ]
        if not self.avoid_instances:
               ])
        if self.cpu.supports_floats:
            all.append((rop.GUARD_VALUE, [boxfloat(3.5), constfloat(3.5)]))
        for (opname, args) in all:
            assert self.execute_operation(opname, args, 'void') == None
        all = [(rop.GUARD_TRUE, [BoxInt(0)]),
               (rop.GUARD_FALSE, [BoxInt(1)]),
               (rop.GUARD_VALUE, [BoxInt(42), ConstInt(41)]),
               ]
        if not self.avoid_instances:
            all.extend([
               (rop.GUARD_NONNULL, [nullbox]),
               (rop.GUARD_ISNULL, [t_box])])
        if self.cpu.supports_floats:
            all.append((rop.GUARD_VALUE, [boxfloat(-1.0), constfloat(1.0)]))

src/p/l/plexnet-HEAD/third_party/generic/pypy/pypy/jit/backend/test/runner_test.py   plexnet(Download)
    def test_passing_guards(self):
        all = [(rop.GUARD_TRUE, [BoxInt(1)]),
               (rop.GUARD_FALSE, [BoxInt(0)]),
               (rop.GUARD_VALUE, [BoxInt(42), BoxInt(42)])]
        if self.cpu.supports_floats:
            all.append((rop.GUARD_VALUE, [BoxFloat(3.5), BoxFloat(3.5)]))
    def test_failing_guards(self):
        all = [(rop.GUARD_TRUE, [BoxInt(0)]),
               (rop.GUARD_FALSE, [BoxInt(1)]),
               (rop.GUARD_VALUE, [BoxInt(42), BoxInt(41)])]
        if self.cpu.supports_floats:
            all.append((rop.GUARD_VALUE, [BoxFloat(-1.0), BoxFloat(1.0)]))

  1 | 2  Next