Commit 6c6593e
committed
GROOVY-10307: Address PR review feedback for thread safety and documentation
- Fix race condition in invalidateSwitchPoints(): synchronize target reset
and cache clear operations per call site to ensure atomicity
- Fix race condition in clearCache(): move latestHitMethodHandleWrapper
null assignment inside synchronized block for consistency with getAndPut
- Add comprehensive Javadoc for INDY_SWITCHPOINT_GUARD explaining
performance implications of enabling the global switchpoint guard
- Document WeakReference cleanup behavior in ALL_CALL_SITES and
registerCallSite() to clarify garbage collection semantics
- Simplify inline comment in setGuards() with detailed Javadoc on field1 parent ca36b8c commit 6c6593e
File tree
3 files changed
+41
-24
lines changed- src/main/java/org/codehaus/groovy/vmplugin/v8
3 files changed
+41
-24
lines changedLines changed: 6 additions & 5 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
128 | 128 | | |
129 | 129 | | |
130 | 130 | | |
| 131 | + | |
| 132 | + | |
| 133 | + | |
131 | 134 | | |
132 | 135 | | |
133 | | - | |
134 | | - | |
135 | | - | |
136 | | - | |
| 136 | + | |
137 | 137 | | |
| 138 | + | |
138 | 139 | | |
139 | 140 | | |
140 | 141 | | |
141 | | - | |
| 142 | + | |
142 | 143 | | |
143 | 144 | | |
144 | 145 | | |
Lines changed: 23 additions & 8 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
182 | 182 | | |
183 | 183 | | |
184 | 184 | | |
| 185 | + | |
| 186 | + | |
| 187 | + | |
| 188 | + | |
| 189 | + | |
| 190 | + | |
| 191 | + | |
185 | 192 | | |
186 | 193 | | |
187 | 194 | | |
| |||
191 | 198 | | |
192 | 199 | | |
193 | 200 | | |
| 201 | + | |
| 202 | + | |
| 203 | + | |
| 204 | + | |
194 | 205 | | |
195 | 206 | | |
196 | 207 | | |
| |||
211 | 222 | | |
212 | 223 | | |
213 | 224 | | |
214 | | - | |
215 | | - | |
| 225 | + | |
| 226 | + | |
| 227 | + | |
| 228 | + | |
216 | 229 | | |
217 | 230 | | |
218 | 231 | | |
219 | 232 | | |
220 | 233 | | |
221 | | - | |
222 | | - | |
223 | | - | |
224 | | - | |
| 234 | + | |
| 235 | + | |
| 236 | + | |
| 237 | + | |
| 238 | + | |
| 239 | + | |
| 240 | + | |
| 241 | + | |
225 | 242 | | |
226 | | - | |
227 | | - | |
228 | 243 | | |
229 | 244 | | |
230 | 245 | | |
| |||
Lines changed: 12 additions & 11 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
126 | 126 | | |
127 | 127 | | |
128 | 128 | | |
129 | | - | |
130 | | - | |
131 | | - | |
| 129 | + | |
| 130 | + | |
| 131 | + | |
| 132 | + | |
| 133 | + | |
| 134 | + | |
| 135 | + | |
| 136 | + | |
| 137 | + | |
| 138 | + | |
| 139 | + | |
132 | 140 | | |
133 | 141 | | |
134 | 142 | | |
| |||
948 | 956 | | |
949 | 957 | | |
950 | 958 | | |
951 | | - | |
952 | | - | |
953 | | - | |
954 | | - | |
955 | | - | |
956 | | - | |
957 | | - | |
958 | | - | |
| 959 | + | |
959 | 960 | | |
960 | 961 | | |
961 | 962 | | |
| |||
0 commit comments