|
1 | 1 | /*
|
2 |
| - * Copyright (c) 2016, 2022, Oracle and/or its affiliates. |
| 2 | + * Copyright (c) 2016, 2025, Oracle and/or its affiliates. |
3 | 3 | *
|
4 | 4 | * All rights reserved.
|
5 | 5 | *
|
@@ -151,6 +151,12 @@ public final class Function implements ParserListener {
|
151 | 151 | private static final int INSTRUCTION_CALLBR = 57;
|
152 | 152 | private static final int INSTRUCTION_FREEZE = 58;
|
153 | 153 | private static final int INSTRUCTION_ATOMICRMW = 59;
|
| 154 | + private static final int INSTRUCTION_BLOCKADDR_USERS = 60; |
| 155 | + private static final int INSTRUCTION_DEBUG_RECORD_VALUE = 61; |
| 156 | + private static final int INSTRUCTION_DEBUG_RECORD_DECLARE = 62; |
| 157 | + private static final int INSTRUCTION_DEBUG_RECORD_ASSIGN = 63; |
| 158 | + private static final int INSTRUCTION_DEBUG_RECORD_VALUE_SIMPLE = 64; |
| 159 | + private static final int INSTRUCTION_DEBUG_RECORD_LABEL = 65; |
154 | 160 |
|
155 | 161 | private final FunctionDefinition function;
|
156 | 162 |
|
@@ -227,18 +233,31 @@ public void exit() {
|
227 | 233 | public void record(RecordBuffer buffer) {
|
228 | 234 | int opCode = buffer.getId();
|
229 | 235 |
|
230 |
| - // debug locations can occur after terminating instructions, we process them before we |
| 236 | + // debug instructions can occur after terminating instructions, we process them before we |
231 | 237 | // replace the old block
|
232 | 238 | switch (opCode) {
|
| 239 | + case INSTRUCTION_DECLAREBLOCKS: |
| 240 | + function.allocateBlocks(buffer.readInt()); |
| 241 | + return; |
| 242 | + |
233 | 243 | case INSTRUCTION_DEBUG_LOC:
|
234 | 244 | parseDebugLocation(buffer); // intentional fallthrough
|
235 | 245 |
|
236 | 246 | case INSTRUCTION_DEBUG_LOC_AGAIN:
|
237 | 247 | applyDebugLocation();
|
238 | 248 | return;
|
239 | 249 |
|
240 |
| - case INSTRUCTION_DECLAREBLOCKS: |
241 |
| - function.allocateBlocks(buffer.readInt()); |
| 250 | + case INSTRUCTION_BLOCKADDR_USERS: |
| 251 | + // only needed by the IRLinker |
| 252 | + // since we consume only bitcode after linking, it's safe to ignore |
| 253 | + return; |
| 254 | + |
| 255 | + case INSTRUCTION_DEBUG_RECORD_VALUE: |
| 256 | + case INSTRUCTION_DEBUG_RECORD_DECLARE: |
| 257 | + case INSTRUCTION_DEBUG_RECORD_ASSIGN: |
| 258 | + case INSTRUCTION_DEBUG_RECORD_VALUE_SIMPLE: |
| 259 | + case INSTRUCTION_DEBUG_RECORD_LABEL: |
| 260 | + // TODO parse debug info |
242 | 261 | return;
|
243 | 262 |
|
244 | 263 | default:
|
|
0 commit comments