summaryrefslogtreecommitdiffstats
path: root/Programs
diff options
context:
space:
mode:
authorPablo Galindo <Pablogsal@gmail.com>2021-07-02 14:10:11 (GMT)
committerGitHub <noreply@github.com>2021-07-02 14:10:11 (GMT)
commit98eee94421dcb42c15f2d7fc4cd21357722fbe2a (patch)
tree45a158d1e97f0b29d24ded80122559b50cc858f5 /Programs
parent943e77d42d3f84b581f32c05f1fc8c05366b8ed3 (diff)
downloadcpython-98eee94421dcb42c15f2d7fc4cd21357722fbe2a.zip
cpython-98eee94421dcb42c15f2d7fc4cd21357722fbe2a.tar.gz
cpython-98eee94421dcb42c15f2d7fc4cd21357722fbe2a.tar.bz2
bpo-43950: Add code.co_positions (PEP 657) (GH-26955)
This PR is part of PEP 657 and augments the compiler to emit ending line numbers as well as starting and ending columns from the AST into compiled code objects. This allows bytecodes to be correlated to the exact source code ranges that generated them. This information is made available through the following public APIs: * The `co_positions` method on code objects. * The C API function `PyCode_Addr2Location`. Co-authored-by: Batuhan Taskaya <isidentical@gmail.com> Co-authored-by: Ammar Askar <ammar@ammaraskar.com>
Diffstat (limited to 'Programs')
-rw-r--r--Programs/test_frozenmain.h9
1 files changed, 8 insertions, 1 deletions
diff --git a/Programs/test_frozenmain.h b/Programs/test_frozenmain.h
index 10b1350..22af31c 100644
--- a/Programs/test_frozenmain.h
+++ b/Programs/test_frozenmain.h
@@ -23,5 +23,12 @@ unsigned char M_test_frozenmain[] = {
250,18,116,101,115,116,95,102,114,111,122,101,110,109,97,105,
110,46,112,121,218,8,60,109,111,100,117,108,101,62,1,0,
0,0,115,16,0,0,0,8,3,8,1,8,2,12,1,12,
- 1,8,1,26,7,4,249,114,9,0,0,0,
+ 1,8,1,26,7,4,249,115,18,0,0,0,8,3,8,1,
+ 8,2,12,1,12,1,2,7,4,1,2,249,30,7,115,86,
+ 0,0,0,1,11,1,11,1,11,1,11,1,25,1,25,1,
+ 25,1,25,1,6,7,27,1,28,1,28,1,6,7,17,19,
+ 22,19,27,1,28,1,28,10,27,10,39,10,41,42,50,10,
+ 51,1,7,12,2,1,42,1,42,5,8,5,10,11,41,21,
+ 24,11,41,11,41,28,34,35,38,28,39,11,41,11,41,5,
+ 42,5,42,5,42,1,42,1,42,114,9,0,0,0,
};