Skip to content
  1. Feb 26, 2009
    • Steve Naroff's avatar
      Fix http://llvm.org/bugs/show_bug.cgi?id=3544. · b162f170
      Steve Naroff authored
      The code for looking up local/private method in Sema::ActOnInstanceMessage() was not handling categories properly. Sema::ActOnClassMessage() didn't have this bug.
      Created a helper with the correct logic and changed both methods to use it.
      
      llvm-svn: 65532
      b162f170
  2. Feb 24, 2009
  3. Feb 23, 2009
  4. Feb 22, 2009
    • Steve Naroff's avatar
      Minor cleanup, replace bool with qual_empty(). · d2c44d22
      Steve Naroff authored
      llvm-svn: 65293
      d2c44d22
    • Steve Naroff's avatar
      Contains the following (related to problems found while investigting... · c4173fa7
      Steve Naroff authored
      Contains the following (related to problems found while investigting <rdar://problem/6497631> Message lookup is sometimes different than gcc's).
      
      - Implement instance/class overloading in ObjCContainerDecl (removing a FIXME). This involved hacking NamedDecl::declarationReplaces(), which took awhile to figure out (didn't realize replace was the default).
      - Changed Sema::ActOnInstanceMessage() to remove redundant warnings when dealing with protocols. For now, I've omitted the "protocol" term in the diagnostic. It simplifies the code flow and wan't always 100% accurate (e.g. "Foo<Prot>" looks in the class interface, not just the protocol).
      - Changed several test cases to jive with the above changes.
      
      llvm-svn: 65292
      c4173fa7
    • Steve Naroff's avatar
      Remove debugging statement. · 10cbe66f
      Steve Naroff authored
      llvm-svn: 65257
      10cbe66f
  5. Feb 21, 2009
  6. Feb 20, 2009
  7. Feb 18, 2009
  8. Feb 15, 2009
  9. Feb 14, 2009
  10. 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
  11. 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
  12. 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
  13. 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
  14. 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
  15. Jan 29, 2009
  16. Jan 28, 2009
  17. Jan 27, 2009
  18. 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
  19. Jan 16, 2009
  20. Jan 13, 2009
  21. 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
  22. Jan 07, 2009
  23. Dec 16, 2008
  24. Nov 24, 2008
  25. 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
Loading