Article View: net.lang.c++
Article #365``this'' other than register?
From: kenny
Date: Tue, 21 Oct 1986 18:47
Date: Tue, 21 Oct 1986 18:47
25 lines
1757 bytes
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
Technical Details
Message-ID:
<154000005@uiucdcsb>Path:
arc1-ca.pugleaf.net!utzoo!mnetor!seismo!rutgers!princeton!allegra!ulysses!mhuxr!mhuxt!houxm!ihnp4!inuxc!pur-ee!uiucdcs!uiucdcsb!kennyShow Full Headers
Complete Article Headers
Relay-Version: version B 2.10 5/3/83; site utzoo.UUCP Path: arc1-ca.pugleaf.net!utzoo!mnetor!seismo!rutgers!princeton!allegra!ulysses!mhuxr!mhuxt!houxm!ihnp4!inuxc!pur-ee!uiucdcs!uiucdcsb!kenny From: kenny@uiucdcsb.cs.uiuc.edu Newsgroups: net.lang.c++ Subject: ``this'' other than register? Message-ID: <154000005@uiucdcsb> Date: Tue, 21-Oct-86 14:47:00 EDT Article-I.D.: uiucdcsb.154000005 Posted: Tue Oct 21 14:47:00 1986 Date-Received: Thu, 23-Oct-86 02:44:53 EDT Lines: 25 Nf-ID: #N:uiucdcsb:154000005:000:1161 Nf-From: uiucdcsb.cs.uiuc.edu!kenny Oct 21 13:47:00 1986