Changeset 52275 in webkit


Ignore:
Timestamp:
Dec 17, 2009 12:00:50 PM (14 years ago)
Author:
Adam Roben
Message:

Don't include all JSC headers everywhere

https://bugs.webkit.org/show_bug.cgi?id=32663

Patch by Benjamin Otte <otte@gnome.org> on 2009-12-17
Reviewed by Adam Roben.

WebCore:

PlatformString.h included almost all of JSC via runtime/Identifier.h.
This patch gets rid of this include by forward-declaring the required
classes instead.
This reduces the build size of the object files on a Gtk debug build
by 10%. The resulting libwebkit.so gets 5% smaller.

No new tests as it's just a build improvement.

  • platform/gtk/LocalizedStringsGtk.cpp:

include math.h here (it used to be pulled by JSC)

  • platform/text/PlatformString.h:
  • platform/text/String.cpp:

WebKit/win:

  • WebCoreLocalizedStrings.cpp: Added now-needed #include of

MathExtras.h.

Location:
trunk
Files:
6 edited

Legend:

Unmodified
Added
Removed
  • trunk/WebCore/ChangeLog

    r52274 r52275  
     12009-12-17  Benjamin Otte  <otte@gnome.org>
     2
     3        Reviewed by Adam Roben.
     4
     5        Don't include all JSC headers everywhere
     6        https://bugs.webkit.org/show_bug.cgi?id=32663
     7
     8        PlatformString.h included almost all of JSC via runtime/Identifier.h.
     9        This patch gets rid of this include by forward-declaring the required
     10        classes instead.
     11        This reduces the build size of the object files on a Gtk debug build
     12        by 10%. The resulting libwebkit.so gets 5% smaller.
     13
     14        No new tests as it's just a build improvement.
     15
     16        * platform/gtk/LocalizedStringsGtk.cpp:
     17        include math.h here (it used to be pulled by JSC)
     18        * platform/text/PlatformString.h:
     19        * platform/text/String.cpp:
     20
    1212009-12-17  Evan Martin  <evan@chromium.org>
    222
  • trunk/WebCore/platform/gtk/LocalizedStringsGtk.cpp

    r51200 r52275  
    3939#include <glib/gi18n-lib.h>
    4040#include <gtk/gtk.h>
     41#include <math.h>
    4142
    4243namespace WebCore {
  • trunk/WebCore/platform/text/PlatformString.h

    r50763 r52275  
    3232#endif
    3333
    34 #if USE(JSC)
    35 #include <runtime/Identifier.h>
    36 #else
    37 // runtime/Identifier.h brings in a variety of wtf headers.  We explicitly
    38 // include them in the case of non-JSC builds to keep things consistent.
    3934#include <wtf/HashMap.h>
    4035#include <wtf/HashSet.h>
    4136#include <wtf/OwnPtr.h>
    42 #endif
    4337
    4438#if PLATFORM(CF)
     
    5953#if PLATFORM(HAIKU)
    6054class BString;
     55#endif
     56
     57#if USE(JSC)
     58namespace JSC {
     59class Identifier;
     60class UString;
     61}
    6162#endif
    6263
  • trunk/WebCore/platform/text/String.cpp

    r51705 r52275  
    3838
    3939#if USE(JSC)
     40#include <runtime/Identifier.h>
     41
    4042using JSC::Identifier;
    4143using JSC::UString;
  • trunk/WebKit/win/ChangeLog

    r52263 r52275  
     12009-12-17  Benjamin Otte  <otte@gnome.org>
     2
     3        Reviewed by Adam Roben.
     4
     5        Don't include all JSC headers everywhere
     6        https://bugs.webkit.org/show_bug.cgi?id=32663
     7
     8        * WebCoreLocalizedStrings.cpp: Added now-needed #include of
     9        MathExtras.h.
     10
    1112009-12-17  Adam Roben  <aroben@apple.com>
    212
  • trunk/WebKit/win/WebCoreLocalizedStrings.cpp

    r51191 r52275  
    2929#include <WebCore/LocalizedStrings.h>
    3030#include <WebCore/PlatformString.h>
     31#include <wtf/MathExtras.h>
    3132#include <wtf/RetainPtr.h>
    3233
Note: See TracChangeset for help on using the changeset viewer.