Guillermo Vilas, left hanging overnight on the short end of a match postponed by darkness at two sets to one, hoisted himself up and beat Gene Mayer today, 7-5, 1-6, 6-7, 6-1, 6-2, keeping intact the top four seeds in the French Open tennis championships.

Vilas, the champion of 1977 and runner-up to Bjorn Borg last year in the world's premier clay-court test, was much more purposeful and self-assured on the center court at Stade Roland Garros at noontime today than he had been on noisy and windblown court No. 2 at nightfall Monday.

Mayer, meanwhile, did not have the same exquisite feel for the ball he had demonstrated in tormenting Vilas with drop shots, lobs, improvisational little shots and such exotic instruments of torture as lob volleys that appeared remote-controlled.

"Conditions were completely different, and you never hit the ball the same way two days," sighed Mayer, 23, who could manage only three games in two sets of the resumption. " . . . He played me a little bit differently today. He played a little bit better and I played a little bit worse."

Vilas, who won the Australian Open in January on grass courts, thus arrived safely in the quarterfinals and will play Victor Pecci Wednesday.

Jimmy Connors, seeded second behind three-time champ Borg, will play fellow American Eddie Dibbs.

Borg and No. 4 seed Vitas Gerulaitis, winner of the Italian Open nine days ago, played their quarterfinal matches today and advanced to a showdown Friday, men's semifinal day.

Borg, who celebrates his 23rd birthday Wednesday, received a trophy from the International Tennis Federation as the men's world champion of 1978 at a gala dinner tonight. He gave another performance worthy of the honor in dispatching Hans Gildemeister, 6-4, 6-1, 7-5.

Gerulaitis had a much more difficult time against the steady but unspectacular Spaniard, Jose Higueras, winning, 6-1, 3-6, 6-4, 6-4. Higueras was twice up a bread in the fourth set, at 3-2 and 4-3, but was starting to get cramps in his left leg and to feel the aftereffects of six days of flu and fever.

Speedy Wendy (Rabbit) Turnbull served well and cleverly mixed up attack and defense in defeating Hana Mandlikova, the promising 17-year-old Czech who was honored at the ITF dinner as the outstanding junior girl of 1978, 6-3, 6-3.

Regina Marsikova reached the semifinals of the women's singles for the third consecutive year by defeating yet another Czech, 1976 runner-up Renata Tomanova, 6-1, 6-1.

Turnbull will play Marsikova and top seed Chris Evert will face Dianne Fromholtz in the women's semifinals Thursday.

Mayer, an unorthodox but richly gifted player who blossomed this year and reached the World Championship Tennis playoffs at Dallas last month, had seized the initiative against Vilas Monday evening by playing some inspired tennis in less-than-ideal conditions.

Their match was originally scheduled for the stadium, but was started instead at 7:15 on a gray, damp, chilly and breezy evening on court No. 2, in one of the most distracting corners of the picturesque Roland Garros grounds.

Flags flapped, chestnut trees rustled in the wind and heavy traffic on the Avenue de la Porte d'Auteuil, homeward-bound after a three-day weekend, provided a cacophony of engines, tires and horns.

Despite the chaos, Vilas won a tight, well-played first set. Then Mayer started to assert himself, jerking the Argentinian lefthander to and fro with extraordinary touch and imaginatively varied tactics.

Mayer seldom punished the ball with his oversized graphite racket, preferring instead to coax it into doing his bidding. He chipped and dinked and lobbed, all the time disguising superbly the strokes that he hits with a double-handed grip from both sides.

He mixed up his game, sometimes staying in the back court, sometimes sneaking to the net, but making Vilas do most of the running. Vilas had to cover every inch of the court, frequently more than once in a single point, and Mayer occasionally seemed to have him on a string.

Vilas - quick, fit and muscular - kept sprinting flat out, knowing there would be a suspension after three sets. He served for the third set, having twice been up a break, but wound up losing it in a tiebreaker.

But if he spent a night restless from worry, Vilas gave no hint of it when the fourth set began shortly before noon today, this time on the center court. The upper deck of the stadium - the "bleachers," sold unreserved on a first-come, first-served basis - was jammed, but the reserved sections were sparsely populated.

The jackals were back and shrieking against another melancholy sky. The air was damp and clammy again but there was no breeze to speak of. Vilas looked composed and resolute behind his ever-present headband. It was Mayer who appeared jumpy, several times complaining about spectators moving about in the front rows.

The match never really regained its delightfully animated, chessboard quality of the previous evening. Mayer saved two break points in the second game, had one advantage point on Vilas' serve in the third, then lost four games in a row.

He quickly found himself down a break at 1-2 in the fifth and never had a point to break back. The closest he came was deuce on Vilas' serve in the sixth game, but thereafter he won only one more point.

Mayer continued to scramble well and make Vilas scamper, but he was not putting away volleys and overheads when he got them. Eventually, Vilas' topspin groundstrokes got the best of him.

Vilas also was getting to virtually all of Mayer's frequent drop shots and drop volleys, either hitting outright winners or making forcing plays off them. This time, Mayer was under nearly constant pressure.

Borg was simply too quick and powerful for Gildemeister, routing and exhausting the lanky, sandy-haired Chilean Davis Cupper in a back-court battle of attrition.

Gildemeister, like Mayer, hits both his forehand and backhand two-fisted except when he has to stretch for a shot. He pounds the ball, disguising the angle of his racket face and therefore the direction in which he is about to hit - until the last possible second.

He scurries along the baseline in quick, curious, crab-like movements. Against lesser players, he keeps stroking with concussive pace until he can drive his opponent out of position and then blow an outright winner past him. But Borg's speed afoot and ability to hit groundstrokes just as hard and accurate totally frustrated him.