Ignore:
Timestamp:
Dec 28, 2017, 11:52:24 PM (7 years ago)
Author:
[email protected]
Message:

Remove op_assert and make @assert in builtins a function call so we have DFG/FTL coverage for builtins that use @assert in debug builds
https://bugs.webkit.org/show_bug.cgi?id=181176

Reviewed by Yusuke Suzuki.

Previously, op_assert was only implemented in the LLInt and baseline JIT. This
meant that any builtin that used @assert was not tiering up to the DFG/FTL
in debug builds. This patch changes @assert to just call a host function when
!ASSERT_DISABLED. It's a no-op when ASSERT_DISABLED. Now, builtins that use @assert
will tier up to the DFG/FTL on debug builds.

  • builtins/BuiltinNames.h:
  • bytecode/BytecodeDumper.cpp:

(JSC::BytecodeDumper<Block>::dumpBytecode):

  • bytecode/BytecodeIntrinsicRegistry.h:
  • bytecode/BytecodeList.json:
  • bytecode/BytecodeUseDef.h:

(JSC::computeUsesForBytecodeOffset):
(JSC::computeDefsForBytecodeOffset):

  • bytecompiler/BytecodeGenerator.cpp:

(JSC::BytecodeGenerator::emitAssert): Deleted.

  • bytecompiler/BytecodeGenerator.h:
  • bytecompiler/NodesCodegen.cpp:

(JSC::FunctionCallResolveNode::emitBytecode):
(JSC::BytecodeIntrinsicNode::emit_intrinsic_assert): Deleted.

  • jit/JIT.cpp:

(JSC::JIT::privateCompileMainPass):

  • llint/LowLevelInterpreter.asm:
  • runtime/CommonSlowPaths.cpp:
  • runtime/CommonSlowPaths.h:
  • runtime/JSGlobalObject.cpp:

(JSC::assertCall):
(JSC::JSGlobalObject::init):

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/Source/JavaScriptCore/bytecode/BytecodeDumper.cpp

    r225385 r226310  
    15951595        break;
    15961596    }
    1597     case op_assert: {
    1598         int condition = (++it)->u.operand;
    1599         int line = (++it)->u.operand;
    1600         printLocationAndOp(out, location, it, "assert");
    1601         out.printf("%s, %d", registerName(condition).data(), line);
    1602         break;
    1603     }
    16041597    case op_identity_with_profile: {
    16051598        int r0 = (++it)->u.operand;
Note: See TracChangeset for help on using the changeset viewer.