• fpizlo@apple.com's avatar
    Move all Structure out-of-line inline methods to StructureInlines.h · bb8aa756
    fpizlo@apple.com authored
    Rubber stamped by Mark Hahnenberg and Sam Weinig.
    This was supposed to be easy.
    But, initially, there was a Structure inline method in CodeBlock.h, and moving that
    into StructureInlines.h meant that Operations.h included CodeBlock.h. This would
    cause WebCore build failures, because CodeBlock.h transitively included the JSC
    parser (via many, many paths), and the JSC parser defines tokens using enumeration
    elements that CSSGrammar.cpp (generated by bison) would #define. For example,
    bison would give CSSGrammar.cpp a #define FUNCTION 123, and would do so before
    including anything interesting. The JSC parser would have an enum that included
    FUNCTION as an element. Hence the JSC parser included into CSSGrammar.cpp would have
    a token element called FUNCTION declared in an enumeration, but FUNCTION was
    #define'd to 123, leading to a parser error.
    So I removed all transitive include paths from CodeBlock.h to the JSC Parser. I
    believe I was able to do so without out-of-lining anything interesting or performance
    critical. This is probably a purely good thing to have done: it will be nice to be
    able to make changes to the parser without having to compile the universe.
    Of course, doing this caused a bunch of other things to not compile, since a bunch of
    headers relied on things being implicitly included for them when they transitively
    included the parser. I fixed a lot of that.
    Finally, I ended up removing the method that depended on CodeBlock.h from
    StructureInlines.h, and putting it in Structure.cpp. That might seem like all of this
    was a waste of time, except that I suspect it was a worthwhile forcing function for
    cleaning up a bunch of cruft.
    * API/JSCallbackFunction.cpp:
    * CMakeLists.txt:
    * GNUmakefile.list.am:
    * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore.vcproj:
    * JavaScriptCore.xcodeproj/project.pbxproj:
    * Target.pri:
    * bytecode/CodeBlock.h:
    * bytecode/EvalCodeCache.h:
    * bytecode/SamplingTool.h:
    * bytecode/UnlinkedCodeBlock.cpp:
    * bytecode/UnlinkedCodeBlock.h:
    * bytecompiler/BytecodeGenerator.h:
    * bytecompiler/Label.h:
    * dfg/DFGByteCodeParser.cpp:
    * dfg/DFGByteCodeParser.h:
    * dfg/DFGFPRInfo.h:
    * dfg/DFGRegisterBank.h:
    * heap/HandleStack.cpp:
    * jit/JITWriteBarrier.h:
    * parser/Nodes.h:
    * parser/Parser.h:
    * parser/ParserError.h: Added.
    * parser/ParserModes.h:
    * parser/SourceProvider.cpp: Added.
    * parser/SourceProvider.h:
    * runtime/ArrayPrototype.cpp:
    * runtime/DatePrototype.cpp:
    * runtime/Executable.h:
    * runtime/JSGlobalObject.cpp:
    * runtime/JSGlobalObject.h:
    * runtime/Operations.h:
    * runtime/Structure.cpp:
    * runtime/Structure.h:
    * runtime/StructureInlines.h: Added.
    * runtime/StructureRareData.cpp:
    Rubber stamped by Sam Weinig.
    No new tests because no new behavior. Just rewiring includes.
    * ForwardingHeaders/parser/SourceProviderCache.h: Added.
    * loader/cache/CachedScript.cpp:
    git-svn-id: http://svn.webkit.org/repository/webkit/trunk@143147 268f45cc-cd09-0410-ab3c-d52691b4dbfc
JSGlobalObject.h 22.6 KB