| Commit message (Collapse) | Author | Age | Files | Lines |
... | |
|
|
|
|
|
|
|
|
| |
more to do).
Remove Action::ObjCStartCategoryInterface/ObjCFinishInterface - they are unused.
.
llvm-svn: 42559
|
|
|
|
|
|
| |
and their accessors in a variety of objective-c classes.
llvm-svn: 42555
|
|
|
|
|
|
|
|
| |
Parser).
Add Sema::CheckImplementationIvars() to replace the previous action.
llvm-svn: 42553
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Rename ObjcProtocolDecl::getIsForwardProtoDecl() to isForwardDecl().
Rename ObjcInterfaceDecl::setIsForwardDecl() to setForwardDecl().
Rename ObjcProtocolDecl::setIsForwardProtoDecl() to setForwardDecl().
Two reasons:
#1: boolean predicates should start with "is".
#2: Since these two sets of methods represent the same concept, they should be named the same (polymorphism is good:-)
llvm-svn: 42545
|
|
|
|
|
|
|
|
| |
class/category.
Now, I also warn those class/categories which are incomplete because of this.
llvm-svn: 42544
|
|
|
|
|
|
|
|
| |
- Add ObjcMessageExpr::getSelector(), getClassName().
- Change Sema::getObjCInterfaceDecl() to simply take an IdentifierInfo (no Scope needed).
- Remove FIXME for printing ObjCMessageExpr's.
llvm-svn: 42543
|
|
|
|
|
|
|
| |
Ted may want to take a look at the change I made at
FGRecStmtDeclVisitor.h.
llvm-svn: 42535
|
|
|
|
|
|
|
|
| |
related to
unimplemented methods in category implementation.
llvm-svn: 42531
|
|
|
|
|
|
| |
Update clients and add to project file.
llvm-svn: 42494
|
|
|
|
|
|
|
| |
September 30, 2007 12:36:58 AM PDT and
September 30, 2007 12:50:05 AM PDT
llvm-svn: 42490
|
|
|
|
| |
llvm-svn: 42479
|
|
|
|
| |
llvm-svn: 42477
|
|
|
|
|
|
|
| |
September 28, 2007 4:39:24 PM PDT
Please let me know if I missed anything.
llvm-svn: 42473
|
|
|
|
|
|
|
|
| |
Sema class.
Avoiding passing a Sema object to these utility functions.
llvm-svn: 42472
|
|
|
|
|
|
|
|
| |
mirrors my
previous patch to do the same for class name lookup using a hash table.
llvm-svn: 42471
|
|
|
|
|
|
|
| |
There is still an issue if doing ScopedLookup is an overkill and we can
just access the decl using the identifier.
llvm-svn: 42463
|
|
|
|
|
|
|
|
|
|
|
|
| |
This motivated implementing a devious clattner inspired solution:-)
This approach uses a small value "Selector" class to point to an IdentifierInfo for the 0/1 case. For multi-keyword selectors, we instantiate a MultiKeywordSelector object (previously known as SelectorInfo). Now, the incremental cost for selectors is only 24,800 for Cocoa.h! This saves 156,592 bytes, or 86%!! The size reduction is also the result of getting rid of the AST slot, which was not strictly necessary (we will associate a selector with it's method using another table...most likely in Sema).
This change was critical to make now, before we have too many clients.
I still need to add some comments to the Selector class...will likely add later today/tomorrow.
llvm-svn: 42452
|
|
|
|
|
|
| |
protocols.
llvm-svn: 42436
|
|
|
|
|
|
|
|
| |
with method implementation declarations .
It checks and warns on those methods declared in class interface and not implemented.
llvm-svn: 42412
|
|
|
|
| |
llvm-svn: 42396
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
is SelectorInfo is not string-oriented, it is a unique aggregate of IdentifierInfo's (using a folding set). SelectorInfo also has a richer API that simplifies the parser/action interface. 3 noteworthy benefits:
#1: It is cleaner. I never "liked" storing keyword selectors (i.e. foo:bar:baz) in the IdentifierTable.
#2: It is more space efficient. Since Cocoa keyword selectors can be quite long, this technique is space saving. For Cocoa.h, pulling the keyword selectors out saves ~180k. The cost of the SelectorInfo data is ~100k. Saves ~80k, or 43%.
#3: It results in many API simplifications. Here are some highlights:
- Removed 3 actions (ActOnKeywordMessage, ActOnUnaryMessage, & one flavor of ObjcBuildMethodDeclaration that was specific to unary messages).
- Removed 3 funky structs from DeclSpec.h (ObjcKeywordMessage, ObjcKeywordDecl, and ObjcKeywordInfo).
- Removed 2 ivars and 2 constructors from ObjCMessageExpr (fyi, this space savings has not been measured).
I am happy with the way it turned out (though it took a bit more hacking than I expected). Given the central role of selectors in ObjC, making sure this is "right" will pay dividends later.
Thanks to Chris for talking this through with me and suggesting this approach.
llvm-svn: 42395
|
|
|
|
|
|
|
| |
that they conform(in type, name and numbers) to those declared in @interface.
Test case highlights kind of checking we do here.
llvm-svn: 42360
|
|
|
|
|
|
| |
objective-c code with no @interface declaration.
llvm-svn: 42319
|
|
|
|
|
|
|
|
|
| |
info. It also adds more
semantic checks for class and protocol declarations. Test cases are good indications of kind of
checking being done in this patch.
llvm-svn: 42311
|
|
|
|
|
|
|
|
| |
1. Handles saving and checking on protocols used in an @interface declaration
2. Checks and saves class's super class.
3. Adds semantic check to category declarations.
llvm-svn: 42218
|
|
|
|
|
|
|
|
| |
use of
protocols referenced in @protocol declarations.
llvm-svn: 42191
|
|
|
|
|
|
| |
ObjcInterfaceClass Objects.
llvm-svn: 42172
|
|
|
|
|
|
|
| |
1. Detect used of undeclared/forward declared super class.
2. Detect duplicate definition of a class.
llvm-svn: 42168
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
IdentifierTable.
Rationale:
We currently have a separate table to unique ObjC selectors. Since I don't need all the instance data in IdentifierInfo, I thought this would save space (and make more sense conceptually).
It turns out the cost of having duplicate entries for unary selectors (i.e. names without colons) outweighs the cost difference between the IdentifierInfo & SelectorInfo structures. Here is the data:
Two tables:
*** Selector/Identifier Stats:
# Selectors/Identifiers: 51635
Bytes allocated: 1999824
One table:
*** Identifier Table Stats:
# Identifiers: 49500
Bytes allocated: 1990316
llvm-svn: 42139
|
|
|
|
| |
llvm-svn: 42126
|
|
|
|
| |
llvm-svn: 42117
|
|
|
|
|
|
|
|
|
|
|
| |
- Add ObjcMessageExpr AST node and associated constructors.
- Add SourceLocation's to ActOnKeywordMessage/ActOnUnaryMessage API.
- Instantiate message expressions...
- Replace alloca usage with SmallString.
Next step, installing a correct type, among other tweaks...
llvm-svn: 42116
|
|
|
|
| |
llvm-svn: 42104
|
|
|
|
| |
llvm-svn: 42089
|
|
|
|
| |
llvm-svn: 42088
|
|
|
|
|
|
| |
Moves such argument as the last argument and uses defaul value.
llvm-svn: 42073
|
|
|
|
|
|
| |
instead for @protocol method decls.
llvm-svn: 42070
|
|
|
|
| |
llvm-svn: 42060
|
|
|
|
|
|
|
|
|
|
|
|
| |
ObjcKeywordMessage.
- Removed helper ObjcGetSelectorInfo(), moving the code directly into ObjcBuildMethodDeclaration().
- Many refinements to ParseObjCMessageExpression().
- Add ActOnMessageExpression().
Next step, finish the message actions and (finally) create/instantiate an ObjcMessageExpr AST.
llvm-svn: 42050
|
|
|
|
|
|
|
|
|
|
| |
- Add SelectorInfo/SelectorTable classes, modeled after IdentifierInfo/IdentifierTable.
- Add SelectorTable instance to ASTContext, created lazily through ASTContext::getSelectorInfo().
- Add SelectorInfo slot to ObjcMethodDecl.
- Add helper function to derive a SelectorInfo from ObjcKeywordInfo.
Misc: Got the Decl stats stuff up and running again...it was missing support for ObjC AST's.
llvm-svn: 42023
|
|
|
|
|
|
|
| |
- Allow classnames as the receiver (removing a FIXME from ParseObjCMessageExpression).
- Added a FIXME to ParseObjCMessageExpression()...we need to return a message expr AST node!
llvm-svn: 42001
|
|
|
|
|
|
| |
The previous naming scheme was confusing, since it resulted in both the Parser and Action modules having methods with the same name. In addition, the Action module never does any parsing...
llvm-svn: 41986
|
|
|
|
|
|
|
|
|
|
| |
visibility argument.
Remove Action::ObjcAddVisibilityToIvars(). No need for an extra API when it is trivial to add this info to the previous hook.
In general, I want to start migrating away from having Actions prefixed with "Parse" (which is confusing, since the Action API doesn't do any parsing, per se).
llvm-svn: 41973
|
|
|
|
|
|
|
|
| |
- Adding a safer prologue. The previous prologue would accept a null and therefore assume we had an interface (which was incorrect).
- Fixed FieldDecl's classof method. This allowed me to simplify some unnecessary casting.
- When diagnosing errors, make sure the FieldDecl/EnclosingDecl are marked as invalid. In addition, don't delete the field...rather, add all fields to the enclosing decl. Memory management can/should be done elsewhere. This code was never "upgraded" to the recently added invalid decl strategy.
llvm-svn: 41964
|
|
|
|
| |
llvm-svn: 41961
|
|
|
|
| |
llvm-svn: 41954
|
|
|
|
|
|
|
|
| |
didn't need NextDeclarator. As a result, I'm removing it.
Removing both slots (NextDeclarator/Next) end up reducing the size of fields/ivars by 40%.
llvm-svn: 41948
|
|
|
|
|
|
| |
Decl is now svelte:-)
llvm-svn: 41935
|
|
|
|
|
|
|
|
| |
Move Identifier/Loc instance variables (and associated getters/setters) down from Decl to ScopedDecl/FieldDecl.
Objc AST's can now inherit from Decl without getting instance variables and types that are C specific. For now, I am keeping NextDeclarator, since I believe it may be useful to ObjC. If not, it can be moved later.
llvm-svn: 41934
|
|
|
|
| |
llvm-svn: 41932
|