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

Commit f689dfc5 authored by Chris Craik's avatar Chris Craik Committed by Android Git Automerger
Browse files

am f451be08: am e8a5ae29: am 3b34b006: am be10a866: am 9f004920: Merge "Reduce...

am f451be08: am e8a5ae29: am 3b34b006: am be10a866: am 9f004920: Merge "Reduce cost of span type checking" into mnc-dev

* commit 'f451be08':
  Reduce cost of span type checking
parents d2c9d0d9 f451be08
Loading
Loading
Loading
Loading
+5 −4
Original line number Diff line number Diff line
@@ -214,10 +214,6 @@ import java.lang.reflect.Array;
        Object ret1 = null;

        for (int i = 0; i < spanCount; i++) {
            if (kind != null && !kind.isInstance(spans[i])) {
                continue;
            }

            int spanStart = data[i * COLUMNS + START];
            int spanEnd = data[i * COLUMNS + END];

@@ -237,6 +233,11 @@ import java.lang.reflect.Array;
                }
            }

            // verify span class as late as possible, since it is expensive
            if (kind != null && !kind.isInstance(spans[i])) {
                continue;
            }

            if (count == 0) {
                ret1 = spans[i];
                count++;