@@ -18,7 +18,7 @@ import {
1818} from '#client/constants' ;
1919import { UNINITIALIZED } from '../../constants.js' ;
2020import * as e from './errors.js' ;
21- import { get_stack , tag_source } from './dev/tracing.js' ;
21+ import { get_stack , tag } from './dev/tracing.js' ;
2222import { tracing_mode_flag } from '../flags/index.js' ;
2323
2424/**
@@ -55,7 +55,8 @@ export function proxy(value, path, path_preservation = PROXY_PRESERVE_PATH) {
5555 /** @type {Map<any, Source<any>> } */
5656 var sources = new Map ( ) ;
5757 var is_proxied_array = is_array ( value ) ;
58- var version = tag_source ( source ( 0 ) , `${ path } version` ) ;
58+ // var version = tag(source(0), `${path} version`);
59+ var version = source ( 0 ) ;
5960
6061 var stack = DEV && tracing_mode_flag ? get_stack ( 'CreatedAt' ) : null ;
6162 var reaction = active_reaction ;
@@ -89,7 +90,7 @@ export function proxy(value, path, path_preservation = PROXY_PRESERVE_PATH) {
8990 // We need to create the length source eagerly to ensure that
9091 // mutations to the array are properly synced with our proxy
9192 const length_source = source ( /** @type {any[] } */ ( value ) . length , stack ) ;
92- sources . set ( 'length' , DEV ? tag_source ( length_source , to_trace_name ( 'length' ) ) : length_source ) ;
93+ sources . set ( 'length' , DEV ? tag ( length_source , to_trace_name ( 'length' ) ) : length_source ) ;
9394 }
9495
9596 return new Proxy ( /** @type {any } */ ( value ) , {
@@ -111,7 +112,7 @@ export function proxy(value, path, path_preservation = PROXY_PRESERVE_PATH) {
111112
112113 if ( s === undefined ) {
113114 s = with_parent ( ( ) => source ( descriptor . value , stack ) ) ;
114- s = DEV && typeof prop === 'string' ? tag_source ( s , to_trace_name ( prop ) ) : s ;
115+ s = DEV && typeof prop === 'string' ? tag ( s , to_trace_name ( prop ) ) : s ;
115116 sources . set ( prop , s ) ;
116117 } else {
117118 set (
@@ -129,7 +130,7 @@ export function proxy(value, path, path_preservation = PROXY_PRESERVE_PATH) {
129130 if ( s === undefined ) {
130131 if ( prop in target ) {
131132 const s = with_parent ( ( ) => source ( UNINITIALIZED , stack ) ) ;
132- sources . set ( prop , DEV ? tag_source ( s , to_trace_name ( prop ) ) : s ) ;
133+ sources . set ( prop , DEV ? tag ( s , to_trace_name ( prop ) ) : s ) ;
133134 update_version ( version ) ;
134135 }
135136 } else {
@@ -166,7 +167,7 @@ export function proxy(value, path, path_preservation = PROXY_PRESERVE_PATH) {
166167 s = with_parent ( ( ) =>
167168 source ( proxy ( exists ? target [ prop ] : UNINITIALIZED , to_trace_name ( prop ) ) , stack )
168169 ) ;
169- s = DEV ? tag_source ( s , to_trace_name ( prop ) ) : s ;
170+ s = DEV ? tag ( s , to_trace_name ( prop ) ) : s ;
170171 sources . set ( prop , s ) ;
171172 }
172173
@@ -217,7 +218,7 @@ export function proxy(value, path, path_preservation = PROXY_PRESERVE_PATH) {
217218 s = with_parent ( ( ) =>
218219 source ( has ? proxy ( target [ prop ] , to_trace_name ( prop ) ) : UNINITIALIZED , stack )
219220 ) ;
220- s = DEV ? tag_source ( s , to_trace_name ( prop ) ) : s ;
221+ s = DEV ? tag ( s , to_trace_name ( prop ) ) : s ;
221222 sources . set ( prop , s ) ;
222223 }
223224
@@ -233,10 +234,10 @@ export function proxy(value, path, path_preservation = PROXY_PRESERVE_PATH) {
233234 set ( target , prop , value , receiver ) {
234235 if ( DEV && prop === PROXY_PATH_SYMBOL ) {
235236 path = value ;
236- tag_source ( version , `${ path } version` ) ;
237+ // tag (version, `${path} version`);
237238 // rename all child sources and child proxies
238239 for ( const [ prop , source ] of sources ) {
239- tag_source ( source , to_trace_name ( prop ) ) ;
240+ tag ( source , to_trace_name ( prop ) ) ;
240241 if ( typeof source . v === 'object' && source . v !== null && PROXY_PATH_SYMBOL in source . v ) {
241242 source . v [ PROXY_PATH_SYMBOL ] = to_trace_name ( prop ) ;
242243 }
@@ -256,7 +257,7 @@ export function proxy(value, path, path_preservation = PROXY_PRESERVE_PATH) {
256257 // else a later read of the property would result in a source being created with
257258 // the value of the original item at that index.
258259 other_s = with_parent ( ( ) => source ( UNINITIALIZED , stack ) ) ;
259- other_s = DEV ? tag_source ( other_s , to_trace_name ( i ) ) : other_s ;
260+ other_s = DEV ? tag ( other_s , to_trace_name ( i ) ) : other_s ;
260261 sources . set ( i + '' , other_s ) ;
261262 }
262263 }
@@ -269,7 +270,7 @@ export function proxy(value, path, path_preservation = PROXY_PRESERVE_PATH) {
269270 if ( s === undefined ) {
270271 if ( ! has || get_descriptor ( target , prop ) ?. writable ) {
271272 s = with_parent ( ( ) => source ( undefined , stack ) ) ;
272- s = DEV ? tag_source ( s , to_trace_name ( prop ) ) : s ;
273+ s = DEV ? tag ( s , to_trace_name ( prop ) ) : s ;
273274 set (
274275 s ,
275276 with_parent ( ( ) => proxy ( value , to_trace_name ( prop ) , PROXY_CHANGE_PATH ) )
0 commit comments