Ignore:
Timestamp:
Aug 11, 2015, 4:50:02 PM (10 years ago)
Author:
[email protected]
Message:

Make ASan build not depend on asan.xcconfig
https://bugs.webkit.org/show_bug.cgi?id=147840
rdar://problem/21093702

Reviewed by Daniel Bates.

Source/JavaScriptCore:

  • dfg/DFGOSREntry.cpp:

(JSC::DFG::OSREntryData::dump):
(JSC::DFG::prepareOSREntry):

  • ftl/FTLOSREntry.cpp:

(JSC::FTL::prepareOSREntry):

  • heap/ConservativeRoots.cpp:

(JSC::ConservativeRoots::genericAddPointer):
(JSC::ConservativeRoots::genericAddSpan):

  • heap/MachineStackMarker.cpp:

(JSC::MachineThreads::removeThreadIfFound):
(JSC::MachineThreads::gatherFromCurrentThread):
(JSC::MachineThreads::Thread::captureStack):
(JSC::copyMemory):

  • interpreter/Register.h:

(JSC::Register::operator=):
(JSC::Register::asanUnsafeJSValue):
(JSC::Register::jsValue):

Tools:

  • asan/asan.xcconfig:
  • asan/webkit-asan-ignore.txt: Removed. It's no longer needed, as unsafe functions

are now marked in source code.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/Source/JavaScriptCore/dfg/DFGOSREntry.cpp

    r186691 r188311  
    9191}
    9292
     93SUPPRESS_ASAN
    9394void* prepareOSREntry(ExecState* exec, CodeBlock* codeBlock, unsigned bytecodeIndex)
    9495{
     
    203204        int localOffset = virtualRegisterForLocal(local).offset();
    204205        if (entry->m_localsForcedDouble.get(local)) {
    205             if (!exec->registers()[localOffset].jsValue().isNumber()) {
     206            if (!exec->registers()[localOffset].asanUnsafeJSValue().isNumber()) {
    206207                if (Options::verboseOSR()) {
    207208                    dataLog(
    208209                        "    OSR failed because variable ", localOffset, " is ",
    209                         exec->registers()[localOffset].jsValue(), ", expected number.\n");
     210                        exec->registers()[localOffset].asanUnsafeJSValue(), ", expected number.\n");
    210211                }
    211212                return 0;
     
    214215        }
    215216        if (entry->m_localsForcedMachineInt.get(local)) {
    216             if (!exec->registers()[localOffset].jsValue().isMachineInt()) {
     217            if (!exec->registers()[localOffset].asanUnsafeJSValue().isMachineInt()) {
    217218                if (Options::verboseOSR()) {
    218219                    dataLog(
    219220                        "    OSR failed because variable ", localOffset, " is ",
    220                         exec->registers()[localOffset].jsValue(), ", expected ",
     221                        exec->registers()[localOffset].asanUnsafeJSValue(), ", expected ",
    221222                        "machine int.\n");
    222223                }
     
    225226            continue;
    226227        }
    227         if (!entry->m_expectedValues.local(local).validate(exec->registers()[localOffset].jsValue())) {
     228        if (!entry->m_expectedValues.local(local).validate(exec->registers()[localOffset].asanUnsafeJSValue())) {
    228229            if (Options::verboseOSR()) {
    229230                dataLog(
    230231                    "    OSR failed because variable ", localOffset, " is ",
    231                     exec->registers()[localOffset].jsValue(), ", expected ",
     232                    exec->registers()[localOffset].asanUnsafeJSValue(), ", expected ",
    232233                    entry->m_expectedValues.local(local), ".\n");
    233234            }
     
    281282        if (reg.isLocal()) {
    282283            if (entry->m_localsForcedDouble.get(reg.toLocal())) {
    283                 *bitwise_cast<double*>(pivot + index) = exec->registers()[reg.offset()].jsValue().asNumber();
     284                *bitwise_cast<double*>(pivot + index) = exec->registers()[reg.offset()].asanUnsafeJSValue().asNumber();
    284285                continue;
    285286            }
    286287           
    287288            if (entry->m_localsForcedMachineInt.get(reg.toLocal())) {
    288                 *bitwise_cast<int64_t*>(pivot + index) = exec->registers()[reg.offset()].jsValue().asMachineInt() << JSValue::int52ShiftAmount;
     289                *bitwise_cast<int64_t*>(pivot + index) = exec->registers()[reg.offset()].asanUnsafeJSValue().asMachineInt() << JSValue::int52ShiftAmount;
    289290                continue;
    290291            }
    291292        }
    292293       
    293         pivot[index] = exec->registers()[reg.offset()].jsValue();
     294        pivot[index] = exec->registers()[reg.offset()].asanUnsafeJSValue();
    294295    }
    295296   
     
    297298    Vector<JSValue> temporaryLocals(entry->m_reshufflings.size());
    298299    for (unsigned i = entry->m_reshufflings.size(); i--;)
    299         temporaryLocals[i] = pivot[VirtualRegister(entry->m_reshufflings[i].fromOffset).toLocal()].jsValue();
     300        temporaryLocals[i] = pivot[VirtualRegister(entry->m_reshufflings[i].fromOffset).toLocal()].asanUnsafeJSValue();
    300301    for (unsigned i = entry->m_reshufflings.size(); i--;)
    301302        pivot[VirtualRegister(entry->m_reshufflings[i].toOffset).toLocal()] = temporaryLocals[i];
Note: See TracChangeset for help on using the changeset viewer.