Skip to content
  1. Jan 09, 2009
    • Douglas Gregor's avatar
      Replace DeclContext's vector of ScopedDecl pointers with a linked list · 020713e3
      Douglas Gregor authored
      of ScopedDecls (using the new ScopedDecl::NextDeclInScope
      pointer). Performance-wise:
      
        - It's a net win in memory utilization, since DeclContext is now one
          pointer smaller than it used to be (std::vectors are typically 3
          pointers; we now use 2 pointers) and 
        - Parsing Cocoa.h with -fsyntax-only (with a Release-Asserts Clang)
          is about 1.9% faster than before, most likely because we no longer
          have the memory allocations and copying associated with the
          std::vector.
      
      I'll re-enable serialization of DeclContexts once I've sorted out the
      NextDeclarator/NextDeclInScope question.
      
      llvm-svn: 62001
      020713e3
    • Douglas Gregor's avatar
      Provide a new kind of iterator, the specific_decl_iterator, that · ffca3a21
      Douglas Gregor authored
      filters the decls seen by decl_iterator with two criteria: the dynamic
      type of the declaration and a run-time predicate described by a member
      function. This simplifies EnumDecl, RecordDecl, and ObjCContainerDecl
      considerably. It has no measurable performance impact.
      
      llvm-svn: 61994
      ffca3a21
    • Steve Naroff's avatar
      Move property API's up to ObjCContainerDecl (removing a lot of duplicate code). · b3a87982
      Steve Naroff authored
      Add isa/cast/dyncast support for ObjCContainerDecl.
      Renamed classprop_iterator/begin/end to prop_iterator/begin/end (the class prefix was confusing).
      More simplifications to Sema::ActOnAtEnd()...
      Added/changed some FIXME's as a result of the above work.
      
      llvm-svn: 61988
      b3a87982
    • Douglas Gregor's avatar
      Addressed the issue in <rdar://problem/6479085>, where we failed to · c25d7a7f
      Douglas Gregor authored
      rewrite @class declarations that showed up within linkage
      specifications because those @class declarations never made it any
      place where the rewriter could find them.
      
      Moved all of the ObjC*Decl nodes over to ScopedDecls, so that they can
      live in the appropriate top-level or transparent DeclContext near the
      top level, e.g., TranslationUnitDecl or LinkageSpecDecl. Objective-C
      declarations now show up in a traversal of the declarations in a
      DeclContext (they didn't before!). This way, the rewriter finds all
      Objective-C declarations within linkage specifications.
      
      llvm-svn: 61966
      c25d7a7f
    • Fariborz Jahanian's avatar
      Adding support for ObjC methods which have c-style · e84858cc
      Fariborz Jahanian authored
      parameter list. This is work in progress.
      
      llvm-svn: 61964
      e84858cc
  2. Jan 08, 2009
    • Steve Naroff's avatar
      Move FIXME to a better location. · 6c879a14
      Steve Naroff authored
      llvm-svn: 61937
      6c879a14
    • Steve Naroff's avatar
      Removed ObjCContainerDecl::getPropertyMethods()...doesn't belong in the AST. · e538c5f3
      Steve Naroff authored
      Moved logic to Sema::ProcessPropertyDecl().
      
      llvm-svn: 61936
      e538c5f3
    • Steve Naroff's avatar
      This is a large/messy diff that unifies the ObjC AST's with DeclContext. · 35c62ae6
      Steve Naroff authored
      - ObjCContainerDecl's (ObjCInterfaceDecl/ObjCCategoryDecl/ObjCProtocolDecl), ObjCCategoryImpl, & ObjCImplementation are all DeclContexts.
      - ObjCMethodDecl is now a ScopedDecl (so it can play nicely with DeclContext).
      - ObjCContainerDecl now does iteration/lookup using DeclContext infrastructure (no more linear search:-)
      - Removed ASTContext argument to DeclContext::lookup(). It wasn't being used and complicated it's use from an ObjC AST perspective.
      - Added Sema::ProcessPropertyDecl() and removed Sema::diagnosePropertySetterGetterMismatch().
      - Simplified Sema::ActOnAtEnd() considerably. Still more work to do.
      - Fixed an incorrect casting assumption in Sema::getCurFunctionOrMethodDecl(), now that ObjCMethodDecl is a ScopedDecl.
      - Removed addPropertyMethods from ObjCInterfaceDecl/ObjCCategoryDecl/ObjCProtocolDecl.
      
      This passes all the tests on my machine. Since many of the changes are central to the way ObjC finds it's methods, I expect some fallout (and there are still a handful of FIXME's). Nevertheless, this should be a step in the right direction.
      
      llvm-svn: 61929
      35c62ae6
    • Fariborz Jahanian's avatar
      Objc's compatibility-alias semantics and code · 17290c36
      Fariborz Jahanian authored
      gen issue fix.
      
      llvm-svn: 61901
      17290c36
  3. Jan 07, 2009
  4. Dec 29, 2008
  5. Dec 22, 2008
  6. Dec 21, 2008
  7. Dec 17, 2008
  8. Dec 16, 2008
  9. Dec 15, 2008
  10. Dec 13, 2008
  11. Dec 11, 2008
    • Douglas Gregor's avatar
      Unifies the name-lookup mechanisms used in various parts of the AST · 91f84216
      Douglas Gregor authored
      and separates lexical name lookup from qualified name lookup. In
      particular:
        * Make DeclContext the central data structure for storing and
          looking up declarations within existing declarations, e.g., members
          of structs/unions/classes, enumerators in C++0x enums, members of
          C++ namespaces, and (later) members of Objective-C
          interfaces/implementations. DeclContext uses a lazily-constructed
          data structure optimized for fast lookup (array for small contexts,
          hash table for larger contexts). 
      
        * Implement C++ qualified name lookup in terms of lookup into
          DeclContext.
      
        * Implement C++ unqualified name lookup in terms of
          qualified+unqualified name lookup (since unqualified lookup is not
          purely lexical in C++!)
      
        * Limit the use of the chains of declarations stored in
          IdentifierInfo to those names declared lexically.
      
        * Eliminate CXXFieldDecl, collapsing its behavior into
          FieldDecl. (FieldDecl is now a ScopedDecl).
      
        * Make RecordDecl into a DeclContext and eliminates its
          Members/NumMembers fields (since one can just iterate through the
          DeclContext to get the fields).
      
      llvm-svn: 60878
      91f84216
  12. Dec 09, 2008
  13. Dec 08, 2008
  14. Dec 07, 2008
  15. Dec 06, 2008
  16. Dec 05, 2008
  17. Dec 04, 2008
  18. Dec 02, 2008
  19. Nov 26, 2008
Loading