quakeforge/tools/qfcc
Bill Currie f025bd96d4 [qfcc] Copy self param when copying methods
Copying methods is done when adding protocols to classes (the current
use for adding regular methods is an incorrect solution to a different
problem). However, when a method is added to a class, the type of its
self parameter is set to be a pointer to the class. Thus, not only does
the method need to be copied, the self parameter does too, otherwise
the self parameter of methods added via protocols will have their type
set to be a pointer to the last class seen adding the protocol.

That is, if, while compiling the implementation for class A, but the
interface for class B is comes after the interface for class A, and both
A and B add protocol P, then all methods in protocol P will have self
pointing to B rather than A.

@protocol P
-method;
@end

@interface A <P>
@end

@interface B <P>
@end

@implementation A
-method	{} // self is B, not A!
@end
2020-03-02 23:46:26 +09:00
..
doc Allow constant initialized globals in advanced code 2020-02-23 22:51:00 +09:00
include [qfcc] Emit static instance lists 2020-03-02 10:48:51 +09:00
source [qfcc] Copy self param when copying methods 2020-03-02 23:46:26 +09:00
test [qfcc] Remove type alias encoding 2020-03-01 16:13:18 +09:00
AUTHORS more mailing list corrections 2003-07-12 21:50:22 +00:00
bootstrap scary, but the only changes qfcc needed to build as part of quakeforge was 2002-01-22 05:48:03 +00:00
configure.in Replace system defines/includes with qfcc's 2020-02-19 02:35:09 +09:00
Makefile.am Add a test harness for qfcc. 2012-11-22 21:59:01 +09:00
TODO Throw away function parameter type alias info 2020-02-26 17:46:53 +09:00