diff options
author | rsesek@chromium.org <rsesek@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2012-05-16 15:23:30 +0000 |
---|---|---|
committer | rsesek@chromium.org <rsesek@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2012-05-16 15:23:30 +0000 |
commit | 6e680cfca66d0461f2824ccb5128e4f9cbb20bb6 (patch) | |
tree | 8810c22ec7ab357f5cc15cc508565d2a9872dcf5 /base/base_export.h | |
parent | 97570b99a4341b1d1d6512f5d82b43c3123eb927 (diff) | |
download | chromium_src-6e680cfca66d0461f2824ccb5128e4f9cbb20bb6.zip chromium_src-6e680cfca66d0461f2824ccb5128e4f9cbb20bb6.tar.gz chromium_src-6e680cfca66d0461f2824ccb5128e4f9cbb20bb6.tar.bz2 |
Rewrite base::JSONReader to be 35-40% faster, depending on the input string.
This change does the following:
* Parses the input string and generates the object representation in O(n) time.
* Optimizes string decoding by using StringPiece where possible, which also
introduces the JSON_DETACHABLE_CHILDREN parser option.
* Makes JSONReader a simpler interface by hiding the parser details in an
internal JSONParser class.
BUG=49212,111581,121469
TEST=Hopefully covered by all test suites. New tests added for edge cases.
Review URL: https://chromiumcodereview.appspot.com/10035042
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@137430 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'base/base_export.h')
-rw-r--r-- | base/base_export.h | 9 |
1 files changed, 7 insertions, 2 deletions
diff --git a/base/base_export.h b/base/base_export.h index 239360e..37bbc60 100644 --- a/base/base_export.h +++ b/base/base_export.h @@ -1,4 +1,4 @@ -// Copyright (c) 2011 The Chromium Authors. All rights reserved. +// Copyright (c) 2012 The Chromium Authors. All rights reserved. // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. @@ -11,20 +11,25 @@ #if defined(BASE_IMPLEMENTATION) #define BASE_EXPORT __declspec(dllexport) +#define BASE_EXPORT_PRIVATE __declspec(dllexport) #else #define BASE_EXPORT __declspec(dllimport) +#define BASE_EXPORT_PRIVATE __declspec(dllimport) #endif // defined(BASE_IMPLEMENTATION) #else // defined(WIN32) #if defined(BASE_IMPLEMENTATION) #define BASE_EXPORT __attribute__((visibility("default"))) +#define BASE_EXPORT_PRIVATE __attribute__((visibility("default"))) #else #define BASE_EXPORT -#endif +#define BASE_EXPORT_PRIVATE +#endif // defined(BASE_IMPLEMENTATION) #endif #else // defined(COMPONENT_BUILD) #define BASE_EXPORT +#define BASE_EXPORT_PRIVATE #endif #endif // BASE_BASE_EXPORT_H_ |