🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

1 total messages Started by kenny Tue, 21 Oct 1986 18:47
``this'' other than register?
#365
Author: kenny
Date: Tue, 21 Oct 1986 18:47
25 lines
1757 bytes
	The C++ compiler in use here (1.0; we have 1.1 on order but it
has yet to arrive) always declares ``this'' as a register argument.  As
Bjarne points out, if a function has little use for ``this'' (I have
one that picks up an instance variable, goes through a complex loop
that uses only local variables, and finally plugs the instance variable
back) making ``this'' a register is a loss, particularly on Vax.

	In addition, it turns out that (again on Vax) the loop in
question works out to be *much* faster if I can use a sixth register
variable (the working set just happens to be six registers).

+	Do any of the newer compilers allow ``this'' to be other than
	register?

+	Does anyone have something clever to interpose between cfront
	and cc that gets rid of the register declaration?  That gets
	rid of it for one entry function?  Yes, I'm hacker enough to
	build my own, but why re-invent the wheel?

Kevin Kenny			UUCP: {ihnp4,pur-ee,convex}!uiucdcs!kenny
Department of Computer Science	ARPA: kenny@B.CS.UIUC.EDU (kenny@UIUC.ARPA)
University of Illinois		CSNET: kenny@UIUC.CSNET
1304 W. Springfield Ave.
Urbana, Illinois, 61801		Voice: (217) 333-7980
Thread Navigation

This is a paginated view of messages in the thread with full content displayed inline.

Messages are displayed in chronological order, with the original post highlighted in green.

Use pagination controls to navigate through all messages in large threads.

Back to All Threads