Commit b041b0d6 authored by Kevin Modzelewski's avatar Kevin Modzelewski

Merge pull request #248 from dorafmon/master

Trying to fix Issue #171
parents e2bc5cd6 5bd02224
# 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
......@@ -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);
......
nan = float('nan')
print nan == nan
print nan in [nan]
print [nan] == [nan]
print [nan] in [nan]
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment