- Oct 07, 2007
-
-
Chris Lattner authored
llvm-svn: 42730
-
Chris Lattner authored
NamedDecl is a Decl that has an IdentifierInfo (for example, ScopedDecl), but not ObjcMethodDecl. Simplify some code in ActOnAddMethodsToObjcDecl, by doing the cast from DeclTy to Decl at the start of the method. llvm-svn: 42710
-
- Oct 04, 2007
-
-
Fariborz Jahanian authored
llvm-svn: 42608
-
Fariborz Jahanian authored
llvm-svn: 42601
-
- Oct 03, 2007
-
-
Fariborz Jahanian authored
and their accessors in a variety of objective-c classes. llvm-svn: 42555
-
- Oct 02, 2007
-
-
Steve Naroff authored
- Add ObjcInterfaceDecl::lookupInstanceMethod(), lookupClassMethod(). - Add ObjcMessageExpr::getSelector(), getClassName(). - Change Sema::getObjCInterfaceDecl() to simply take an IdentifierInfo (no Scope needed). - Remove FIXME for printing ObjCMessageExpr's. llvm-svn: 42543
-
Fariborz Jahanian authored
unimplemented methods in category implementation. llvm-svn: 42531
-
- Oct 01, 2007
-
-
Ted Kremenek authored
tracked BlkExpr information now maintained by the CFG class. llvm-svn: 42498
-
Ted Kremenek authored
expressions to IDs. This is used by various dataflow analyses, but is also useful for anyone querying a CFG to determine where an expression is evaluated. llvm-svn: 42495
-
Steve Naroff authored
Move ObjC decls to DeclObjC.h, a new AST header. Update clients and add to project file. llvm-svn: 42494
-
Fariborz Jahanian authored
September 30, 2007 12:36:58 AM PDT and September 30, 2007 12:50:05 AM PDT llvm-svn: 42490
-
Ted Kremenek authored
as a member function. This function is no longer needed within the CFG class, and logically belongs to the Stmt class as a predicate for a Stmt instance. llvm-svn: 42489
-
- Sep 30, 2007
-
-
Fariborz Jahanian authored
llvm-svn: 42485
-
- Sep 29, 2007
-
-
Steve Naroff authored
Yesterday I discovered that 78% of all selectors in "Cocoa.h" take 0/1 argument. 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
-
- Sep 27, 2007
-
-
Fariborz Jahanian authored
Patch for method implementation. It populates ObjcImplementationDecl object with method implementation declarations . It checks and warns on those methods declared in class interface and not implemented. llvm-svn: 42412
-
Chris Lattner authored
llvm-svn: 42396
-
Steve Naroff authored
Add SelectorInfo (similar in spirit to IdentifierInfo). The key difference 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
-
Chris Lattner authored
fixing: VoidMethod.m:14:5: warning: expression result unused [Greeter hello]; ^~~~~~~~~~~~~~~ llvm-svn: 42380
-
- Sep 26, 2007
-
-
Ted Kremenek authored
BUG 1) CFG failed to build for empty functions, or functions containing only NullStmts or empty compound statements. We now handle such cases, although now we cannot test for CFG construction failure by asserting that the last block constructed is not NULL (since it now may be). BUG 2) CFG construction segfaulted on some cases when walking the AST and not taking into account that some children of a statement may be NULL. llvm-svn: 42370
-
Fariborz Jahanian authored
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
-
Chris Lattner authored
llvm-svn: 42334
-
- Sep 25, 2007
-
-
Fariborz Jahanian authored
semantic checks for class and protocol declarations. Test cases are good indications of kind of checking being done in this patch. llvm-svn: 42311
-
Chris Lattner authored
llvm-svn: 42291
-
- Sep 22, 2007
-
-
Chris Lattner authored
integer constant expressions. The only questionable thing is that we now reject: void foo() { switch (1) { case (int)1.0e10000: ; } } with: t.c:5:13: error: case label does not reduce to an integer constant case (int)1.0e10000: ~~~~~^~~~~~~~~ GCC accepts this, emitting the pedwarn: t.c:5: warning: floating constant exceeds range of 'double' llvm-svn: 42238
-
Chris Lattner authored
APFloat straight through to LLVM now. llvm-svn: 42236
-
Chris Lattner authored
for *which* apfloat to use for a particular type. llvm-svn: 42234
-
- Sep 21, 2007
-
-
Fariborz Jahanian authored
protocols referenced in @protocol declarations. llvm-svn: 42191
-
- Sep 19, 2007
-
-
Ted Kremenek authored
functionality is still preliminary. llvm-svn: 42152
-
Steve Naroff authored
Remove SelectorTable/SelectorInfo, simply store all selectors in the central 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
-
Steve Naroff authored
Progress on message expressions... - 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
-
- Sep 18, 2007
-
-
Fariborz Jahanian authored
llvm-svn: 42104
-
Fariborz Jahanian authored
instead for @protocol method decls. llvm-svn: 42070
-
- Sep 17, 2007
-
-
Fariborz Jahanian authored
llvm-svn: 42060
-
Ted Kremenek authored
to serve as the entry block. An empty entry block (just as with an empty exit block, which we already have) simplifies building analyses on top of CFGs with very little extra overhead. llvm-svn: 42031
-
Steve Naroff authored
llvm-svn: 42025
-
Steve Naroff authored
Add support for ObjC keyword selectors. - 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
-
Hartmut Kaiser authored
llvm-svn: 42022
-
Chris Lattner authored
llvm-svn: 42020
-
- Sep 16, 2007
-
-
Hartmut Kaiser authored
Updated VC++ project files. llvm-svn: 42015
-
Chris Lattner authored
llvm-svn: 42010
-