| Commit message (Collapse) | Author | Age | Files | Lines |
| |
|
|
|
|
|
| |
No performance regression in my basic test.
Also fixed a type error in ActOnFinishSwitchStmt's arguments (body is a stmt).
llvm-svn: 62032
|
| |
|
|
| |
llvm-svn: 62031
|
| |
|
|
|
|
|
|
| |
not merging protocol properties into the classes which
use those protocols. With this patch, all my exceutable
test pass again.
llvm-svn: 62030
|
| |
|
|
|
|
| |
prohibition of 'readonly' properties in an assignment.
llvm-svn: 62028
|
| |
|
|
|
|
| |
rdar://problem/6486133
llvm-svn: 62018
|
| |
|
|
|
|
| |
coming from a protocol.
llvm-svn: 62017
|
| |
|
|
| |
llvm-svn: 62016
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
that is neither a definition nor a forward declaration and where X has
not yet been declared as a tag, introduce a declaration
into the appropriate scope (which is likely *not* to be the current
scope). The rules for the placement of the declaration differ slightly
in C and C++, so we implement both and test the various corner
cases. This implementation isn't 100% correct due to some lingering
issues with the function prototype scope (for a function parameter
list) not being the same scope as the scope of the function
definition. Testcase is FIXME'd; this probably isn't an important issue.
Addresses <rdar://problem/6484805>.
llvm-svn: 62014
|
| |
|
|
| |
llvm-svn: 62012
|
| |
|
|
|
|
| |
escape hatch for 'unused variable' warnings).
llvm-svn: 62010
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
| |
- Refactor caching logic into a helper class PTHSpellingSearch
- Allow "random accesses" in the spelling cache, thus catching the remaining
cases where 'getSpelling' wasn't hitting the PTH cache
For -Eonly, PTH, Cocoa.h:
- This reduces wall time by 3% (user time unchanged, sys time reduced)
- This reduces the amount of paged source by 1112K.
The remaining 1112K still being paged in is from somewhere else
(investigating).
llvm-svn: 62009
|
| |
|
|
| |
llvm-svn: 62008
|
| |
|
|
|
|
| |
in designated protocols lazily.
llvm-svn: 62007
|
| |
|
|
| |
llvm-svn: 62004
|
| |
|
|
| |
llvm-svn: 62003
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
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
|
| |
|
|
|
|
| |
their lexical context
llvm-svn: 61998
|
| |
|
|
|
|
|
|
|
| |
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
|
| |
|
|
| |
llvm-svn: 61993
|
| |
|
|
|
|
| |
crashes.
llvm-svn: 61992
|
| |
|
|
|
|
|
|
|
| |
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
|
| |
|
|
| |
llvm-svn: 61975
|
| |
|
|
|
|
| |
matches llvm-gcc (?).
llvm-svn: 61974
|
| |
|
|
| |
llvm-svn: 61973
|
| |
|
|
|
|
|
| |
categories.
- Also, simplify nesting via early return.
llvm-svn: 61968
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
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
|
| |
|
|
|
|
| |
parameter list. This is work in progress.
llvm-svn: 61964
|
| |
|
|
| |
llvm-svn: 61961
|
| |
|
|
| |
llvm-svn: 61954
|
| |
|
|
|
|
| |
accesses well. Added a FIXME so we know to revisit this later
llvm-svn: 61951
|
| |
|
|
|
|
| |
destroy all contained ObjCMethodDecls in one sweep. This fixes a use-after-free error found by valgrind.
llvm-svn: 61943
|
| |
|
|
|
|
| |
pointing this out
llvm-svn: 61942
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
introduce a Scope for the body of a tag. This reduces the number of
semantic differences between C and C++ structs and unions, and will
help with other features (e.g., anonymous unions) in C. Some important
points:
- Fields are now in the "member" namespace (IDNS_Member), to keep
them separate from tags and ordinary names in C. See the new test
in Sema/member-reference.c for an example of why this matters. In
C++, ordinary and member name lookup will find members in both the
ordinary and member namespace, so the difference between
IDNS_Member and IDNS_Ordinary is erased by Sema::LookupDecl (but
only in C++!).
- We always introduce a Scope and push a DeclContext when we're
defining a tag, in both C and C++. Previously, we had different
actions and different Scope/CurContext behavior for enums, C
structs/unions, and C++ structs/unions/classes. Now, it's one pair
of actions. (Yay!)
There's still some fuzziness in the handling of struct/union/enum
definitions within other struct/union/enum definitions in C. We'll
need to do some more cleanup to eliminate some reliance on CurContext
before we can solve this issue for real. What we want is for something
like this:
struct X {
struct T { int x; } t;
};
to introduce T into translation unit scope (placing it at the
appropriate point in the IdentifierResolver chain, too), but it should
still have struct X as its lexical declaration
context. PushOnScopeChains isn't smart enough to do that yet, though,
so there's a FIXME test in nested-redef.c
llvm-svn: 61940
|
| |
|
|
| |
llvm-svn: 61937
|
| |
|
|
|
|
| |
Moved logic to Sema::ProcessPropertyDecl().
llvm-svn: 61936
|
| |
|
|
|
|
|
|
| |
Convert clients to use the standard getDeclContext() API.
Doug, thanks for the review!
llvm-svn: 61935
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
- 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
|
| |
|
|
| |
llvm-svn: 61924
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
performance gain. Here's what we see for -Eonly on Cocoa.h (using PTH):
- wall time decreases by 21% (26% speedup overall)
- system time decreases by 35%
- user time decreases by 6%
These reductions are due to not paging source files just to get spellings for
literals. The solution in place doesn't appear to be 100% yet, as we still see
some of the pages for source files getting mapped in. Using -print-stats, we see
that SourceManager maps in 7179K less bytes of source text (reduction of 75%).
Will investigate why the remaining 25% are getting paged in.
With these changes, here's how PTH compares to non-PTH on Cocoa.h:
-Eonly: PTH takes 64% of the time as non-PTH (54% speedup)
-fsyntax-only: PTH takes 89% of the time as non-PTH (11% speedup)
llvm-svn: 61913
|
| |
|
|
|
|
|
|
|
|
| |
- Added stub PTHLexer::getSpelling() that will be used for fetching cached
spellings from the PTH file. This doesn't do anything yet.
- Added a hook in Preprocessor::getSpelling() to call PTHLexer::getSpelling()
when using a PTHLexer.
- Updated PTHLexer to read the offsets of spelling tables in the PTH file.
llvm-svn: 61911
|
| |
|
|
|
|
| |
gen issue fix.
llvm-svn: 61901
|
| |
|
|
|
|
| |
StoreManager::GetRegionSVal.
llvm-svn: 61894
|
| |
|
|
|
|
| |
functionality change.
llvm-svn: 61888
|
| |
|
|
| |
llvm-svn: 61886
|
| |
|
|
|
|
| |
member references, e.g., for anonymous struct/unions or implicit 'this' in member functions
llvm-svn: 61885
|
| |
|
|
|
|
| |
of category implementation is undeclared. Issue error instead.
llvm-svn: 61882
|
| |
|
|
|
|
|
| |
method on 'super' receiver in a category implementation.
Other simpler cases were working by accident.
llvm-svn: 61880
|
| |
|
|
|
|
|
|
|
| |
Duplicate-member checking within classes is still a little messy, and
anonymous unions are still completely broken in C. We'll need to unify
the handling of fields in C and C++ to make this code applicable in
both languages.
llvm-svn: 61878
|
| |
|
|
|
|
| |
Add ObjCContainerDecl class and have ObjCInterfaceDecl/ObjCCategoryDecl/ObjCProtocolDecl inherit from it.
llvm-svn: 61866
|
| |
|
|
|
|
| |
through transparent contexts
llvm-svn: 61861
|