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
d98960b4
Commit
d98960b4
authored
Feb 01, 2016
by
Kevin Modzelewski
Browse files
Options
Browse Files
Download
Plain Diff
Merge pull request #1086 from undingen/fix_boolop_parsing
Fix cpython parser bool operation conversion
parents
8c850f64
9eabc931
Changes
4
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
10 additions
and
5 deletions
+10
-5
src/codegen/cpython_ast.cpp
src/codegen/cpython_ast.cpp
+1
-1
src/codegen/parser.cpp
src/codegen/parser.cpp
+3
-3
src/core/ast.cpp
src/core/ast.cpp
+3
-0
src/core/cfg.cpp
src/core/cfg.cpp
+3
-1
No files found.
src/codegen/cpython_ast.cpp
View file @
d98960b4
...
...
@@ -139,7 +139,7 @@ public:
AST_TYPE
::
AST_TYPE
convert
(
boolop_ty
op
)
{
switch
(
op
)
{
CASE
(
A
d
d
);
CASE
(
A
n
d
);
CASE
(
Or
);
}
// GCC wants this:
...
...
src/codegen/parser.cpp
View file @
d98960b4
...
...
@@ -1106,11 +1106,11 @@ AST_Module* parse_file(const char* fn, FutureFlags inherited_flags) {
const
char
*
getMagic
()
{
if
(
ENABLE_CPYTHON_PARSER
)
return
"a
\n
C
O
"
;
return
"a
\n
C
P
"
;
else
if
(
ENABLE_PYPA_PARSER
)
return
"a
\n
c
O
"
;
return
"a
\n
c
P
"
;
else
return
"a
\n
c
o
"
;
return
"a
\n
c
p
"
;
}
#define MAGIC_STRING_LENGTH 4
...
...
src/core/ast.cpp
View file @
d98960b4
...
...
@@ -1560,6 +1560,9 @@ bool PrintVisitor::visit_langprimitive(AST_LangPrimitive* node) {
case
AST_LangPrimitive
:
:
HASNEXT
:
stream
<<
"HASNEXT"
;
break
;
case
AST_LangPrimitive
:
:
PRINT_EXPR
:
stream
<<
"PRINT_EXPR"
;
break
;
default:
RELEASE_ASSERT
(
0
,
"%d"
,
node
->
opcode
);
}
...
...
src/core/cfg.cpp
View file @
d98960b4
...
...
@@ -746,9 +746,11 @@ private:
if
(
node
->
op_type
==
AST_TYPE
::
Or
)
{
br
->
iftrue
=
crit_break_block
;
br
->
iffalse
=
next_block
;
}
else
{
}
else
if
(
node
->
op_type
==
AST_TYPE
::
And
)
{
br
->
iffalse
=
crit_break_block
;
br
->
iftrue
=
next_block
;
}
else
{
RELEASE_ASSERT
(
0
,
""
);
}
curblock
=
crit_break_block
;
...
...
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