Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 18fbabc2 authored by Jack Palevich's avatar Jack Palevich Committed by Android Git Automerger
Browse files

am ef41d238: am c0b74902: Merge change 24171 into eclair

Merge commit 'ef41d238'

* commit 'ef41d238':
  Turn an assert into an error to handle bad struct members more gracefully.
parents f937d759 ef41d238
Loading
Loading
Loading
Loading
+19 −9
Original line number Diff line number Diff line
@@ -1548,7 +1548,7 @@ class Compiler : public ErrorSink {
#endif
                    }
                } else {
                    assert (r0Tag == TY_DOUBLE);
                    if (r0Tag == TY_DOUBLE) {
                        if (destTag == TY_INT) {
#ifdef ARM_USE_VFP
                            o4(0xEEFD7BC7); // ftosizd s15, d7
@@ -1557,12 +1557,18 @@ class Compiler : public ErrorSink {
                            callRuntime((void*) runtime_double_to_int);
#endif
                        } else {
                        assert(destTag == TY_FLOAT);
                            if(destTag == TY_FLOAT) {
#ifdef ARM_USE_VFP
                                o4(0xEEF77BC7); // fcvtsd s15, d7
#else
                                callRuntime((void*) runtime_double_to_float);
#endif
                            } else {
                                incompatibleTypes(pR0Type, pType);
                            }
                        }
                    } else {
                        incompatibleTypes(pR0Type, pType);
                    }
                }
            }
@@ -2032,6 +2038,10 @@ class Compiler : public ErrorSink {
            return false;
        }

        void incompatibleTypes(Type* pR0Type, Type* pType) {
            error("Incompatible types old: %d new: %d", pR0Type->tag, pType->tag);
        }

        size_t rotateRight(size_t n, size_t rotate) {
            return (n >> rotate) | (n << (32 - rotate));
        }