[prev in list] [next in list] [prev in thread] [next in thread] 

List:       pypy-svn
Subject:    [pypy-commit] [Git][pypy/pypy][branch/default] 2 commits: remove very convoluted _build_consts_array
From:       Carl Friedrich Bolz-Tereick <foss () heptapod ! net>
Date:       2020-02-29 22:08:55
Message-ID: 5e5ae0f751e5e_101b892ae1741d042c74134 () heptapod-foss ! mail
[Download RAW message or body]

[Attachment #2 (multipart/alternative)]


Carl Friedrich Bolz-Tereick pushed to branch branch/default at PyPy / pypy


Commits:
96f76bfa by Carl Friedrich Bolz-Tereick at 2020-02-29T09:17:03+01:00
remove very convoluted _build_consts_array function

- - - - -
c32afba7 by Carl Friedrich Bolz-Tereick at 2020-02-29T23:07:21+01:00
fix bug in PyCode.__eq__: the compiler contains careful logic to make sure that
it doesn&#39;t unify things like 0.0 and -0.0 (they are equal, but the sign still
shouldn&#39;t be dropped). PyCode.__eq__ needs to use the same logic, move it to
PyCode.const_comparison_key and then use that from the bytecode compiler.

Also make explicit the decition that we never unify equal code objects in the
same surrounding code&#39;s co_consts. CPython does that but it&#39;s extremely \
limited (only identical lambdas on the same line).

- - - - -


4 changed files:

- pypy/interpreter/astcompiler/assemble.py
- pypy/interpreter/pycode.py
- pypy/interpreter/test/test_code.py
- pypy/interpreter/test/test_compiler.py


View it on GitLab: https://foss.heptapod.net/pypy/pypy/compare/3db6b2c0bda43fbee10f2a469e1858f9ca47085b...c32afba764837d7b937596dda66483a298c1bf6a


---
View it on GitLab: https://foss.heptapod.net/pypy/pypy/compare/3db6b2c0bda43fbee10f2a469e1858f9ca47085b...c32afba764837d7b937596dda66483a298c1bf6a
 You're receiving this email because of your account on foss.heptapod.net.


[Attachment #5 (text/html)]

<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN" \
"http://www.w3.org/TR/REC-html40/loose.dtd"> <html lang="en">
<head>
<meta content="text/html; charset=utf-8" http-equiv="Content-Type">
<title>
GitLab
</title>



<style>img {
max-width: 100%; height: auto;
}
</style>
</head>
<body>
<div class="content">
<h3>
Carl Friedrich Bolz-Tereick pushed to branch branch/default
at <a href="https://foss.heptapod.net/pypy/pypy">PyPy / pypy</a>
</h3>
<h4>
Commits:
</h4>
<ul>
<li>
<strong><a href="https://foss.heptapod.net/pypy/pypy/commit/96f76bfae4f2589aec12c398857ef8a5f13485fc">96f76bfa</a></strong>
 <div>
<span>by Carl Friedrich Bolz-Tereick</span>
<i>at 2020-02-29T09:17:03+01:00</i>
</div>
<pre class="commit-message" style="white-space: pre-wrap; margin: 0;">remove very \
convoluted _build_consts_array function </pre>
</li>
<li>
<strong><a href="https://foss.heptapod.net/pypy/pypy/commit/c32afba764837d7b937596dda66483a298c1bf6a">c32afba7</a></strong>
 <div>
<span>by Carl Friedrich Bolz-Tereick</span>
<i>at 2020-02-29T23:07:21+01:00</i>
</div>
<pre class="commit-message" style="white-space: pre-wrap; margin: 0;">fix bug in \
PyCode.__eq__: the compiler contains careful logic to make sure that it doesn't unify \
things like 0.0 and -0.0 (they are equal, but the sign still shouldn't be dropped). \
PyCode.__eq__ needs to use the same logic, move it to PyCode.const_comparison_key and \
then use that from the bytecode compiler.

Also make explicit the decition that we never unify equal code objects in the
same surrounding code's co_consts. CPython does that but it's extremely limited
(only identical lambdas on the same line).
</pre>
</li>
</ul>
<h4>4 changed files:</h4>
<ul>
<li class="file-stats">
<a href="https://foss.heptapod.net/pypy/pypy/compare/3db6b2c0bda43fbee10f2a469e1858f9c \
a47085b...c32afba764837d7b937596dda66483a298c1bf6a#bf51116f9c935bd7bdd308fd0ce4ccc3baad7288">
 pypy/interpreter/astcompiler/assemble.py
</a>
</li>
<li class="file-stats">
<a href="https://foss.heptapod.net/pypy/pypy/compare/3db6b2c0bda43fbee10f2a469e1858f9c \
a47085b...c32afba764837d7b937596dda66483a298c1bf6a#d0a5678f84ee406ca40aabcdf0747d3408a5409b">
 pypy/interpreter/pycode.py
</a>
</li>
<li class="file-stats">
<a href="https://foss.heptapod.net/pypy/pypy/compare/3db6b2c0bda43fbee10f2a469e1858f9c \
a47085b...c32afba764837d7b937596dda66483a298c1bf6a#8d6c5530af20ee48f6f24c5bb9769772f597eab8">
 pypy/interpreter/test/test_code.py
</a>
</li>
<li class="file-stats">
<a href="https://foss.heptapod.net/pypy/pypy/compare/3db6b2c0bda43fbee10f2a469e1858f9c \
a47085b...c32afba764837d7b937596dda66483a298c1bf6a#c79f712157cfa0f034005995b9ab7cf48d3a853a">
 pypy/interpreter/test/test_compiler.py
</a>
</li>
</ul>

</div>
<div class="footer" style="margin-top: 10px;">
<p style="font-size: small; color: #777;">
—
<br>
<a href="https://foss.heptapod.net/pypy/pypy/compare/3db6b2c0bda43fbee10f2a469e1858f9ca47085b...c32afba764837d7b937596dda66483a298c1bf6a">View \
it on GitLab</a>. <br>
You're receiving this email because of your account on foss.heptapod.net.
If you'd like to receive fewer emails, you can
adjust your notification settings.

</p>
</div>
</body>
</html>



_______________________________________________
pypy-commit mailing list
pypy-commit@python.org
https://mail.python.org/mailman/listinfo/pypy-commit


[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic