Merge pull request #2112 from ewanmellor/swift-mutexes-let
[Swift] Make all the mutexes "let" rather than "var".
This commit is contained in:
commit
8c1a46d87a
|
@ -61,12 +61,12 @@ open class Parser: Recognizer<ParserATNSimulator> {
|
|||
///
|
||||
/// mutex for bypassAltsAtnCache updates
|
||||
///
|
||||
private var bypassAltsAtnCacheMutex = Mutex()
|
||||
private let bypassAltsAtnCacheMutex = Mutex()
|
||||
|
||||
///
|
||||
/// mutex for decisionToDFA updates
|
||||
///
|
||||
private var decisionToDFAMutex = Mutex()
|
||||
private let decisionToDFAMutex = Mutex()
|
||||
|
||||
///
|
||||
/// This field maps from the serialized ATN string to the deserialized _org.antlr.v4.runtime.atn.ATN_ with
|
||||
|
|
|
@ -77,12 +77,12 @@ open class LexerATNSimulator: ATNSimulator {
|
|||
///
|
||||
/// mutex for DFAState change
|
||||
///
|
||||
private var dfaStateMutex = Mutex()
|
||||
private let dfaStateMutex = Mutex()
|
||||
|
||||
///
|
||||
/// mutex for changes to all DFAStates map
|
||||
///
|
||||
private var dfaStatesMutex = Mutex()
|
||||
private let dfaStatesMutex = Mutex()
|
||||
|
||||
///
|
||||
/// Used during DFA/ATN exec to record the most recent accept configuration info
|
||||
|
|
|
@ -281,12 +281,12 @@ open class ParserATNSimulator: ATNSimulator {
|
|||
///
|
||||
/// mutex for DFAState change
|
||||
///
|
||||
private var dfaStateMutex = Mutex()
|
||||
private let dfaStateMutex = Mutex()
|
||||
|
||||
///
|
||||
/// mutex for changes in a DFAStates map
|
||||
///
|
||||
private var dfaStatesMutex = Mutex()
|
||||
private let dfaStatesMutex = Mutex()
|
||||
|
||||
// /// Testing only!
|
||||
// public convenience init(_ atn : ATN, _ decisionToDFA : [DFA],
|
||||
|
|
|
@ -32,7 +32,7 @@ public class DFA: CustomStringConvertible {
|
|||
///
|
||||
/// mutex for DFAState changes.
|
||||
///
|
||||
private var dfaStateMutex = Mutex()
|
||||
private let dfaStateMutex = Mutex()
|
||||
|
||||
public convenience init(_ atnStartState: DecisionState) {
|
||||
self.init(atnStartState, 0)
|
||||
|
|
Loading…
Reference in New Issue