internal SwitchStringJumpTableEmitter(
            ILBuilder builder,
            LocalOrParameter key,
            KeyValuePair<ConstantValue, object>[] caseLabels,
            object fallThroughLabel,
            LocalDefinition keyHash,
            EmitStringCompareAndBranch emitStringCondBranchDelegate,
            GetStringHashCode computeStringHashcodeDelegate)
        {
            Debug.Assert(caseLabels.Length > 0);
            Debug.Assert(emitStringCondBranchDelegate != null);

            _builder = builder;
            _key = key;
            _caseLabels = caseLabels;
            _fallThroughLabel = fallThroughLabel;
            _keyHash = keyHash;
            _emitStringCondBranchDelegate = emitStringCondBranchDelegate;
            _computeStringHashcodeDelegate = computeStringHashcodeDelegate;
        }
예제 #2
0
        internal SwitchStringJumpTableEmitter(
            ILBuilder builder,
            LocalDefinition key,
            KeyValuePair <ConstantValue, object>[] caseLabels,
            object fallThroughLabel,
            LocalDefinition keyHash,
            EmitStringCompareAndBranch emitStringCondBranchDelegate,
            GetStringHashCode computeStringHashcodeDelegate)
        {
            Debug.Assert(caseLabels.Length > 0);
            Debug.Assert(emitStringCondBranchDelegate != null);

            this.builder                       = builder;
            this.key                           = key;
            this.caseLabels                    = caseLabels;
            this.fallThroughLabel              = fallThroughLabel;
            this.keyHash                       = keyHash;
            this.emitStringCondBranchDelegate  = emitStringCondBranchDelegate;
            this.computeStringHashcodeDelegate = computeStringHashcodeDelegate;
        }
        internal SwitchStringJumpTableEmitter(
            ILBuilder builder,
            LocalOrParameter key,
            KeyValuePair <ConstantValue, object>[] caseLabels,
            object fallThroughLabel,
            LocalDefinition?keyHash,
            EmitStringCompareAndBranch emitStringCondBranchDelegate,
            GetStringHashCode computeStringHashcodeDelegate)
        {
            Debug.Assert(caseLabels.Length > 0);
            RoslynDebug.Assert(emitStringCondBranchDelegate != null);

            _builder                       = builder;
            _key                           = key;
            _caseLabels                    = caseLabels;
            _fallThroughLabel              = fallThroughLabel;
            _keyHash                       = keyHash;
            _emitStringCondBranchDelegate  = emitStringCondBranchDelegate;
            _computeStringHashcodeDelegate = computeStringHashcodeDelegate;
        }