Did I find the right examples for you? yes no

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

src/p/l/plexnet-HEAD/third_party/generic/pypy/pypy/jit/metainterp/pyjitpl.py   plexnet(Download)
    def opimpl_arraylen_gc(self, arraybox, arraydesc):
        self.execute_with_descr(rop.ARRAYLEN_GC, arraydesc, arraybox)
 
    @arguments("orgpc", "box", "descr", "box")
    def opimpl_check_neg_index(self, pc, arraybox, arraydesc, indexbox):
            # the index is < 0; add the array length to it
            lenbox = self.metainterp.execute_and_record(
                rop.ARRAYLEN_GC, arraydesc, arraybox)
            indexbox = self.metainterp.execute_and_record(
                rop.INT_ADD, None, indexbox, lenbox)
                                                          descr, basebox)
            descr = self._get_virtualizable_array_descr(arrayindex)
            self.execute_with_descr(rop.ARRAYLEN_GC, descr, arraybox)
            return
        vinfo = self.metainterp.staticdata.virtualizable_info

src/s/y/Sypy-HEAD/jit/metainterp/pyjitpl.py   Sypy(Download)
    def opimpl_arraylen_gc(self, arraybox, arraydescr):
        lengthbox = self.metainterp.heapcache.arraylen(arraybox)
        if lengthbox is None:
            lengthbox = self.execute_with_descr(
                    rop.ARRAYLEN_GC, arraydescr, arraybox)

src/s/y/Sypy-HEAD/jit/metainterp/optimizeopt/optimizer.py   Sypy(Download)
                lenbox = BoxInt()
                if self.lenbound.mode == MODE_ARRAY:
                    op = ResOperation(rop.ARRAYLEN_GC, [box], lenbox, self.lenbound.descr)
                elif self.lenbound.mode == MODE_STR:
                    op = ResOperation(rop.STRLEN, [box], lenbox, self.lenbound.descr)

src/s/y/Sypy-HEAD/jit/backend/test/test_ll_random.py   Sypy(Download)
    OPERATIONS.append(SetArrayItemOperation(rop.SETARRAYITEM_GC))
    OPERATIONS.append(NewArrayOperation(rop.NEW_ARRAY))
    OPERATIONS.append(ArrayLenOperation(rop.ARRAYLEN_GC))
    OPERATIONS.append(NewStrOperation(rop.NEWSTR))
    OPERATIONS.append(NewUnicodeOperation(rop.NEWUNICODE))

src/s/y/Sypy-HEAD/jit/backend/test/runner_test.py   Sypy(Download)
        assert not arraydescr.is_array_of_pointers()
        #
        r = self.execute_operation(rop.ARRAYLEN_GC, [a_box],
                                   'int', descr=arraydescr)
        assert r.value == 342
        assert not arraydescr.is_array_of_pointers()
        #
        r = self.execute_operation(rop.ARRAYLEN_GC, [a_box],
                                   'int', descr=arraydescr)
        assert r.value == 342
        arraydescr = self.cpu.arraydescrof(A)
        assert not arraydescr.is_array_of_pointers()
        r = self.execute_operation(rop.ARRAYLEN_GC, [a_box],
                                   'int', descr=arraydescr)
        assert r.value == 11
        arraydescr = self.cpu.arraydescrof(B)
        assert arraydescr.is_array_of_pointers()
        r = self.execute_operation(rop.ARRAYLEN_GC, [b_box],
                                   'int', descr=arraydescr)
        assert r.value == 3
        arraydescr = self.cpu.arraydescrof(A)
        assert not arraydescr.is_array_of_pointers()
        r = self.execute_operation(rop.ARRAYLEN_GC, [a_box],
                                   'int', descr=arraydescr)
        assert r.value == 342

src/p/l/plexnet-HEAD/third_party/generic/pypy/pypy/jit/backend/test/test_ll_random.py   plexnet(Download)
    OPERATIONS.append(SetArrayItemOperation(rop.SETARRAYITEM_GC))
    OPERATIONS.append(NewArrayOperation(rop.NEW_ARRAY))
    OPERATIONS.append(ArrayLenOperation(rop.ARRAYLEN_GC))
    OPERATIONS.append(NewStrOperation(rop.NEWSTR))
    OPERATIONS.append(NewUnicodeOperation(rop.NEWUNICODE))

src/p/l/plexnet-HEAD/third_party/generic/pypy/pypy/jit/backend/test/runner_test.py   plexnet(Download)
        assert not arraydescr.is_array_of_pointers()
        #
        r = self.execute_operation(rop.ARRAYLEN_GC, [a_box],
                                   'int', descr=arraydescr)
        assert r.value == 342
        arraydescr = self.cpu.arraydescrof(A)
        assert not arraydescr.is_array_of_pointers()
        r = self.execute_operation(rop.ARRAYLEN_GC, [a_box],
                                   'int', descr=arraydescr)
        assert r.value == 11
        arraydescr = self.cpu.arraydescrof(B)
        assert arraydescr.is_array_of_pointers()
        r = self.execute_operation(rop.ARRAYLEN_GC, [b_box],
                                   'int', descr=arraydescr)
        assert r.value == 3
        arraydescr = self.cpu.arraydescrof(A)
        assert not arraydescr.is_array_of_pointers()
        r = self.execute_operation(rop.ARRAYLEN_GC, [a_box],
                                   'int', descr=arraydescr)
        assert r.value == 342
        arraydescr = self.cpu.arraydescrof(A)
        assert not arraydescr.is_array_of_pointers()
        r = self.execute_operation(rop.ARRAYLEN_GC, [a_box],
                                   'int', descr=arraydescr)
        assert r.value == 311

src/p/l/plexnet-HEAD/third_party/generic/pypy/pypy/jit/metainterp/test/test_executor.py   plexnet(Download)
    # arity == 1
    box1 = BoxInt(515)
    box = execute_nonspec(cpu, rop.ARRAYLEN_GC, [box1], descr)
    assert box.args == ('arraylen_gc', box1, descr)
    # arity == 2

src/s/y/Sypy-HEAD/jit/metainterp/test/test_executor.py   Sypy(Download)
    # arity == 1
    box1 = BoxPtr()
    box = execute_nonspec(cpu, None, rop.ARRAYLEN_GC, [box1], descr)
    assert box.value == 55
    # arity == 2