| Commit message (Collapse) | Author | Age | Files | Lines |
|
|
|
|
|
|
|
|
|
|
| |
This should be faster, and just as correct.
BUG=None
Review URL: https://chromiumcodereview.appspot.com/10565006
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@142998 0039d316-1c4b-4281-b951-d872f2087c98
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
currying, and use less types.
The main API change IgnoreResult() and fully currying. See unittest for what the new API looks like. The rest of the changes are done to support that.
Previously, IgnoreReturn could not be used with WeakPtr<> Bind()s as it was applied after the fact to the Callback object. Now, IgnoreResult() wraps the function like Unretained().
As an incidental benefit, the new implementation gave us fully currying for free.
Also, the new implementation scales better when supporting higher arities of functions. The new type growth is:
(n^2 + 20n) / 2
as opposed to
(3n^2 + 17n) / 2
where n == arity.
For n = 6 and n=10, the new implementation has 81 and 155 templates respectively.
The old implementation had 105 and 235 templates respectively.
BUG=35233,98919,98542
TEST=existing unittests
Review URL: http://codereview.chromium.org/8483003
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@110975 0039d316-1c4b-4281-b951-d872f2087c98
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Required because we abstract the storage of the funciton pointer out using
a reinterpret_cast to reduce template bloat. This effectively readds the
failure that would have happened had we stored the function pointer directly
in the template class.
BUG=86008
TEST=new unittests.
Review URL: http://codereview.chromium.org/7241015
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@90525 0039d316-1c4b-4281-b951-d872f2087c98
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
It turns out that if you nest a template inside the initializer list of another template, the namelookup in windows gets all funky. In this case, it couldn't tell that the found name was a function.
Luckily, we could just move the template parameters one level deeper.
BUG=none
TEST=unittests & trybots.
Review URL: http://codereview.chromium.org/6537001
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@75194 0039d316-1c4b-4281-b951-d872f2087c98
|
|
|
|
|
|
|
|
|
| |
BUG=none
TEST=Clang try-bot passes.
Review URL: http://codereview.chromium.org/6523014
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@74908 0039d316-1c4b-4281-b951-d872f2087c98
|
|
internal callback code.
This callback system allows for creation of functors for normal functions, methods, and const methods. It is a superset of the functionality of NewRunnableMethod, NewRunnableFunction, NewCallback, and CreateFunctor.
We support partial binding of function arguments, and also specification of refcounting semantics by wrapping a target object in a wrapper object.
BUG=35223
TEST=none
Review URL: http://codereview.chromium.org/6109007
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@74904 0039d316-1c4b-4281-b951-d872f2087c98
|