Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
P
Pyston
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
Boxiang Sun
Pyston
Commits
cee97659
Commit
cee97659
authored
Oct 28, 2015
by
Kevin Modzelewski
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Support inherited flags in the cpython parser
parent
bf8e0fc9
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
3 additions
and
8 deletions
+3
-8
src/codegen/parser.cpp
src/codegen/parser.cpp
+3
-8
No files found.
src/codegen/parser.cpp
View file @
cee97659
...
...
@@ -1019,9 +1019,8 @@ AST_Module* parse_string(const char* code, FutureFlags inherited_flags) {
inherited_flags
&=
~
(
CO_NESTED
|
CO_FUTURE_DIVISION
);
if
(
ENABLE_CPYTHON_PARSER
)
{
RELEASE_ASSERT
(
!
inherited_flags
,
"unimplemented"
);
PyCompilerFlags
cf
;
cf
.
cf_flags
=
0
;
cf
.
cf_flags
=
inherited_flags
;
ArenaWrapper
arena
;
assert
(
arena
);
const
char
*
fn
=
"<string>"
;
...
...
@@ -1065,11 +1064,9 @@ AST_Module* parse_file(const char* fn, FutureFlags inherited_flags) {
Timer
_t
(
"parsing"
);
if
(
ENABLE_CPYTHON_PARSER
)
{
RELEASE_ASSERT
(
!
inherited_flags
,
"unimplemented"
);
FileHandle
fp
(
fn
,
"r"
);
PyCompilerFlags
cf
;
cf
.
cf_flags
=
0
;
cf
.
cf_flags
=
inherited_flags
;
ArenaWrapper
arena
;
assert
(
arena
);
mod_ty
mod
=
PyParser_ASTFromFile
(
fp
,
fn
,
Py_file_input
,
0
,
0
,
&
cf
,
NULL
,
arena
);
...
...
@@ -1153,11 +1150,9 @@ static std::vector<char> _reparse(const char* fn, const std::string& cache_fn, A
if
(
ENABLE_CPYTHON_PARSER
||
ENABLE_PYPA_PARSER
||
inherited_flags
)
{
if
(
ENABLE_CPYTHON_PARSER
)
{
RELEASE_ASSERT
(
!
inherited_flags
,
"unimplemented"
);
FileHandle
fp
(
fn
,
"r"
);
PyCompilerFlags
cf
;
cf
.
cf_flags
=
0
;
cf
.
cf_flags
=
inherited_flags
;
ArenaWrapper
arena
;
assert
(
arena
);
mod_ty
mod
=
PyParser_ASTFromFile
(
fp
,
fn
,
Py_file_input
,
0
,
0
,
&
cf
,
NULL
,
arena
);
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment