Changeset 240138 in webkit


Ignore:
Timestamp:
Jan 17, 2019 6:11:44 PM (5 years ago)
Author:
mark.lam@apple.com
Message:

Audit bytecode fields and ensure that LLInt instructions for accessing them are appropriate.
https://bugs.webkit.org/show_bug.cgi?id=193557
<rdar://problem/47369125>

Reviewed by Yusuke Suzuki.

  1. Rename some bytecode fields so that it's easier to discern whether the LLInt is accessing them the right way:
    • distinguish between targetVirtualRegister and targetLabel.
    • name all StructureID fields as structureID (oldStructureID, newStructureID) instead of structure (oldStructure, newStructure).
  1. Use bitwise_cast in struct Fits when sizeof(T) == size. This prevents potential undefined behavior issues arising from doing assignments with reinterpret_cast'ed pointers.
  1. Make Special::Pointer an unsigned type (previously int). Make ResolveType an unsigned type (previously int).
  1. In LowLevelInterpreter*.asm:
  • rename the op macro argument to opcodeName or opcodeStruct respectively. This makes it clearer which argument type the macro is working with.
  • rename the name macro argument to opcodeName.
  • fix operator types to match the field type being accessed. The following may have resulted in bugs before:
  1. The following should be read with getu() instead of get() because they are unsigned ints:

OpSwitchImm::m_tableIndex
OpSwitchChar::m_tableIndex
OpGetFromArguments::m_index
OpPutToArguments::m_index
OpGetRestLength::m_numParametersToSkip

OpJneqPtr::m_specialPointer should also be read with getu() though this
wasn't a bug because it was previously an int by default, and is only
changed to an unsigned int in this patch.

2.The following should be read with loadi (not loadp) because they are of

unsigned type (not a pointer):

OpResolveScope::Metadata::m_resolveType
CodeBlock::m_numParameters (see prepareForTailCall)

  1. OpPutToScope::Metadata::m_operand should be read with loadp (not loadis) because it is a uintptr_t.
  1. The following should be read with loadi (not loadis) because they are unsigned ints:

OpNegate::Metadata::m_arithProfile + ArithProfile::m_bits
OpPutById::Metadata::m_oldStructureID
OpPutToScope::Metadata::m_getPutInfo + GetPutInfo::m_operand

These may not have manifested in bugs because the operations that follow
the load are 32-bit instructions which ignore the high word.

  1. Give class GetPutInfo a default constructor so that we can use bitwise_cast on it. Also befriend LLIntOffsetsExtractor so that we can take the offset of m_operand in it.
  • bytecode/ArithProfile.h:
  • bytecode/BytecodeList.rb:
  • bytecode/BytecodeUseDef.h:

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

  • bytecode/CodeBlock.cpp:

(JSC::CodeBlock::propagateTransitions):
(JSC::CodeBlock::finalizeLLIntInlineCaches):

  • bytecode/Fits.h:
  • bytecode/GetByIdMetadata.h:
  • bytecode/GetByIdStatus.cpp:

(JSC::GetByIdStatus::computeFromLLInt):

  • bytecode/LLIntPrototypeLoadAdaptiveStructureWatchpoint.cpp:

(JSC::LLIntPrototypeLoadAdaptiveStructureWatchpoint::clearLLIntGetByIdCache):

  • bytecode/PreciseJumpTargetsInlines.h:

(JSC::jumpTargetForInstruction):
(JSC::updateStoredJumpTargetsForInstruction):

  • bytecode/PutByIdStatus.cpp:

(JSC::PutByIdStatus::computeFromLLInt):

  • bytecode/SpecialPointer.h:
  • bytecompiler/BytecodeGenerator.cpp:

(JSC::Label::setLocation):

  • dfg/DFGByteCodeParser.cpp:

(JSC::DFG::ByteCodeParser::parseBlock):

  • jit/JITArithmetic.cpp:

(JSC::JIT::emit_compareAndJump):
(JSC::JIT::emit_compareUnsignedAndJump):
(JSC::JIT::emit_compareAndJumpSlow):

  • jit/JITArithmetic32_64.cpp:

(JSC::JIT::emit_compareAndJump):
(JSC::JIT::emit_compareUnsignedAndJump):
(JSC::JIT::emit_compareAndJumpSlow):
(JSC::JIT::emitBinaryDoubleOp):

  • jit/JITOpcodes.cpp:

(JSC::JIT::emit_op_jmp):
(JSC::JIT::emit_op_jfalse):
(JSC::JIT::emit_op_jeq_null):
(JSC::JIT::emit_op_jneq_null):
(JSC::JIT::emit_op_jneq_ptr):
(JSC::JIT::emit_op_jeq):
(JSC::JIT::emit_op_jtrue):
(JSC::JIT::emit_op_jneq):
(JSC::JIT::compileOpStrictEqJump):
(JSC::JIT::emitSlow_op_jstricteq):
(JSC::JIT::emitSlow_op_jnstricteq):
(JSC::JIT::emit_op_check_tdz):
(JSC::JIT::emitSlow_op_jeq):
(JSC::JIT::emitSlow_op_jneq):
(JSC::JIT::emit_op_profile_type):

  • jit/JITOpcodes32_64.cpp:

(JSC::JIT::emit_op_jmp):
(JSC::JIT::emit_op_jfalse):
(JSC::JIT::emit_op_jtrue):
(JSC::JIT::emit_op_jeq_null):
(JSC::JIT::emit_op_jneq_null):
(JSC::JIT::emit_op_jneq_ptr):
(JSC::JIT::emit_op_jeq):
(JSC::JIT::emitSlow_op_jeq):
(JSC::JIT::emit_op_jneq):
(JSC::JIT::emitSlow_op_jneq):
(JSC::JIT::compileOpStrictEqJump):
(JSC::JIT::emitSlow_op_jstricteq):
(JSC::JIT::emitSlow_op_jnstricteq):
(JSC::JIT::emit_op_check_tdz):
(JSC::JIT::emit_op_profile_type):

  • llint/LLIntSlowPaths.cpp:

(JSC::LLInt::LLINT_SLOW_PATH_DECL):
(JSC::LLInt::setupGetByIdPrototypeCache):

  • llint/LowLevelInterpreter.asm:
  • llint/LowLevelInterpreter32_64.asm:
  • llint/LowLevelInterpreter64.asm:
  • runtime/CommonSlowPaths.cpp:
  • runtime/GetPutInfo.h:
Location:
trunk/Source/JavaScriptCore
Files:
24 edited

Legend:

Unmodified
Added
Removed
  • trunk/Source/JavaScriptCore/ChangeLog

    r240136 r240138  
     12019-01-17  Mark Lam  <mark.lam@apple.com>
     2
     3        Audit bytecode fields and ensure that LLInt instructions for accessing them are appropriate.
     4        https://bugs.webkit.org/show_bug.cgi?id=193557
     5        <rdar://problem/47369125>
     6
     7        Reviewed by Yusuke Suzuki.
     8
     9        1. Rename some bytecode fields so that it's easier to discern whether the LLInt
     10           is accessing them the right way:
     11           - distinguish between targetVirtualRegister and targetLabel.
     12           - name all StructureID fields as structureID (oldStructureID, newStructureID)
     13             instead of structure (oldStructure, newStructure).
     14
     15        2. Use bitwise_cast in struct Fits when sizeof(T) == size.
     16           This prevents potential undefined behavior issues arising from doing
     17           assignments with reinterpret_cast'ed pointers.
     18
     19        3. Make Special::Pointer an unsigned type (previously int).
     20           Make ResolveType an unsigned type (previously int).
     21
     22        4. In LowLevelInterpreter*.asm:
     23
     24           - rename the op macro argument to opcodeName or opcodeStruct respectively.
     25             This makes it clearer which argument type the macro is working with.
     26
     27           - rename the name macro argument to opcodeName.
     28
     29           - fix operator types to match the field type being accessed.  The following
     30             may have resulted in bugs before:
     31
     32             1. The following should be read with getu() instead of get() because they
     33                are unsigned ints:
     34                    OpSwitchImm::m_tableIndex
     35                    OpSwitchChar::m_tableIndex
     36                    OpGetFromArguments::m_index
     37                    OpPutToArguments::m_index
     38                    OpGetRestLength::m_numParametersToSkip
     39
     40                OpJneqPtr::m_specialPointer should also be read with getu() though this
     41                wasn't a bug because it was previously an int by default, and is only
     42                changed to an unsigned int in this patch.
     43
     44             2.The following should be read with loadi (not loadp) because they are of
     45               unsigned type (not a pointer):
     46                    OpResolveScope::Metadata::m_resolveType
     47                    CodeBlock::m_numParameters (see prepareForTailCall)
     48
     49             3. OpPutToScope::Metadata::m_operand should be read with loadp (not loadis)
     50                because it is a uintptr_t.
     51
     52             4. The following should be read with loadi (not loadis) because they are
     53                unsigned ints:
     54                    OpNegate::Metadata::m_arithProfile + ArithProfile::m_bits
     55                    OpPutById::Metadata::m_oldStructureID
     56                    OpPutToScope::Metadata::m_getPutInfo + GetPutInfo::m_operand
     57
     58                These may not have manifested in bugs because the operations that follow
     59                the load are 32-bit instructions which ignore the high word.
     60
     61        5. Give class GetPutInfo a default constructor so that we can use bitwise_cast
     62           on it.  Also befriend LLIntOffsetsExtractor so that we can take the offset of
     63           m_operand in it.
     64
     65        * bytecode/ArithProfile.h:
     66        * bytecode/BytecodeList.rb:
     67        * bytecode/BytecodeUseDef.h:
     68        (JSC::computeUsesForBytecodeOffset):
     69        (JSC::computeDefsForBytecodeOffset):
     70        * bytecode/CodeBlock.cpp:
     71        (JSC::CodeBlock::propagateTransitions):
     72        (JSC::CodeBlock::finalizeLLIntInlineCaches):
     73        * bytecode/Fits.h:
     74        * bytecode/GetByIdMetadata.h:
     75        * bytecode/GetByIdStatus.cpp:
     76        (JSC::GetByIdStatus::computeFromLLInt):
     77        * bytecode/LLIntPrototypeLoadAdaptiveStructureWatchpoint.cpp:
     78        (JSC::LLIntPrototypeLoadAdaptiveStructureWatchpoint::clearLLIntGetByIdCache):
     79        * bytecode/PreciseJumpTargetsInlines.h:
     80        (JSC::jumpTargetForInstruction):
     81        (JSC::updateStoredJumpTargetsForInstruction):
     82        * bytecode/PutByIdStatus.cpp:
     83        (JSC::PutByIdStatus::computeFromLLInt):
     84        * bytecode/SpecialPointer.h:
     85        * bytecompiler/BytecodeGenerator.cpp:
     86        (JSC::Label::setLocation):
     87        * dfg/DFGByteCodeParser.cpp:
     88        (JSC::DFG::ByteCodeParser::parseBlock):
     89        * jit/JITArithmetic.cpp:
     90        (JSC::JIT::emit_compareAndJump):
     91        (JSC::JIT::emit_compareUnsignedAndJump):
     92        (JSC::JIT::emit_compareAndJumpSlow):
     93        * jit/JITArithmetic32_64.cpp:
     94        (JSC::JIT::emit_compareAndJump):
     95        (JSC::JIT::emit_compareUnsignedAndJump):
     96        (JSC::JIT::emit_compareAndJumpSlow):
     97        (JSC::JIT::emitBinaryDoubleOp):
     98        * jit/JITOpcodes.cpp:
     99        (JSC::JIT::emit_op_jmp):
     100        (JSC::JIT::emit_op_jfalse):
     101        (JSC::JIT::emit_op_jeq_null):
     102        (JSC::JIT::emit_op_jneq_null):
     103        (JSC::JIT::emit_op_jneq_ptr):
     104        (JSC::JIT::emit_op_jeq):
     105        (JSC::JIT::emit_op_jtrue):
     106        (JSC::JIT::emit_op_jneq):
     107        (JSC::JIT::compileOpStrictEqJump):
     108        (JSC::JIT::emitSlow_op_jstricteq):
     109        (JSC::JIT::emitSlow_op_jnstricteq):
     110        (JSC::JIT::emit_op_check_tdz):
     111        (JSC::JIT::emitSlow_op_jeq):
     112        (JSC::JIT::emitSlow_op_jneq):
     113        (JSC::JIT::emit_op_profile_type):
     114        * jit/JITOpcodes32_64.cpp:
     115        (JSC::JIT::emit_op_jmp):
     116        (JSC::JIT::emit_op_jfalse):
     117        (JSC::JIT::emit_op_jtrue):
     118        (JSC::JIT::emit_op_jeq_null):
     119        (JSC::JIT::emit_op_jneq_null):
     120        (JSC::JIT::emit_op_jneq_ptr):
     121        (JSC::JIT::emit_op_jeq):
     122        (JSC::JIT::emitSlow_op_jeq):
     123        (JSC::JIT::emit_op_jneq):
     124        (JSC::JIT::emitSlow_op_jneq):
     125        (JSC::JIT::compileOpStrictEqJump):
     126        (JSC::JIT::emitSlow_op_jstricteq):
     127        (JSC::JIT::emitSlow_op_jnstricteq):
     128        (JSC::JIT::emit_op_check_tdz):
     129        (JSC::JIT::emit_op_profile_type):
     130        * llint/LLIntSlowPaths.cpp:
     131        (JSC::LLInt::LLINT_SLOW_PATH_DECL):
     132        (JSC::LLInt::setupGetByIdPrototypeCache):
     133        * llint/LowLevelInterpreter.asm:
     134        * llint/LowLevelInterpreter32_64.asm:
     135        * llint/LowLevelInterpreter64.asm:
     136        * runtime/CommonSlowPaths.cpp:
     137        * runtime/GetPutInfo.h:
     138
    11392019-01-17  Truitt Savell  <tsavell@apple.com>
    2140
  • trunk/Source/JavaScriptCore/bytecode/ArithProfile.h

    r237972 r240138  
    11/*
    2  * Copyright (C) 2016 Apple Inc. All rights reserved.
     2 * Copyright (C) 2016-2019 Apple Inc. All rights reserved.
    33 *
    44 * Redistribution and use in source and binary forms, with or without
     
    307307
    308308    uint32_t m_bits { 0 }; // We take care to update m_bits only in a single operation. We don't ever store an inconsistent bit representation to it.
     309
     310    friend class JSC::LLIntOffsetsExtractor;
    309311};
    310312
  • trunk/Source/JavaScriptCore/bytecode/BytecodeList.rb

    r240023 r240138  
    1 # Copyright (C) 2018 Apple Inc. All rights reserved.
     1# Copyright (C) 2018-2019 Apple Inc. All rights reserved.
    22#
    33# Redistribution and use in source and binary forms, with or without
     
    143143op :check_tdz,
    144144    args: {
    145         target: VirtualRegister,
     145        targetVirtualRegister: VirtualRegister,
    146146    }
    147147
     
    450450    metadata: {
    451451        profile: ValueProfile, # not used in llint
    452         structure: StructureID,
     452        structureID: StructureID,
    453453        offset: unsigned,
    454454    }
     
    472472    },
    473473    metadata: {
    474         oldStructure: StructureID,
     474        oldStructureID: StructureID,
    475475        offset: unsigned,
    476         newStructure: StructureID,
     476        newStructureID: StructureID,
    477477        structureChain: WriteBarrierBase[StructureChain],
    478478    }
     
    599599op :jmp,
    600600    args: {
    601         target: BoundLabel,
     601        targetLabel: BoundLabel,
    602602    }
    603603
     
    605605    args: {
    606606        condition: VirtualRegister,
    607         target: BoundLabel,
     607        targetLabel: BoundLabel,
    608608    }
    609609
     
    611611    args: {
    612612        condition: VirtualRegister,
    613         target: BoundLabel,
     613        targetLabel: BoundLabel,
    614614    }
    615615
     
    617617    args: {
    618618        value: VirtualRegister,
    619         target: BoundLabel,
     619        targetLabel: BoundLabel,
    620620    }
    621621
     
    623623    args: {
    624624        value: VirtualRegister,
    625         target: BoundLabel,
     625        targetLabel: BoundLabel,
    626626    }
    627627
     
    630630        value: VirtualRegister,
    631631        specialPointer: Special::Pointer,
    632         target: BoundLabel,
     632        targetLabel: BoundLabel,
    633633    },
    634634    metadata: {
     
    656656        lhs: VirtualRegister,
    657657        rhs: VirtualRegister,
    658         target: BoundLabel,
     658        targetLabel: BoundLabel,
    659659    }
    660660
     
    966966op :profile_type,
    967967    args: {
    968         target: VirtualRegister,
     968        targetVirtualRegister: VirtualRegister,
    969969        symbolTableOrScopeDepth: int,
    970970        flag: ProfileTypeBytecodeFlag,
  • trunk/Source/JavaScriptCore/bytecode/BytecodeUseDef.h

    r240041 r240138  
    9595    USES(OpGetScope, dst)
    9696    USES(OpToThis, srcDst)
    97     USES(OpCheckTdz, target)
     97    USES(OpCheckTdz, targetVirtualRegister)
    9898    USES(OpIdentityWithProfile, srcDst)
    99     USES(OpProfileType, target);
     99    USES(OpProfileType, targetVirtualRegister);
    100100    USES(OpThrow, value)
    101101    USES(OpThrowStaticError, message)
     
    449449    DEFS(OpNewObject, dst)
    450450    DEFS(OpToThis, srcDst)
    451     DEFS(OpCheckTdz, target)
     451    DEFS(OpCheckTdz, targetVirtualRegister)
    452452    DEFS(OpGetScope, dst)
    453453    DEFS(OpCreateDirectArguments, dst)
  • trunk/Source/JavaScriptCore/bytecode/CodeBlock.cpp

    r240041 r240138  
    10961096            if (instruction->is<OpPutById>()) {
    10971097                auto& metadata = instruction->as<OpPutById>().metadata(this);
    1098                 StructureID oldStructureID = metadata.m_oldStructure;
    1099                 StructureID newStructureID = metadata.m_newStructure;
     1098                StructureID oldStructureID = metadata.m_oldStructureID;
     1099                StructureID newStructureID = metadata.m_newStructureID;
    11001100                if (!oldStructureID || !newStructureID)
    11011101                    continue;
     
    12271227            if (metadata.m_mode != GetByIdMode::Default)
    12281228                break;
    1229             StructureID oldStructureID = metadata.m_modeMetadata.defaultMode.structure;
     1229            StructureID oldStructureID = metadata.m_modeMetadata.defaultMode.structureID;
    12301230            if (!oldStructureID || Heap::isMarked(vm.heap.structureIDTable().get(oldStructureID)))
    12311231                break;
     
    12371237        case op_get_by_id_direct: {
    12381238            auto& metadata = curInstruction->as<OpGetByIdDirect>().metadata(this);
    1239             StructureID oldStructureID = metadata.m_structure;
     1239            StructureID oldStructureID = metadata.m_structureID;
    12401240            if (!oldStructureID || Heap::isMarked(vm.heap.structureIDTable().get(oldStructureID)))
    12411241                break;
    12421242            if (Options::verboseOSR())
    12431243                dataLogF("Clearing LLInt property access.\n");
    1244             metadata.m_structure = 0;
     1244            metadata.m_structureID = 0;
    12451245            metadata.m_offset = 0;
    12461246            break;
     
    12481248        case op_put_by_id: {
    12491249            auto& metadata = curInstruction->as<OpPutById>().metadata(this);
    1250             StructureID oldStructureID = metadata.m_oldStructure;
    1251             StructureID newStructureID = metadata.m_newStructure;
     1250            StructureID oldStructureID = metadata.m_oldStructureID;
     1251            StructureID newStructureID = metadata.m_newStructureID;
    12521252            StructureChain* chain = metadata.m_structureChain.get();
    12531253            if ((!oldStructureID || Heap::isMarked(vm.heap.structureIDTable().get(oldStructureID)))
     
    12571257            if (Options::verboseOSR())
    12581258                dataLogF("Clearing LLInt put transition.\n");
    1259             metadata.m_oldStructure = 0;
     1259            metadata.m_oldStructureID = 0;
    12601260            metadata.m_offset = 0;
    1261             metadata.m_newStructure = 0;
     1261            metadata.m_newStructureID = 0;
    12621262            metadata.m_structureChain.clear();
    12631263            break;
  • trunk/Source/JavaScriptCore/bytecode/Fits.h

    r240023 r240138  
    11/*
    2  * Copyright (C) 2018 Apple Inc. All rights reserved.
     2 * Copyright (C) 2018-2019 Apple Inc. All rights reserved.
    33 *
    44 * Redistribution and use in source and binary forms, with or without
     
    5353    static bool check(T) { return true; }
    5454
    55     static typename TypeBySize<size>::type convert(T t) { return *reinterpret_cast<typename TypeBySize<size>::type*>(&t); }
     55    static typename TypeBySize<size>::type convert(T t) { return bitwise_cast<typename TypeBySize<size>::type>(t); }
    5656
    5757    template<class T1 = T, OpcodeSize size1 = size, typename = std::enable_if_t<!std::is_same<T1, typename TypeBySize<size1>::type>::value, std::true_type>>
    58     static T1 convert(typename TypeBySize<size1>::type t) { return *reinterpret_cast<T1*>(&t); }
     58    static T1 convert(typename TypeBySize<size1>::type t) { return bitwise_cast<T1>(t); }
    5959};
    6060
  • trunk/Source/JavaScriptCore/bytecode/GetByIdMetadata.h

    r237547 r240138  
    11/*
    2  * Copyright (C) 2018 Apple Inc. All rights reserved.
     2 * Copyright (C) 2018-2019 Apple Inc. All rights reserved.
    33 *
    44 * Redistribution and use in source and binary forms, with or without
     
    4040
    4141    struct Default {
    42         StructureID structure;
     42        StructureID structureID;
    4343        PropertyOffset cachedOffset;
    4444    } defaultMode;
    4545
    4646    struct Unset {
    47         StructureID structure;
     47        StructureID structureID;
    4848    } unsetMode;
    4949
    5050    struct ProtoLoad {
    51         StructureID structure;
     51        StructureID structureID;
    5252        PropertyOffset cachedOffset;
    5353        JSObject* cachedSlot;
  • trunk/Source/JavaScriptCore/bytecode/GetByIdStatus.cpp

    r240041 r240138  
    6767        if (metadata.m_mode != GetByIdMode::Default)
    6868            return GetByIdStatus(NoInformation, false);
    69         structureID = metadata.m_modeMetadata.defaultMode.structure;
     69        structureID = metadata.m_modeMetadata.defaultMode.structureID;
    7070        break;
    7171    }
    7272    case op_get_by_id_direct:
    73         structureID = instruction->as<OpGetByIdDirect>().metadata(profiledBlock).m_structure;
     73        structureID = instruction->as<OpGetByIdDirect>().metadata(profiledBlock).m_structureID;
    7474        break;
    7575    case op_try_get_by_id: {
  • trunk/Source/JavaScriptCore/bytecode/LLIntPrototypeLoadAdaptiveStructureWatchpoint.cpp

    r240041 r240138  
    6262    metadata.m_mode = GetByIdMode::Default;
    6363    metadata.m_modeMetadata.defaultMode.cachedOffset = 0;
    64     metadata.m_modeMetadata.defaultMode.structure = 0;
     64    metadata.m_modeMetadata.defaultMode.structureID = 0;
    6565}
    6666
  • trunk/Source/JavaScriptCore/bytecode/PreciseJumpTargetsInlines.h

    r240041 r240138  
    109109{
    110110    auto bytecode = instruction->as<Op>();
    111     return jumpTargetForInstruction(codeBlock, instruction, bytecode.m_target);
     111    return jumpTargetForInstruction(codeBlock, instruction, bytecode.m_targetLabel);
    112112}
    113113
     
    140140        int32_t target = jumpTargetForInstruction<__op>(codeBlockOrHashMap, instruction); \
    141141        int32_t newTarget = function(target); \
    142         instruction->cast<__op>()->setTarget(BoundLabel(newTarget), [&]() { \
     142        instruction->cast<__op>()->setTargetLabel(BoundLabel(newTarget), [&]() { \
    143143            codeBlock->addOutOfLineJumpTarget(finalOffset + instruction.offset(), newTarget); \
    144144            return BoundLabel(); \
  • trunk/Source/JavaScriptCore/bytecode/PutByIdStatus.cpp

    r240041 r240138  
    5656    auto& metadata = bytecode.metadata(profiledBlock);
    5757
    58     StructureID structureID = metadata.m_oldStructure;
     58    StructureID structureID = metadata.m_oldStructureID;
    5959    if (!structureID)
    6060        return PutByIdStatus(NoInformation);
     
    6262    Structure* structure = vm.heap.structureIDTable().get(structureID);
    6363
    64     StructureID newStructureID = metadata.m_newStructure;
     64    StructureID newStructureID = metadata.m_newStructureID;
    6565    if (!newStructureID) {
    6666        PropertyOffset offset = structure->getConcurrently(uid);
  • trunk/Source/JavaScriptCore/bytecode/SpecialPointer.h

    r237547 r240138  
    11/*
    2  * Copyright (C) 2012 Apple Inc. All rights reserved.
     2 * Copyright (C) 2012-2019 Apple Inc. All rights reserved.
    33 *
    44 * Redistribution and use in source and binary forms, with or without
     
    3232
    3333namespace Special {
    34 enum Pointer {
     34enum Pointer : unsigned {
    3535    CallFunction,
    3636    ApplyFunction,
  • trunk/Source/JavaScriptCore/bytecompiler/BytecodeGenerator.cpp

    r240041 r240138  
    103103#define CASE(__op) \
    104104    case __op::opcodeID:  \
    105         instruction->cast<__op>()->setTarget(BoundLabel(target), [&]() { \
     105        instruction->cast<__op>()->setTargetLabel(BoundLabel(target), [&]() { \
    106106            generator.m_codeBlock->addOutOfLineJumpTarget(instruction.offset(), target); \
    107107            return BoundLabel(); \
  • trunk/Source/JavaScriptCore/dfg/DFGByteCodeParser.cpp

    r240106 r240138  
    50915091        case op_check_tdz: {
    50925092            auto bytecode = currentInstruction->as<OpCheckTdz>();
    5093             addToGraph(CheckNotEmpty, get(bytecode.m_target));
     5093            addToGraph(CheckNotEmpty, get(bytecode.m_targetVirtualRegister));
    50945094            NEXT_OPCODE(op_check_tdz);
    50955095        }
     
    55995599            auto bytecode = currentInstruction->as<OpProfileType>();
    56005600            auto& metadata = bytecode.metadata(codeBlock);
    5601             Node* valueToProfile = get(bytecode.m_target);
     5601            Node* valueToProfile = get(bytecode.m_targetVirtualRegister);
    56025602            addToGraph(ProfileType, OpInfo(metadata.m_typeLocation), valueToProfile);
    56035603            NEXT_OPCODE(op_profile_type);
     
    56165616            ASSERT(!m_currentBlock->terminal());
    56175617            auto bytecode = currentInstruction->as<OpJmp>();
    5618             int relativeOffset = jumpTarget(bytecode.m_target);
     5618            int relativeOffset = jumpTarget(bytecode.m_targetLabel);
    56195619            addToGraph(Jump, OpInfo(m_currentIndex + relativeOffset));
    56205620            if (relativeOffset <= 0)
     
    56255625        case op_jtrue: {
    56265626            auto bytecode = currentInstruction->as<OpJtrue>();
    5627             unsigned relativeOffset = jumpTarget(bytecode.m_target);
     5627            unsigned relativeOffset = jumpTarget(bytecode.m_targetLabel);
    56285628            Node* condition = get(bytecode.m_condition);
    56295629            addToGraph(Branch, OpInfo(branchData(m_currentIndex + relativeOffset, m_currentIndex + currentInstruction->size())), condition);
     
    56335633        case op_jfalse: {
    56345634            auto bytecode = currentInstruction->as<OpJfalse>();
    5635             unsigned relativeOffset = jumpTarget(bytecode.m_target);
     5635            unsigned relativeOffset = jumpTarget(bytecode.m_targetLabel);
    56365636            Node* condition = get(bytecode.m_condition);
    56375637            addToGraph(Branch, OpInfo(branchData(m_currentIndex + currentInstruction->size(), m_currentIndex + relativeOffset)), condition);
     
    56415641        case op_jeq_null: {
    56425642            auto bytecode = currentInstruction->as<OpJeqNull>();
    5643             unsigned relativeOffset = jumpTarget(bytecode.m_target);
     5643            unsigned relativeOffset = jumpTarget(bytecode.m_targetLabel);
    56445644            Node* value = get(bytecode.m_value);
    56455645            Node* nullConstant = addToGraph(JSConstant, OpInfo(m_constantNull));
     
    56515651        case op_jneq_null: {
    56525652            auto bytecode = currentInstruction->as<OpJneqNull>();
    5653             unsigned relativeOffset = jumpTarget(bytecode.m_target);
     5653            unsigned relativeOffset = jumpTarget(bytecode.m_targetLabel);
    56545654            Node* value = get(bytecode.m_value);
    56555655            Node* nullConstant = addToGraph(JSConstant, OpInfo(m_constantNull));
     
    56615661        case op_jless: {
    56625662            auto bytecode = currentInstruction->as<OpJless>();
    5663             unsigned relativeOffset = jumpTarget(bytecode.m_target);
     5663            unsigned relativeOffset = jumpTarget(bytecode.m_targetLabel);
    56645664            Node* op1 = get(bytecode.m_lhs);
    56655665            Node* op2 = get(bytecode.m_rhs);
     
    56715671        case op_jlesseq: {
    56725672            auto bytecode = currentInstruction->as<OpJlesseq>();
    5673             unsigned relativeOffset = jumpTarget(bytecode.m_target);
     5673            unsigned relativeOffset = jumpTarget(bytecode.m_targetLabel);
    56745674            Node* op1 = get(bytecode.m_lhs);
    56755675            Node* op2 = get(bytecode.m_rhs);
     
    56815681        case op_jgreater: {
    56825682            auto bytecode = currentInstruction->as<OpJgreater>();
    5683             unsigned relativeOffset = jumpTarget(bytecode.m_target);
     5683            unsigned relativeOffset = jumpTarget(bytecode.m_targetLabel);
    56845684            Node* op1 = get(bytecode.m_lhs);
    56855685            Node* op2 = get(bytecode.m_rhs);
     
    56915691        case op_jgreatereq: {
    56925692            auto bytecode = currentInstruction->as<OpJgreatereq>();
    5693             unsigned relativeOffset = jumpTarget(bytecode.m_target);
     5693            unsigned relativeOffset = jumpTarget(bytecode.m_targetLabel);
    56945694            Node* op1 = get(bytecode.m_lhs);
    56955695            Node* op2 = get(bytecode.m_rhs);
     
    57015701        case op_jeq: {
    57025702            auto bytecode = currentInstruction->as<OpJeq>();
    5703             unsigned relativeOffset = jumpTarget(bytecode.m_target);
     5703            unsigned relativeOffset = jumpTarget(bytecode.m_targetLabel);
    57045704            Node* op1 = get(bytecode.m_lhs);
    57055705            Node* op2 = get(bytecode.m_rhs);
     
    57115711        case op_jstricteq: {
    57125712            auto bytecode = currentInstruction->as<OpJstricteq>();
    5713             unsigned relativeOffset = jumpTarget(bytecode.m_target);
     5713            unsigned relativeOffset = jumpTarget(bytecode.m_targetLabel);
    57145714            Node* op1 = get(bytecode.m_lhs);
    57155715            Node* op2 = get(bytecode.m_rhs);
     
    57215721        case op_jnless: {
    57225722            auto bytecode = currentInstruction->as<OpJnless>();
    5723             unsigned relativeOffset = jumpTarget(bytecode.m_target);
     5723            unsigned relativeOffset = jumpTarget(bytecode.m_targetLabel);
    57245724            Node* op1 = get(bytecode.m_lhs);
    57255725            Node* op2 = get(bytecode.m_rhs);
     
    57315731        case op_jnlesseq: {
    57325732            auto bytecode = currentInstruction->as<OpJnlesseq>();
    5733             unsigned relativeOffset = jumpTarget(bytecode.m_target);
     5733            unsigned relativeOffset = jumpTarget(bytecode.m_targetLabel);
    57345734            Node* op1 = get(bytecode.m_lhs);
    57355735            Node* op2 = get(bytecode.m_rhs);
     
    57415741        case op_jngreater: {
    57425742            auto bytecode = currentInstruction->as<OpJngreater>();
    5743             unsigned relativeOffset = jumpTarget(bytecode.m_target);
     5743            unsigned relativeOffset = jumpTarget(bytecode.m_targetLabel);
    57445744            Node* op1 = get(bytecode.m_lhs);
    57455745            Node* op2 = get(bytecode.m_rhs);
     
    57515751        case op_jngreatereq: {
    57525752            auto bytecode = currentInstruction->as<OpJngreatereq>();
    5753             unsigned relativeOffset = jumpTarget(bytecode.m_target);
     5753            unsigned relativeOffset = jumpTarget(bytecode.m_targetLabel);
    57545754            Node* op1 = get(bytecode.m_lhs);
    57555755            Node* op2 = get(bytecode.m_rhs);
     
    57615761        case op_jneq: {
    57625762            auto bytecode = currentInstruction->as<OpJneq>();
    5763             unsigned relativeOffset = jumpTarget(bytecode.m_target);
     5763            unsigned relativeOffset = jumpTarget(bytecode.m_targetLabel);
    57645764            Node* op1 = get(bytecode.m_lhs);
    57655765            Node* op2 = get(bytecode.m_rhs);
     
    57715771        case op_jnstricteq: {
    57725772            auto bytecode = currentInstruction->as<OpJnstricteq>();
    5773             unsigned relativeOffset = jumpTarget(bytecode.m_target);
     5773            unsigned relativeOffset = jumpTarget(bytecode.m_targetLabel);
    57745774            Node* op1 = get(bytecode.m_lhs);
    57755775            Node* op2 = get(bytecode.m_rhs);
     
    57815781        case op_jbelow: {
    57825782            auto bytecode = currentInstruction->as<OpJbelow>();
    5783             unsigned relativeOffset = jumpTarget(bytecode.m_target);
     5783            unsigned relativeOffset = jumpTarget(bytecode.m_targetLabel);
    57845784            Node* op1 = get(bytecode.m_lhs);
    57855785            Node* op2 = get(bytecode.m_rhs);
     
    57915791        case op_jbeloweq: {
    57925792            auto bytecode = currentInstruction->as<OpJbeloweq>();
    5793             unsigned relativeOffset = jumpTarget(bytecode.m_target);
     5793            unsigned relativeOffset = jumpTarget(bytecode.m_targetLabel);
    57945794            Node* op1 = get(bytecode.m_lhs);
    57955795            Node* op2 = get(bytecode.m_rhs);
     
    61086108                actualPointerFor(m_inlineStackTop->m_codeBlock, specialPointer));
    61096109            FrozenValue* frozenPointer = m_graph.freeze(actualPointer);
    6110             unsigned relativeOffset = jumpTarget(bytecode.m_target);
     6110            unsigned relativeOffset = jumpTarget(bytecode.m_targetLabel);
    61116111            Node* child = get(bytecode.m_value);
    61126112            if (bytecode.metadata(codeBlock).m_hasJumped) {
  • trunk/Source/JavaScriptCore/jit/JITArithmetic.cpp

    r240041 r240138  
    179179    int op1 = bytecode.m_lhs.offset();
    180180    int op2 = bytecode.m_rhs.offset();
    181     unsigned target = jumpTarget(instruction, bytecode.m_target);
     181    unsigned target = jumpTarget(instruction, bytecode.m_targetLabel);
    182182    if (isOperandConstantChar(op1)) {
    183183        emitGetVirtualRegister(op2, regT0);
     
    226226    int op1 = bytecode.m_lhs.offset();
    227227    int op2 = bytecode.m_rhs.offset();
    228     unsigned target = jumpTarget(instruction, bytecode.m_target);
     228    unsigned target = jumpTarget(instruction, bytecode.m_targetLabel);
    229229    if (isOperandConstantInt(op2)) {
    230230        emitGetVirtualRegister(op1, regT0);
     
    270270    int op1 = bytecode.m_lhs.offset();
    271271    int op2 = bytecode.m_rhs.offset();
    272     unsigned target = jumpTarget(instruction, bytecode.m_target);
     272    unsigned target = jumpTarget(instruction, bytecode.m_targetLabel);
    273273
    274274    // We generate inline code for the following cases in the slow path:
  • trunk/Source/JavaScriptCore/jit/JITArithmetic32_64.cpp

    r240041 r240138  
    5151    int op1 = bytecode.m_lhs.offset();
    5252    int op2 = bytecode.m_rhs.offset();
    53     unsigned target = jumpTarget(instruction, bytecode.m_target);
     53    unsigned target = jumpTarget(instruction, bytecode.m_targetLabel);
    5454
    5555    // Character less.
     
    105105    int op1 = bytecode.m_lhs.offset();
    106106    int op2 = bytecode.m_rhs.offset();
    107     unsigned target = jumpTarget(instruction, bytecode.m_target);
     107    unsigned target = jumpTarget(instruction, bytecode.m_targetLabel);
    108108
    109109    if (isOperandConstantInt(op1)) {
     
    146146    int op1 = bytecode.m_lhs.offset();
    147147    int op2 = bytecode.m_rhs.offset();
    148     unsigned target = jumpTarget(instruction, bytecode.m_target);
     148    unsigned target = jumpTarget(instruction, bytecode.m_targetLabel);
    149149
    150150    linkAllSlowCases(iter);
     
    200200    auto bytecode = instruction->as<Op>();
    201201    int opcodeID = Op::opcodeID;
    202     int target = jumpTarget(instruction, bytecode.m_target);
     202    int target = jumpTarget(instruction, bytecode.m_targetLabel);
    203203    int op1 = bytecode.m_lhs.offset();
    204204    int op2 = bytecode.m_rhs.offset();
  • trunk/Source/JavaScriptCore/jit/JITOpcodes.cpp

    r240041 r240138  
    8787{
    8888    auto bytecode = currentInstruction->as<OpJmp>();
    89     unsigned target = jumpTarget(currentInstruction, bytecode.m_target);
     89    unsigned target = jumpTarget(currentInstruction, bytecode.m_targetLabel);
    9090    addJump(jump(), target);
    9191}
     
    384384{
    385385    auto bytecode = currentInstruction->as<OpJfalse>();
    386     unsigned target = jumpTarget(currentInstruction, bytecode.m_target);
     386    unsigned target = jumpTarget(currentInstruction, bytecode.m_targetLabel);
    387387
    388388    GPRReg value = regT0;
     
    399399    auto bytecode = currentInstruction->as<OpJeqNull>();
    400400    int src = bytecode.m_value.offset();
    401     unsigned target = jumpTarget(currentInstruction, bytecode.m_target);
     401    unsigned target = jumpTarget(currentInstruction, bytecode.m_targetLabel);
    402402
    403403    emitGetVirtualRegister(src, regT0);
     
    423423    auto bytecode = currentInstruction->as<OpJneqNull>();
    424424    int src = bytecode.m_value.offset();
    425     unsigned target = jumpTarget(currentInstruction, bytecode.m_target);
     425    unsigned target = jumpTarget(currentInstruction, bytecode.m_targetLabel);
    426426
    427427    emitGetVirtualRegister(src, regT0);
     
    449449    int src = bytecode.m_value.offset();
    450450    Special::Pointer ptr = bytecode.m_specialPointer;
    451     unsigned target = jumpTarget(currentInstruction, bytecode.m_target);
     451    unsigned target = jumpTarget(currentInstruction, bytecode.m_targetLabel);
    452452   
    453453    emitGetVirtualRegister(src, regT0);
     
    471471{
    472472    auto bytecode = currentInstruction->as<OpJeq>();
    473     unsigned target = jumpTarget(currentInstruction, bytecode.m_target);
     473    unsigned target = jumpTarget(currentInstruction, bytecode.m_targetLabel);
    474474    emitGetVirtualRegisters(bytecode.m_lhs.offset(), regT0, bytecode.m_rhs.offset(), regT1);
    475475    emitJumpSlowCaseIfNotInt(regT0, regT1, regT2);
     
    480480{
    481481    auto bytecode = currentInstruction->as<OpJtrue>();
    482     unsigned target = jumpTarget(currentInstruction, bytecode.m_target);
     482    unsigned target = jumpTarget(currentInstruction, bytecode.m_targetLabel);
    483483
    484484    GPRReg value = regT0;
     
    504504{
    505505    auto bytecode = currentInstruction->as<OpJneq>();
    506     unsigned target = jumpTarget(currentInstruction, bytecode.m_target);
     506    unsigned target = jumpTarget(currentInstruction, bytecode.m_targetLabel);
    507507    emitGetVirtualRegisters(bytecode.m_lhs.offset(), regT0, bytecode.m_rhs.offset(), regT1);
    508508    emitJumpSlowCaseIfNotInt(regT0, regT1, regT2);
     
    567567{
    568568    auto bytecode = currentInstruction->as<Op>();
    569     int target = jumpTarget(currentInstruction, bytecode.m_target);
     569    int target = jumpTarget(currentInstruction, bytecode.m_targetLabel);
    570570    int src1 = bytecode.m_lhs.offset();
    571571    int src2 = bytecode.m_rhs.offset();
     
    608608
    609609    auto bytecode = currentInstruction->as<OpJstricteq>();
    610     unsigned target = jumpTarget(currentInstruction, bytecode.m_target);
     610    unsigned target = jumpTarget(currentInstruction, bytecode.m_targetLabel);
    611611    callOperation(operationCompareStrictEq, regT0, regT1);
    612612    emitJumpSlowToHot(branchTest32(NonZero, returnValueGPR), target);
     
    618618
    619619    auto bytecode = currentInstruction->as<OpJnstricteq>();
    620     unsigned target = jumpTarget(currentInstruction, bytecode.m_target);
     620    unsigned target = jumpTarget(currentInstruction, bytecode.m_targetLabel);
    621621    callOperation(operationCompareStrictEq, regT0, regT1);
    622622    emitJumpSlowToHot(branchTest32(Zero, returnValueGPR), target);
     
    933933{
    934934    auto bytecode = currentInstruction->as<OpCheckTdz>();
    935     emitGetVirtualRegister(bytecode.m_target.offset(), regT0);
     935    emitGetVirtualRegister(bytecode.m_targetVirtualRegister.offset(), regT0);
    936936    addSlowCase(branchIfEmpty(regT0));
    937937}
     
    966966
    967967    auto bytecode = currentInstruction->as<OpJeq>();
    968     unsigned target = jumpTarget(currentInstruction, bytecode.m_target);
     968    unsigned target = jumpTarget(currentInstruction, bytecode.m_targetLabel);
    969969    callOperation(operationCompareEq, regT0, regT1);
    970970    emitJumpSlowToHot(branchTest32(NonZero, returnValueGPR), target);
     
    976976
    977977    auto bytecode = currentInstruction->as<OpJneq>();
    978     unsigned target = jumpTarget(currentInstruction, bytecode.m_target);
     978    unsigned target = jumpTarget(currentInstruction, bytecode.m_targetLabel);
    979979    callOperation(operationCompareEq, regT0, regT1);
    980980    emitJumpSlowToHot(branchTest32(Zero, returnValueGPR), target);
     
    14001400    auto& metadata = bytecode.metadata(m_codeBlock);
    14011401    TypeLocation* cachedTypeLocation = metadata.m_typeLocation;
    1402     int valueToProfile = bytecode.m_target.offset();
     1402    int valueToProfile = bytecode.m_targetVirtualRegister.offset();
    14031403
    14041404    emitGetVirtualRegister(valueToProfile, regT0);
  • trunk/Source/JavaScriptCore/jit/JITOpcodes32_64.cpp

    r240041 r240138  
    7575{
    7676    auto bytecode = currentInstruction->as<OpJmp>();
    77     unsigned target = jumpTarget(currentInstruction, bytecode.m_target);
     77    unsigned target = jumpTarget(currentInstruction, bytecode.m_targetLabel);
    7878    addJump(jump(), target);
    7979}
     
    373373    auto bytecode = currentInstruction->as<OpJfalse>();
    374374    int cond = bytecode.m_condition.offset();
    375     unsigned target = jumpTarget(currentInstruction, bytecode.m_target);
     375    unsigned target = jumpTarget(currentInstruction, bytecode.m_targetLabel);
    376376
    377377    emitLoad(cond, regT1, regT0);
     
    388388    auto bytecode = currentInstruction->as<OpJtrue>();
    389389    int cond = bytecode.m_condition.offset();
    390     unsigned target = jumpTarget(currentInstruction, bytecode.m_target);
     390    unsigned target = jumpTarget(currentInstruction, bytecode.m_targetLabel);
    391391
    392392    emitLoad(cond, regT1, regT0);
     
    402402    auto bytecode = currentInstruction->as<OpJeqNull>();
    403403    int src = bytecode.m_value.offset();
    404     unsigned target = jumpTarget(currentInstruction, bytecode.m_target);
     404    unsigned target = jumpTarget(currentInstruction, bytecode.m_targetLabel);
    405405
    406406    emitLoad(src, regT1, regT0);
     
    428428    auto bytecode = currentInstruction->as<OpJneqNull>();
    429429    int src = bytecode.m_value.offset();
    430     unsigned target = jumpTarget(currentInstruction, bytecode.m_target);
     430    unsigned target = jumpTarget(currentInstruction, bytecode.m_targetLabel);
    431431
    432432    emitLoad(src, regT1, regT0);
     
    456456    int src = bytecode.m_value.offset();
    457457    Special::Pointer ptr = bytecode.m_specialPointer;
    458     unsigned target = jumpTarget(currentInstruction, bytecode.m_target);
     458    unsigned target = jumpTarget(currentInstruction, bytecode.m_targetLabel);
    459459
    460460    emitLoad(src, regT1, regT0);
     
    515515{
    516516    auto bytecode = currentInstruction->as<OpJeq>();
    517     unsigned target = jumpTarget(currentInstruction, bytecode.m_target);
     517    unsigned target = jumpTarget(currentInstruction, bytecode.m_targetLabel);
    518518    int src1 = bytecode.m_lhs.offset();
    519519    int src2 = bytecode.m_rhs.offset();
     
    555555{
    556556    auto bytecode = currentInstruction->as<OpJeq>();
    557     unsigned target = jumpTarget(currentInstruction, bytecode.m_target);
     557    unsigned target = jumpTarget(currentInstruction, bytecode.m_targetLabel);
    558558    compileOpEqJumpSlow(iter, CompileOpEqType::Eq, target);
    559559}
     
    607607{
    608608    auto bytecode = currentInstruction->as<OpJneq>();
    609     unsigned target = jumpTarget(currentInstruction, bytecode.m_target);
     609    unsigned target = jumpTarget(currentInstruction, bytecode.m_targetLabel);
    610610    int src1 = bytecode.m_lhs.offset();
    611611    int src2 = bytecode.m_rhs.offset();
     
    622622{
    623623    auto bytecode = currentInstruction->as<OpJneq>();
    624     unsigned target = jumpTarget(currentInstruction, bytecode.m_target);
     624    unsigned target = jumpTarget(currentInstruction, bytecode.m_targetLabel);
    625625    compileOpEqJumpSlow(iter, CompileOpEqType::NEq, target);
    626626}
     
    670670{
    671671    auto bytecode = currentInstruction->as<Op>();
    672     int target = jumpTarget(currentInstruction, bytecode.m_target);
     672    int target = jumpTarget(currentInstruction, bytecode.m_targetLabel);
    673673    int src1 = bytecode.m_lhs.offset();
    674674    int src2 = bytecode.m_rhs.offset();
     
    709709
    710710    auto bytecode = currentInstruction->as<OpJstricteq>();
    711     unsigned target = jumpTarget(currentInstruction, bytecode.m_target);
     711    unsigned target = jumpTarget(currentInstruction, bytecode.m_targetLabel);
    712712    callOperation(operationCompareStrictEq, JSValueRegs(regT1, regT0), JSValueRegs(regT3, regT2));
    713713    emitJumpSlowToHot(branchTest32(NonZero, returnValueGPR), target);
     
    719719
    720720    auto bytecode = currentInstruction->as<OpJnstricteq>();
    721     unsigned target = jumpTarget(currentInstruction, bytecode.m_target);
     721    unsigned target = jumpTarget(currentInstruction, bytecode.m_targetLabel);
    722722    callOperation(operationCompareStrictEq, JSValueRegs(regT1, regT0), JSValueRegs(regT3, regT2));
    723723    emitJumpSlowToHot(branchTest32(Zero, returnValueGPR), target);
     
    10591059{
    10601060    auto bytecode = currentInstruction->as<OpCheckTdz>();
    1061     emitLoadTag(bytecode.m_target.offset(), regT0);
     1061    emitLoadTag(bytecode.m_targetVirtualRegister.offset(), regT0);
    10621062    addSlowCase(branchIfEmpty(regT0));
    10631063}
     
    12721272    auto& metadata = bytecode.metadata(m_codeBlock);
    12731273    TypeLocation* cachedTypeLocation = metadata.m_typeLocation;
    1274     int valueToProfile = bytecode.m_target.offset();
     1274    int valueToProfile = bytecode.m_targetVirtualRegister.offset();
    12751275
    12761276    // Load payload in T0. Load tag in T3.
  • trunk/Source/JavaScriptCore/llint/LLIntSlowPaths.cpp

    r240041 r240138  
    123123    } while (false)
    124124
    125 #define JUMP_OFFSET(target) \
    126     ((target) ? (target) : exec->codeBlock()->outOfLineJumpOffset(pc))
     125#define JUMP_OFFSET(targetOffset) \
     126    ((targetOffset) ? (targetOffset) : exec->codeBlock()->outOfLineJumpOffset(pc))
    127127
    128128#define JUMP_TO(target) do { \
     
    134134        LLINT_CHECK_EXCEPTION();                                  \
    135135        if (__b_condition)                                        \
    136             JUMP_TO(JUMP_OFFSET(bytecode.m_target)); \
     136            JUMP_TO(JUMP_OFFSET(bytecode.m_targetLabel));        \
    137137        else                                                      \
    138138            JUMP_TO(pc->size()); \
     
    657657        auto& metadata = bytecode.metadata(exec);
    658658        {
    659             StructureID oldStructureID = metadata.m_structure;
     659            StructureID oldStructureID = metadata.m_structureID;
    660660            if (oldStructureID) {
    661661                Structure* a = vm.heap.structureIDTable().get(oldStructureID);
     
    673673        if (slot.isValue()) {
    674674            // Start out by clearing out the old cache.
    675             metadata.m_structure = 0;
     675            metadata.m_structureID = 0;
    676676            metadata.m_offset = 0;
    677677
     
    682682                ConcurrentJSLocker locker(codeBlock->m_lock);
    683683
    684                 metadata.m_structure = structure->id();
     684                metadata.m_structureID = structure->id();
    685685                metadata.m_offset = slot.cachedOffset();
    686686            }
     
    737737    if (slot.isUnset()) {
    738738        metadata.m_mode = GetByIdMode::Unset;
    739         metadata.m_modeMetadata.unsetMode.structure = structure->id();
     739        metadata.m_modeMetadata.unsetMode.structureID = structure->id();
    740740        return;
    741741    }
     
    743743
    744744    metadata.m_mode = GetByIdMode::ProtoLoad;
    745     metadata.m_modeMetadata.protoLoadMode.structure = structure->id();
     745    metadata.m_modeMetadata.protoLoadMode.structureID = structure->id();
    746746    metadata.m_modeMetadata.protoLoadMode.cachedOffset = offset;
    747747    metadata.m_modeMetadata.protoLoadMode.cachedSlot = slot.slotBase();
     
    774774            switch (mode) {
    775775            case GetByIdMode::Default:
    776                 oldStructureID = metadata.m_modeMetadata.defaultMode.structure;
     776                oldStructureID = metadata.m_modeMetadata.defaultMode.structureID;
    777777                break;
    778778            case GetByIdMode::Unset:
    779                 oldStructureID = metadata.m_modeMetadata.unsetMode.structure;
     779                oldStructureID = metadata.m_modeMetadata.unsetMode.structureID;
    780780                break;
    781781            case GetByIdMode::ProtoLoad:
    782                 oldStructureID = metadata.m_modeMetadata.protoLoadMode.structure;
     782                oldStructureID = metadata.m_modeMetadata.protoLoadMode.structureID;
    783783                break;
    784784            default:
     
    801801            // Start out by clearing out the old cache.
    802802            metadata.m_mode = GetByIdMode::Default;
    803             metadata.m_modeMetadata.defaultMode.structure = 0;
     803            metadata.m_modeMetadata.defaultMode.structureID = 0;
    804804            metadata.m_modeMetadata.defaultMode.cachedOffset = 0;
    805805
     
    813813                ConcurrentJSLocker locker(codeBlock->m_lock);
    814814
    815                 metadata.m_modeMetadata.defaultMode.structure = structure->id();
     815                metadata.m_modeMetadata.defaultMode.structureID = structure->id();
    816816                metadata.m_modeMetadata.defaultMode.cachedOffset = slot.cachedOffset();
    817817            }
     
    858858
    859859        {
    860             StructureID oldStructureID = metadata.m_oldStructure;
     860            StructureID oldStructureID = metadata.m_oldStructureID;
    861861            if (oldStructureID) {
    862862                Structure* a = vm.heap.structureIDTable().get(oldStructureID);
     
    873873
    874874        // Start out by clearing out the old cache.
    875         metadata.m_oldStructure = 0;
     875        metadata.m_oldStructureID = 0;
    876876        metadata.m_offset = 0;
    877         metadata.m_newStructure = 0;
     877        metadata.m_newStructureID = 0;
    878878        metadata.m_structureChain.clear();
    879879       
     
    897897                    if (result != InvalidPrototypeChain && !sawPolyProto) {
    898898                        ASSERT(structure->previousID()->isObject());
    899                         metadata.m_oldStructure = structure->previousID()->id();
     899                        metadata.m_oldStructureID = structure->previousID()->id();
    900900                        metadata.m_offset = slot.cachedOffset();
    901                         metadata.m_newStructure = structure->id();
     901                        metadata.m_newStructureID = structure->id();
    902902                        if (!(bytecode.m_flags & PutByIdIsDirect)) {
    903903                            StructureChain* chain = structure->prototypeChain(exec, asObject(baseCell));
     
    909909            } else {
    910910                structure->didCachePropertyReplacement(vm, slot.cachedOffset());
    911                 metadata.m_oldStructure = structure->id();
     911                metadata.m_oldStructureID = structure->id();
    912912                metadata.m_offset = slot.cachedOffset();
    913913            }
  • trunk/Source/JavaScriptCore/llint/LowLevelInterpreter.asm

    r240041 r240138  
    286286end
    287287
    288 macro dispatch(advance)
    289     addp advance, PC
     288macro dispatch(advanceReg)
     289    addp advanceReg, PC
    290290    nextInstruction()
    291291end
    292292
    293 macro dispatchIndirect(offset)
    294     dispatch(offset)
    295 end
    296 
    297 macro dispatchOp(size, op)
     293macro dispatchIndirect(offsetReg)
     294    dispatch(offsetReg)
     295end
     296
     297macro dispatchOp(size, opcodeName)
    298298    macro dispatchNarrow()
    299         dispatch(constexpr %op%_length)
     299        dispatch(constexpr %opcodeName%_length)
    300300    end
    301301
    302302    macro dispatchWide()
    303         dispatch(constexpr %op%_length * 4 + 1)
     303        dispatch(constexpr %opcodeName%_length * 4 + 1)
    304304    end
    305305
     
    307307end
    308308
    309 macro getu(size, op, fieldName, dst)
     309macro getu(size, opcodeStruct, fieldName, dst)
    310310    size(getuOperandNarrow, getuOperandWide, macro (getu)
    311         getu(op, fieldName, dst)
     311        getu(opcodeStruct, fieldName, dst)
    312312    end)
    313313end
    314314
    315 macro get(size, op, fieldName, dst)
     315macro get(size, opcodeStruct, fieldName, dst)
    316316    size(getOperandNarrow, getOperandWide, macro (get)
    317         get(op, fieldName, dst)
     317        get(opcodeStruct, fieldName, dst)
    318318    end)
    319319end
     
    335335end
    336336
    337 macro jumpImpl(target)
    338     btiz target, .outOfLineJumpTarget
    339     dispatchIndirect(target)
     337macro jumpImpl(targetOffsetReg)
     338    btiz targetOffsetReg, .outOfLineJumpTarget
     339    dispatchIndirect(targetOffsetReg)
    340340.outOfLineJumpTarget:
    341341    callSlowPath(_llint_slow_path_out_of_line_jump_target)
     
    359359end
    360360
    361 macro llintOp(name, op, fn)
    362     commonOp(llint_%name%, traceExecution, macro(size)
     361macro llintOp(opcodeName, opcodeStruct, fn)
     362    commonOp(llint_%opcodeName%, traceExecution, macro(size)
    363363        macro getImpl(fieldName, dst)
    364             get(size, op, fieldName, dst)
     364            get(size, opcodeStruct, fieldName, dst)
    365365        end
    366366
    367367        macro dispatchImpl()
    368             dispatchOp(size, name)
     368            dispatchOp(size, opcodeName)
    369369        end
    370370
     
    373373end
    374374
    375 macro llintOpWithReturn(name, op, fn)
    376     llintOp(name, op, macro(size, get, dispatch)
     375macro llintOpWithReturn(opcodeName, opcodeStruct, fn)
     376    llintOp(opcodeName, opcodeStruct, macro(size, get, dispatch)
    377377        makeReturn(get, dispatch, macro (return)
    378378            fn(size, get, dispatch, return)
     
    381381end
    382382
    383 macro llintOpWithMetadata(name, op, fn)
    384     llintOpWithReturn(name, op, macro (size, get, dispatch, return)
     383macro llintOpWithMetadata(opcodeName, opcodeStruct, fn)
     384    llintOpWithReturn(opcodeName, opcodeStruct, macro (size, get, dispatch, return)
    385385        macro meta(dst, scratch)
    386             metadata(size, op, dst, scratch)
     386            metadata(size, opcodeStruct, dst, scratch)
    387387        end
    388388        fn(size, get, dispatch, meta, return)
     
    390390end
    391391
    392 macro llintOpWithJump(name, op, impl)
    393     llintOpWithMetadata(name, op, macro(size, get, dispatch, metadata, return)
     392macro llintOpWithJump(opcodeName, opcodeStruct, impl)
     393    llintOpWithMetadata(opcodeName, opcodeStruct, macro(size, get, dispatch, metadata, return)
    394394        macro jump(fieldName)
    395395            get(fieldName, t0)
     
    401401end
    402402
    403 macro llintOpWithProfile(name, op, fn)
    404     llintOpWithMetadata(name, op, macro(size, get, dispatch, metadata, return)
    405         makeReturnProfiled(op, get, metadata, dispatch, macro (returnProfiled)
     403macro llintOpWithProfile(opcodeName, opcodeStruct, fn)
     404    llintOpWithMetadata(opcodeName, opcodeStruct, macro(size, get, dispatch, metadata, return)
     405        makeReturnProfiled(opcodeStruct, get, metadata, dispatch, macro (returnProfiled)
    406406            fn(size, get, dispatch, returnProfiled)
    407407        end)
     
    896896end
    897897
    898 macro callTargetFunction(size, op, dispatch, callee, callPtrTag)
     898macro callTargetFunction(size, opcodeStruct, dispatch, callee, callPtrTag)
    899899    if C_LOOP
    900900        cloopCallJSFunction callee
     
    903903    end
    904904    restoreStackPointerAfterCall()
    905     dispatchAfterCall(size, op, dispatch)
     905    dispatchAfterCall(size, opcodeStruct, dispatch)
    906906end
    907907
     
    916916    loadi PayloadOffset + ArgumentCount[cfr], temp2
    917917    loadp CodeBlock[cfr], temp1
    918     loadp CodeBlock::m_numParameters[temp1], temp1
     918    loadi CodeBlock::m_numParameters[temp1], temp1
    919919    bilteq temp1, temp2, .noArityFixup
    920920    move temp1, temp2
     
    971971end
    972972
    973 macro slowPathForCall(size, op, dispatch, slowPath, prepareCall)
     973macro slowPathForCall(size, opcodeStruct, dispatch, slowPath, prepareCall)
    974974    callCallSlowPath(
    975975        slowPath,
     
    980980            prepareCall(callee, t2, t3, t4, SlowPathPtrTag)
    981981        .dontUpdateSP:
    982             callTargetFunction(size, op, dispatch, callee, SlowPathPtrTag)
     982            callTargetFunction(size, opcodeStruct, dispatch, callee, SlowPathPtrTag)
    983983        end)
    984984end
     
    11931193    btpz t3, .argumentProfileDone # When we can't JIT, we don't allocate any argument value profiles.
    11941194    mulp sizeof ValueProfile, t0, t2 # Aaaaahhhh! Need strength reduction!
    1195     lshiftp 3, t0
    1196     addp t2, t3
     1195    lshiftp 3, t0 # offset of last JSValue arguments on the stack.
     1196    addp t2, t3 # pointer to end of ValueProfile array in CodeBlock::m_argumentValueProfiles.
    11971197.argumentProfileLoop:
    11981198    if JSVALUE64
     
    14341434
    14351435# Value-representation-agnostic code.
    1436 macro slowPathOp(op)
    1437     llintOp(op_%op%, unused, macro (unused, unused, dispatch)
    1438         callSlowPath(_slow_path_%op%)
     1436macro slowPathOp(opcodeName)
     1437    llintOp(op_%opcodeName%, unused, macro (unused, unused, dispatch)
     1438        callSlowPath(_slow_path_%opcodeName%)
    14391439        dispatch()
    14401440    end)
     
    14821482slowPathOp(unreachable)
    14831483
    1484 macro llintSlowPathOp(op)
    1485     llintOp(op_%op%, unused, macro (unused, unused, dispatch)
    1486         callSlowPath(_llint_slow_path_%op%)
     1484macro llintSlowPathOp(opcodeName)
     1485    llintOp(op_%opcodeName%, unused, macro (unused, unused, dispatch)
     1486        callSlowPath(_llint_slow_path_%opcodeName%)
    14871487        dispatch()
    14881488    end)
     
    15391539
    15401540llintOpWithJump(op_jmp, OpJmp, macro (size, get, jump, dispatch)
    1541     jump(m_target)
     1541    jump(m_targetLabel)
    15421542end)
    15431543
     
    16751675
    16761676
    1677 macro callOp(name, op, prepareCall, fn)
    1678     commonCallOp(op_%name%, _llint_slow_path_%name%, op, prepareCall, fn)
     1677macro callOp(opcodeName, opcodeStruct, prepareCall, fn)
     1678    commonCallOp(op_%opcodeName%, _llint_slow_path_%opcodeName%, opcodeStruct, prepareCall, fn)
    16791679end
    16801680
     
    16911691
    16921692
    1693 macro doCallVarargs(size, op, dispatch, frameSlowPath, slowPath, prepareCall)
     1693macro doCallVarargs(size, opcodeStruct, dispatch, frameSlowPath, slowPath, prepareCall)
    16941694    callSlowPath(frameSlowPath)
    16951695    branchIfException(_llint_throw_from_slow_path_trampoline)
     
    17061706        end
    17071707    end
    1708     slowPathForCall(size, op, dispatch, slowPath, prepareCall)
     1708    slowPathForCall(size, opcodeStruct, dispatch, slowPath, prepareCall)
    17091709end
    17101710
  • trunk/Source/JavaScriptCore/llint/LowLevelInterpreter32_64.asm

    r240041 r240138  
    3636end
    3737
    38 macro getuOperandNarrow(op, fieldName, dst)
    39     loadb constexpr %op%_%fieldName%_index[PC], dst
    40 end
    41 
    42 macro getOperandNarrow(op, fieldName, dst)
    43     loadbsp constexpr %op%_%fieldName%_index[PC], dst
    44 end
    45 
    46 macro getuOperandWide(op, fieldName, dst)
    47     loadi constexpr %op%_%fieldName%_index * 4 + 1[PC], dst
    48 end
    49 
    50 macro getOperandWide(op, fieldName, dst)
    51     loadis constexpr %op%_%fieldName%_index * 4 + 1[PC], dst
     38macro getuOperandNarrow(opcodeStruct, fieldName, dst)
     39    loadb constexpr %opcodeStruct%_%fieldName%_index[PC], dst
     40end
     41
     42macro getOperandNarrow(opcodeStruct, fieldName, dst)
     43    loadbsp constexpr %opcodeStruct%_%fieldName%_index[PC], dst
     44end
     45
     46macro getuOperandWide(opcodeStruct, fieldName, dst)
     47    loadi constexpr %opcodeStruct%_%fieldName%_index * 4 + 1[PC], dst
     48end
     49
     50macro getOperandWide(opcodeStruct, fieldName, dst)
     51    loadis constexpr %opcodeStruct%_%fieldName%_index * 4 + 1[PC], dst
    5252end
    5353
     
    6363end
    6464
    65 macro makeReturnProfiled(op, get, metadata, dispatch, fn)
     65macro makeReturnProfiled(opcodeStruct, get, metadata, dispatch, fn)
    6666    fn(macro (tag, payload)
    6767        move tag, t1
     
    6969
    7070        metadata(t5, t2)
    71         valueProfile(op, t5, t1, t0)
     71        valueProfile(opcodeStruct, t5, t1, t0)
    7272        get(m_dst, t2)
    7373        storei t1, TagOffset[cfr, t2, 8]
     
    7878
    7979
    80 macro dispatchAfterCall(size, op, dispatch)
     80macro dispatchAfterCall(size, opcodeStruct, dispatch)
    8181    loadi ArgumentCount + TagOffset[cfr], PC
    82     get(size, op, m_dst, t3)
     82    get(size, opcodeStruct, m_dst, t3)
    8383    storei r1, TagOffset[cfr, t3, 8]
    8484    storei r0, PayloadOffset[cfr, t3, 8]
    85     metadata(size, op, t2, t3)
    86     valueProfile(op, t2, r1, r0)
     85    metadata(size, opcodeStruct, t2, t3)
     86    valueProfile(opcodeStruct, t2, r1, r0)
    8787    dispatch()
    8888end
     
    599599end
    600600
    601 macro valueProfile(op, metadata, tag, payload)
    602     storei tag, %op%::Metadata::m_profile.m_buckets + TagOffset[metadata]
    603     storei payload, %op%::Metadata::m_profile.m_buckets + PayloadOffset[metadata]
     601macro valueProfile(opcodeStruct, metadata, tag, payload)
     602    storei tag, %opcodeStruct%::Metadata::m_profile.m_buckets + TagOffset[metadata]
     603    storei payload, %opcodeStruct%::Metadata::m_profile.m_buckets + PayloadOffset[metadata]
    604604end
    605605
     
    683683    andp MarkedBlockMask, t3
    684684    loadp MarkedBlockFooterOffset + MarkedBlock::Footer::m_vm[t3], t3
    685     btiz VM::m_exception[t3], .noException
     685    btpz VM::m_exception[t3], .noException
    686686    jmp label
    687687.noException:
     
    735735llintOpWithReturn(op_get_scope, OpGetScope, macro (size, get, dispatch, return)
    736736    loadi Callee + PayloadOffset[cfr], t0
    737     loadi JSCallee::m_scope[t0], t0
     737    loadp JSCallee::m_scope[t0], t0
    738738    return (CellTag, t0)
    739739end)
     
    747747    metadata(t2, t3)
    748748    loadp OpToThis::Metadata::m_cachedStructure[t2], t2
    749     bpneq JSCell::m_structureID[t0], t2, .opToThisSlow
     749    bineq JSCell::m_structureID[t0], t2, .opToThisSlow
    750750    dispatch()
    751751
     
    757757
    758758llintOp(op_check_tdz, OpCheckTdz, macro (size, get, dispatch)
    759     get(m_target, t0)
     759    get(m_targetVirtualRegister, t0)
    760760    loadConstantOrVariableTag(size, t0, t1)
    761761    bineq t1, EmptyValueTag, .opNotTDZ
     
    787787
    788788
    789 macro equalityComparisonOp(name, op, integerComparison)
    790     llintOpWithReturn(op_%name%, op, macro (size, get, dispatch, return)
     789macro equalityComparisonOp(opcodeName, opcodeStruct, integerComparison)
     790    llintOpWithReturn(op_%opcodeName%, opcodeStruct, macro (size, get, dispatch, return)
    791791        get(m_rhs, t2)
    792792        get(m_lhs, t0)
     
    800800
    801801    .opEqSlow:
    802         callSlowPath(_slow_path_%name%)
     802        callSlowPath(_slow_path_%opcodeName%)
    803803        dispatch()
    804804    end)
     
    806806
    807807
    808 macro equalityJumpOp(name, op, integerComparison)
    809     llintOpWithJump(op_%name%, op, macro (size, get, jump, dispatch)
     808macro equalityJumpOp(opcodeName, opcodeStruct, integerComparison)
     809    llintOpWithJump(op_%opcodeName%, opcodeStruct, macro (size, get, jump, dispatch)
    810810        get(m_rhs, t2)
    811811        get(m_lhs, t0)
     
    819819
    820820    .jumpTarget:
    821         jump(m_target)
     821        jump(m_targetLabel)
    822822
    823823    .slow:
    824         callSlowPath(_llint_slow_path_%name%)
     824        callSlowPath(_llint_slow_path_%opcodeName%)
    825825        nextInstruction()
    826826    end)
     
    828828
    829829
    830 macro equalNullComparisonOp(name, op, fn)
    831     llintOpWithReturn(name, op, macro (size, get, dispatch, return)
     830macro equalNullComparisonOp(opcodeName, opcodeStruct, fn)
     831    llintOpWithReturn(opcodeName, opcodeStruct, macro (size, get, dispatch, return)
    832832        get(m_operand, t0)
    833833        assertNotConstant(size, t0)
     
    839839        jmp .opEqNullNotImmediate
    840840    .opEqNullMasqueradesAsUndefined:
    841         loadp JSCell::m_structureID[t0], t1
     841        loadi JSCell::m_structureID[t0], t1
    842842        loadp CodeBlock[cfr], t0
    843843        loadp CodeBlock::m_globalObject[t0], t0
     
    870870
    871871
    872 macro strictEqOp(name, op, equalityOperation)
    873     llintOpWithReturn(op_%name%, op, macro (size, get, dispatch, return)
     872macro strictEqOp(opcodeName, opcodeStruct, equalityOperation)
     873    llintOpWithReturn(op_%opcodeName%, opcodeStruct, macro (size, get, dispatch, return)
    874874        get(m_rhs, t2)
    875875        get(m_lhs, t0)
     
    886886
    887887    .slow:
    888         callSlowPath(_slow_path_%name%)
     888        callSlowPath(_slow_path_%opcodeName%)
    889889        dispatch()
    890890    end)
     
    892892
    893893
    894 macro strictEqualityJumpOp(name, op, equalityOperation)
    895     llintOpWithJump(op_%name%, op, macro (size, get, jump, dispatch)
     894macro strictEqualityJumpOp(opcodeName, opcodeStruct, equalityOperation)
     895    llintOpWithJump(op_%opcodeName%, opcodeStruct, macro (size, get, jump, dispatch)
    896896        get(m_rhs, t2)
    897897        get(m_lhs, t0)
     
    908908
    909909    .jumpTarget:
    910         jump(m_target)
     910        jump(m_targetLabel)
    911911
    912912    .slow:
    913         callSlowPath(_llint_slow_path_%name%)
     913        callSlowPath(_llint_slow_path_%opcodeName%)
    914914        nextInstruction()
    915915    end)
     
    933933
    934934
    935 macro preOp(name, op, operation)
    936     llintOp(op_%name%, op, macro (size, get, dispatch)
     935macro preOp(opcodeName, opcodeStruct, operation)
     936    llintOp(op_%opcodeName%, opcodeStruct, macro (size, get, dispatch)
    937937        get(m_srcDst, t0)
    938938        bineq TagOffset[cfr, t0, 8], Int32Tag, .slow
     
    943943
    944944    .slow:
    945         callSlowPath(_slow_path_%name%)
     945        callSlowPath(_slow_path_%opcodeName%)
    946946        dispatch()
    947947    end)
     
    993993
    994994    macro arithProfile(type)
    995         ori type, OpNegate::Metadata::m_arithProfile[t5]
     995        ori type, OpNegate::Metadata::m_arithProfile + ArithProfile::m_bits[t5]
    996996    end
    997997
     
    10161016
    10171017
    1018 macro binaryOpCustomStore(name, op, integerOperationAndStore, doubleOperation)
    1019     llintOpWithMetadata(op_%name%, op, macro (size, get, dispatch, metadata, return)
     1018macro binaryOpCustomStore(opcodeName, opcodeStruct, integerOperationAndStore, doubleOperation)
     1019    llintOpWithMetadata(op_%opcodeName%, opcodeStruct, macro (size, get, dispatch, metadata, return)
    10201020        macro arithProfile(type)
    1021             ori type, %op%::Metadata::m_arithProfile[t5]
     1021            ori type, %opcodeStruct%::Metadata::m_arithProfile + ArithProfile::m_bits[t5]
    10221022        end
    10231023
     
    10641064
    10651065    .slow:
    1066         callSlowPath(_slow_path_%name%)
     1066        callSlowPath(_slow_path_%opcodeName%)
    10671067        dispatch()
    10681068    end)
    10691069end
    10701070
    1071 macro binaryOp(name, op, integerOperation, doubleOperation)
    1072     binaryOpCustomStore(name, op,
     1071macro binaryOp(opcodeName, opcodeStruct, integerOperation, doubleOperation)
     1072    binaryOpCustomStore(opcodeName, opcodeStruct,
    10731073        macro (int32Tag, left, right, slow, index)
    10741074            integerOperation(left, right, slow)
     
    11311131
    11321132
    1133 macro commonBitOp(opKind, name, op, operation)
    1134     opKind(op_%name%, op, macro (size, get, dispatch, return)
     1133macro commonBitOp(opKind, opcodeName, opcodeStruct, operation)
     1134    opKind(op_%opcodeName%, opcodeStruct, macro (size, get, dispatch, return)
    11351135        get(m_rhs, t2)
    11361136        get(m_lhs, t0)
     
    11431143
    11441144    .slow:
    1145         callSlowPath(_slow_path_%name%)
     1145        callSlowPath(_slow_path_%opcodeName%)
    11461146        dispatch()
    11471147    end)
    11481148end
    11491149
    1150 macro bitOp(name, op, operation)
    1151     commonBitOp(llintOpWithReturn, name, op, operation)
    1152 end
    1153 
    1154 macro bitOpProfiled(name, op, operation)
    1155     commonBitOp(llintOpWithProfile, name, op, operation)
     1150macro bitOp(opcodeName, opcodeStruct, operation)
     1151    commonBitOp(llintOpWithReturn, opcodeName, opcodeStruct, operation)
     1152end
     1153
     1154macro bitOpProfiled(opcodeName, opcodeStruct, operation)
     1155    commonBitOp(llintOpWithProfile, opcodeName, opcodeStruct, operation)
    11561156end
    11571157
     
    12371237    return(BooleanTag, 0)
    12381238.opIsUndefinedMasqueradesAsUndefined:
    1239     loadp JSCell::m_structureID[t3], t1
     1239    loadi JSCell::m_structureID[t3], t1
    12401240    loadp CodeBlock[cfr], t3
    12411241    loadp CodeBlock::m_globalObject[t3], t3
     
    13291329    metadata(t5, t0)
    13301330    get(m_base, t0)
    1331     loadi OpGetByIdDirect::Metadata::m_structure[t5], t1
     1331    loadi OpGetByIdDirect::Metadata::m_structureID[t5], t1
    13321332    loadConstantOrVariablePayload(size, t0, CellTag, t3, .opGetByIdDirectSlow)
    13331333    loadi OpGetByIdDirect::Metadata::m_offset[t5], t2
     
    13501350.opGetByIdProtoLoad:
    13511351    bbneq t1, constexpr GetByIdMode::ProtoLoad, .opGetByIdArrayLength
    1352     loadi OpGetById::Metadata::m_modeMetadata.protoLoadMode.structure[t5], t1
     1352    loadi OpGetById::Metadata::m_modeMetadata.protoLoadMode.structureID[t5], t1
    13531353    loadConstantOrVariablePayload(size, t0, CellTag, t3, .opGetByIdSlow)
    13541354    loadis OpGetById::Metadata::m_modeMetadata.protoLoadMode.cachedOffset[t5], t2
     
    13741374.opGetByIdUnset:
    13751375    bbneq t1, constexpr GetByIdMode::Unset, .opGetByIdDefault
    1376     loadi OpGetById::Metadata::m_modeMetadata.unsetMode.structure[t5], t1
     1376    loadi OpGetById::Metadata::m_modeMetadata.unsetMode.structureID[t5], t1
    13771377    loadConstantOrVariablePayload(size, t0, CellTag, t3, .opGetByIdSlow)
    13781378    bineq JSCell::m_structureID[t3], t1, .opGetByIdSlow
     
    13811381
    13821382.opGetByIdDefault:
    1383     loadi OpGetById::Metadata::m_modeMetadata.defaultMode.structure[t5], t1
     1383    loadi OpGetById::Metadata::m_modeMetadata.defaultMode.structureID[t5], t1
    13841384    loadConstantOrVariablePayload(size, t0, CellTag, t3, .opGetByIdSlow)
    13851385    loadis OpGetById::Metadata::m_modeMetadata.defaultMode.cachedOffset[t5], t2
     
    14011401    loadConstantOrVariablePayload(size, t3, CellTag, t0, .opPutByIdSlow)
    14021402    loadi JSCell::m_structureID[t0], t2
    1403     bineq t2, OpPutById::Metadata::m_oldStructure[t5], .opPutByIdSlow
     1403    bineq t2, OpPutById::Metadata::m_oldStructureID[t5], .opPutByIdSlow
    14041404
    14051405    # At this point, we have:
     
    14091409    # We will lose currentStructureID in the shenanigans below.
    14101410
    1411     loadi OpPutById::Metadata::m_newStructure[t5], t1
     1411    loadi OpPutById::Metadata::m_newStructureID[t5], t1
    14121412
    14131413    btiz t1, .opPutByIdNotTransition
     
    14181418    btpz t3, .opPutByIdTransitionDirect
    14191419
    1420     loadi OpPutById::Metadata::m_oldStructure[t5], t2 # Need old structure again.
     1420    loadi OpPutById::Metadata::m_oldStructureID[t5], t2 # Need old structure again.
    14211421    loadp StructureChain::m_vector[t3], t3
    14221422    assert(macro (ok) btpnz t3, ok end)
     
    14261426.opPutByIdTransitionChainLoop:
    14271427    loadp [t3], t1
    1428     bpneq t1, JSCell::m_structureID[t2], .opPutByIdSlow
     1428    bineq t1, JSCell::m_structureID[t2], .opPutByIdSlow
    14291429    addp 4, t3
    14301430    loadp Structure::m_prototype[t1], t2
     
    14321432
    14331433.opPutByIdTransitionChainDone:
    1434     loadi OpPutById::Metadata::m_newStructure[t5], t1
     1434    loadi OpPutById::Metadata::m_newStructureID[t5], t1
    14351435
    14361436.opPutByIdTransitionDirect:
     
    15081508
    15091509
    1510 macro putByValOp(name, op)
    1511     llintOpWithMetadata(op_%name%, op, macro (size, get, dispatch, metadata, return)
     1510macro putByValOp(opcodeName, opcodeStruct)
     1511    llintOpWithMetadata(op_%opcodeName%, opcodeStruct, macro (size, get, dispatch, metadata, return)
    15121512        macro contiguousPutByVal(storeCallback)
    15131513            biaeq t3, -sizeof IndexingHeader + IndexingHeader::u.lengths.publicLength[t0], .outOfBounds
     
    15191519        .outOfBounds:
    15201520            biaeq t3, -sizeof IndexingHeader + IndexingHeader::u.lengths.vectorLength[t0], .opPutByValOutOfBounds
    1521             storeb 1, %op%::Metadata::m_arrayProfile.m_mayStoreToHole[t5]
     1521            storeb 1, %opcodeStruct%::Metadata::m_arrayProfile.m_mayStoreToHole[t5]
    15221522            addi 1, t3, t2
    15231523            storei t2, -sizeof IndexingHeader + IndexingHeader::u.lengths.publicLength[t0]
     
    15301530        loadConstantOrVariablePayload(size, t0, CellTag, t1, .opPutByValSlow)
    15311531        move t1, t2
    1532         arrayProfile(%op%::Metadata::m_arrayProfile, t2, t5, t0)
     1532        arrayProfile(%opcodeStruct%::Metadata::m_arrayProfile, t2, t5, t0)
    15331533        get(m_property, t0)
    15341534        loadConstantOrVariablePayload(size, t0, Int32Tag, t3, .opPutByValSlow)
     
    15841584
    15851585    .opPutByValArrayStorageEmpty:
    1586         storeb 1, %op%::Metadata::m_arrayProfile.m_mayStoreToHole[t5]
     1586        storeb 1, %opcodeStruct%::Metadata::m_arrayProfile.m_mayStoreToHole[t5]
    15871587        addi 1, ArrayStorage::m_numValuesInVector[t0]
    15881588        bib t3, -sizeof IndexingHeader + IndexingHeader::u.lengths.publicLength[t0], .opPutByValArrayStorageStoreResult
     
    15921592
    15931593    .opPutByValOutOfBounds:
    1594         storeb 1, %op%::Metadata::m_arrayProfile.m_outOfBounds[t5]
     1594        storeb 1, %opcodeStruct%::Metadata::m_arrayProfile.m_outOfBounds[t5]
    15951595    .opPutByValSlow:
    1596         callSlowPath(_llint_slow_path_%name%)
     1596        callSlowPath(_llint_slow_path_%opcodeName%)
    15971597        dispatch()
    15981598    end)
     
    16051605
    16061606
    1607 macro llintJumpTrueOrFalseOp(name, op, conditionOp)
    1608     llintOpWithJump(op_%name%, op, macro (size, get, jump, dispatch)
     1607macro llintJumpTrueOrFalseOp(opcodeName, opcodeStruct, conditionOp)
     1608    llintOpWithJump(op_%opcodeName%, opcodeStruct, macro (size, get, jump, dispatch)
    16091609        get(m_condition, t1)
    16101610        loadConstantOrVariablePayload(size, t1, BooleanTag, t0, .slow)
     
    16131613
    16141614    .target:
    1615         jump(m_target)
     1615        jump(m_targetLabel)
    16161616
    16171617    .slow:
    1618         callSlowPath(_llint_slow_path_%name%)
     1618        callSlowPath(_llint_slow_path_%opcodeName%)
    16191619        nextInstruction()
    16201620    end)
     
    16221622
    16231623
    1624 macro equalNullJumpOp(name, op, cellHandler, immediateHandler)
    1625     llintOpWithJump(op_%name%, op, macro (size, get, jump, dispatch)
     1624macro equalNullJumpOp(opcodeName, opcodeStruct, cellHandler, immediateHandler)
     1625    llintOpWithJump(op_%opcodeName%, opcodeStruct, macro (size, get, jump, dispatch)
    16261626        get(m_value, t0)
    16271627        assertNotConstant(size, t0)
     
    16291629        loadi PayloadOffset[cfr, t0, 8], t0
    16301630        bineq t1, CellTag, .immediate
    1631         loadp JSCell::m_structureID[t0], t2
     1631        loadi JSCell::m_structureID[t0], t2
    16321632        cellHandler(t2, JSCell::m_flags[t0], .target)
    16331633        dispatch()
    16341634
    16351635    .target:
    1636         jump(m_target)
     1636        jump(m_targetLabel)
    16371637
    16381638    .immediate:
     
    16661666llintOpWithMetadata(op_jneq_ptr, OpJneqPtr, macro (size, get, dispatch, metadata, return)
    16671667    get(m_value, t0)
    1668     get(m_specialPointer, t1)
     1668    getu(size, OpJneqPtr, m_specialPointer, t1)
    16691669    loadp CodeBlock[cfr], t2
    16701670    loadp CodeBlock::m_globalObject[t2], t2
     
    16751675    metadata(t5, t2)
    16761676    storeb 1, OpJneqPtr::Metadata::m_hasJumped[t5]
    1677     get(m_target, t0)
     1677    get(m_targetLabel, t0)
    16781678    jumpImpl(t0)
    16791679.opJneqPtrFallThrough:
     
    16821682
    16831683
    1684 macro compareUnsignedJumpOp(name, op, integerCompare)
    1685     llintOpWithJump(op_%name%, op, macro (size, get, jump, dispatch)
     1684macro compareUnsignedJumpOp(opcodeName, opcodeStruct, integerCompare)
     1685    llintOpWithJump(op_%opcodeName%, opcodeStruct, macro (size, get, jump, dispatch)
    16861686        get(m_lhs, t2)
    16871687        get(m_rhs, t3)
     
    16921692
    16931693    .jumpTarget:
    1694         jump(m_target)
     1694        jump(m_targetLabel)
    16951695    end)
    16961696end
    16971697
    16981698
    1699 macro compareUnsignedOp(name, op, integerCompareAndSet)
    1700     llintOpWithReturn(op_%name%, op, macro (size, get, dispatch, return)
     1699macro compareUnsignedOp(opcodeName, opcodeStruct, integerCompareAndSet)
     1700    llintOpWithReturn(op_%opcodeName%, opcodeStruct, macro (size, get, dispatch, return)
    17011701        get(m_rhs, t2)
    17021702        get(m_lhs, t0)
     
    17091709
    17101710
    1711 macro compareJumpOp(name, op, integerCompare, doubleCompare)
    1712     llintOpWithJump(op_%name%, op, macro (size, get, jump, dispatch)
     1711macro compareJumpOp(opcodeName, opcodeStruct, integerCompare, doubleCompare)
     1712    llintOpWithJump(op_%opcodeName%, opcodeStruct, macro (size, get, jump, dispatch)
    17131713        get(m_lhs, t2)
    17141714        get(m_rhs, t3)
     
    17411741
    17421742    .jumpTarget:
    1743         jump(m_target)
     1743        jump(m_targetLabel)
    17441744
    17451745    .slow:
    1746         callSlowPath(_llint_slow_path_%name%)
     1746        callSlowPath(_llint_slow_path_%opcodeName%)
    17471747        nextInstruction()
    17481748    end)
     
    17521752llintOpWithJump(op_switch_imm, OpSwitchImm, macro (size, get, jump, dispatch)
    17531753    get(m_scrutinee, t2)
    1754     get(m_tableIndex, t3)
     1754    getu(size, OpSwitchImm, m_tableIndex, t3)
    17551755    loadConstantOrVariable(size, t2, t1, t0)
    17561756    loadp CodeBlock[cfr], t2
     
    17801780llintOpWithJump(op_switch_char, OpSwitchChar, macro (size, get, jump, dispatch)
    17811781    get(m_scrutinee, t2)
    1782     get(m_tableIndex, t3)
     1782    getu(size, OpSwitchChar, m_tableIndex, t3)
    17831783    loadConstantOrVariable(size, t2, t1, t0)
    17841784    loadp CodeBlock[cfr], t2
     
    18151815
    18161816
    1817 macro arrayProfileForCall(op, getu)
     1817macro arrayProfileForCall(opcodeStruct, getu)
    18181818    getu(m_argv, t3)
    18191819    negi t3
    18201820    bineq ThisArgumentOffset + TagOffset[cfr, t3, 8], CellTag, .done
    18211821    loadi ThisArgumentOffset + PayloadOffset[cfr, t3, 8], t0
    1822     loadp JSCell::m_structureID[t0], t0
    1823     storep t0, %op%::Metadata::m_arrayProfile.m_lastSeenStructureID[t5]
     1822    loadi JSCell::m_structureID[t0], t0
     1823    storei t0, %opcodeStruct%::Metadata::m_arrayProfile.m_lastSeenStructureID[t5]
    18241824.done:
    18251825end
    18261826
    1827 macro commonCallOp(name, slowPath, op, prepareCall, prologue)
    1828     llintOpWithMetadata(name, op, macro (size, get, dispatch, metadata, return)
     1827macro commonCallOp(opcodeName, slowPath, opcodeStruct, prepareCall, prologue)
     1828    llintOpWithMetadata(opcodeName, opcodeStruct, macro (size, get, dispatch, metadata, return)
    18291829        metadata(t5, t0)
    18301830
    18311831        prologue(macro (fieldName, dst)
    1832             getu(size, op, fieldName, dst)
     1832            getu(size, opcodeStruct, fieldName, dst)
    18331833        end, metadata)
    18341834
    18351835        get(m_callee, t0)
    1836         loadp %op%::Metadata::m_callLinkInfo.callee[t5], t2
     1836        loadp %opcodeStruct%::Metadata::m_callLinkInfo.callee[t5], t2
    18371837        loadConstantOrVariablePayload(size, t0, CellTag, t3, .opCallSlow)
    18381838        bineq t3, t2, .opCallSlow
    1839         getu(size, op, m_argv, t3)
     1839        getu(size, opcodeStruct, m_argv, t3)
    18401840        lshifti 3, t3
    18411841        negi t3
    18421842        addp cfr, t3  # t3 contains the new value of cfr
    18431843        storei t2, Callee + PayloadOffset[t3]
    1844         getu(size, op, m_argc, t2)
     1844        getu(size, opcodeStruct, m_argc, t2)
    18451845        storei PC, ArgumentCount + TagOffset[cfr]
    18461846        storei t2, ArgumentCount + PayloadOffset[t3]
    18471847        storei CellTag, Callee + TagOffset[t3]
    18481848        move t3, sp
    1849         prepareCall(%op%::Metadata::m_callLinkInfo.machineCodeTarget[t5], t2, t3, t4, JSEntryPtrTag)
    1850         callTargetFunction(size, op, dispatch, %op%::Metadata::m_callLinkInfo.machineCodeTarget[t5], JSEntryPtrTag)
     1849        prepareCall(%opcodeStruct%::Metadata::m_callLinkInfo.machineCodeTarget[t5], t2, t3, t4, JSEntryPtrTag)
     1850        callTargetFunction(size, opcodeStruct, dispatch, %opcodeStruct%::Metadata::m_callLinkInfo.machineCodeTarget[t5], JSEntryPtrTag)
    18511851
    18521852    .opCallSlow:
    1853         slowPathForCall(size, op, dispatch, slowPath, prepareCall)
     1853        slowPathForCall(size, opcodeStruct, dispatch, slowPath, prepareCall)
    18541854    end)
    18551855end
     
    19061906    loadp MarkedBlockFooterOffset + MarkedBlock::Footer::m_vm[t3], t3
    19071907
    1908     loadi VM::m_exception[t3], t0
    1909     storei 0, VM::m_exception[t3]
     1908    loadp VM::m_exception[t3], t0
     1909    storep 0, VM::m_exception[t3]
    19101910    get(size, OpCatch, m_exception, t2)
    19111911    storei t0, PayloadOffset[cfr, t2, 8]
     
    20142014    end
    20152015   
    2016     btinz VM::m_exception[t3], .handleException
     2016    btpnz VM::m_exception[t3], .handleException
    20172017
    20182018    functionEpilogue()
     
    20692069    end
    20702070
    2071     btinz VM::m_exception[t3], .handleException
     2071    btpnz VM::m_exception[t3], .handleException
    20722072
    20732073    functionEpilogue()
     
    21142114
    21152115    metadata(t5, t0)
    2116     loadp OpResolveScope::Metadata::m_resolveType[t5], t0
     2116    loadi OpResolveScope::Metadata::m_resolveType[t5], t0
    21172117
    21182118#rGlobalProperty:
     
    21622162
    21632163
    2164 macro loadWithStructureCheck(op, get, operand, slowPath)
     2164macro loadWithStructureCheck(opcodeStruct, get, operand, slowPath)
    21652165    get(m_scope, t0)
    21662166    loadp PayloadOffset[cfr, t0, 8], t0
    2167     loadp %op%::Metadata::m_structure[t5], t1
    2168     bpneq JSCell::m_structureID[t0], t1, slowPath
     2167    loadp %opcodeStruct%::Metadata::m_structure[t5], t1
     2168    bineq JSCell::m_structureID[t0], t1, slowPath
    21692169end
    21702170
     
    21962196
    21972197    metadata(t5, t0)
    2198     loadi OpGetFromScope::Metadata::m_getPutInfo[t5], t0
     2198    loadi OpGetFromScope::Metadata::m_getPutInfo + GetPutInfo::m_operand[t5], t0
    21992199    andi ResolveTypeMask, t0
    22002200
     
    22542254        get(m_value, t1)
    22552255        loadConstantOrVariable(size, t1, t2, t3)
    2256         loadis OpPutToScope::Metadata::m_operand[t5], t1
     2256        loadp OpPutToScope::Metadata::m_operand[t5], t1
    22572257        storePropertyAtVariableOffset(t1, t0, t2, t3)
    22582258    end
     
    22712271        get(m_value, t1)
    22722272        loadConstantOrVariable(size, t1, t2, t3)
    2273         loadis OpPutToScope::Metadata::m_operand[t5], t1
     2273        loadp OpPutToScope::Metadata::m_operand[t5], t1
    22742274        storei t2, JSLexicalEnvironment_variables + TagOffset[t0, t1, 8]
    22752275        storei t3, JSLexicalEnvironment_variables + PayloadOffset[t0, t1, 8]
     
    22832283        notifyWrite(t1, .pDynamic)
    22842284    .noVariableWatchpointSet:
    2285         loadis OpPutToScope::Metadata::m_operand[t5], t1
     2285        loadp OpPutToScope::Metadata::m_operand[t5], t1
    22862286        storei t2, JSLexicalEnvironment_variables + TagOffset[t0, t1, 8]
    22872287        storei t3, JSLexicalEnvironment_variables + PayloadOffset[t0, t1, 8]
     
    22902290
    22912291    metadata(t5, t0)
    2292     loadi OpPutToScope::Metadata::m_getPutInfo[t5], t0
     2292    loadi OpPutToScope::Metadata::m_getPutInfo + GetPutInfo::m_operand[t5], t0
    22932293    andi ResolveTypeMask, t0
    22942294
     
    23692369    get(m_arguments, t0)
    23702370    loadi PayloadOffset[cfr, t0, 8], t0
    2371     get(m_index, t1)
     2371    getu(size, OpGetFromArguments, m_index, t1)
    23722372    loadi DirectArguments_storage + TagOffset[t0, t1, 8], t2
    23732373    loadi DirectArguments_storage + PayloadOffset[t0, t1, 8], t3
     
    23822382    get(m_value, t1)
    23832383    loadConstantOrVariable(size, t1, t2, t3)
    2384     get(m_index, t1)
     2384    getu(size, OpPutToArguments, m_index, t1)
    23852385    storei t2, DirectArguments_storage + TagOffset[t0, t1, 8]
    23862386    storei t3, DirectArguments_storage + PayloadOffset[t0, t1, 8]
     
    24052405
    24062406    # t0 is holding the payload, t5 is holding the tag.
    2407     get(m_target, t2)
     2407    get(m_targetVirtualRegister, t2)
    24082408    loadConstantOrVariable(size, t2, t5, t0)
    24092409
     
    24572457    loadi PayloadOffset + ArgumentCount[cfr], t0
    24582458    subi 1, t0
    2459     get(m_numParametersToSkip, t1)
     2459    getu(size, OpGetRestLength, m_numParametersToSkip, t1)
    24602460    bilteq t0, t1, .storeZero
    24612461    subi t1, t0
  • trunk/Source/JavaScriptCore/llint/LowLevelInterpreter64.asm

    r240041 r240138  
    3737end
    3838
    39 macro getuOperandNarrow(op, fieldName, dst)
    40     loadb constexpr %op%_%fieldName%_index[PB, PC, 1], dst
    41 end
    42 
    43 macro getOperandNarrow(op, fieldName, dst)
    44     loadbsp constexpr %op%_%fieldName%_index[PB, PC, 1], dst
    45 end
    46 
    47 macro getuOperandWide(op, fieldName, dst)
    48     loadi constexpr %op%_%fieldName%_index * 4 + 1[PB, PC, 1], dst
    49 end
    50 
    51 macro getOperandWide(op, fieldName, dst)
    52     loadis constexpr %op%_%fieldName%_index * 4 + 1[PB, PC, 1], dst
     39macro getuOperandNarrow(opcodeStruct, fieldName, dst)
     40    loadb constexpr %opcodeStruct%_%fieldName%_index[PB, PC, 1], dst
     41end
     42
     43macro getOperandNarrow(opcodeStruct, fieldName, dst)
     44    loadbsp constexpr %opcodeStruct%_%fieldName%_index[PB, PC, 1], dst
     45end
     46
     47macro getuOperandWide(opcodeStruct, fieldName, dst)
     48    loadi constexpr %opcodeStruct%_%fieldName%_index * 4 + 1[PB, PC, 1], dst
     49end
     50
     51macro getOperandWide(opcodeStruct, fieldName, dst)
     52    loadis constexpr %opcodeStruct%_%fieldName%_index * 4 + 1[PB, PC, 1], dst
    5353end
    5454
     
    6262end
    6363
    64 macro makeReturnProfiled(op, get, metadata, dispatch, fn)
     64macro makeReturnProfiled(opcodeStruct, get, metadata, dispatch, fn)
    6565    fn(macro (value)
    6666        move value, t3
    6767        metadata(t1, t2)
    68         valueProfile(op, t1, t3)
     68        valueProfile(opcodeStruct, t1, t3)
    6969        get(m_dst, t1)
    7070        storeq t3, [cfr, t1, 8]
     
    7373end
    7474
    75 macro valueProfile(op, metadata, value)
    76     storeq value, %op%::Metadata::m_profile.m_buckets[metadata]
    77 end
    78 
    79 macro dispatchAfterCall(size, op, dispatch)
     75macro valueProfile(opcodeStruct, metadata, value)
     76    storeq value, %opcodeStruct%::Metadata::m_profile.m_buckets[metadata]
     77end
     78
     79macro dispatchAfterCall(size, opcodeStruct, dispatch)
    8080    loadi ArgumentCount + TagOffset[cfr], PC
    8181    loadp CodeBlock[cfr], PB
    8282    loadp CodeBlock::m_instructionsRawPointer[PB], PB
    8383    unpoison(_g_CodeBlockPoison, PB, t1)
    84     get(size, op, m_dst, t1)
     84    get(size, opcodeStruct, m_dst, t1)
    8585    storeq r0, [cfr, t1, 8]
    86     metadata(size, op, t2, t1)
    87     valueProfile(op, t2, r0)
     86    metadata(size, opcodeStruct, t2, t1)
     87    valueProfile(opcodeStruct, t2, r0)
    8888    dispatch()
    8989end
     
    711711
    712712llintOp(op_check_tdz, OpCheckTdz, macro (size, get, dispatch)
    713     get(m_target, t0)
     713    get(m_targetVirtualRegister, t0)
    714714    loadConstantOrVariable(size, t0, t1)
    715715    bqneq t1, ValueEmpty, .opNotTDZ
     
    742742
    743743
    744 macro equalityComparisonOp(name, op, integerComparison)
    745     llintOpWithReturn(op_%name%, op, macro (size, get, dispatch, return)
     744macro equalityComparisonOp(opcodeName, opcodeStruct, integerComparison)
     745    llintOpWithReturn(op_%opcodeName%, opcodeStruct, macro (size, get, dispatch, return)
    746746        get(m_rhs, t0)
    747747        get(m_lhs, t2)
     
    753753
    754754    .slow:
    755         callSlowPath(_slow_path_%name%)
     755        callSlowPath(_slow_path_%opcodeName%)
    756756        dispatch()
    757757    end)
     
    759759
    760760
    761 macro equalNullComparisonOp(name, op, fn)
    762     llintOpWithReturn(name, op, macro (size, get, dispatch, return)
     761macro equalNullComparisonOp(opcodeName, opcodeStruct, fn)
     762    llintOpWithReturn(opcodeName, opcodeStruct, macro (size, get, dispatch, return)
    763763        get(m_operand, t0)
    764764        loadq [cfr, t0, 8], t0
     
    800800
    801801
    802 macro strictEqOp(name, op, equalityOperation)
    803     llintOpWithReturn(op_%name%, op, macro (size, get, dispatch, return)
     802macro strictEqOp(opcodeName, opcodeStruct, equalityOperation)
     803    llintOpWithReturn(op_%opcodeName%, opcodeStruct, macro (size, get, dispatch, return)
    804804        get(m_rhs, t0)
    805805        get(m_lhs, t2)
     
    820820
    821821    .slow:
    822         callSlowPath(_slow_path_%name%)
     822        callSlowPath(_slow_path_%opcodeName%)
    823823        dispatch()
    824824    end)
     
    834834
    835835
    836 macro strictEqualityJumpOp(name, op, equalityOperation)
    837     llintOpWithJump(op_%name%, op, macro (size, get, jump, dispatch)
     836macro strictEqualityJumpOp(opcodeName, opcodeStruct, equalityOperation)
     837    llintOpWithJump(op_%opcodeName%, opcodeStruct, macro (size, get, jump, dispatch)
    838838        get(m_lhs, t2)
    839839        get(m_rhs, t3)
     
    853853
    854854    .jumpTarget:
    855         jump(m_target)
     855        jump(m_targetLabel)
    856856
    857857    .slow:
    858         callSlowPath(_llint_slow_path_%name%)
     858        callSlowPath(_llint_slow_path_%opcodeName%)
    859859        nextInstruction()
    860860    end)
     
    870870
    871871
    872 macro preOp(name, op, arithmeticOperation)
    873     llintOp(op_%name%, op, macro (size, get, dispatch)
     872macro preOp(opcodeName, opcodeStruct, arithmeticOperation)
     873    llintOp(op_%opcodeName%, opcodeStruct, macro (size, get, dispatch)
    874874        get(m_srcDst, t0)
    875875        loadq [cfr, t0, 8], t1
     
    880880        dispatch()
    881881    .slow:
    882         callSlowPath(_slow_path_%name%)
     882        callSlowPath(_slow_path_%opcodeName%)
    883883        dispatch()
    884884    end)
     
    930930    loadConstantOrVariable(size, t0, t3)
    931931    metadata(t1, t2)
    932     loadis OpNegate::Metadata::m_arithProfile[t1], t2
     932    loadi OpNegate::Metadata::m_arithProfile + ArithProfile::m_bits[t1], t2
    933933    bqb t3, tagTypeNumber, .opNegateNotInt
    934934    btiz t3, 0x7fffffff, .opNegateSlow
     
    936936    orq tagTypeNumber, t3
    937937    ori ArithProfileInt, t2
    938     storei t2, OpNegate::Metadata::m_arithProfile[t1]
     938    storei t2, OpNegate::Metadata::m_arithProfile + ArithProfile::m_bits[t1]
    939939    return(t3)
    940940.opNegateNotInt:
     
    942942    xorq 0x8000000000000000, t3
    943943    ori ArithProfileNumber, t2
    944     storei t2, OpNegate::Metadata::m_arithProfile[t1]
     944    storei t2, OpNegate::Metadata::m_arithProfile + ArithProfile::m_bits[t1]
    945945    return(t3)
    946946
     
    951951
    952952
    953 macro binaryOpCustomStore(name, op, integerOperationAndStore, doubleOperation)
    954     llintOpWithMetadata(op_%name%, op, macro (size, get, dispatch, metadata, return)
     953macro binaryOpCustomStore(opcodeName, opcodeStruct, integerOperationAndStore, doubleOperation)
     954    llintOpWithMetadata(op_%opcodeName%, opcodeStruct, macro (size, get, dispatch, metadata, return)
    955955        metadata(t5, t0)
    956956
    957957        macro profile(type)
    958             ori type, %op%::Metadata::m_arithProfile[t5]
     958            ori type, %opcodeStruct%::Metadata::m_arithProfile + ArithProfile::m_bits[t5]
    959959        end
    960960
     
    10081008
    10091009    .slow:
    1010         callSlowPath(_slow_path_%name%)
     1010        callSlowPath(_slow_path_%opcodeName%)
    10111011        dispatch()
    10121012    end)
     
    10531053
    10541054
    1055 macro binaryOp(name, op, integerOperation, doubleOperation)
    1056     binaryOpCustomStore(name, op,
     1055macro binaryOp(opcodeName, opcodeStruct, integerOperation, doubleOperation)
     1056    binaryOpCustomStore(opcodeName, opcodeStruct,
    10571057        macro (left, right, slow, index)
    10581058            integerOperation(left, right, slow)
     
    10841084
    10851085
    1086 macro commonBitOp(opKind, name, op, operation)
    1087     opKind(op_%name%, op, macro (size, get, dispatch, return)
     1086macro commonBitOp(opKind, opcodeName, opcodeStruct, operation)
     1087    opKind(op_%opcodeName%, opcodeStruct, macro (size, get, dispatch, return)
    10881088        get(m_rhs, t0)
    10891089        get(m_lhs, t2)
     
    10971097
    10981098    .slow:
    1099         callSlowPath(_slow_path_%name%)
     1099        callSlowPath(_slow_path_%opcodeName%)
    11001100        dispatch()
    11011101    end)
    11021102end
    11031103
    1104 macro bitOp(name, op, operation)
    1105     commonBitOp(llintOpWithReturn, name, op, operation)
    1106 end
    1107 
    1108 macro bitOpProfiled(name, op, operation)
    1109     commonBitOp(llintOpWithProfile, name, op, operation)
     1104macro bitOp(opcodeName, opcodeStruct, operation)
     1105    commonBitOp(llintOpWithReturn, opcodeName, opcodeStruct, operation)
     1106end
     1107
     1108macro bitOpProfiled(opcodeName, opcodeStruct, operation)
     1109    commonBitOp(llintOpWithProfile, opcodeName, opcodeStruct, operation)
    11101110end
    11111111
     
    12701270    loadConstantOrVariableCell(size, t0, t3, .opGetByIdDirectSlow)
    12711271    loadi JSCell::m_structureID[t3], t1
    1272     loadi OpGetByIdDirect::Metadata::m_structure[t2], t0
     1272    loadi OpGetByIdDirect::Metadata::m_structureID[t2], t0
    12731273    bineq t0, t1, .opGetByIdDirectSlow
    12741274    loadi OpGetByIdDirect::Metadata::m_offset[t2], t1
     
    12921292    bbneq t1, constexpr GetByIdMode::Default, .opGetByIdProtoLoad
    12931293    loadi JSCell::m_structureID[t3], t1
    1294     loadi OpGetById::Metadata::m_modeMetadata.defaultMode.structure[t2], t0
     1294    loadi OpGetById::Metadata::m_modeMetadata.defaultMode.structureID[t2], t0
    12951295    bineq t0, t1, .opGetByIdSlow
    12961296    loadis OpGetById::Metadata::m_modeMetadata.defaultMode.cachedOffset[t2], t1
     
    13021302    bbneq t1, constexpr GetByIdMode::ProtoLoad, .opGetByIdArrayLength
    13031303    loadi JSCell::m_structureID[t3], t1
    1304     loadi OpGetById::Metadata::m_modeMetadata.protoLoadMode.structure[t2], t3
     1304    loadi OpGetById::Metadata::m_modeMetadata.protoLoadMode.structureID[t2], t3
    13051305    bineq t3, t1, .opGetByIdSlow
    13061306    loadis OpGetById::Metadata::m_modeMetadata.protoLoadMode.cachedOffset[t2], t1
     
    13251325.opGetByIdUnset:
    13261326    loadi JSCell::m_structureID[t3], t1
    1327     loadi OpGetById::Metadata::m_modeMetadata.unsetMode.structure[t2], t0
     1327    loadi OpGetById::Metadata::m_modeMetadata.unsetMode.structureID[t2], t0
    13281328    bineq t0, t1, .opGetByIdSlow
    13291329    valueProfile(OpGetById, t2, ValueUndefined)
     
    13401340    loadConstantOrVariableCell(size, t3, t0, .opPutByIdSlow)
    13411341    metadata(t5, t2)
    1342     loadis OpPutById::Metadata::m_oldStructure[t5], t2
     1342    loadi OpPutById::Metadata::m_oldStructureID[t5], t2
    13431343    bineq t2, JSCell::m_structureID[t0], .opPutByIdSlow
    13441344
     
    13481348    # t5 -> metadata
    13491349
    1350     loadi OpPutById::Metadata::m_newStructure[t5], t1
     1350    loadi OpPutById::Metadata::m_newStructureID[t5], t1
    13511351    btiz t1, .opPutByIdNotTransition
    13521352
     
    13811381.opPutByIdTransitionChainDone:
    13821382    # Reload the new structure, since we clobbered it above.
    1383     loadi OpPutById::Metadata::m_newStructure[t5], t1
     1383    loadi OpPutById::Metadata::m_newStructureID[t5], t1
    13841384
    13851385.opPutByIdTransitionDirect:
     
    15751575
    15761576
    1577 macro putByValOp(name, op)
    1578     llintOpWithMetadata(op_%name%, op, macro (size, get, dispatch, metadata, return)
     1577macro putByValOp(opcodeName, opcodeStruct)
     1578    llintOpWithMetadata(op_%opcodeName%, opcodeStruct, macro (size, get, dispatch, metadata, return)
    15791579        macro contiguousPutByVal(storeCallback)
    15801580            biaeq t3, -sizeof IndexingHeader + IndexingHeader::u.lengths.publicLength[t0], .outOfBounds
     
    15861586        .outOfBounds:
    15871587            biaeq t3, -sizeof IndexingHeader + IndexingHeader::u.lengths.vectorLength[t0], .opPutByValOutOfBounds
    1588             storeb 1, %op%::Metadata::m_arrayProfile.m_mayStoreToHole[t5]
     1588            storeb 1, %opcodeStruct%::Metadata::m_arrayProfile.m_mayStoreToHole[t5]
    15891589            addi 1, t3, t2
    15901590            storei t2, -sizeof IndexingHeader + IndexingHeader::u.lengths.publicLength[t0]
     
    15961596        move t1, t2
    15971597        metadata(t5, t0)
    1598         arrayProfile(%op%::Metadata::m_arrayProfile, t2, t5, t0)
     1598        arrayProfile(%opcodeStruct%::Metadata::m_arrayProfile, t2, t5, t0)
    15991599        get(m_property, t0)
    16001600        loadConstantOrVariableInt32(size, t0, t3, .opPutByValSlow)
     
    16511651
    16521652    .opPutByValArrayStorageEmpty:
    1653         storeb 1, %op%::Metadata::m_arrayProfile.m_mayStoreToHole[t5]
     1653        storeb 1, %opcodeStruct%::Metadata::m_arrayProfile.m_mayStoreToHole[t5]
    16541654        addi 1, ArrayStorage::m_numValuesInVector[t0]
    16551655        bib t3, -sizeof IndexingHeader + IndexingHeader::u.lengths.publicLength[t0], .opPutByValArrayStorageStoreResult
     
    16591659
    16601660    .opPutByValOutOfBounds:
    1661         storeb 1, %op%::Metadata::m_arrayProfile.m_outOfBounds[t5]
     1661        storeb 1, %opcodeStruct%::Metadata::m_arrayProfile.m_outOfBounds[t5]
    16621662    .opPutByValSlow:
    1663         callSlowPath(_llint_slow_path_%name%)
     1663        callSlowPath(_llint_slow_path_%opcodeName%)
    16641664        dispatch()
    16651665    end)
     
    16711671
    16721672
    1673 macro llintJumpTrueOrFalseOp(name, op, conditionOp)
    1674     llintOpWithJump(op_%name%, op, macro (size, get, jump, dispatch)
     1673macro llintJumpTrueOrFalseOp(opcodeName, opcodeStruct, conditionOp)
     1674    llintOpWithJump(op_%opcodeName%, opcodeStruct, macro (size, get, jump, dispatch)
    16751675        get(m_condition, t1)
    16761676        loadConstantOrVariable(size, t1, t0)
     
    16801680
    16811681    .target:
    1682         jump(m_target)
     1682        jump(m_targetLabel)
    16831683
    16841684    .slow:
    1685         callSlowPath(_llint_slow_path_%name%)
     1685        callSlowPath(_llint_slow_path_%opcodeName%)
    16861686        nextInstruction()
    16871687    end)
     
    16891689
    16901690
    1691 macro equalNullJumpOp(name, op, cellHandler, immediateHandler)
    1692     llintOpWithJump(op_%name%, op, macro (size, get, jump, dispatch)
     1691macro equalNullJumpOp(opcodeName, opcodeStruct, cellHandler, immediateHandler)
     1692    llintOpWithJump(op_%opcodeName%, opcodeStruct, macro (size, get, jump, dispatch)
    16931693        get(m_value, t0)
    16941694        assertNotConstant(size, t0)
     
    17001700
    17011701    .target:
    1702         jump(m_target)
     1702        jump(m_targetLabel)
    17031703
    17041704    .immediate:
     
    17321732llintOpWithMetadata(op_jneq_ptr, OpJneqPtr, macro (size, get, dispatch, metadata, return)
    17331733    get(m_value, t0)
    1734     get(m_specialPointer, t1)
     1734    getu(size, OpJneqPtr, m_specialPointer, t1)
    17351735    loadp CodeBlock[cfr], t2
    17361736    loadp CodeBlock::m_globalObject[t2], t2
     
    17421742    metadata(t5, t0)
    17431743    storeb 1, OpJneqPtr::Metadata::m_hasJumped[t5]
    1744     get(m_target, t0)
     1744    get(m_targetLabel, t0)
    17451745    jumpImpl(t0)
    17461746end)
    17471747
    17481748
    1749 macro compareJumpOp(name, op, integerCompare, doubleCompare)
    1750     llintOpWithJump(op_%name%, op, macro (size, get, jump, dispatch)
     1749macro compareJumpOp(opcodeName, opcodeStruct, integerCompare, doubleCompare)
     1750    llintOpWithJump(op_%opcodeName%, opcodeStruct, macro (size, get, jump, dispatch)
    17511751        get(m_lhs, t2)
    17521752        get(m_rhs, t3)
     
    17821782
    17831783    .jumpTarget:
    1784         jump(m_target)
     1784        jump(m_targetLabel)
    17851785
    17861786    .slow:
    1787         callSlowPath(_llint_slow_path_%name%)
     1787        callSlowPath(_llint_slow_path_%opcodeName%)
    17881788        nextInstruction()
    17891789    end)
     
    17911791
    17921792
    1793 macro equalityJumpOp(name, op, integerComparison)
    1794     llintOpWithJump(op_%name%, op, macro (size, get, jump, dispatch)
     1793macro equalityJumpOp(opcodeName, opcodeStruct, integerComparison)
     1794    llintOpWithJump(op_%opcodeName%, opcodeStruct, macro (size, get, jump, dispatch)
    17951795        get(m_lhs, t2)
    17961796        get(m_rhs, t3)
     
    18011801
    18021802    .jumpTarget:
    1803         jump(m_target)
     1803        jump(m_targetLabel)
    18041804
    18051805    .slow:
    1806         callSlowPath(_llint_slow_path_%name%)
     1806        callSlowPath(_llint_slow_path_%opcodeName%)
    18071807        nextInstruction()
    18081808    end)
     
    18101810
    18111811
    1812 macro compareUnsignedJumpOp(name, op, integerCompareMacro)
    1813     llintOpWithJump(op_%name%, op, macro (size, get, jump, dispatch)
     1812macro compareUnsignedJumpOp(opcodeName, opcodeStruct, integerCompareMacro)
     1813    llintOpWithJump(op_%opcodeName%, opcodeStruct, macro (size, get, jump, dispatch)
    18141814        get(m_lhs, t2)
    18151815        get(m_rhs, t3)
     
    18201820
    18211821    .jumpTarget:
    1822         jump(m_target)
     1822        jump(m_targetLabel)
    18231823    end)
    18241824end
    18251825
    18261826
    1827 macro compareUnsignedOp(name, op, integerCompareAndSet)
    1828     llintOpWithReturn(op_%name%, op, macro (size, get, dispatch, return)
     1827macro compareUnsignedOp(opcodeName, opcodeStruct, integerCompareAndSet)
     1828    llintOpWithReturn(op_%opcodeName%, opcodeStruct, macro (size, get, dispatch, return)
    18291829        get(m_lhs, t2)
    18301830        get(m_rhs,  t0)
     
    18401840llintOpWithJump(op_switch_imm, OpSwitchImm, macro (size, get, jump, dispatch)
    18411841    get(m_scrutinee, t2)
    1842     get(m_tableIndex, t3)
     1842    getu(size, OpSwitchImm, m_tableIndex, t3)
    18431843    loadConstantOrVariable(size, t2, t1)
    18441844    loadp CodeBlock[cfr], t2
     
    18681868llintOpWithJump(op_switch_char, OpSwitchChar, macro (size, get, jump, dispatch)
    18691869    get(m_scrutinee, t2)
    1870     get(m_tableIndex, t3)
     1870    getu(size, OpSwitchChar, m_tableIndex, t3)
    18711871    loadConstantOrVariable(size, t2, t1)
    18721872    loadp CodeBlock[cfr], t2
     
    19041904
    19051905# we assume t5 contains the metadata, and we should not scratch that
    1906 macro arrayProfileForCall(op, getu)
     1906macro arrayProfileForCall(opcodeStruct, getu)
    19071907    getu(m_argv, t3)
    19081908    negp t3
     
    19101910    btqnz t0, tagMask, .done
    19111911    loadi JSCell::m_structureID[t0], t3
    1912     storei t3, %op%::Metadata::m_arrayProfile.m_lastSeenStructureID[t5]
     1912    storei t3, %opcodeStruct%::Metadata::m_arrayProfile.m_lastSeenStructureID[t5]
    19131913.done:
    19141914end
    19151915
    1916 macro commonCallOp(name, slowPath, op, prepareCall, prologue)
    1917     llintOpWithMetadata(name, op, macro (size, get, dispatch, metadata, return)
     1916macro commonCallOp(opcodeName, slowPath, opcodeStruct, prepareCall, prologue)
     1917    llintOpWithMetadata(opcodeName, opcodeStruct, macro (size, get, dispatch, metadata, return)
    19181918        metadata(t5, t0)
    19191919
    19201920        prologue(macro (fieldName, dst)
    1921             getu(size, op, fieldName, dst)
     1921            getu(size, opcodeStruct, fieldName, dst)
    19221922        end, metadata)
    19231923
    19241924        get(m_callee, t0)
    1925         loadp %op%::Metadata::m_callLinkInfo.callee[t5], t2
     1925        loadp %opcodeStruct%::Metadata::m_callLinkInfo.callee[t5], t2
    19261926        loadConstantOrVariable(size, t0, t3)
    19271927        bqneq t3, t2, .opCallSlow
    1928         getu(size, op, m_argv, t3)
     1928        getu(size, opcodeStruct, m_argv, t3)
    19291929        lshifti 3, t3
    19301930        negp t3
    19311931        addp cfr, t3
    19321932        storeq t2, Callee[t3]
    1933         getu(size, op, m_argc, t2)
     1933        getu(size, opcodeStruct, m_argc, t2)
    19341934        storei PC, ArgumentCount + TagOffset[cfr]
    19351935        storei t2, ArgumentCount + PayloadOffset[t3]
     
    19371937        if POISON
    19381938            loadp _g_JITCodePoison, t2
    1939             xorp %op%::Metadata::m_callLinkInfo.machineCodeTarget[t5], t2
     1939            xorp %opcodeStruct%::Metadata::m_callLinkInfo.machineCodeTarget[t5], t2
    19401940            prepareCall(t2, t1, t3, t4, JSEntryPtrTag)
    1941             callTargetFunction(size, op, dispatch, t2, JSEntryPtrTag)
     1941            callTargetFunction(size, opcodeStruct, dispatch, t2, JSEntryPtrTag)
    19421942        else
    1943             prepareCall(%op%::Metadata::m_callLinkInfo.machineCodeTarget[t5], t2, t3, t4, JSEntryPtrTag)
    1944             callTargetFunction(size, op, dispatch, %op%::Metadata::m_callLinkInfo.machineCodeTarget[t5], JSEntryPtrTag)
     1943            prepareCall(%opcodeStruct%::Metadata::m_callLinkInfo.machineCodeTarget[t5], t2, t3, t4, JSEntryPtrTag)
     1944            callTargetFunction(size, opcodeStruct, dispatch, %opcodeStruct%::Metadata::m_callLinkInfo.machineCodeTarget[t5], JSEntryPtrTag)
    19451945        end
    19461946
    19471947    .opCallSlow:
    1948         slowPathForCall(size, op, dispatch, slowPath, prepareCall)
     1948        slowPathForCall(size, opcodeStruct, dispatch, slowPath, prepareCall)
    19491949    end)
    19501950end
     
    21712171    end
    21722172
    2173     loadp OpResolveScope::Metadata::m_resolveType[t5], t0
     2173    loadi OpResolveScope::Metadata::m_resolveType[t5], t0
    21742174
    21752175#rGlobalProperty:
     
    22192219
    22202220
    2221 macro loadWithStructureCheck(op, get, slowPath)
     2221macro loadWithStructureCheck(opcodeStruct, get, slowPath)
    22222222    get(m_scope, t0)
    22232223    loadq [cfr, t0, 8], t0
    22242224    loadStructureWithScratch(t0, t2, t1, t3)
    2225     loadp %op%::Metadata::m_structure[t5], t1
     2225    loadp %opcodeStruct%::Metadata::m_structure[t5], t1
    22262226    bpneq t2, t1, slowPath
    22272227end
     
    22522252    end
    22532253
    2254     loadi OpGetFromScope::Metadata::m_getPutInfo[t5], t0
     2254    loadi OpGetFromScope::Metadata::m_getPutInfo + GetPutInfo::m_operand[t5], t0
    22552255    andi ResolveTypeMask, t0
    22562256
     
    23102310        get(m_value, t1)
    23112311        loadConstantOrVariable(size, t1, t2)
    2312         loadis OpPutToScope::Metadata::m_operand[t5], t1
     2312        loadp OpPutToScope::Metadata::m_operand[t5], t1
    23132313        storePropertyAtVariableOffset(t1, t0, t2)
    23142314    end
     
    23262326        get(m_value, t1)
    23272327        loadConstantOrVariable(size, t1, t2)
    2328         loadis OpPutToScope::Metadata::m_operand[t5], t1
     2328        loadp OpPutToScope::Metadata::m_operand[t5], t1
    23292329        storeq t2, JSLexicalEnvironment_variables[t0, t1, 8]
    23302330    end
     
    23372337        notifyWrite(t3, .pDynamic)
    23382338    .noVariableWatchpointSet:
    2339         loadis OpPutToScope::Metadata::m_operand[t5], t1
     2339        loadp OpPutToScope::Metadata::m_operand[t5], t1
    23402340        storeq t2, JSLexicalEnvironment_variables[t0, t1, 8]
    23412341    end
    23422342
    23432343    macro checkTDZInGlobalPutToScopeIfNecessary()
    2344         loadis OpPutToScope::Metadata::m_getPutInfo[t5], t0
     2344        loadi OpPutToScope::Metadata::m_getPutInfo + GetPutInfo::m_operand[t5], t0
    23452345        andi InitializationModeMask, t0
    23462346        rshifti InitializationModeShift, t0
     
    23532353
    23542354    metadata(t5, t0)
    2355     loadi OpPutToScope::Metadata::m_getPutInfo[t5], t0
     2355    loadi OpPutToScope::Metadata::m_getPutInfo + GetPutInfo::m_operand[t5], t0
    23562356    andi ResolveTypeMask, t0
    23572357
     
    24672467
    24682468    # t0 is holding the JSValue argument.
    2469     get(m_target, t3)
     2469    get(m_targetVirtualRegister, t3)
    24702470    loadConstantOrVariable(size, t3, t0)
    24712471
  • trunk/Source/JavaScriptCore/runtime/CommonSlowPaths.cpp

    r240041 r240138  
    126126        CHECK_EXCEPTION();                                  \
    127127        if (bCondition)                                        \
    128             pc = bytecode.m_target \
    129                 ? reinterpret_cast<const Instruction*>(reinterpret_cast<const uint8_t*>(pc) + bytecode.m_target) \
     128            pc = bytecode.m_targetLabel \
     129                ? reinterpret_cast<const Instruction*>(reinterpret_cast<const uint8_t*>(pc) + bytecode.m_targetLabel) \
    130130                : exec->codeBlock()->outOfLineJumpTarget(pc);                              \
    131131        else                                                      \
  • trunk/Source/JavaScriptCore/runtime/GetPutInfo.h

    r237547 r240138  
    11/*
    2  * Copyright (C) 2015-2018 Apple Inc. All Rights Reserved.
     2 * Copyright (C) 2015-2019 Apple Inc. All Rights Reserved.
    33 *
    44 * Redistribution and use in source and binary forms, with or without
     
    3939};
    4040
    41 enum ResolveType {
     41enum ResolveType : unsigned {
    4242    // Lexical scope guaranteed a certain type of variable access.
    4343    GlobalProperty,
     
    211211    static_assert((modeBits & initializationBits & typeBits) == 0x0, "There should be no intersection between ResolveMode ResolveType and InitializationMode");
    212212
     213    GetPutInfo() = default;
     214
    213215    GetPutInfo(ResolveMode resolveMode, ResolveType resolveType, InitializationMode initializationMode)
    214216        : m_operand((resolveMode << modeShift) | (static_cast<unsigned>(initializationMode) << initializationShift) | resolveType)
     
    229231
    230232private:
    231     Operand m_operand;
     233    Operand m_operand { 0 };
     234
     235    friend class JSC::LLIntOffsetsExtractor;
    232236};
    233237
Note: See TracChangeset for help on using the changeset viewer.