- 23 Aug, 2017 2 commits
-
-
x3k6a2 authored
The code right now creates a frame containing a reference to f_globals in f_locals. This is because of https://github.com/python/cpython/blob/2.7/Objects/frameobject.c#L732 If a profiler accesses frame.f_locals (from python) it will trigger frame_getlocals https://github.com/python/cpython/blob/02e03672e6766b1da847b1635982a70346780744/Objects/frameobject.c#L56 PyFrame_FastToLocals https://github.com/python/cpython/blob/02e03672e6766b1da847b1635982a70346780744/Objects/frameobject.c#L867 which will call map_to_dict with (pseudocode) map_to_dict(f.co_code.co_varnames, len(f.co_code.co_varnames), f.f_locals, f.f_localsplus, 0) which will remove everything from f_locals which is also in f.co_code.co_varnames. As f_locals == f_globals in the current setup that modifies the global namespace. In our case we have a function def foo(foo): pass if a function call to this function is profiled the function will be removed from the global namespace (as it shares it's name with one of it's parameter names).
-
Stefan Behnel authored
Disable refnanny in PyPy since it otherwise risks to access partly initialised objects, e.g. tuples.
-
- 22 Aug, 2017 3 commits
-
-
Stefan Behnel authored
Remove accidental left-over name "gs" from Shadow.py that should not be part of the pure mode types.
-
Stefan Behnel authored
Avoid some unnecessary strlen() calls in exception text formatting, while still keeping up the nice property of sharing const C message strings.
- 21 Aug, 2017 13 commits
-
-
Stefan Behnel authored
Revert "Do not compile Lexicon.py. It's really only used once and is much larger as a binary module than as a byte code file, but not slower to import." Currently seems to be required when the scanner is compiled. This reverts commit d66405c6.
-
Stefan Behnel authored
-
Stefan Behnel authored
-
Stefan Behnel authored
-
Stefan Behnel authored
-
Stefan Behnel authored
-
Stefan Behnel authored
-
Stefan Behnel authored
-
Stefan Behnel authored
-
Stefan Behnel authored
-
Stefan Behnel authored
Do not compile Lexicon.py. It's really only used once and is much larger as a binary module than as a byte code file, but not slower to import.
-
Stefan Behnel authored
-
Stefan Behnel authored
-
- 19 Aug, 2017 8 commits
-
-
Stefan Behnel authored
-
Stefan Behnel authored
-
Stefan Behnel authored
-
Stefan Behnel authored
Include deprecation warning from CPython (3.3+) in __Pyx_PyNumber_IntOrLong() and avoid inlining error handling code.
-
Stefan Behnel authored
Streamline __Pyx_PyNumber_IntOrLong() with direct slot calls instead of C-API function calls that only do what we already do on our side already.
-
Stefan Behnel authored
-
Stefan Behnel authored
Specialise coercion from bytes to char* (and friends) to avoid going through several type checks in the generic "__Pyx_PyObject_AsStringAndSize()" function.
-
Stefan Behnel authored
Split uncommon case from unicode/bytes.endswith() implementation to suggest inlining the normal case.
-
- 18 Aug, 2017 8 commits
-
-
Stefan Behnel authored
-
Stefan Behnel authored
Fix reference leak in the Py2.x __Pyx_ReleaseBuffer() implementation for types with an overridden __releasebuffer__ method. Closes #1638.
-
Stefan Behnel authored
-
Stefan Behnel authored
-
Stefan Behnel authored
-
Stefan Behnel authored
-
Stefan Behnel authored
-
Stefan Behnel authored
-
- 17 Aug, 2017 6 commits
-
-
Stefan Behnel authored
-
Stefan Behnel authored
-
Stefan Behnel authored
Fix more tests: Correct the source character position of name nodes to improve error reporting (previously reported the character position *behind* the name).
-
Stefan Behnel authored
Correct the source character position of name nodes to improve error reporting (previously reported the character position *behind* the name).
-
Stefan Behnel authored
Closes #1824.
-
Stefan Behnel authored
Repair "range(enum)" iteration in C++ which (rightfully) disallows arbitrary assignments between enum+int.
-