Marissa Mayer and Yahoo are still in the midst of their turnaround effort, but investors like what they saw in the company's first-quarter results.

Shares surged 6% Wednesday after Yahoo (YHOO) posted earnings and sales that came in slightly ahead of expectations. Of particular note was the company's success in stemming declines in revenue from its search and display ads, which have flagged in recent quarters.

"We believe we've moved from our core business being in decline to stable to modest growth," Mayer said Tuesday in a presentation of the results.

Investors were also enthused about Alibaba, the Chinese Internet portal in which Yahoo owns a 24% stake. Alibaba announced plans last month to go public in the U.S. in what is expected to be one of the largest-ever initial offerings. Yahoo will sell 40% of its stake when Alibaba goes public, putting it in position for a multi-billion-dollar windfall.

Alibaba sales rose 66% in the fourth quarter of 2013 versus the year prior, Yahoo said, while earnings surged 110%.

Excitement about Alibaba has helped drive Yahoo shares more than 40% higher in the past year. As for Yahoo itself, analysts are still puzzling over what exactly the company wants to be.

"Mayer has her work cut out," Sejuti Banerjea of Zacks Investment Research said in a report Wednesday. "Once the [Alibaba] IPO is over, the euphoria will die down and everyone will be focused on the core business."

Mayer announced ambitious plans for 2014 back in January, saying the company is planning new apps, new sites, new acquisitions and improvements to existing products. She appears particularly focused on media, having recently announced two news products: Yahoo News Digest and Yahoo Magazines.

The company is also reportedly interested in acquiring a handful of high-quality online TV series, though Mayer was cagey when asked about this possibility following Tuesday's presentation.

"Moving forward, we will continue to bring our users great original content, but we will do so with much more focus and quality," she said, adding that Yahoo had been evaluating whether it should "build, buy or partner" with other firms in this effort.

Web searches, meanwhile, remain key to the company's business, accounting for $445 million in revenue for the quarter. Mayer trumpeted Yahoo's mobile operations, which, at 430 million monthly active users, showed a 30% improvement from the prior year.

Overall, Yahoo reported $1.09 billion in sales for the quarter and $311.6 million in earnings.