Skip to content
  1. Oct 10, 2007
    • Steve Naroff's avatar
      · c62adb6d
      Steve Naroff authored
      Make sure methods with no return type default to "id".
      
      This fixes a crasher in Sema::MatchTwoMethodDeclarations(), identified by selector-overload.m (just added).
      
      Added Action::ActOnTranslationUnitScope() and renamed Action::PopScope to ActOnPopScope.
      
      Added a Translation Unit Scope instance variable to Sema (will be very useful to ObjC-related actions, since ObjC declarations are always file-scoped).
      
      llvm-svn: 42817
      c62adb6d
  2. Oct 08, 2007
  3. Oct 07, 2007
  4. Oct 04, 2007
  5. Oct 03, 2007
  6. Oct 02, 2007
  7. Oct 01, 2007
  8. Sep 30, 2007
  9. Sep 29, 2007
    • Steve Naroff's avatar
      · 8017506d
      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
      8017506d
  10. Sep 27, 2007
    • Fariborz Jahanian's avatar
      Patch for method implementation. It populates ObjcImplementationDecl object... · f6546b38
      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
      f6546b38
    • Chris Lattner's avatar
      Fix some use of uninit variables issues, reported by Anton. · cc61bf5e
      Chris Lattner authored
      llvm-svn: 42396
      cc61bf5e
    • Steve Naroff's avatar
      · f73590db
      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
      f73590db
    • Chris Lattner's avatar
      objc messages have side effects, return true from hasLocalSideEffect, · e6d9ca54
      Chris Lattner authored
      fixing:
      
      VoidMethod.m:14:5: warning: expression result unused
          [Greeter hello];
          ^~~~~~~~~~~~~~~
      
      llvm-svn: 42380
      e6d9ca54
  11. Sep 26, 2007
  12. Sep 25, 2007
  13. Sep 22, 2007
  14. Sep 21, 2007
  15. Sep 19, 2007
    • Ted Kremenek's avatar
      Added support to clang driver to view ASTs using GraphViz. This · 66d130a5
      Ted Kremenek authored
      functionality is still preliminary.
      
      llvm-svn: 42152
      66d130a5
    • Steve Naroff's avatar
      · 2cd263ff
      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
      2cd263ff
    • Steve Naroff's avatar
      · d54978ba
      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
      d54978ba
  16. Sep 18, 2007
  17. Sep 17, 2007
Loading