@@ -44,30 +44,37 @@ impl<K: UnifyKey> UnificationStore for InPlace<K> {
44
44
type Value = K :: Value ;
45
45
type Snapshot = sv:: Snapshot ;
46
46
47
+ #[ inline]
47
48
fn new ( ) -> Self {
48
49
InPlace { values : sv:: SnapshotVec :: new ( ) }
49
50
}
50
51
52
+ #[ inline]
51
53
fn start_snapshot ( & mut self ) -> Self :: Snapshot {
52
54
self . values . start_snapshot ( )
53
55
}
54
56
57
+ #[ inline]
55
58
fn rollback_to ( & mut self , snapshot : Self :: Snapshot ) {
56
59
self . values . rollback_to ( snapshot) ;
57
60
}
58
61
62
+ #[ inline]
59
63
fn commit ( & mut self , snapshot : Self :: Snapshot ) {
60
64
self . values . commit ( snapshot) ;
61
65
}
62
66
67
+ #[ inline]
63
68
fn len ( & self ) -> usize {
64
69
self . values . len ( )
65
70
}
66
71
72
+ #[ inline]
67
73
fn push ( & mut self , value : VarValue < Self :: Key > ) {
68
74
self . values . push ( value) ;
69
75
}
70
76
77
+ #[ inline]
71
78
fn update < F > ( & mut self , index : usize , op : F )
72
79
where F : FnOnce ( & mut VarValue < Self :: Key > )
73
80
{
@@ -106,29 +113,36 @@ impl<K: UnifyKey> UnificationStore for Persistent<K> {
106
113
type Value = K :: Value ;
107
114
type Snapshot = Self ;
108
115
116
+ #[ inline]
109
117
fn new ( ) -> Self {
110
118
Persistent { values : DVec :: new ( ) }
111
119
}
112
120
121
+ #[ inline]
113
122
fn start_snapshot ( & mut self ) -> Self :: Snapshot {
114
123
self . clone ( )
115
124
}
116
125
126
+ #[ inline]
117
127
fn rollback_to ( & mut self , snapshot : Self :: Snapshot ) {
118
128
* self = snapshot;
119
129
}
120
130
131
+ #[ inline]
121
132
fn commit ( & mut self , _snapshot : Self :: Snapshot ) {
122
133
}
123
134
135
+ #[ inline]
124
136
fn len ( & self ) -> usize {
125
137
self . values . len ( )
126
138
}
127
139
140
+ #[ inline]
128
141
fn push ( & mut self , value : VarValue < Self :: Key > ) {
129
142
self . values . push ( value) ;
130
143
}
131
144
145
+ #[ inline]
132
146
fn update < F > ( & mut self , index : usize , op : F )
133
147
where F : FnOnce ( & mut VarValue < Self :: Key > )
134
148
{
0 commit comments