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
b041b0d6
Commit
b041b0d6
authored
Jan 02, 2015
by
Kevin Modzelewski
Browse files
Options
Browse Files
Download
Plain Diff
Merge pull request #248 from dorafmon/master
Trying to fix Issue #171
parents
e2bc5cd6
5bd02224
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
15 additions
and
1 deletion
+15
-1
Makefile.llvmconfig
Makefile.llvmconfig
+1
-1
src/runtime/list.cpp
src/runtime/list.cpp
+9
-0
test/tests/list_eq_contains.py
test/tests/list_eq_contains.py
+5
-0
No files found.
Makefile.llvmconfig
View file @
b041b0d6
# included by Makefile
LLVM_CONFIGURE_LINE
:=
CXX
=
$(GPP)
LDFLAGS
=
"-Wl,-rpath,
$(GCC_DIR)
/lib64"
$(LLVM_SRC)
/configure
--enable-targets
=
host
--with-gcc-toolchain
=
$(GCC_DIR)
LLVM_CONFIGURE_LINE
:=
CXX
=
$(GPP)
LDFLAGS
=
"-Wl,-rpath,
$(GCC_DIR)
/lib64"
$(LLVM_SRC)
/configure
--enable-targets
=
host
--with-gcc-toolchain
=
$(GCC_DIR)
--disable-bindings
src/runtime/list.cpp
View file @
b041b0d6
...
...
@@ -395,6 +395,11 @@ Box* listContains(BoxedList* self, Box* elt) {
int
size
=
self
->
size
;
for
(
int
i
=
0
;
i
<
size
;
i
++
)
{
Box
*
e
=
self
->
elts
->
elts
[
i
];
bool
identity_eq
=
e
==
elt
;
if
(
identity_eq
)
return
True
;
Box
*
cmp
=
compareInternal
(
e
,
elt
,
AST_TYPE
::
Eq
,
NULL
);
bool
b
=
nonzero
(
cmp
);
if
(
b
)
...
...
@@ -517,6 +522,10 @@ Box* _listCmp(BoxedList* lhs, BoxedList* rhs, AST_TYPE::AST_TYPE op_type) {
int
n
=
std
::
min
(
lsz
,
rsz
);
for
(
int
i
=
0
;
i
<
n
;
i
++
)
{
bool
identity_eq
=
lhs
->
elts
->
elts
[
i
]
==
rhs
->
elts
->
elts
[
i
];
if
(
identity_eq
)
continue
;
Box
*
is_eq
=
compareInternal
(
lhs
->
elts
->
elts
[
i
],
rhs
->
elts
->
elts
[
i
],
AST_TYPE
::
Eq
,
NULL
);
bool
bis_eq
=
nonzero
(
is_eq
);
...
...
test/tests/list_eq_contains.py
0 → 100644
View file @
b041b0d6
nan
=
float
(
'nan'
)
print
nan
==
nan
print
nan
in
[
nan
]
print
[
nan
]
==
[
nan
]
print
[
nan
]
in
[
nan
]
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