diff options
author | erg@chromium.org <erg@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2010-07-15 21:03:54 +0000 |
---|---|---|
committer | erg@chromium.org <erg@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2010-07-15 21:03:54 +0000 |
commit | 3a3d4747769aec2954a2ca21de4812c5892994aa (patch) | |
tree | db112f2c73cc39e9d6088059eae1fc9d35b74920 /base/values.h | |
parent | 2235b22b88260fde392b753b5d7bb7904e5efbc6 (diff) | |
download | chromium_src-3a3d4747769aec2954a2ca21de4812c5892994aa.zip chromium_src-3a3d4747769aec2954a2ca21de4812c5892994aa.tar.gz chromium_src-3a3d4747769aec2954a2ca21de4812c5892994aa.tar.bz2 |
Move implementation from header to source.
This is an effort to speed up compile and link time, and also minimizing the
size of the intermediary .o files on disk. For example, just moving the
constructor/destructor from the classes in chrome/browser/pref_member.{cc,h}
netted a 368k drop in total .o file size. In aggregate, this shrinks
libbrowser.a by 10 megabytes, and a few odd megabytes on most other chrome .a files.
A lot of this was done before I started harvesting what the most included
symbols were across all of chrome's code. Most of them are in webkit, but
there's plenty in base/ that are used everywhere to keep me busy for several
patches to come.
BUG=none
TEST=none
Review URL: http://codereview.chromium.org/3012001
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@52528 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'base/values.h')
-rw-r--r-- | base/values.h | 17 |
1 files changed, 7 insertions, 10 deletions
diff --git a/base/values.h b/base/values.h index 5c0ea33..ea8a3ca 100644 --- a/base/values.h +++ b/base/values.h @@ -104,7 +104,7 @@ class Value { protected: // This isn't safe for end-users (they should use the Create*Value() // static methods above), but it's useful for subclasses. - explicit Value(ValueType type) : type_(type) {} + explicit Value(ValueType type); private: Value(); @@ -117,12 +117,9 @@ class Value { // FundamentalValue represents the simple fundamental types of values. class FundamentalValue : public Value { public: - explicit FundamentalValue(bool in_value) - : Value(TYPE_BOOLEAN), boolean_value_(in_value) {} - explicit FundamentalValue(int in_value) - : Value(TYPE_INTEGER), integer_value_(in_value) {} - explicit FundamentalValue(double in_value) - : Value(TYPE_REAL), real_value_(in_value) {} + explicit FundamentalValue(bool in_value); + explicit FundamentalValue(int in_value); + explicit FundamentalValue(double in_value); ~FundamentalValue(); // Subclassed methods @@ -206,7 +203,7 @@ class BinaryValue: public Value { class DictionaryValue : public Value { public: - DictionaryValue() : Value(TYPE_DICTIONARY) {} + DictionaryValue(); ~DictionaryValue(); // Subclassed methods @@ -352,7 +349,7 @@ class DictionaryValue : public Value { // This type of Value represents a list of other Value values. class ListValue : public Value { public: - ListValue() : Value(TYPE_LIST) {} + ListValue(); ~ListValue(); // Subclassed methods @@ -435,7 +432,7 @@ class ListValue : public Value { // deserialize Value objects. class ValueSerializer { public: - virtual ~ValueSerializer() {} + virtual ~ValueSerializer(); virtual bool Serialize(const Value& root) = 0; |