<feed xmlns='http://www.w3.org/2005/Atom'>
<title>python.git/Include/compile.h, branch v2.3.2</title>
<subtitle>Unnamed repository; edit this file 'description' to name the repository.</subtitle>
<id>http://dangofactory.net/cgit/cgit.cgi/Server/python.git/atom/Include/compile.h?h=v2.3.2</id>
<link rel='self' href='http://dangofactory.net/cgit/cgit.cgi/Server/python.git/atom/Include/compile.h?h=v2.3.2'/>
<link rel='alternate' type='text/html' href='http://dangofactory.net/cgit/cgit.cgi/Server/python.git/'/>
<updated>2003-02-05T23:13:00Z</updated>
<entry>
<title>Small function call optimization and special build option for call stats.</title>
<updated>2003-02-05T23:13:00Z</updated>
<author>
<name>Jeremy Hylton</name>
<email>jeremy@alum.mit.edu</email>
</author>
<published>2003-02-05T23:13:00Z</published>
<link rel='alternate' type='text/html' href='http://dangofactory.net/cgit/cgit.cgi/Server/python.git/commit/?id=985eba53f5d1ac45037fbf19b6955c74823c1ded'/>
<id>urn:sha1:985eba53f5d1ac45037fbf19b6955c74823c1ded</id>
<content type='text'>
-DCALL_PROFILE: Count the number of function calls executed.

When this symbol is defined, the ceval mainloop and helper functions
count the number of function calls made.  It keeps detailed statistics
about what kind of object was called and whether the call hit any of
the special fast paths in the code.

Optimization:

When we take the fast_function() path, which seems to be taken for
most function calls, and there is minimal frame setup to do, avoid
call PyEval_EvalCodeEx().  The eval code ex function does a lot of
work to handle keywords args and star args, free variables,
generators, etc.  The inlined version simply allocates the frame and
copies the arguments values into the frame.

The optimization gets a little help from compile.c which adds a
CO_NOFREE flag to code objects that don't have free variables or cell
variables.  This change allows fast_function() to get into the fast
path with fewer tests.

I measure a couple of percent speedup in pystone with this change, but
there's surely more that can be done.
</content>
</entry>
<entry>
<title>Constify filenames and scripts. Fixes #651362.</title>
<updated>2002-12-11T14:04:59Z</updated>
<author>
<name>Martin v. Löwis</name>
<email>martin@v.loewis.de</email>
</author>
<published>2002-12-11T14:04:59Z</published>
<link rel='alternate' type='text/html' href='http://dangofactory.net/cgit/cgit.cgi/Server/python.git/commit/?id=95292d6caa3af3196c5b9f5f95dae209815c09e5'/>
<id>urn:sha1:95292d6caa3af3196c5b9f5f95dae209815c09e5</id>
<content type='text'>
</content>
</entry>
<entry>
<title>Excise DL_EXPORT from Include.</title>
<updated>2002-08-12T07:21:58Z</updated>
<author>
<name>Mark Hammond</name>
<email>mhammond@skippinet.com.au</email>
</author>
<published>2002-08-12T07:21:58Z</published>
<link rel='alternate' type='text/html' href='http://dangofactory.net/cgit/cgit.cgi/Server/python.git/commit/?id=91a681debf9ffec155d0aff8a0bb5f965f592e16'/>
<id>urn:sha1:91a681debf9ffec155d0aff8a0bb5f965f592e16</id>
<content type='text'>
Thanks to Skip Montanaro and Kalle Svensson for the patches.
</content>
</entry>
<entry>
<title>Removed more hair in support of future-generator stmts.</title>
<updated>2002-04-12T01:20:10Z</updated>
<author>
<name>Tim Peters</name>
<email>tim.peters@gmail.com</email>
</author>
<published>2002-04-12T01:20:10Z</published>
<link rel='alternate' type='text/html' href='http://dangofactory.net/cgit/cgit.cgi/Server/python.git/commit/?id=2bbdba3c00c33453a2591ffce798c870d9a0ae22'/>
<id>urn:sha1:2bbdba3c00c33453a2591ffce798c870d9a0ae22</id>
<content type='text'>
</content>
</entry>
<entry>
<title>Add helper macro to get the number of free variables for a PyCodeObject.</title>
<updated>2001-12-13T19:47:02Z</updated>
<author>
<name>Jeremy Hylton</name>
<email>jeremy@alum.mit.edu</email>
</author>
<published>2001-12-13T19:47:02Z</published>
<link rel='alternate' type='text/html' href='http://dangofactory.net/cgit/cgit.cgi/Server/python.git/commit/?id=12ce485b48430bdcf50b621e2e785c0079a7aebe'/>
<id>urn:sha1:12ce485b48430bdcf50b621e2e785c0079a7aebe</id>
<content type='text'>
</content>
</entry>
<entry>
<title>Refactor future feature handling</title>
<updated>2001-08-10T21:38:04Z</updated>
<author>
<name>Jeremy Hylton</name>
<email>jeremy@alum.mit.edu</email>
</author>
<published>2001-08-10T21:38:04Z</published>
<link rel='alternate' type='text/html' href='http://dangofactory.net/cgit/cgit.cgi/Server/python.git/commit/?id=fdd12f66bb9740c7796441cd19db2a9d1502ee4f'/>
<id>urn:sha1:fdd12f66bb9740c7796441cd19db2a9d1502ee4f</id>
<content type='text'>
Replace individual slots in PyFutureFeatures with a single bitmask
with one field per feature.  The flags for this bitmask are the same
as the flags used in the co_flags slot of a code object.

    XXX This means we waste several bits, because they are used
    for co_flags but have no meaning for future statements.  Don't
    think this is an issue.

Remove the NESTED_SCOPES_DEFAULT define and others.  Not sure what
they were for anyway.

Remove all the PyCF_xxx flags, but define PyCF_MASK in terms of the
CO_xxx flags that are relevant for this release.

Change definition of PyCompilerFlags so that cf_flags matches
co_flags.
</content>
</entry>
<entry>
<title>Implement PEP 238 in its (almost) full glory.</title>
<updated>2001-08-08T05:00:18Z</updated>
<author>
<name>Guido van Rossum</name>
<email>guido@python.org</email>
</author>
<published>2001-08-08T05:00:18Z</published>
<link rel='alternate' type='text/html' href='http://dangofactory.net/cgit/cgit.cgi/Server/python.git/commit/?id=4668b000a1d9113394941ad39875c827634feb49'/>
<id>urn:sha1:4668b000a1d9113394941ad39875c827634feb49</id>
<content type='text'>
This introduces:

- A new operator // that means floor division (the kind of division
  where 1/2 is 0).

- The "future division" statement ("from __future__ import division)
  which changes the meaning of the / operator to implement "true
  division" (where 1/2 is 0.5).

- New overloadable operators __truediv__ and __floordiv__.

- New slots in the PyNumberMethods struct for true and floor division,
  new abstract APIs for them, new opcodes, and so on.

I emphasize that without the future division statement, the semantics
of / will remain unchanged until Python 3.0.

Not yet implemented are warnings (default off) when / is used with int
or long arguments.

This has been on display since 7/31 as SF patch #443474.

Flames to /dev/null.
</content>
</entry>
<entry>
<title>Part way to allowing "from __future__ import generators" to communicate</title>
<updated>2001-07-16T02:29:45Z</updated>
<author>
<name>Tim Peters</name>
<email>tim.peters@gmail.com</email>
</author>
<published>2001-07-16T02:29:45Z</published>
<link rel='alternate' type='text/html' href='http://dangofactory.net/cgit/cgit.cgi/Server/python.git/commit/?id=5ba58662817b708a453020f0425fe4747ea6d5cb'/>
<id>urn:sha1:5ba58662817b708a453020f0425fe4747ea6d5cb</id>
<content type='text'>
that info to code dynamically compiled *by* code compiled with generators
enabled.  Doesn't yet work because there's still no way to tell the parser
that "yield" is OK (unlike nested_scopes, the parser has its fingers in
this too).
Replaced PyEval_GetNestedScopes by a more-general
PyEval_MergeCompilerFlags.  Perhaps I should not have?  I doubted it was
*intended* to be part of the public API, so just did.
</content>
</entry>
<entry>
<title>Preliminary support for "from __future__ import generators" to enable</title>
<updated>2001-07-15T21:08:29Z</updated>
<author>
<name>Guido van Rossum</name>
<email>guido@python.org</email>
</author>
<published>2001-07-15T21:08:29Z</published>
<link rel='alternate' type='text/html' href='http://dangofactory.net/cgit/cgit.cgi/Server/python.git/commit/?id=b09f7ed6235783fca27a4f8730c4c33e0f53c16c'/>
<id>urn:sha1:b09f7ed6235783fca27a4f8730c4c33e0f53c16c</id>
<content type='text'>
the yield statement.  I figure we have to have this in before I can
release 2.2a1 on Wednesday.

Note: test_generators is currently broken, I'm counting on Tim to fix
this.
</content>
</entry>
<entry>
<title>Enable nested scopes by default.</title>
<updated>2001-07-12T12:50:23Z</updated>
<author>
<name>Guido van Rossum</name>
<email>guido@python.org</email>
</author>
<published>2001-07-12T12:50:23Z</published>
<link rel='alternate' type='text/html' href='http://dangofactory.net/cgit/cgit.cgi/Server/python.git/commit/?id=aa314298543132742efb5544ad202bb209136abf'/>
<id>urn:sha1:aa314298543132742efb5544ad202bb209136abf</id>
<content type='text'>
Although this is a one-character change, more work needs to be done:
the compiler can get rid of a lot of non-nested-scopes code, the
documentation needs to be updated, the future statement can be
simplified, etc.

But this change enables the nested scope semantics everywhere, and
that's the important part -- we can now test code for compatibility
with nested scopes by default.
</content>
</entry>
</feed>
