@@ -101,22 +101,22 @@ class Base(clarirs.Base, metaclass=type):
101
101
"""
102
102
103
103
__slots__ = [
104
- "op" ,
105
- "args" ,
106
- "variables" ,
107
- "symbolic" ,
104
+ # "op",
105
+ # "args",
106
+ # "variables",
107
+ # "symbolic",
108
108
"_hash" ,
109
109
"_simplified" ,
110
110
"_cached_encoded_name" ,
111
111
"_cache_key" ,
112
112
"_errored" ,
113
113
"_eager_backends" ,
114
- "length" ,
114
+ # "length",
115
115
"_excavated" ,
116
116
"_burrowed" ,
117
117
"_uninitialized" ,
118
118
"_uc_alloc_depth" ,
119
- "annotations" ,
119
+ # "annotations",
120
120
"simplifiable" ,
121
121
"_uneliminatable_annotations" ,
122
122
"_relocatable_annotations" ,
@@ -286,7 +286,15 @@ def __new__(cls, op, args, add_variables=None, hash=None, **kwargs): # pylint:d
286
286
h = Base ._calc_hash (op , a_args , kwargs ) if hash is None else hash
287
287
self = cache .get (h , None )
288
288
if self is None :
289
- self = super ().__new__ (cls )
289
+ self = super ().__new__ (
290
+ cls ,
291
+ op ,
292
+ tuple (args ),
293
+ kwargs .get ("length" , None ),
294
+ frozenset (kwargs ["variables" ]),
295
+ kwargs ["symbolic" ],
296
+ annotations ,
297
+ )
290
298
depth = arg_max_depth + 1
291
299
self .__a_init__ (
292
300
op ,
@@ -314,7 +322,15 @@ def __init_with_annotations__(
314
322
if self is not None :
315
323
return self
316
324
317
- self = super ().__new__ (cls )
325
+ self = super ().__new__ (
326
+ cls ,
327
+ op ,
328
+ tuple (a_args ),
329
+ kwargs .get ("length" , None ),
330
+ frozenset (kwargs ["variables" ]),
331
+ kwargs ["symbolic" ],
332
+ tuple (kwargs .get ("annotations" , ())),
333
+ )
318
334
self .__a_init__ (
319
335
op ,
320
336
a_args ,
@@ -476,12 +492,13 @@ def __a_init__(
476
492
477
493
# HASHCONS: these attributes key the cache
478
494
# BEFORE CHANGING THIS, SEE ALL OTHER INSTANCES OF "HASHCONS" IN THIS FILE
479
- self .op = op
480
- self .args = args if type (args ) is tuple else tuple (args )
481
- self .length = length
482
- self .variables = frozenset (variables ) if type (variables ) is not frozenset else variables
483
- self .symbolic = symbolic
484
- self .annotations : tuple [Annotation ] = annotations
495
+ # super().__new__(op, args, length, frozenset(variables), symbolic, annotations)
496
+ # self.op = op
497
+ # self.args = args if type(args) is tuple else tuple(args)
498
+ # self.length = length
499
+ # self.variables = frozenset(variables) if type(variables) is not frozenset else variables
500
+ # self.symbolic = symbolic
501
+ # self.annotations: tuple[Annotation] = annotations
485
502
self ._uneliminatable_annotations = uneliminatable_annotations
486
503
self ._relocatable_annotations = relocatable_annotations
487
504
0 commit comments