Skip to content

Commit 3a3e1f0

Browse files
committed
order properties and add comments
1 parent b917b9b commit 3a3e1f0

File tree

1 file changed

+28
-13
lines changed

1 file changed

+28
-13
lines changed

packages/svelte/src/internal/client/runtime.js

Lines changed: 28 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -94,20 +94,20 @@ export function set_is_ssr(ssr) {
9494
export function create_component_context(props) {
9595
const parent = current_component_context;
9696
return {
97-
// effects
98-
e: null,
99-
// props
100-
s: props,
101-
// parent
102-
p: parent,
10397
// accessors
10498
a: null,
10599
// context
106100
c: null,
101+
// effects
102+
e: null,
107103
// immutable
108104
i: false,
109105
// mounted
110106
m: false,
107+
// parent
108+
p: parent,
109+
// props
110+
s: props,
111111
// runes
112112
r: false,
113113
// update_callbacks
@@ -148,14 +148,19 @@ function default_equals(a, b) {
148148
* @returns {import('./types.js').SourceSignal<V>}
149149
*/
150150
function create_source_signal(flags, value) {
151-
return {
151+
const source = {
152+
// consumers
152153
c: null,
153-
// We can remove this if we get rid of beforeUpdate/afterUpdate
154-
x: null,
154+
// equals
155155
e: null,
156+
// flags
156157
f: flags,
157-
v: value
158+
// value
159+
v: value,
160+
// context: We can remove this if we get rid of beforeUpdate/afterUpdate
161+
x: null
158162
};
163+
return source;
159164
}
160165

161166
/**
@@ -167,16 +172,26 @@ function create_source_signal(flags, value) {
167172
*/
168173
function create_computation_signal(flags, value, block) {
169174
return {
175+
// block
170176
b: block,
177+
// consumers
171178
c: null,
172-
x: null,
179+
// destroy
173180
d: null,
174-
y: null,
181+
// equals
175182
e: null,
183+
// flags
176184
f: flags,
185+
// init
177186
i: null,
187+
// references
178188
r: null,
179-
v: value
189+
// value
190+
v: value,
191+
// context: We can remove this if we get rid of beforeUpdate/afterUpdate
192+
x: null,
193+
// destroy
194+
y: null
180195
};
181196
}
182197

0 commit comments

Comments
 (0)