Skip to content
  1. Feb 18, 2009
  2. Feb 15, 2009
  3. Feb 14, 2009
  4. Feb 12, 2009
    • Steve Naroff's avatar
      Several cleanups: · b7605153
      Steve Naroff authored
      - rename isObjCIdType/isObjCClassType -> isObjCIdStructType/isObjCClassStructType. The previous name didn't do what you would expect.
      - add back isObjCIdType/isObjCClassType to do what you would expect. Not currently used, however many of the isObjCIdStructType/isObjCClassStructType clients could be converted over time.
      - move static Sema function areComparableObjCInterfaces to ASTContext (renamed to areComparableObjCPointerTypes, since it now operates on pointer types).
      
      llvm-svn: 64385
      b7605153
  5. Feb 07, 2009
    • Ted Kremenek's avatar
      Overhaul of Stmt allocation: · 5a201951
      Ted Kremenek authored
      - Made allocation of Stmt objects using vanilla new/delete a *compiler
        error* by making this new/delete "protected" within class Stmt.
      - Now the only way to allocate Stmt objects is by using the new
        operator that takes ASTContext& as an argument.  This ensures that
        all Stmt nodes are allocated from the same (pool) allocator.
      - Naturally, these two changes required that *all* creation sites for
        AST nodes use new (ASTContext&).  This is a large patch, but the
        majority of the changes are just this mechanical adjustment.
      - The above changes also mean that AST nodes can no longer be
        deallocated using 'delete'.  Instead, one most do
        StmtObject->Destroy(ASTContext&) or do
        ASTContextObject.Deallocate(StmtObject) (the latter not running the
        'Destroy' method).
      
      Along the way I also...
      - Made CompoundStmt allocate its array of Stmt* using the allocator in
        ASTContext (previously it used std::vector).  There are a whole
        bunch of other Stmt classes that need to be similarly changed to
        ensure that all memory allocated for ASTs comes from the allocator
        in ASTContext.
      - Added a new smart pointer ExprOwningPtr to Sema.h.  This replaces
        the uses of llvm::OwningPtr within Sema, as llvm::OwningPtr used
        'delete' to free memory instead of a Stmt's 'Destroy' method.
      
      Big thanks to Doug Gregor for helping with the acrobatics of making
      'new/delete' private and the new smart pointer ExprOwningPtr!
      
      llvm-svn: 63997
      5a201951
  6. Feb 06, 2009
    • Ted Kremenek's avatar
      Move StringLiteral to allocate its internal string data using the allocator in · 6b7ecf68
      Ted Kremenek authored
      ASTContext. This required changing all clients to pass in the ASTContext& to the
      constructor of StringLiteral. I also changed all allocations of StringLiteral to
      use new(ASTContext&).
      
      Along the way, I updated a bunch of new()'s in StmtSerialization.cpp to use the
      allocator from ASTContext& (not complete).
      
      llvm-svn: 63958
      6b7ecf68
  7. Feb 04, 2009
    • Douglas Gregor's avatar
      Some name-lookup-related fixes, from Piotr Rak! · 2ada0489
      Douglas Gregor authored
      - Changes Lookup*Name functions to return NamedDecls, instead of
      Decls. Unfortunately my recent statement that it will simplify lot of
      code, was not quite right, but it simplifies some...
      - Makes MergeLookupResult SmallPtrSet instead of vector, following
      Douglas suggestions.
      - Adds %qN format for printing qualified names to Diagnostic.
      - Avoids searching for using-directives in Scopes, which are not
      DeclScope, during unqualified name lookup.
      
      llvm-svn: 63739
      2ada0489
  8. Jan 30, 2009
    • Douglas Gregor's avatar
      Eliminated LookupCriteria, whose creation was causing a bottleneck for · ed8f2887
      Douglas Gregor authored
      LookupName et al. Instead, use an enum and a bool to describe its
      contents.
      
      Optimized the C/Objective-C path through LookupName, eliminating any
      unnecessarily C++isms. Simplify IdentifierResolver::iterator, removing
      some code and arguments that are no longer used.
      
      Eliminated LookupDeclInScope/LookupDeclInContext, moving all callers
      over to LookupName, LookupQualifiedName, or LookupParsedName, as
      appropriate.
      
      All together, I'm seeing a 0.2% speedup on Cocoa.h with PTH and
      -disable-free. Plus, we're down to three name-lookup routines.
      
      llvm-svn: 63354
      ed8f2887
  9. Jan 29, 2009
  10. Jan 28, 2009
  11. Jan 27, 2009
  12. Jan 26, 2009
    • Douglas Gregor's avatar
      Some micro-optimizations for DISABLE_SMART_POINTERS: · f829825d
      Douglas Gregor authored
        - When it's safe, ActionResult uses the low bit of the pointer for
        the "invalid" flag rather than a separate "bool" value. This keeps
        GCC from generating some truly awful code, for a > 3x speedup in the
        result-passing microbenchmark.
        - When DISABLE_SMART_POINTERS is defined, store an ActionResult
        within ASTOwningResult rather than an ASTOwningPtr. Brings the
        performance benefits of the above to smart pointers with
        DISABLE_SMART_POINTERS defined.
      
      Sadly, these micro-benchmark performance improvements don't seem to
      make much of a difference on Cocoa.h right now. However, they're
      harmless and might help with future optimizations.
      
      llvm-svn: 63061
      f829825d
  13. Jan 16, 2009
  14. Jan 13, 2009
  15. Jan 09, 2009
    • 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
  16. Jan 07, 2009
  17. Dec 16, 2008
  18. Nov 24, 2008
  19. Nov 23, 2008
    • Chris Lattner's avatar
      Convert IdentifierInfo's to be printed the same as DeclarationNames · e3d20d95
      Chris Lattner authored
      with implicit quotes around them.  This has a bunch of follow-on 
      effects and requires tweaking to a whole lot of code.  This causes
      a regression in two tests (xfailed) by causing it to emit things like:
      
        Line 10: duplicate interface declaration for category 'MyClass1' ('Category1')
      
      instead of:
      
        Line 10: duplicate interface declaration for category 'MyClass1(Category1)'
      
      I will fix this in a follow-up commit.
      
      As part of this, I had to start switching stuff to use ->getDeclName() instead
      of Decl::getName() for consistency.  This is good, but I was planning to do this
      as an independent patch.  There will be several follow-on patches
      to clean up some of the mess, but this patch is already too big.
      
      llvm-svn: 59917
      e3d20d95
  20. Nov 21, 2008
  21. Nov 20, 2008
  22. Nov 19, 2008
  23. Nov 17, 2008
  24. Nov 04, 2008
  25. Sep 30, 2008
  26. Sep 29, 2008
  27. Sep 28, 2008
Loading