Changeset 159987 in webkit


Ignore:
Timestamp:
Dec 2, 2013 5:32:43 PM (10 years ago)
Author:
mark.lam@apple.com
Message:

Build failure when disabling JIT, YARR_JIT, and ASSEMBLER.
https://bugs.webkit.org/show_bug.cgi?id=123809.

Reviewed by Geoffrey Garen.

Source/JavaScriptCore:

Also fixed build when disabling the DISASSEMBLER.
Added some needed #if's and some comments.

  • assembler/LinkBuffer.cpp:

(JSC::LinkBuffer::finalizeCodeWithDisassembly):

  • dfg/DFGDisassembler.cpp:
  • dfg/DFGDisassembler.h:

(JSC::DFG::Disassembler::Disassembler):
(JSC::DFG::Disassembler::setStartOfCode):
(JSC::DFG::Disassembler::setForBlockIndex):
(JSC::DFG::Disassembler::setForNode):
(JSC::DFG::Disassembler::setEndOfMainPath):
(JSC::DFG::Disassembler::setEndOfCode):
(JSC::DFG::Disassembler::dump):
(JSC::DFG::Disassembler::reportToProfiler):

  • disassembler/Disassembler.cpp:
  • disassembler/X86Disassembler.cpp:
  • jit/FPRInfo.h:
  • jit/GPRInfo.h:
  • jit/JITDisassembler.cpp:
  • jit/JITDisassembler.h:

(JSC::JITDisassembler::JITDisassembler):
(JSC::JITDisassembler::setStartOfCode):
(JSC::JITDisassembler::setForBytecodeMainPath):
(JSC::JITDisassembler::setForBytecodeSlowPath):
(JSC::JITDisassembler::setEndOfSlowPath):
(JSC::JITDisassembler::setEndOfCode):
(JSC::JITDisassembler::dump):
(JSC::JITDisassembler::reportToProfiler):

Source/WTF:

  • wtf/Platform.h:
  • Ensure that the ASSEMBLER is enabled when the DISASSEMBLER is enabled.
Location:
trunk/Source
Files:
12 edited

Legend:

Unmodified
Added
Removed
  • trunk/Source/JavaScriptCore/ChangeLog

    r159973 r159987  
     12013-12-02  Mark Lam  <mark.lam@apple.com>
     2
     3        Build failure when disabling JIT, YARR_JIT, and ASSEMBLER.
     4        https://bugs.webkit.org/show_bug.cgi?id=123809.
     5
     6        Reviewed by Geoffrey Garen.
     7
     8        Also fixed build when disabling the DISASSEMBLER.
     9        Added some needed #if's and some comments.
     10
     11        * assembler/LinkBuffer.cpp:
     12        (JSC::LinkBuffer::finalizeCodeWithDisassembly):
     13        * dfg/DFGDisassembler.cpp:
     14        * dfg/DFGDisassembler.h:
     15        (JSC::DFG::Disassembler::Disassembler):
     16        (JSC::DFG::Disassembler::setStartOfCode):
     17        (JSC::DFG::Disassembler::setForBlockIndex):
     18        (JSC::DFG::Disassembler::setForNode):
     19        (JSC::DFG::Disassembler::setEndOfMainPath):
     20        (JSC::DFG::Disassembler::setEndOfCode):
     21        (JSC::DFG::Disassembler::dump):
     22        (JSC::DFG::Disassembler::reportToProfiler):
     23        * disassembler/Disassembler.cpp:
     24        * disassembler/X86Disassembler.cpp:
     25        * jit/FPRInfo.h:
     26        * jit/GPRInfo.h:
     27        * jit/JITDisassembler.cpp:
     28        * jit/JITDisassembler.h:
     29        (JSC::JITDisassembler::JITDisassembler):
     30        (JSC::JITDisassembler::setStartOfCode):
     31        (JSC::JITDisassembler::setForBytecodeMainPath):
     32        (JSC::JITDisassembler::setForBytecodeSlowPath):
     33        (JSC::JITDisassembler::setEndOfSlowPath):
     34        (JSC::JITDisassembler::setEndOfCode):
     35        (JSC::JITDisassembler::dump):
     36        (JSC::JITDisassembler::reportToProfiler):
     37
    1382013-12-02  Filip Pizlo  <fpizlo@apple.com>
    239
  • trunk/Source/JavaScriptCore/assembler/LinkBuffer.cpp

    r158670 r159987  
    5050   
    5151    CodeRef result = finalizeCodeWithoutDisassembly();
    52    
     52
     53#if ENABLE(DISASSEMBLER)
    5354    dataLogF("Generated JIT code for ");
    5455    va_list argList;
     
    6061    dataLogF("    Code at [%p, %p):\n", result.code().executableAddress(), static_cast<char*>(result.code().executableAddress()) + result.size());
    6162    disassemble(result.code(), m_size, "    ", WTF::dataFile());
     63#else
     64    UNUSED_PARAM(format);
     65#endif // ENABLE(DISASSEMBLER)
    6266   
    6367    return result;
  • trunk/Source/JavaScriptCore/dfg/DFGDisassembler.cpp

    r159883 r159987  
    2727#include "DFGDisassembler.h"
    2828
    29 #if ENABLE(DFG_JIT)
     29#if ENABLE(DFG_JIT) && ENABLE(DISASSEMBLER)
    3030
    3131#include "CodeBlockWithJITType.h"
     
    173173} } // namespace JSC::DFG
    174174
    175 #endif // ENABLE(DFG_JIT)
     175#endif // ENABLE(DFG_JIT) && ENABLE(DISASSEMBLER)
  • trunk/Source/JavaScriptCore/dfg/DFGDisassembler.h

    r153296 r159987  
    4242
    4343class Graph;
     44
     45#if ENABLE(DISASSEMBLER)
    4446
    4547class Disassembler {
     
    98100};
    99101
     102#else // ENABLE(DISASSEMBLER)
     103
     104class Disassembler {
     105    WTF_MAKE_FAST_ALLOCATED;
     106public:
     107    Disassembler(Graph&) { }
     108
     109    void setStartOfCode(MacroAssembler::Label) { }
     110    void setForBlockIndex(BlockIndex, MacroAssembler::Label) { }
     111    void setForNode(Node*, MacroAssembler::Label) { }
     112    void setEndOfMainPath(MacroAssembler::Label) { }
     113    void setEndOfCode(MacroAssembler::Label) { }
     114
     115    void dump(LinkBuffer&) { }
     116    void reportToProfiler(Profiler::Compilation*, LinkBuffer&) { }
     117};
     118
     119#endif // ENABLE(DISASSEMBLER)
     120
    100121} } // namespace JSC::DFG
    101122
  • trunk/Source/JavaScriptCore/disassembler/Disassembler.cpp

    r153256 r159987  
    2727#include "Disassembler.h"
    2828
     29#if ENABLE(DISASSEMBLER)
     30
    2931#include "MacroAssemblerCodeRef.h"
    3032#include <wtf/DataLog.h>
     
    4244} // namespace JSC
    4345
     46#endif // ENABLE(DISASSEMBLER)
  • trunk/Source/JavaScriptCore/disassembler/X86Disassembler.cpp

    r153256 r159987  
    2727#include "Disassembler.h"
    2828
     29#if ENABLE(DISASSEMBLER)
    2930#if USE(UDIS86) || USE(LLVM_DISASSEMBLER)
    3031
     
    7172
    7273#endif // USE(UDIS86) || USE(LLVM_DISASSEMBLER)
    73 
     74#endif // ENABLE(DISASSEMBLER)
  • trunk/Source/JavaScriptCore/jit/FPRInfo.h

    r159099 r159987  
    3535#define InvalidFPRReg ((::JSC::FPRReg)-1)
    3636
     37#if ENABLE(JIT)
     38
    3739#if CPU(X86) || CPU(X86_64)
    3840
     
    109111};
    110112
    111 #endif
     113#endif // CPU(X86) || CPU(X86_64)
    112114
    113115#if CPU(ARM)
     
    173175};
    174176
    175 #endif
     177#endif // CPU(ARM)
    176178
    177179#if CPU(ARM64)
     
    261263};
    262264
    263 #endif
     265#endif // CPU(ARM64)
    264266
    265267#if CPU(MIPS)
     
    328330};
    329331
    330 #endif
     332#endif // CPU(MIPS)
    331333
    332334#if CPU(SH4)
     
    390392};
    391393
    392 #endif
     394#endif // CPU(SH4)
     395
     396#endif // ENABLE(JIT)
    393397
    394398} // namespace JSC
  • trunk/Source/JavaScriptCore/jit/GPRInfo.h

    r159427 r159987  
    3535#define InvalidGPRReg ((::JSC::GPRReg)-1)
    3636
     37#if ENABLE(JIT)
     38
    3739#if USE(JSVALUE64)
    3840class JSValueRegs {
     
    126128    GPRReg m_base;
    127129};
    128 #endif
     130#endif // USE(JSVALUE64)
    129131
    130132#if USE(JSVALUE32_64)
     
    277279    int8_t m_tagType; // Contains the low bits of the tag.
    278280};
    279 #endif
     281#endif // USE(JSVALUE32_64)
    280282
    281283// The baseline JIT requires that regT3 be callee-preserved.
     
    344346};
    345347
    346 #endif
     348#endif // CPU(X86)
    347349
    348350#if CPU(X86_64)
     
    441443};
    442444
    443 #endif
     445#endif // CPU(X86_64)
    444446
    445447#if CPU(ARM)
     
    522524};
    523525
    524 #endif
     526#endif // CPU(ARM)
    525527
    526528#if CPU(ARM64)
     
    620622};
    621623
    622 #endif
     624#endif // CPU(ARM64)
    623625
    624626#if CPU(MIPS)
     
    696698};
    697699
    698 #endif
     700#endif // CPU(MIPS)
    699701
    700702#if CPU(SH4)
     
    766768};
    767769
    768 #endif
     770#endif // CPU(SH4)
    769771
    770772// The baseline JIT uses "accumulator" style execution with regT0 (for 64-bit)
     
    776778#endif
    777779
     780#endif // ENABLE(JIT)
     781
    778782} // namespace JSC
    779783
  • trunk/Source/JavaScriptCore/jit/JITDisassembler.cpp

    r159883 r159987  
    11/*
    2  * Copyright (C) 2012 Apple Inc. All rights reserved.
     2 * Copyright (C) 2012, 2013 Apple Inc. All rights reserved.
    33 *
    44 * Redistribution and use in source and binary forms, with or without
     
    2727#include "JITDisassembler.h"
    2828
    29 #if ENABLE(JIT)
     29#if ENABLE(JIT) && ENABLE(DISASSEMBLER)
    3030
    3131#include "CodeBlock.h"
     
    165165} // namespace JSC
    166166
    167 #endif // ENABLE(JIT)
     167#endif // ENABLE(JIT) && ENABLE(DISASSEMBLER)
    168168
  • trunk/Source/JavaScriptCore/jit/JITDisassembler.h

    r136601 r159987  
    3939
    4040class CodeBlock;
     41
     42#if ENABLE(DISASSEMBLER)
    4143
    4244class JITDisassembler {
     
    8587};
    8688
     89#else // ENABLE(DISASSEMBLER)
     90
     91class JITDisassembler {
     92    WTF_MAKE_FAST_ALLOCATED;
     93public:
     94    JITDisassembler(CodeBlock*) { }
     95
     96    void setStartOfCode(MacroAssembler::Label) { }
     97    void setForBytecodeMainPath(unsigned, MacroAssembler::Label) { }
     98    void setForBytecodeSlowPath(unsigned, MacroAssembler::Label) { }
     99    void setEndOfSlowPath(MacroAssembler::Label) { }
     100    void setEndOfCode(MacroAssembler::Label) { }
     101
     102    void dump(LinkBuffer&) { }
     103    void reportToProfiler(Profiler::Compilation*, LinkBuffer&) { }
     104};
     105
     106#endif // ENABLE(DISASSEMBLER)
     107
    87108} // namespace JSC
    88109
  • trunk/Source/WTF/ChangeLog

    r159892 r159987  
     12013-12-02  Mark Lam  <mark.lam@apple.com>
     2
     3        Build failure when disabling JIT, YARR_JIT, and ASSEMBLER.
     4        https://bugs.webkit.org/show_bug.cgi?id=123809.
     5
     6        Reviewed by Geoffrey Garen.
     7
     8        * wtf/Platform.h:
     9        - Ensure that the ASSEMBLER is enabled when the DISASSEMBLER is enabled.
     10
    1112013-11-30  peavo@outlook.com  <peavo@outlook.com>
    212
  • trunk/Source/WTF/wtf/Platform.h

    r159817 r159987  
    852852#endif
    853853
     854/* If the Disassembler is enabled, then the Assembler must be enabled as well: */
     855#if ENABLE(DISASSEMBLER)
     856#if defined(ENABLE_ASSEMBLER) && !ENABLE_ASSEMBLER
     857#error "Cannot enable the Disassembler without enabling the Assembler"
     858#else
     859#undef ENABLE_ASSEMBLER
     860#define ENABLE_ASSEMBLER 1
     861#endif
     862#endif
     863
    854864/* FIXME: We currently unconditionally use spearate stacks. When we switch to using the
    855865   C stack for JS frames, we'll need to make the following conditional on ENABLE(LLINT_CLOOP)
Note: See TracChangeset for help on using the changeset viewer.