| Commit message (Collapse) | Author | Age | Files | Lines |
... | |
|
|
|
|
|
|
| |
If it's in an ObjCContainerDecl, its "redeclaration" is the method definition in the corresponding ObjCImplDecl.
If it's in an ObjCImplDecl, its "redeclaration" is the method in the interface.
llvm-svn: 76512
|
|
|
|
|
|
| |
Use ObjCInterfaceDecl::getCategoryClassMethod() and ObjCInterfaceDecl::getCategoryInstanceMethod() for the same functionality.
llvm-svn: 76510
|
|
|
|
|
|
|
|
|
|
|
|
| |
ASTContext::setObjCImplementation() which use a DenseMap to associate
an interface/category with its implementation (if one exists).
- Introduce ObjCInterfaceDecl::get/setImplementation() and ObjCCategoryDecl::get/setImplementation() that use the above methods.
- Add a compiler error for when a category is reimplemented.
llvm-svn: 76508
|
|
|
|
|
|
|
|
|
|
|
|
| |
The idea is to segregate Objective-C "object" pointers from general C pointers (utilizing the recently added ObjCObjectPointerType). The fun starts in Sema::GetTypeForDeclarator(), where "SomeInterface *" is now represented by a single AST node (rather than a PointerType whose Pointee is an ObjCInterfaceType). Since a significant amount of code assumed ObjC object pointers where based on C pointers/structs, this patch is very tedious. It should also explain why it is hard to accomplish this in smaller, self-contained patches.
This patch does most of the "heavy lifting" related to moving from PointerType->ObjCObjectPointerType. It doesn't include all potential "cleanups". The good news is additional cleanups can be done later (some are noted in the code). This patch is so large that I didn't want to include any changes that are purely aesthetic.
By making the ObjC types truly built-in, they are much easier to work with (and require fewer "hacks"). For example, there is no need for ASTContext::isObjCIdStructType() or ASTContext::isObjCClassStructType()! We believe this change (and the follow-up cleanups) will pay dividends over time.
Given the amount of code change, I do expect some fallout from this change (though it does pass all of the clang tests). If you notice any problems, please let us know asap! Thanks.
llvm-svn: 75314
|
|
|
|
|
|
|
| |
Remove ASTContext parameter from DeclContext's methods. This change cascaded down to other Decl's methods and changes to call sites started "escalating".
Timings using pre-tokenized "cocoa.h" showed only a ~1% increase in time run between and after this commit.
llvm-svn: 74506
|
|
|
|
| |
llvm-svn: 73000
|
|
|
|
|
|
| |
change. More to follow.
llvm-svn: 72951
|
|
|
|
|
|
|
|
|
| |
and objects of this class are derived from 'NSProxy'.
Under such conditions, which means that every method possible is
implemented in the class, we should not issue "Method definition not found"
warnings.
llvm-svn: 72267
|
|
|
|
|
|
|
| |
DeclContext rather than in a separate list. This makes PCH
(de-)serialization trivial, so that ivars can be loaded lazily.
llvm-svn: 69857
|
|
|
|
| |
llvm-svn: 69855
|
|
|
|
|
|
|
|
|
|
|
| |
methods, class methods, and property implementations) and instead
place all of these entities into the DeclContext.
This eliminates more linear walks when looking for class or instance
methods and should make PCH (de-)serialization of ObjCDecls trivial
(and lazy).
llvm-svn: 69849
|
|
|
|
|
|
| |
- This is only used by CGObjCRuntime now.
llvm-svn: 69800
|
|
|
|
| |
llvm-svn: 69773
|
|
|
|
| |
llvm-svn: 69772
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
- Superclasses are now always laid out their shadow structure at the
first field.
- Prior to this, the entire class heirarchy was flattened into a
single structure which meant that alignment, padding, and bitfields
weren't packed correctly (the ASTRecordLayout was correct however,
which meant our debug info didn't coincide with ivar offsets, for
example).
- This is still very suboptimal, but I believe the ivar layout itself
is now at least close to correct.
- <rdar://problem/6773388> error: objc[29823]: layout bitmap sliding
backwards
llvm-svn: 69771
|
|
|
|
|
|
|
|
|
| |
@implementation that closes a @class delcaration.
- I don't know how to make a test case for this, but this strengthens
the invariants that hold internally. The functionality change here
is the edit to SemaDeclObjC.cpp.
llvm-svn: 69728
|
|
|
|
|
|
| |
Test will be enabled with ObjCInterfaceDecl is added.
llvm-svn: 69594
|
|
|
|
| |
llvm-svn: 69563
|
|
|
|
|
|
| |
No functionality change (really).
llvm-svn: 68726
|
|
|
|
|
|
| |
objc's continuation class.
llvm-svn: 68339
|
|
|
|
|
|
|
| |
class which was exposed by implementation of
objc2's nonfragile abi code gen.
llvm-svn: 68259
|
|
|
|
|
|
| |
class.
llvm-svn: 68234
|
|
|
|
| |
llvm-svn: 68098
|
|
|
|
| |
llvm-svn: 68077
|
|
|
|
|
|
|
|
|
| |
'XCElementSpacer *', expected 'XCElement *' (not handling protocol signatures correctly?).
- Reworked ASTContext::canAssignObjCInterfaces().
- Added ObjCProtocolDecl::lookupProtocolNamed().
llvm-svn: 65773
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
/// FIXME: Like ObjCImplementationDecl, this should not be a NamedDecl!
/// FIXME: Introduce a new common base class for ObjCImplementationDecl and ObjCCategoryImplDecl
It adds an IndentifierInfo ivar to the ObjCCategoryImplDecl, so it can inherits from Decl and not NamedDecl (I'm not sure about the memory management of this ivar).
And now that both ObjCImplementationDecl and ObjCCategoryImplDecl have the same super classes, it allow creation of a common base class: ObjCImplDecl"
Patch by Jean-Daniel Dupas!
llvm-svn: 65703
|
|
|
|
|
|
|
|
|
|
| |
in inherited protocols.
Also changed ObjCInterfaceDecl::lookupClassMethod() to look through a categories protocols.
Test/patch submitted by Jean-Daniel Dupas (thanks!).
llvm-svn: 65526
|
|
|
|
|
|
|
|
|
|
| |
<rdar://problem/6497631> Message lookup is sometimes different than gcc's).
- Implement instance/class overloading in ObjCContainerDecl (removing a FIXME). This involved hacking NamedDecl::declarationReplaces(), which took awhile to figure out (didn't realize replace was the default).
- Changed Sema::ActOnInstanceMessage() to remove redundant warnings when dealing with protocols. For now, I've omitted the "protocol" term in the diagnostic. It simplifies the code flow and wan't always 100% accurate (e.g. "Foo<Prot>" looks in the class interface, not just the protocol).
- Changed several test cases to jive with the above changes.
llvm-svn: 65292
|
|
|
|
|
|
|
|
|
| |
with new/delete. With disable-free, this reduces the number of 4/8 byte
mallocs from 4793/1541 to 865/456 and also drops other sizes as well.
This is a very small perf win, nothing major.
llvm-svn: 65171
|
|
|
|
|
|
|
|
| |
ObjCList,
but don't start using it yet. Renamed some methods to be more consistent.
llvm-svn: 65168
|
|
|
|
| |
llvm-svn: 65166
|
|
|
|
|
|
| |
before the dtor.
llvm-svn: 65156
|
|
|
|
|
|
| |
and other non-semantic changes.
llvm-svn: 65155
|
|
|
|
| |
llvm-svn: 65151
|
|
|
|
|
|
| |
it from being leaked, among other things.
llvm-svn: 65150
|
|
|
|
| |
llvm-svn: 65132
|
|
|
|
| |
llvm-svn: 65131
|
|
|
|
| |
llvm-svn: 65129
|
|
|
|
| |
llvm-svn: 65127
|
|
|
|
|
|
| |
ObjCList.
llvm-svn: 65114
|
|
|
|
| |
llvm-svn: 65113
|
|
|
|
| |
llvm-svn: 65112
|
|
|
|
| |
llvm-svn: 65111
|
|
|
|
|
|
| |
Pass the DeclContext to ObjCIvarDecls as well.
llvm-svn: 64801
|
|
|
|
|
|
| |
the same.
llvm-svn: 64657
|
|
|
|
| |
llvm-svn: 64650
|
|
|
|
|
|
|
|
| |
calls to the recently added placement new (which uses ASTContext's allocator for memory). Also added ASTContext::Deallocate().
This will simplify runtime replacement of ASTContext's allocator. Keeping the allocator private (and removing getAllocator() entirely) is also goodness.
llvm-svn: 63135
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
that every declaration lives inside a DeclContext.
Moved several things that don't have names but were ScopedDecls (and,
therefore, NamedDecls) to inherit from Decl rather than NamedDecl,
including ObjCImplementationDecl and LinkageSpecDecl. Now, we don't
store empty DeclarationNames for these things, nor do we try to insert
them into DeclContext's lookup structure.
The serialization tests are temporarily disabled. We'll re-enable them
once we've sorted out the remaining ownership/serialiazation issues
between DeclContexts and TranslationUnion, DeclGroups, etc.
llvm-svn: 62562
|
|
|
|
|
|
| |
with @synthesize being illegal.
llvm-svn: 62515
|
|
|
|
|
|
| |
ObjCMethodDecls, and shouldn't be released elsewhere.
llvm-svn: 62113
|