Source:
<code>public void register(final SPromise promise, final PromiseMessage msg, final Actor current) { Object promiseValue; synchronized (promise) { if (VmSettings.REPLAY) { ReplayRecord npr = current.peekNextReplayEvent(); if (npr.type == TraceRecord.PROMISE_CHAINED && !promise.isResolvedUnsync()) { npr = current.getNextReplayEvent(); assert msg instanceof AbstractPromiseSendMessage; LinkedList<ReplayRecord> events = new LinkedList<>(); while (npr.type == TraceRecord.PROMISE_CHAINED) { events.add(npr); npr = current.getNextReplayEvent(); } assert npr.type == TraceRecord.MESSAGE; <START> msg.messageId = npr.eventNo; <END> ((SReplayPromise) promise).registerPromiseMessageWithChainingEvents(msg, events); return; } assert npr.type == TraceRecord.PROMISE_MESSAGE || npr.type == TraceRecord.MESSAGE || npr.type == TraceRecord.PROMISE_CHAINED : "was: " + npr.type.name(); if (npr.type == TraceRecord.PROMISE_MESSAGE) { current.getNextReplayEvent(); msg.messageId = npr.eventNo; ((SReplayPromise) promise).registerOnResolvedReplay(msg); return; } } if (!promise.isResolvedUnsync()) { if (VmSettings.REPLAY) { ReplayRecord npr = current.getNextReplayEvent(); assert npr.type == TraceRecord.MESSAGE; msg.messageId = npr.eventNo; } if (VmSettings.UNIFORM_TRACING) { promiseMsgSend.record(((STracingPromise) promise).version); ((STracingPromise) promise).version++; } if (promise.isErroredUnsync()) { return; } promise.registerWhenResolvedUnsynced(msg); return; } else { promiseValue = promise.value; assert promiseValue != null; } } synchronized (promiseValue) { if (promise.getHaltOnResolution()) { msg.enableHaltOnReceive(); } schedule.execute(promise, msg, current); } }</code><technical_language>specific reason this is a LinkedList</technical_language>

Target:
public void register(final SPromise promise, final PromiseMessage msg, final Actor current) { Object promiseValue; synchronized (promise) { if (VmSettings.SENDER_SIDE_REPLAY) { ReplayRecord npr = current.peekNextReplayEvent(); if (npr.type == TraceRecord.PROMISE_CHAINED && !promise.isResolvedUnsync()) { npr = current.getNextReplayEvent(); assert msg instanceof AbstractPromiseSendMessage; LinkedList<ReplayRecord> events = new LinkedList<>(); while (npr.type == TraceRecord.PROMISE_CHAINED) { events.add(npr); npr = current.getNextReplayEvent(); } assert npr.type == TraceRecord.MESSAGE; msg.messageId = npr.eventNo; ((SReplayPromise) promise).registerPromiseMessageWithChainingEvents(msg, events); return; } assert npr.type == TraceRecord.PROMISE_MESSAGE || npr.type == TraceRecord.MESSAGE || npr.type == TraceRecord.PROMISE_CHAINED : "was: " + npr.type.name(); if (npr.type == TraceRecord.PROMISE_MESSAGE) { current.getNextReplayEvent(); msg.messageId = npr.eventNo; ((SReplayPromise) promise).registerOnResolvedReplay(msg); return; } } if (!promise.isResolvedUnsync()) { if (VmSettings.SENDER_SIDE_REPLAY) { ReplayRecord npr = current.getNextReplayEvent(); assert npr.type == TraceRecord.MESSAGE; msg.messageId = npr.eventNo; } if (VmSettings.SENDER_SIDE_TRACING) { promiseMsgSend.record(((STracingPromise) promise).version); ((STracingPromise) promise).version++; } if (promise.isErroredUnsync()) { return; } promise.registerWhenResolvedUnsynced(msg); return; } else { promiseValue = promise.value; assert promiseValue != null; } } synchronized (promiseValue) { if (promise.getHaltOnResolution()) { msg.enableHaltOnReceive(); } if (VmSettings.DYNAMIC_METRICS) { numScheduledWhenResolved.incrementAndGet(); } schedule.execute(promise, msg, current); } }