public static Slot slotFromExpressionTree(Cons tree) {
    if (Stella.SYM_STELLA_TYPED_SYS == tree.value) {
      tree = ((Cons)(tree.rest.value));
    }
    { GeneralizedSymbol testValue000 = ((GeneralizedSymbol)(tree.value));

      if ((testValue000 == Stella.SYM_STELLA_SYS_SLOT_VALUE) ||
          ((testValue000 == Stella.SYM_STELLA_SYS_CALL_METHOD) ||
           ((testValue000 == Stella.SYM_STELLA_SYS_SLOT_VALUE_SETTER) ||
            (testValue000 == Stella.SYM_STELLA_SYS_CALL_METHOD_SETTER)))) {
        return (Stella_Class.lookupSlot(((Stella_Class)(((Surrogate)(tree.rest.value)).surrogateValue)), ((Symbol)(tree.rest.rest.value))));
      }
      else if (testValue000 == Stella.SYM_STELLA_SYS_CALL_FUNCTION) {
        { MethodSlot function = Symbol.lookupFunction(((Symbol)(tree.rest.value)));

          if ((function != null) &&
              Stella_Object.isaP(function, Stella.SGT_STELLA_METHOD_SLOT)) {
            return (function);
          }
        }
      }
      else {
        return (null);
      }
    }
    return (null);
  }