Skip to content

Commit e801633

Browse files
committed
Fix a few missing uses of interned Vectors
1 parent 44bd51e commit e801633

File tree

2 files changed

+7
-7
lines changed

2 files changed

+7
-7
lines changed

src/flitter/language/tree.pyx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -927,7 +927,7 @@ cdef class Slice(Expression):
927927
cdef void _compile(self, Program program, list lnames):
928928
self.expr._compile(program, lnames)
929929
if isinstance(self.index, Literal):
930-
program.slice_literal((<Literal>self.index).value)
930+
program.slice_literal((<Literal>self.index).value.intern())
931931
else:
932932
self.index._compile(program, lnames)
933933
program.slice()

src/flitter/model.pyx

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1167,12 +1167,12 @@ cdef class Vector:
11671167
return result
11681168

11691169

1170-
cdef Vector null_ = Vector()
1171-
cdef Vector true_ = Vector(1)
1172-
cdef Vector false_ = Vector(0)
1173-
cdef Vector minusone_ = Vector(-1)
1174-
cdef Vector inf_ = Vector(np.inf)
1175-
cdef Vector nan_ = Vector(np.nan)
1170+
cdef Vector null_ = Vector().intern()
1171+
cdef Vector true_ = Vector(1).intern()
1172+
cdef Vector false_ = Vector(0).intern()
1173+
cdef Vector minusone_ = Vector(-1).intern()
1174+
cdef Vector inf_ = Vector(np.inf).intern()
1175+
cdef Vector nan_ = Vector(np.nan).intern()
11761176

11771177
null = null_
11781178
true = true_

0 commit comments

Comments
 (0)