octane 0.16.2 → 0.16.3
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/cjs/rollback-flag.cjs +39 -0
- package/dist/cjs/runtime/activity.cjs +1 -1
- package/dist/cjs/runtime/block.cjs +23 -18
- package/dist/cjs/runtime/branches.cjs +1 -1
- package/dist/cjs/runtime/child-slots.cjs +24 -21
- package/dist/cjs/runtime/commit.cjs +33 -38
- package/dist/cjs/runtime/component-slots.cjs +35 -31
- package/dist/cjs/runtime/context.cjs +14 -8
- package/dist/cjs/runtime/deopt.cjs +30 -30
- package/dist/cjs/runtime/drivers.cjs +166 -14
- package/dist/cjs/runtime/effects.cjs +1 -1
- package/dist/cjs/runtime/elements.cjs +7 -3
- package/dist/cjs/runtime/engine.cjs +72 -67
- package/dist/cjs/runtime/events.cjs +22 -20
- package/dist/cjs/runtime/forms.cjs +10 -10
- package/dist/cjs/runtime/head.cjs +5 -4
- package/dist/cjs/runtime/hooks.cjs +3 -2
- package/dist/cjs/runtime/host-props.cjs +21 -21
- package/dist/cjs/runtime/hydrate-boundary.cjs +19 -4
- package/dist/cjs/runtime/hydration-presentation.cjs +24 -21
- package/dist/cjs/runtime/hydration.cjs +5 -5
- package/dist/cjs/runtime/lists.cjs +34 -29
- package/dist/cjs/runtime/portals.cjs +2 -2
- package/dist/cjs/runtime/refs.cjs +10 -7
- package/dist/cjs/runtime/render.cjs +29 -94
- package/dist/cjs/runtime/roots.cjs +1 -1
- package/dist/cjs/runtime/signal-bindings.cjs +17 -17
- package/dist/cjs/runtime/signal-owners.cjs +8 -9
- package/dist/cjs/runtime/suspense.cjs +38 -30
- package/dist/cjs/runtime/templates.cjs +7 -1
- package/dist/cjs/runtime/use.cjs +3 -1
- package/dist/cjs/runtime/view-transition.cjs +8 -8
- package/dist/cjs/runtime.cjs +2 -0
- package/dist/cjs/signals/owner-context.cjs +11 -0
- package/dist/cjs/version.cjs +1 -1
- package/dist/compiler/compile.js +4 -0
- package/dist/node/rollback-flag.js +13 -0
- package/dist/node/runtime/activity.js +2 -2
- package/dist/node/runtime/block.js +27 -17
- package/dist/node/runtime/branches.js +2 -7
- package/dist/node/runtime/child-slots.js +31 -22
- package/dist/node/runtime/commit.js +19 -24
- package/dist/node/runtime/component-slots.js +40 -35
- package/dist/node/runtime/context.js +20 -20
- package/dist/node/runtime/deopt.js +40 -33
- package/dist/node/runtime/drivers.js +143 -14
- package/dist/node/runtime/effects.js +7 -2
- package/dist/node/runtime/elements.js +13 -4
- package/dist/node/runtime/engine.js +75 -64
- package/dist/node/runtime/events.js +25 -23
- package/dist/node/runtime/forms.js +12 -16
- package/dist/node/runtime/head.js +4 -3
- package/dist/node/runtime/hooks.js +6 -4
- package/dist/node/runtime/host-props.js +22 -24
- package/dist/node/runtime/hydrate-boundary.js +24 -5
- package/dist/node/runtime/hydration-presentation.js +32 -30
- package/dist/node/runtime/hydration.js +11 -7
- package/dist/node/runtime/lists.js +38 -32
- package/dist/node/runtime/portals.js +1 -2
- package/dist/node/runtime/refs.js +18 -8
- package/dist/node/runtime/render.js +42 -91
- package/dist/node/runtime/roots.js +2 -2
- package/dist/node/runtime/signal-bindings.js +25 -27
- package/dist/node/runtime/signal-owners.js +8 -9
- package/dist/node/runtime/suspense.js +34 -26
- package/dist/node/runtime/templates.js +6 -1
- package/dist/node/runtime/use.js +3 -1
- package/dist/node/runtime/view-transition.js +10 -10
- package/dist/node/runtime.js +2 -0
- package/dist/node/signals/owner-context.js +9 -0
- package/dist/node/version.js +1 -1
- package/dist/rollback-flag.d.ts +11 -0
- package/dist/rollback-flag.js +13 -0
- package/dist/runtime/activity.js +2 -2
- package/dist/runtime/block.js +27 -17
- package/dist/runtime/branches.js +2 -7
- package/dist/runtime/child-slots.js +31 -22
- package/dist/runtime/commit.d.ts +0 -3
- package/dist/runtime/commit.js +19 -24
- package/dist/runtime/component-slots.js +40 -35
- package/dist/runtime/context.d.ts +6 -3
- package/dist/runtime/context.js +20 -20
- package/dist/runtime/deopt.d.ts +1 -1
- package/dist/runtime/deopt.js +40 -33
- package/dist/runtime/drivers.d.ts +55 -18
- package/dist/runtime/drivers.js +143 -14
- package/dist/runtime/effects.js +7 -2
- package/dist/runtime/elements.js +13 -4
- package/dist/runtime/engine.d.ts +7 -7
- package/dist/runtime/engine.js +75 -64
- package/dist/runtime/events.js +25 -23
- package/dist/runtime/forms.js +12 -16
- package/dist/runtime/head.js +4 -3
- package/dist/runtime/hooks.js +6 -4
- package/dist/runtime/host-props.d.ts +1 -1
- package/dist/runtime/host-props.js +22 -24
- package/dist/runtime/hydrate-boundary.js +24 -5
- package/dist/runtime/hydration-presentation.d.ts +1 -1
- package/dist/runtime/hydration-presentation.js +32 -30
- package/dist/runtime/hydration.js +11 -7
- package/dist/runtime/lists.js +38 -32
- package/dist/runtime/portals.js +1 -2
- package/dist/runtime/refs.d.ts +1 -1
- package/dist/runtime/refs.js +18 -8
- package/dist/runtime/render.d.ts +0 -11
- package/dist/runtime/render.js +42 -91
- package/dist/runtime/roots.js +2 -2
- package/dist/runtime/signal-bindings.js +25 -27
- package/dist/runtime/signal-owners.js +8 -9
- package/dist/runtime/suspense.d.ts +3 -1
- package/dist/runtime/suspense.js +34 -26
- package/dist/runtime/templates.d.ts +2 -0
- package/dist/runtime/templates.js +6 -1
- package/dist/runtime/types.d.ts +3 -2
- package/dist/runtime/use.d.ts +2 -1
- package/dist/runtime/use.js +3 -1
- package/dist/runtime/view-transition.js +10 -10
- package/dist/runtime.d.ts +1 -1
- package/dist/runtime.js +2 -0
- package/dist/signals/owner-context.d.ts +13 -0
- package/dist/signals/owner-context.js +9 -0
- package/dist/version.js +1 -1
- package/package.json +1 -1
|
@@ -0,0 +1,39 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __defProp = Object.defineProperty;
|
|
3
|
+
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
4
|
+
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
5
|
+
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
6
|
+
var __export = (target, all) => {
|
|
7
|
+
for (var name in all)
|
|
8
|
+
__defProp(target, name, { get: all[name], enumerable: true });
|
|
9
|
+
};
|
|
10
|
+
var __copyProps = (to, from, except, desc) => {
|
|
11
|
+
if (from && typeof from === "object" || typeof from === "function") {
|
|
12
|
+
for (let key of __getOwnPropNames(from))
|
|
13
|
+
if (!__hasOwnProp.call(to, key) && key !== except)
|
|
14
|
+
__defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
|
|
15
|
+
}
|
|
16
|
+
return to;
|
|
17
|
+
};
|
|
18
|
+
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
|
|
19
|
+
var rollback_flag_exports = {};
|
|
20
|
+
__export(rollback_flag_exports, {
|
|
21
|
+
ROOT_ROLLBACK: () => ROOT_ROLLBACK,
|
|
22
|
+
installRootRollback: () => installRootRollback,
|
|
23
|
+
rollbackEntry: () => rollbackEntry
|
|
24
|
+
});
|
|
25
|
+
module.exports = __toCommonJS(rollback_flag_exports);
|
|
26
|
+
let ROOT_ROLLBACK = false;
|
|
27
|
+
function installRootRollback() {
|
|
28
|
+
ROOT_ROLLBACK = true;
|
|
29
|
+
}
|
|
30
|
+
function rollbackEntry(entry) {
|
|
31
|
+
ROOT_ROLLBACK = true;
|
|
32
|
+
return entry;
|
|
33
|
+
}
|
|
34
|
+
// Annotate the CommonJS export names for ESM import in node:
|
|
35
|
+
0 && (module.exports = {
|
|
36
|
+
ROOT_ROLLBACK,
|
|
37
|
+
installRootRollback,
|
|
38
|
+
rollbackEntry
|
|
39
|
+
});
|
|
@@ -382,7 +382,7 @@ function activityBlock(parentScope, slotKey, domParent, mode, body, anchor, env)
|
|
|
382
382
|
}
|
|
383
383
|
const b = state.block;
|
|
384
384
|
const transaction = import_render.ROOT_RENDER_TRANSACTION;
|
|
385
|
-
const queued = transaction !== null && !transaction.aborted && !
|
|
385
|
+
const queued = transaction !== null && !transaction.aborted && !import_drivers.ROOT_RENDER_ROLLBACK;
|
|
386
386
|
if (queued && state.hidden !== wantHidden) {
|
|
387
387
|
(0, import_commit.journalObjectOnce)(state);
|
|
388
388
|
(0, import_engine.journalRootProperty)(b, "inactive", b.inactive);
|
|
@@ -60,6 +60,8 @@ var import_devtools_hook = require("../devtools-hook.cjs");
|
|
|
60
60
|
var import_runtime_tags = require("../runtime-tags.cjs");
|
|
61
61
|
var import_profile_probes = require("./profile-probes.cjs");
|
|
62
62
|
var import_drivers = require("./drivers.cjs");
|
|
63
|
+
var import_document_owner = require("../signals/document-owner.cjs");
|
|
64
|
+
var import_owner_context = require("../signals/owner-context.cjs");
|
|
63
65
|
var import_signal_owners = require("./signal-owners.cjs");
|
|
64
66
|
var import_engine = require("./engine.cjs");
|
|
65
67
|
var import_effects = require("./effects.cjs");
|
|
@@ -245,6 +247,7 @@ function enqueueEffectEventUpdate(entry) {
|
|
|
245
247
|
function enqueueEffectEventCommitAction(action) {
|
|
246
248
|
if (typeof __OCTANE_PROFILE_ENABLED__ !== "undefined" && __OCTANE_PROFILE_ENABLED__)
|
|
247
249
|
(0, import_profiling.__profileQueueWork)(action);
|
|
250
|
+
(0, import_drivers.installCommitWork)();
|
|
248
251
|
import_render.EFFECT_EVENT_ACTION_TARGET.push(action);
|
|
249
252
|
}
|
|
250
253
|
function invalidateRender(block, owner = null) {
|
|
@@ -283,8 +286,8 @@ function keepTransitionWork(block, pendingDeferred, queueEpoch) {
|
|
|
283
286
|
let RETURNED_OUTPUT_SCOPE = null;
|
|
284
287
|
function setReturnedOutputOwner(state, returned) {
|
|
285
288
|
if (state.returnedOutput === returned) return;
|
|
286
|
-
if (
|
|
287
|
-
|
|
289
|
+
if (import_drivers.TRANSITION_JOURNAL && !import_drivers.ROOT_RENDER_ROLLBACK) {
|
|
290
|
+
import_drivers.TRANSITION_JOURNAL.push(import_commit.JOURNAL_PROP, state, "returnedOutput", state.returnedOutput);
|
|
288
291
|
}
|
|
289
292
|
state.returnedOutput = returned;
|
|
290
293
|
}
|
|
@@ -328,7 +331,7 @@ function renderReturnedValue(block, out, reset) {
|
|
|
328
331
|
}
|
|
329
332
|
if ((0, import_commit.usesFrontier)(block, block.parentNode)) {
|
|
330
333
|
const transaction = import_render.ROOT_RENDER_TRANSACTION;
|
|
331
|
-
journalAt =
|
|
334
|
+
journalAt = import_drivers.TRANSITION_JOURNAL ? import_drivers.TRANSITION_JOURNAL.length : 0;
|
|
332
335
|
opsAt = transaction.ops.length;
|
|
333
336
|
retiredAt = transaction.retired?.size ?? 0;
|
|
334
337
|
const frag = (0, import_commit.queueFrontier)(block, block.parentNode, block.endMarker);
|
|
@@ -384,7 +387,7 @@ function renderReturnedValue(block, out, reset) {
|
|
|
384
387
|
(0, import_child_slots.childSlot)(block, 0, domParent, out, anchor);
|
|
385
388
|
}
|
|
386
389
|
} catch (error) {
|
|
387
|
-
if (frontier !== null) {
|
|
390
|
+
if (import_drivers.TRANSITION_JOURNAL && frontier !== null) {
|
|
388
391
|
(0, import_commit.rollbackTransitionJournal)(journalAt, block);
|
|
389
392
|
(0, import_commit.dropRootOps)(import_render.ROOT_RENDER_TRANSACTION, opsAt, retiredAt);
|
|
390
393
|
}
|
|
@@ -404,8 +407,8 @@ function renderReturnedValue(block, out, reset) {
|
|
|
404
407
|
}
|
|
405
408
|
const state = block.slots[0];
|
|
406
409
|
if (!block.disposed && state !== void 0 && state.returnedOutput !== true) {
|
|
407
|
-
if (
|
|
408
|
-
|
|
410
|
+
if (import_drivers.TRANSITION_JOURNAL && !import_drivers.ROOT_RENDER_ROLLBACK) {
|
|
411
|
+
import_drivers.TRANSITION_JOURNAL.push(import_commit.JOURNAL_PROP, state, "returnedOutput", state.returnedOutput);
|
|
409
412
|
}
|
|
410
413
|
state.returnedOutput = true;
|
|
411
414
|
}
|
|
@@ -423,7 +426,7 @@ function disposeReturnSlot(block, state, out) {
|
|
|
423
426
|
const arm = state.block ?? state.lite?.block;
|
|
424
427
|
const end = (kind === "ifBlockSlot" || kind === "switchBlockSlot") && state.start === null && arm?.endMarker != null ? arm.endMarker : state.end;
|
|
425
428
|
const transaction = import_render.ROOT_RENDER_TRANSACTION;
|
|
426
|
-
if (transaction !== null && !transaction.aborted && !
|
|
429
|
+
if (transaction !== null && !transaction.aborted && !import_drivers.ROOT_RENDER_ROLLBACK) {
|
|
427
430
|
const parent = state.ownerHost ?? block.parentNode;
|
|
428
431
|
const borrowed = state.inherited === true || state.borrowed === true;
|
|
429
432
|
let first = state.ownerHost != null || borrowed && state.start === null ? (0, import_templates.getFirstChild)(parent) : borrowed ? (0, import_templates.getNextSibling)(state.start) : state.start ?? state.hostNode ?? state.text ?? arm?.startMarker ?? end ?? null;
|
|
@@ -527,7 +530,7 @@ function dispatchTeardownErrors() {
|
|
|
527
530
|
}
|
|
528
531
|
function unmountBlock(block, detachDom = true) {
|
|
529
532
|
if (block.disposed) return;
|
|
530
|
-
if (
|
|
533
|
+
if (import_drivers.ROOT_RENDER_ROLLBACK && import_render.ROOT_RENDER_TRANSACTION !== null && (import_render.ROOT_RENDER_TRANSACTION.retainedCreated?.has(block) || import_render.ROOT_RENDER_TRANSACTION.hydrating && block.kind !== "portal"))
|
|
531
534
|
detachDom = false;
|
|
532
535
|
if ((0, import_commit.defersRootUnmount)(block)) {
|
|
533
536
|
(0, import_commit.queueRootUnmount)(
|
|
@@ -607,7 +610,7 @@ function registerSlot(scope, slot) {
|
|
|
607
610
|
const SLOT_FLAG_TEARDOWN = 1 << 0;
|
|
608
611
|
function unmountScope(scope, detachDom = true) {
|
|
609
612
|
const effects = scope.effectSlots;
|
|
610
|
-
if (effects !== null) {
|
|
613
|
+
if (import_drivers.EFFECT_HOOKS && effects !== null) {
|
|
611
614
|
for (let i = 0; i < effects.length; i++) {
|
|
612
615
|
const slot = effects[i];
|
|
613
616
|
slot.revision++;
|
|
@@ -629,7 +632,7 @@ function unmountScope(scope, detachDom = true) {
|
|
|
629
632
|
}
|
|
630
633
|
}
|
|
631
634
|
let abortedRefs = null;
|
|
632
|
-
if (scope.mounted !== true) {
|
|
635
|
+
if (import_drivers.COMMIT_WORK && scope.mounted !== true) {
|
|
633
636
|
abortedRefs = [];
|
|
634
637
|
(0, import_activity.collectVisibleSubtreeRefs)(scope, abortedRefs);
|
|
635
638
|
}
|
|
@@ -647,14 +650,16 @@ function runScopeCleanups(scope, retireUnowned) {
|
|
|
647
650
|
reportTeardownError(err);
|
|
648
651
|
}
|
|
649
652
|
}
|
|
650
|
-
|
|
651
|
-
|
|
652
|
-
if (
|
|
653
|
-
|
|
654
|
-
|
|
655
|
-
|
|
656
|
-
|
|
657
|
-
|
|
653
|
+
if (import_drivers.registerRootOptions || import_document_owner.signalDocumentEnabled || import_drivers.SIGNAL_BINDINGS_ENABLED || import_owner_context.explicitSignalOwners) {
|
|
654
|
+
const signalOwner = scope.signalOwner;
|
|
655
|
+
if (signalOwner) {
|
|
656
|
+
if (import_render.RETAINED_SIGNAL_OWNERS?.owners.has(signalOwner)) return;
|
|
657
|
+
if (retireUnowned) scope.signalOwner = null;
|
|
658
|
+
else scope.signalOwner = void 0;
|
|
659
|
+
(0, import_engine.retireRendererSignalOwner)(signalOwner);
|
|
660
|
+
} else if (retireUnowned && (signalOwner === false || signalOwner === void 0 && scope.signalTokenEscaped)) {
|
|
661
|
+
retireUnownedSignalScope(scope);
|
|
662
|
+
}
|
|
658
663
|
}
|
|
659
664
|
}
|
|
660
665
|
function retireUnownedSignalScope(scope) {
|
|
@@ -221,7 +221,7 @@ function unmountLiteArm(state, detachDom) {
|
|
|
221
221
|
state.lite = null;
|
|
222
222
|
const exclusive = arm.startMarker === state.start;
|
|
223
223
|
const transaction = import_render.ROOT_RENDER_TRANSACTION;
|
|
224
|
-
if (transaction !== null && !transaction.aborted && !
|
|
224
|
+
if (transaction !== null && !transaction.aborted && !import_drivers.ROOT_RENDER_ROLLBACK && arm.idState.renderOwner === transaction.owner && !(0, import_engine.isCreatedInRootRender)(transaction, owningBlock(arm))) {
|
|
225
225
|
(0, import_commit.queueRootUnmount)(scope, exclusive);
|
|
226
226
|
return;
|
|
227
227
|
}
|
|
@@ -68,6 +68,7 @@ var import_deopt = require("./deopt.cjs");
|
|
|
68
68
|
var import_activity = require("./activity.cjs");
|
|
69
69
|
var import_commit = require("./commit.cjs");
|
|
70
70
|
var import_templates = require("./templates.cjs");
|
|
71
|
+
var import_rollback_flag = require("../rollback-flag.cjs");
|
|
71
72
|
const __octaneDev = process.env.NODE_ENV !== "production";
|
|
72
73
|
let DEOPT_UPGRADE = null;
|
|
73
74
|
function isPortalTarget(block, domParent) {
|
|
@@ -384,13 +385,14 @@ function childSlot(parentScope, slotKey, domParent, value, anchor, ownEnd, ownsH
|
|
|
384
385
|
continue;
|
|
385
386
|
}
|
|
386
387
|
if (typeof value.then === "function") {
|
|
387
|
-
value = (0, import_use.useThenable)(value);
|
|
388
|
+
if (import_rollback_flag.ROOT_ROLLBACK) value = (0, import_use.useThenable)(value);
|
|
389
|
+
else throw value;
|
|
388
390
|
continue;
|
|
389
391
|
}
|
|
390
392
|
break;
|
|
391
393
|
}
|
|
392
|
-
const elementType = (0, import_elements.isElementDescriptor)(value) ? value.type : void 0;
|
|
393
|
-
const
|
|
394
|
+
const elementType = import_drivers.ELEMENT_DESCRIPTORS && (0, import_elements.isElementDescriptor)(value) ? value.type : void 0;
|
|
395
|
+
const hostBody = typeof elementType === "string" && import_drivers.HOST_BODY ? import_drivers.HOST_BODY : null;
|
|
394
396
|
const valueComponent = typeof value === "function" ? value : typeof elementType === "function" ? elementType : null;
|
|
395
397
|
const hydrationTransparent = hydration?.passthroughRanges === true && valueComponent?.[import_constants.HYDRATION_RANGE_BOUNDARY] !== "owner";
|
|
396
398
|
const passthroughOwner = hydration?.passthroughRanges === true && !hydrationTransparent;
|
|
@@ -399,10 +401,10 @@ function childSlot(parentScope, slotKey, domParent, value, anchor, ownEnd, ownsH
|
|
|
399
401
|
if (iterable !== null) value = iterable;
|
|
400
402
|
const preparedList = compiledMapBody !== void 0 ? { items: value, keys: null } : (0, import_deopt.prepareDeoptList)(value, false, includeKeyedSingle, elementType);
|
|
401
403
|
let state = parentScope.slots[slotKey];
|
|
402
|
-
const pureHost =
|
|
404
|
+
const pureHost = hostBody !== null && preparedList === null && state?.currentComp !== hostBody && !(0, import_deopt.descNeedsBlocks)(value.children);
|
|
403
405
|
let rootShapeChanged = false;
|
|
404
406
|
if (state !== void 0 && import_render.ROOT_RENDER_TRANSACTION !== null) {
|
|
405
|
-
const component = pureHost || preparedList !== null ? null :
|
|
407
|
+
const component = pureHost || preparedList !== null ? null : hostBody !== null ? hostBody : valueComponent;
|
|
406
408
|
const unchangedList = preparedList !== null && state.forSlot !== null;
|
|
407
409
|
const unchangedComponent = state.block !== null && component !== null && (component === state.currentComp || typeof value === "function" && state.currentIsBodyFn && (0, import_component_slots.sameRenderBody)(state.currentComp, component));
|
|
408
410
|
const unchangedHost = pureHost && state.hostNode !== null && state.block === null && state.hostNode.nodeType === 1 && (0, import_host_props.isHostElementOfType)(state.hostNode, elementType);
|
|
@@ -421,7 +423,7 @@ function childSlot(parentScope, slotKey, domParent, value, anchor, ownEnd, ownsH
|
|
|
421
423
|
let hydratingUpdate = false;
|
|
422
424
|
if (state === void 0) {
|
|
423
425
|
const transaction = import_render.ROOT_RENDER_TRANSACTION;
|
|
424
|
-
if (transaction !== null && !transaction.aborted && !
|
|
426
|
+
if (transaction !== null && !transaction.aborted && !import_drivers.ROOT_RENDER_ROLLBACK && parentScope.mounted && !(0, import_engine.isCreatedInRootRender)(transaction, parentBlock)) {
|
|
425
427
|
(0, import_commit.journalBag)();
|
|
426
428
|
}
|
|
427
429
|
let start;
|
|
@@ -498,7 +500,7 @@ function childSlot(parentScope, slotKey, domParent, value, anchor, ownEnd, ownsH
|
|
|
498
500
|
};
|
|
499
501
|
parentScope.slots[slotKey] = state;
|
|
500
502
|
(0, import_block.registerSlot)(parentScope, state);
|
|
501
|
-
rootShapeChanged = ownsHost !== void 0 && hydration === null && import_render.ROOT_RENDER_TRANSACTION !== null && DEOPT_UPGRADE?.block !== parentScope.block;
|
|
503
|
+
rootShapeChanged = ownsHost !== void 0 && hydration === null && import_render.ROOT_RENDER_TRANSACTION !== null && (import_drivers.HOST_BODY ? DEOPT_UPGRADE?.block !== parentScope.block : true);
|
|
502
504
|
} else if (hydration !== null) {
|
|
503
505
|
if (hydration.lentSlot === state) {
|
|
504
506
|
hydration.lentSlot = null;
|
|
@@ -517,17 +519,17 @@ function childSlot(parentScope, slotKey, domParent, value, anchor, ownEnd, ownsH
|
|
|
517
519
|
if (compactable === true) state.compactable = true;
|
|
518
520
|
let upgradeChildren = void 0;
|
|
519
521
|
let upgradeArmed = false;
|
|
520
|
-
if (DEOPT_UPGRADE !== null && DEOPT_UPGRADE.block === parentScope.block && ownsHost !== void 0) {
|
|
522
|
+
if (import_drivers.HOST_BODY && DEOPT_UPGRADE !== null && DEOPT_UPGRADE.block === parentScope.block && ownsHost !== void 0) {
|
|
521
523
|
upgradeChildren = DEOPT_UPGRADE.children;
|
|
522
524
|
upgradeArmed = true;
|
|
523
525
|
DEOPT_UPGRADE = null;
|
|
524
526
|
}
|
|
525
|
-
if (state.end === null && !pureHost && state.ownerHost === null && !state.borrowed) {
|
|
527
|
+
if (import_drivers.HOST_BODY && state.end === null && !pureHost && state.ownerHost === null && !state.borrowed) {
|
|
526
528
|
const start = document.createComment("");
|
|
527
529
|
const end = document.createComment("");
|
|
528
530
|
const host = state.hostNode;
|
|
529
531
|
const p = host === null ? null : host.parentNode;
|
|
530
|
-
const adopts = hydration === null && preparedList === null && host !== null &&
|
|
532
|
+
const adopts = hydration === null && preparedList === null && host !== null && hostBody !== null && (0, import_drivers.HOST_ADOPTS)(host, value, domParent);
|
|
531
533
|
if (p !== null && !adopts && import_render.ROOT_RENDER_TRANSACTION !== null && (0, import_commit.usesFrontier)(parentBlock, p)) {
|
|
532
534
|
const frag = (0, import_commit.slotFrontier)(state, parentBlock, p, null);
|
|
533
535
|
frag.append(start, end);
|
|
@@ -539,7 +541,7 @@ function childSlot(parentScope, slotKey, domParent, value, anchor, ownEnd, ownsH
|
|
|
539
541
|
state.hostNode = null;
|
|
540
542
|
domParent = frag;
|
|
541
543
|
} else if (p !== null && adopts && import_render.ROOT_RENDER_TRANSACTION !== null && (0, import_commit.usesFrontier)(parentBlock, p)) {
|
|
542
|
-
import_render.ROOT_RENDER_TRANSACTION.ops.push(
|
|
544
|
+
import_render.ROOT_RENDER_TRANSACTION.ops.push(import_drivers.HOST_LAND_PAIR, [host, start, end, parentBlock]);
|
|
543
545
|
} else if (p !== null) {
|
|
544
546
|
p.insertBefore(start, host);
|
|
545
547
|
p.insertBefore(end, (0, import_templates.getNextSibling)(host));
|
|
@@ -614,12 +616,12 @@ function childSlot(parentScope, slotKey, domParent, value, anchor, ownEnd, ownsH
|
|
|
614
616
|
let isBodyFn = false;
|
|
615
617
|
let invocationSite;
|
|
616
618
|
let componentDescriptor = null;
|
|
617
|
-
if (
|
|
619
|
+
if (hostBody !== null) {
|
|
618
620
|
if (pureHost) {
|
|
619
621
|
if (state.block !== null || state.text !== null) (0, import_component_slots.clearChildContent)(state);
|
|
620
622
|
if (state.end === null) {
|
|
621
623
|
const prev2 = state.hostNode;
|
|
622
|
-
const node2 =
|
|
624
|
+
const node2 = (0, import_drivers.HOST_RECONCILE)(
|
|
623
625
|
prev2,
|
|
624
626
|
value,
|
|
625
627
|
parentBlock,
|
|
@@ -660,7 +662,7 @@ function childSlot(parentScope, slotKey, domParent, value, anchor, ownEnd, ownsH
|
|
|
660
662
|
prev = (0, import_templates.getNextSibling)(state.start);
|
|
661
663
|
if (prev === state.end) prev = null;
|
|
662
664
|
}
|
|
663
|
-
const node =
|
|
665
|
+
const node = (0, import_drivers.HOST_RECONCILE)(
|
|
664
666
|
prev,
|
|
665
667
|
value,
|
|
666
668
|
parentBlock,
|
|
@@ -691,13 +693,13 @@ function childSlot(parentScope, slotKey, domParent, value, anchor, ownEnd, ownsH
|
|
|
691
693
|
state.hostNode = node;
|
|
692
694
|
return;
|
|
693
695
|
}
|
|
694
|
-
comp =
|
|
696
|
+
comp = hostBody;
|
|
695
697
|
props = value;
|
|
696
698
|
invocationSite = import_signal_owners.RENDERER_INVOCATION_SITE;
|
|
697
699
|
} else if (typeof value === "function") {
|
|
698
700
|
comp = value;
|
|
699
701
|
isBodyFn = true;
|
|
700
|
-
} else if ((0, import_elements.isElementDescriptor)(value)) {
|
|
702
|
+
} else if (import_drivers.ELEMENT_DESCRIPTORS && (0, import_elements.isElementDescriptor)(value)) {
|
|
701
703
|
const dispatch = import_elements.activityDescriptorDispatch;
|
|
702
704
|
const activity = dispatch !== null && elementType === dispatch.type;
|
|
703
705
|
if (!activity && typeof elementType !== "function") {
|
|
@@ -728,7 +730,7 @@ function childSlot(parentScope, slotKey, domParent, value, anchor, ownEnd, ownsH
|
|
|
728
730
|
if (import_drivers.MEMO_BAIL && (0, import_drivers.MEMO_BAIL)(state.block, comp, props)) return;
|
|
729
731
|
if (props === state.block.props && // Deferred host shells can change their complete record or children.
|
|
730
732
|
// Compare the accepted resolution before accepting the shell's identity.
|
|
731
|
-
(
|
|
733
|
+
(hostBody === null || (0, import_drivers.HOST_UNCHANGED)(state.block, props)) && (0, import_component_slots.tryImplicitBail)(state.block))
|
|
732
734
|
return;
|
|
733
735
|
if (state.block.props !== props) (0, import_engine.journalRootProperty)(state.block, "props", state.block.props);
|
|
734
736
|
state.block.props = props;
|
|
@@ -754,7 +756,7 @@ function childSlot(parentScope, slotKey, domParent, value, anchor, ownEnd, ownsH
|
|
|
754
756
|
component: isBodyFn ? void 0 : comp,
|
|
755
757
|
key: void 0
|
|
756
758
|
};
|
|
757
|
-
if (hydration === null && import_render.ROOT_RENDER_TRANSACTION !== null &&
|
|
759
|
+
if (hydration === null && import_render.ROOT_RENDER_TRANSACTION !== null && hostBody !== null && state.block === null && state.hostNode !== null && (0, import_drivers.HOST_ADOPTS)(state.hostNode, props, domParent)) {
|
|
758
760
|
const el = state.hostNode;
|
|
759
761
|
state.hostNode = null;
|
|
760
762
|
state.currentComp = comp;
|
|
@@ -787,7 +789,8 @@ function childSlot(parentScope, slotKey, domParent, value, anchor, ownEnd, ownsH
|
|
|
787
789
|
}
|
|
788
790
|
if ((rootShapeChanged || upgradeArmed) && (0, import_commit.usesFrontier)(parentBlock, domParent)) {
|
|
789
791
|
const owned = state.ownerHost !== null || state.borrowed && state.start === null;
|
|
790
|
-
const promote = parentScope === parentBlock && parentBlock.forSlot !== null && !parentBlock.exclusiveMarkers && state.borrowed && ((0, import_branches.sharesBlockBoundary)(parentBlock, state.start, state.end) || (
|
|
792
|
+
const promote = parentScope === parentBlock && parentBlock.forSlot !== null && !parentBlock.exclusiveMarkers && state.borrowed && ((0, import_branches.sharesBlockBoundary)(parentBlock, state.start, state.end) || // Only a host descriptor's item can be awaiting its pair (itemRange).
|
|
793
|
+
(import_drivers.HOST_BODY ? (0, import_deopt.itemRange)(parentBlock)[1] : parentBlock.endMarker) === state.end);
|
|
791
794
|
const implicitBail = !isBodyFn || (0, import_component_slots.isChildrenBlock)(comp);
|
|
792
795
|
const frag = (0, import_commit.slotFrontier)(
|
|
793
796
|
state,
|
|
@@ -863,7 +866,7 @@ function childSlot(parentScope, slotKey, domParent, value, anchor, ownEnd, ownsH
|
|
|
863
866
|
import_block.renderReturnedValue
|
|
864
867
|
);
|
|
865
868
|
if (signalInstanceKey !== void 0) (0, import_signal_owners.stampSignalInstanceKey)(b, signalInstanceKey);
|
|
866
|
-
if (typeof __OCTANE_PROFILE_ENABLED__ !== "undefined" && __OCTANE_PROFILE_ENABLED__ &&
|
|
869
|
+
if (typeof __OCTANE_PROFILE_ENABLED__ !== "undefined" && __OCTANE_PROFILE_ENABLED__ && hostBody === null)
|
|
867
870
|
(0, import_profiling.__profileTrackComponent)(b, !isBodyFn || (0, import_profiling.__profileHasComponentMetadata)(comp) ? comp : null);
|
|
868
871
|
if (state.borrowed) b.exclusiveMarkers = true;
|
|
869
872
|
if (!isBodyFn || (0, import_component_slots.isChildrenBlock)(comp)) {
|
|
@@ -873,7 +876,7 @@ function childSlot(parentScope, slotKey, domParent, value, anchor, ownEnd, ownsH
|
|
|
873
876
|
state.block = b;
|
|
874
877
|
if (hydratingUpdate) {
|
|
875
878
|
hydration.renderUpdate(b);
|
|
876
|
-
} else if (adoptedRange && !passthroughOwner &&
|
|
879
|
+
} else if (adoptedRange && !passthroughOwner && hostBody === null) {
|
|
877
880
|
hydration.renderClaimed(b, parentScope, slotKey);
|
|
878
881
|
} else {
|
|
879
882
|
(0, import_signal_owners.renderBlock)(b);
|
|
@@ -31,10 +31,7 @@ __export(commit_exports, {
|
|
|
31
31
|
JOURNAL_RENDER: () => JOURNAL_RENDER,
|
|
32
32
|
JOURNAL_UNDO: () => JOURNAL_UNDO,
|
|
33
33
|
NO_MEMBERS: () => NO_MEMBERS,
|
|
34
|
-
OPS_CHECKPOINTS: () => OPS_CHECKPOINTS,
|
|
35
34
|
REF_DETACH_SUPPRESSION: () => REF_DETACH_SUPPRESSION,
|
|
36
|
-
TRANSITION_JOURNAL_BAG_WINDOWS: () => TRANSITION_JOURNAL_BAG_WINDOWS,
|
|
37
|
-
TRANSITION_JOURNAL_WINDOWS: () => TRANSITION_JOURNAL_WINDOWS,
|
|
38
35
|
applyOutgoing: () => applyOutgoing,
|
|
39
36
|
applySlotNext: () => applySlotNext,
|
|
40
37
|
atCommit: () => atCommit,
|
|
@@ -90,6 +87,7 @@ var import_activity = require("./activity.cjs");
|
|
|
90
87
|
var import_lists = require("./lists.cjs");
|
|
91
88
|
var import_templates = require("./templates.cjs");
|
|
92
89
|
var import_events = require("./events.cjs");
|
|
90
|
+
var import_drivers = require("./drivers.cjs");
|
|
93
91
|
const __octaneDev = process.env.NODE_ENV !== "production";
|
|
94
92
|
const JOURNAL_BAG = 2;
|
|
95
93
|
const JOURNAL_PROP = 3;
|
|
@@ -99,14 +97,11 @@ const JOURNAL_UNDO = 6;
|
|
|
99
97
|
const JOURNAL_INPUTS = 8;
|
|
100
98
|
const JOURNAL_EVENT_OWNER = 9;
|
|
101
99
|
const JOURNAL_OPS = 10;
|
|
102
|
-
const TRANSITION_JOURNAL_WINDOWS = [];
|
|
103
|
-
const TRANSITION_JOURNAL_BAG_WINDOWS = [];
|
|
104
100
|
let TRANSITION_JOURNAL_REPLAYING = false;
|
|
105
101
|
const BAG_SIZE = 255;
|
|
106
102
|
const BAG_STAGED = 256;
|
|
107
103
|
const BAG_QUEUED = 512;
|
|
108
104
|
const BAG_POOL = [[], [], [], [], [], [], [], []];
|
|
109
|
-
const OPS_CHECKPOINTS = [];
|
|
110
105
|
function bagRecord(s, next, cell, value, committed, bundle, a0, a1) {
|
|
111
106
|
const bag = s.slots[0];
|
|
112
107
|
const changed = value !== committed;
|
|
@@ -127,7 +122,7 @@ function bagRecord(s, next, cell, value, committed, bundle, a0, a1) {
|
|
|
127
122
|
bag.$ = state |= BAG_STAGED;
|
|
128
123
|
}
|
|
129
124
|
const transaction = import_render.ROOT_RENDER_TRANSACTION;
|
|
130
|
-
if ((state & BAG_QUEUED) === 0 && transaction !== null && !import_hydration_flag.hydrating && (
|
|
125
|
+
if ((state & BAG_QUEUED) === 0 && transaction !== null && !import_hydration_flag.hydrating && (import_drivers.TRANSITION_JOURNAL && import_drivers.TRANSITION_JOURNAL_DEPTH !== 1 || s.block.createdStamp !== import_render.ROOT_DISCARD_STAMP)) {
|
|
131
126
|
next[size] = s;
|
|
132
127
|
next[size + 1] = transaction.ops.length;
|
|
133
128
|
bag.$ = state | BAG_QUEUED;
|
|
@@ -144,7 +139,7 @@ function bagRecord(s, next, cell, value, committed, bundle, a0, a1) {
|
|
|
144
139
|
}
|
|
145
140
|
function bagResume(bag) {
|
|
146
141
|
const next = bag.next;
|
|
147
|
-
if ((bag.$ & BAG_QUEUED) !== 0 && next[(bag.$ & BAG_SIZE) + 1] <
|
|
142
|
+
if (import_drivers.TRANSITION_JOURNAL && (bag.$ & BAG_QUEUED) !== 0 && next[(bag.$ & BAG_SIZE) + 1] < import_drivers.OPS_CHECKPOINT)
|
|
148
143
|
journalObjectOnce(next);
|
|
149
144
|
return next;
|
|
150
145
|
}
|
|
@@ -155,7 +150,7 @@ function bagDone(s, bag) {
|
|
|
155
150
|
next[size + 2](
|
|
156
151
|
bag,
|
|
157
152
|
next,
|
|
158
|
-
|
|
153
|
+
import_drivers.TRANSITION_JOURNAL ? true : import_events._dispatchDepth !== 0 && import_events.CAPTURE_SLOTS.length !== 0
|
|
159
154
|
);
|
|
160
155
|
}
|
|
161
156
|
function commitQueuedBag(bag, careful) {
|
|
@@ -179,9 +174,9 @@ function slotNext(slot) {
|
|
|
179
174
|
bound: null
|
|
180
175
|
};
|
|
181
176
|
tx.ops.push(applySlotNext, slot);
|
|
182
|
-
if (
|
|
183
|
-
|
|
184
|
-
} else if (
|
|
177
|
+
if (import_drivers.TRANSITION_JOURNAL && import_drivers.TRANSITION_JOURNAL_DEPTH > 1)
|
|
178
|
+
import_drivers.TRANSITION_JOURNAL_BAGS.set(next, import_drivers.TRANSITION_JOURNAL.length);
|
|
179
|
+
} else if (import_drivers.TRANSITION_JOURNAL && import_drivers.TRANSITION_JOURNAL_DEPTH > 1 && (import_drivers.TRANSITION_JOURNAL_BAGS.get(next) ?? -1) < import_drivers.TRANSITION_JOURNAL_CHECKPOINT) {
|
|
185
180
|
journalObjectOnce(next);
|
|
186
181
|
journalObjectOnce(next.out);
|
|
187
182
|
if (next.members !== null) journalObjectOnce(next.members);
|
|
@@ -231,7 +226,7 @@ function noteFrontierMember(parent, member) {
|
|
|
231
226
|
}
|
|
232
227
|
function usesFrontier(parentBlock, domParent) {
|
|
233
228
|
const transaction = import_render.ROOT_RENDER_TRANSACTION;
|
|
234
|
-
if (transaction === null || transaction.aborted ||
|
|
229
|
+
if (transaction === null || transaction.aborted || import_drivers.ROOT_RENDER_ROLLBACK || import_hydration_flag.hydrating && import_hydration.CURSOR !== null)
|
|
235
230
|
return false;
|
|
236
231
|
const owner = parentBlock instanceof import_block.LiteBlockImpl ? parentBlock.ownerBlock : parentBlock;
|
|
237
232
|
if (owner.createdStamp === transaction.createdStamp && !transaction.retainedCreated?.has(owner)) {
|
|
@@ -426,7 +421,7 @@ function dropRootOps(transaction, from, retired) {
|
|
|
426
421
|
}
|
|
427
422
|
function defersRootUnmount(block) {
|
|
428
423
|
const transaction = import_render.ROOT_RENDER_TRANSACTION;
|
|
429
|
-
return transaction !== null && !transaction.aborted && !
|
|
424
|
+
return transaction !== null && !transaction.aborted && !import_drivers.ROOT_RENDER_ROLLBACK && block.idState.renderOwner === transaction.owner && !(0, import_engine.isCreatedInRootRender)(transaction, block);
|
|
430
425
|
}
|
|
431
426
|
function queueRootUnmount(scope, exclusive, out) {
|
|
432
427
|
const block = scope.block;
|
|
@@ -488,7 +483,8 @@ function listNext(state, parentBlock, at) {
|
|
|
488
483
|
const ops = tx.ops;
|
|
489
484
|
if (at >= ops.length) ops.push(applySlotNext, state);
|
|
490
485
|
else ops.splice(at, 0, applySlotNext, state);
|
|
491
|
-
if (
|
|
486
|
+
if (import_drivers.TRANSITION_JOURNAL && import_drivers.TRANSITION_JOURNAL_DEPTH > 1)
|
|
487
|
+
import_drivers.TRANSITION_JOURNAL_BAGS.set(next, import_drivers.TRANSITION_JOURNAL.length);
|
|
492
488
|
return next;
|
|
493
489
|
}
|
|
494
490
|
let DETACHED_ROOT = null;
|
|
@@ -563,16 +559,16 @@ function cloneBindingBag(bag, arity) {
|
|
|
563
559
|
}
|
|
564
560
|
function journalBag() {
|
|
565
561
|
const scope = import_render.CURRENT_SCOPE;
|
|
566
|
-
if (scope === null) return;
|
|
567
|
-
if (
|
|
562
|
+
if (!import_drivers.TRANSITION_JOURNAL || scope === null) return;
|
|
563
|
+
if (import_drivers.TRANSITION_JOURNAL_DEPTH === 1 && scope.block.createdStamp === import_render.ROOT_DISCARD_STAMP) return;
|
|
568
564
|
const bag = scope.slots[0];
|
|
569
565
|
if (bag === null || typeof bag !== "object") return;
|
|
570
566
|
const arity = bag[BINDING_BAG_ARITY];
|
|
571
567
|
if (arity !== void 0 && arity !== -1) {
|
|
572
|
-
const window =
|
|
568
|
+
const window = import_drivers.TRANSITION_JOURNAL_BAG_WINDOW;
|
|
573
569
|
if (bag.__journalWindow === window) return;
|
|
574
570
|
const snapshot = cloneBindingBag(bag, arity);
|
|
575
|
-
|
|
571
|
+
import_drivers.TRANSITION_JOURNAL.push(JOURNAL_BAG, bag, snapshot, null);
|
|
576
572
|
bag.__journalWindow = window;
|
|
577
573
|
return;
|
|
578
574
|
}
|
|
@@ -580,25 +576,27 @@ function journalBag() {
|
|
|
580
576
|
journalObjectOnce(bag);
|
|
581
577
|
}
|
|
582
578
|
function journalObjectOnce(obj) {
|
|
583
|
-
|
|
584
|
-
|
|
585
|
-
seen.
|
|
586
|
-
|
|
579
|
+
if (!import_drivers.TRANSITION_JOURNAL) return;
|
|
580
|
+
const seen = import_drivers.TRANSITION_JOURNAL_BAGS;
|
|
581
|
+
if ((seen.get(obj) ?? -1) >= import_drivers.TRANSITION_JOURNAL_CHECKPOINT) return;
|
|
582
|
+
seen.set(obj, import_drivers.TRANSITION_JOURNAL.length);
|
|
583
|
+
import_drivers.TRANSITION_JOURNAL.push(JOURNAL_BAG, obj, { ...obj }, Array.isArray(obj) ? obj.length : null);
|
|
587
584
|
}
|
|
588
585
|
function journalForSlot(state, link) {
|
|
589
|
-
|
|
586
|
+
if (!import_drivers.TRANSITION_JOURNAL) return null;
|
|
587
|
+
const seen = import_drivers.TRANSITION_JOURNAL_BAGS;
|
|
590
588
|
const at = seen.get(state) ?? -1;
|
|
591
|
-
const current = at >= 0 &&
|
|
592
|
-
if (link && at >=
|
|
589
|
+
const current = at >= 0 && import_drivers.TRANSITION_JOURNAL[at] === JOURNAL_UNDO ? import_drivers.TRANSITION_JOURNAL[at + 2] : null;
|
|
590
|
+
if (link && at >= import_drivers.TRANSITION_JOURNAL_CHECKPOINT) return current;
|
|
593
591
|
if (current !== null) fullForSlotRecord(state, current);
|
|
594
|
-
if (at >=
|
|
595
|
-
seen.set(state,
|
|
592
|
+
if (at >= import_drivers.TRANSITION_JOURNAL_CHECKPOINT) return null;
|
|
593
|
+
seen.set(state, import_drivers.TRANSITION_JOURNAL.length);
|
|
596
594
|
if (import_render.ROOT_RENDER_TRANSACTION !== null && (import_render.ROOT_RENDER_TRANSACTION.hydrating === true && import_hydration_flag.hydrating && import_hydration.CURSOR !== null || state.adopt !== null)) {
|
|
597
595
|
(0, import_engine.journalUndo)(() => {
|
|
598
596
|
seen.delete(state);
|
|
599
597
|
});
|
|
600
598
|
for (let b = state.head; b !== null; b = b.nextSibling)
|
|
601
|
-
|
|
599
|
+
import_drivers.TRANSITION_JOURNAL.push(JOURNAL_PROP, b, "itemIndex", b.itemIndex);
|
|
602
600
|
return null;
|
|
603
601
|
}
|
|
604
602
|
const record = {
|
|
@@ -612,7 +610,7 @@ function journalForSlot(state, link) {
|
|
|
612
610
|
};
|
|
613
611
|
if (!link) fullForSlotRecord(state, record);
|
|
614
612
|
else if (__octaneDev) record.check = forSlotShape(state);
|
|
615
|
-
|
|
613
|
+
import_drivers.TRANSITION_JOURNAL.push(
|
|
616
614
|
JOURNAL_UNDO,
|
|
617
615
|
() => {
|
|
618
616
|
fullForSlotRecord(state, record);
|
|
@@ -668,15 +666,15 @@ function fullForSlotRecord(state, record) {
|
|
|
668
666
|
}
|
|
669
667
|
}
|
|
670
668
|
function journalForListClear(state) {
|
|
671
|
-
const seen =
|
|
669
|
+
const seen = import_drivers.TRANSITION_JOURNAL_BAGS;
|
|
672
670
|
const at = seen.get(state) ?? -1;
|
|
673
671
|
if (at >= 0)
|
|
674
672
|
fullForSlotRecord(
|
|
675
673
|
state,
|
|
676
|
-
|
|
674
|
+
import_drivers.TRANSITION_JOURNAL[at] === JOURNAL_UNDO ? import_drivers.TRANSITION_JOURNAL[at + 2] : null
|
|
677
675
|
);
|
|
678
676
|
const oldItems = state.items;
|
|
679
|
-
seen.set(state,
|
|
677
|
+
seen.set(state, import_drivers.TRANSITION_JOURNAL.length);
|
|
680
678
|
const snapshot = {
|
|
681
679
|
head: state.head,
|
|
682
680
|
tail: state.tail,
|
|
@@ -727,7 +725,7 @@ function restoreForSlot(state, snapshot, chain) {
|
|
|
727
725
|
}
|
|
728
726
|
function rollbackTransitionJournal(checkpoint, owner) {
|
|
729
727
|
if (checkpoint < 0) return;
|
|
730
|
-
const log =
|
|
728
|
+
const log = import_drivers.TRANSITION_JOURNAL;
|
|
731
729
|
if (log === null) return;
|
|
732
730
|
if (typeof __OCTANE_PROFILE_ENABLED__ !== "undefined" && __OCTANE_PROFILE_ENABLED__)
|
|
733
731
|
(0, import_profiling.__profileJournalRolledBack)((log.length - checkpoint) / 4);
|
|
@@ -775,7 +773,7 @@ function rollbackTransitionJournal(checkpoint, owner) {
|
|
|
775
773
|
target[key] = a[key];
|
|
776
774
|
}
|
|
777
775
|
if (b !== null) target.length = b;
|
|
778
|
-
|
|
776
|
+
import_drivers.TRANSITION_JOURNAL_BAGS.delete(target);
|
|
779
777
|
}
|
|
780
778
|
}
|
|
781
779
|
log.length = checkpoint;
|
|
@@ -1063,10 +1061,7 @@ function withRegisteredRefDetachSuppression(entries, fn) {
|
|
|
1063
1061
|
JOURNAL_RENDER,
|
|
1064
1062
|
JOURNAL_UNDO,
|
|
1065
1063
|
NO_MEMBERS,
|
|
1066
|
-
OPS_CHECKPOINTS,
|
|
1067
1064
|
REF_DETACH_SUPPRESSION,
|
|
1068
|
-
TRANSITION_JOURNAL_BAG_WINDOWS,
|
|
1069
|
-
TRANSITION_JOURNAL_WINDOWS,
|
|
1070
1065
|
applyOutgoing,
|
|
1071
1066
|
applySlotNext,
|
|
1072
1067
|
atCommit,
|