1
1
import {
2
2
consume ,
3
- didRender ,
4
3
get ,
5
4
set ,
6
5
tagFor ,
@@ -16,7 +15,6 @@ import { DEBUG } from '@glimmer/env';
16
15
import { Dict , Opaque } from '@glimmer/interfaces' ;
17
16
import {
18
17
combine ,
19
- COMPUTE ,
20
18
ConstReference ,
21
19
createTag ,
22
20
createUpdatableTag ,
@@ -105,32 +103,6 @@ export class RootReference<T extends object> extends ConstReference<T>
105
103
}
106
104
}
107
105
108
- let TwoWayFlushDetectionTag : {
109
- create ( tag : Tag , key : string , ref : VersionedPathReference < Opaque > ) : Tag ;
110
- } ;
111
-
112
- if ( DEBUG ) {
113
- TwoWayFlushDetectionTag = class TwoWayFlushDetectionTag {
114
- static create ( tag : Tag , key : string , ref : VersionedPathReference < Opaque > ) : Tag {
115
- return ( new TwoWayFlushDetectionTag ( tag , key , ref ) as unknown ) as Tag ;
116
- }
117
-
118
- constructor (
119
- private tag : Tag ,
120
- private key : string ,
121
- private ref : VersionedPathReference < Opaque >
122
- ) { }
123
-
124
- [ COMPUTE ] ( ) : Revision {
125
- return this . tag [ COMPUTE ] ( ) ;
126
- }
127
-
128
- didCompute ( parent : Opaque ) : void {
129
- didRender ( parent , this . key , this . ref ) ;
130
- }
131
- } ;
132
- }
133
-
134
106
export abstract class PropertyReference extends CachedReference {
135
107
abstract tag : Tag ;
136
108
@@ -162,11 +134,7 @@ export class RootPropertyReference extends PropertyReference
162
134
update ( tag , tagForProperty ( parentValue , propertyKey ) ) ;
163
135
}
164
136
165
- if ( DEBUG ) {
166
- this . tag = TwoWayFlushDetectionTag . create ( this . propertyTag , propertyKey , this ) ;
167
- } else {
168
- this . tag = this . propertyTag ;
169
- }
137
+ this . tag = this . propertyTag ;
170
138
171
139
if ( DEBUG && ! EMBER_METAL_TRACKED_PROPERTIES ) {
172
140
watchKey ( parentValue , propertyKey ) ;
@@ -176,10 +144,6 @@ export class RootPropertyReference extends PropertyReference
176
144
compute ( ) : Opaque {
177
145
let { parentValue, propertyKey } = this ;
178
146
179
- if ( DEBUG ) {
180
- ( this . tag as any ) . didCompute ( parentValue ) ;
181
- }
182
-
183
147
let ret ;
184
148
185
149
if ( EMBER_METAL_TRACKED_PROPERTIES ) {
@@ -220,12 +184,7 @@ export class NestedPropertyReference extends PropertyReference {
220
184
let parentReferenceTag = parentReference . tag ;
221
185
let propertyTag = ( this . propertyTag = createUpdatableTag ( ) ) ;
222
186
223
- if ( DEBUG ) {
224
- let tag = combine ( [ parentReferenceTag , propertyTag ] ) ;
225
- this . tag = TwoWayFlushDetectionTag . create ( tag , propertyKey , this ) ;
226
- } else {
227
- this . tag = combine ( [ parentReferenceTag , propertyTag ] ) ;
228
- }
187
+ this . tag = combine ( [ parentReferenceTag , propertyTag ] ) ;
229
188
}
230
189
231
190
compute ( ) : Opaque {
@@ -245,10 +204,6 @@ export class NestedPropertyReference extends PropertyReference {
245
204
watchKey ( parentValue , propertyKey ) ;
246
205
}
247
206
248
- if ( DEBUG ) {
249
- ( this . tag as any ) . didCompute ( parentValue ) ;
250
- }
251
-
252
207
let ret ;
253
208
254
209
if ( EMBER_METAL_TRACKED_PROPERTIES ) {
0 commit comments