[pypy-dev] lib_pypy/_marshal.py looks out of date for Python 3

2017-07-09 Thread Rocky Bernstein
A while back, in working on a cross-version python decompiler, I used PyPy's lib_pypy/_marshal.py. Recently in doing work in writing a cross-platform a Python bytecode assember, I noticed what is in the py3.5 branch is a bit out of date for Python 3. Specifically these types: TYPE_REF

[pypy-dev] Static bytecode instruction optimization and pypy (JIT?) optimization

2017-07-09 Thread Rocky Bernstein
In looking at Python bytecode over the years, I've noticed that it does very little to no traditional static-compiler optimization. Specifically: * Dead code elmination (most of the time) * Jumps to Jumps or Jumps to the next instruction * Constant propagation (most of the time) * Common subexpres

Re: [pypy-dev] Static bytecode instruction optimization and pypy (JIT?) optimization

2017-07-10 Thread Rocky Bernstein
Yes, that's true, but I believe that such decisions should offered to the programmers rather than dictated. There is also a whole other discussion on * how/where optimizations/transformations could be recorded * how tracebacks could be handled * debugging optimized code But here I wanted to foc

Re: [pypy-dev] Static bytecode instruction optimization and pypy (JIT?) optimization

2017-07-11 Thread Rocky Bernstein
On Tue, Jul 11, 2017 at 4:01 AM, Armin Rigo wrote: > Hi Rocky, > > On 11 July 2017 at 06:28, Rocky Bernstein wrote: > > Yes, that's true, but I believe that such decisions should offered to the > > programmers rather than dictated. > > If the choice for the progr

Re: [pypy-dev] Static bytecode instruction optimization and pypy (JIT?) optimization

2017-07-11 Thread Rocky Bernstein
On Tue, Jul 11, 2017 at 4:35 AM, William ML Leslie < william.leslie@gmail.com> wrote: > On 11 July 2017 at 18:22, Rocky Bernstein wrote: > > There's too much generalization and abstraction in the discussion at > least > > for me. So let me try to make this a l

[pypy-dev] pypy specific code flags DONT_IMPLY_DEDENT and SOURCE_IS_UTF8

2019-12-16 Thread Rocky Bernstein
Hi - I have a cross-version Python bytecode disassembler xdis ( https://pypi.org/project/xdis/) and I notice that flags 0x0100 and 0x0200 (DONT_IMPLY_DEDENT and SOURCE_IS_UTF8 respectively) conflict in Pypy 3.6 with Python 3.6's ITERABLE_COROUTINE and ASYNC_GENERATOR. However in pypy3.6-7.2.0, i

Re: [pypy-dev] pypy specific code flags DONT_IMPLY_DEDENT and SOURCE_IS_UTF8

2019-12-16 Thread Rocky Bernstein
Rigo wrote: > Hi, > > On Mon, 16 Dec 2019 at 11:24, Rocky Bernstein wrote: > > I have a cross-version Python bytecode disassembler xdis ( > https://pypi.org/project/xdis/) and I notice that flags 0x0100 and 0x0200 > (DONT_IMPLY_DEDENT and SOURCE_IS_UTF8 respectively) conflict

Re: [pypy-dev] pypy specific code flags DONT_IMPLY_DEDENT and SOURCE_IS_UTF8

2019-12-16 Thread Rocky Bernstein
igo wrote: > Hi Rocky, > > On Mon, 16 Dec 2019 at 11:57, Rocky Bernstein wrote: > > > > I did a little test, and for this program: > > > > # from 3.7 test_asyncgen.py > > def test_async_gen_iteration_01(self): > > async def gen(): > >