Is every Java method really a varargs method?

Jon Olson olson@mmsi.com
Wed Sep 16 12:57:00 GMT 1998


>From the assembler output of the Java compiler, it appears that
gcj treats every method as if it has a variable length arglist. Note
the following output from an arm-gcj cross assembler:
	.align	4
	.global	___13HelloWorldApp
___13HelloWorldApp:
	; args = 4, pretend = 16, frame = 0
	; frame_needed = 0, current_function_anonymous_args = 1
	stmfd	sp!, {r0, r1, r2, r3}	<-- Pushes register arguments???
	stmfd	sp!, {lr}
	ldr	r0,[sp, #4]
	bl	___Q34java4lang6Object
	ldmfd	sp!, {lr}
	add	sp, sp, #16
	mov	pc, lr
Is there some magical reason for this that I don't comprehend? For
many architectures with alot of registers like sparc or a29k, this
would incur a big overhead...
--
Jon Olson, Modular Mining Systems
	 3289 E. Hemisphere Loop
	 Tucson, AZ 85706
INTERNET: olson@mmsi.com
PHONE: (520)746-9127
FAX: (520)889-5790


More information about the Java mailing list

AltStyle によって変換されたページ (->オリジナル) /