@@ -256,7 +256,7 @@ def is_macro_call(form, ctx):
256256
257257def call_macro (var , form , ctx ):
258258 form = rt .next (form )
259- args = [None ] * rt .count (form ). int_val ()
259+ args = [None ] * rt .count (form )
260260 i = 0
261261 while form is not nil :
262262 args [i ] = rt .first (form )
@@ -278,7 +278,7 @@ def compile_map_literal(form, ctx):
278278
279279 rt .reduce (CompileMapRf (ctx ), nil , form )
280280
281- size = rt .count (form ). int_val () * 2
281+ size = rt .count (form ) * 2
282282 ctx .bytecode .append (code .INVOKE )
283283 ctx .bytecode .append (r_uint (size ) + 1 )
284284
@@ -321,7 +321,7 @@ def compile_form(form, ctx):
321321
322322 if isinstance (form , PersistentVector ):
323323 vector_var = rt .vector ()
324- size = rt .count (form ). int_val ()
324+ size = rt .count (form )
325325 #assert rt.count(form).int_val() == 0
326326 ctx .push_const (code .intern_var (u"pixie.stdlib" , u"vector" ))
327327 for x in range (size ):
@@ -359,7 +359,7 @@ def compile_platform_plus(form, ctx):
359359def compile_platform_eq (form , ctx ):
360360 form = form .next ()
361361
362- affirm (rt .count (form ). int_val () == 2 , u"TODO: REMOVE" )
362+ affirm (rt .count (form ) == 2 , u"TODO: REMOVE" )
363363 while form is not nil :
364364 compile_form (form .first (), ctx )
365365 form = form .next ()
@@ -371,7 +371,7 @@ def compile_platform_eq(form, ctx):
371371def add_args (args , ctx ):
372372 required_args = - 1
373373 local_idx = 0
374- for x in range (rt .count (args ). int_val () ):
374+ for x in range (rt .count (args )):
375375 arg = rt .nth (args , rt .wrap (x ))
376376 affirm (isinstance (arg , symbol .Symbol ), u"Argument names must be symbols" )
377377 if arg ._str == u"&" :
@@ -416,7 +416,7 @@ def compile_fn(form, ctx):
416416
417417
418418def compile_fn_body (name , args , body , ctx ):
419- new_ctx = Context (name ._str , rt .count (args ). int_val () , ctx )
419+ new_ctx = Context (name ._str , rt .count (args ), ctx )
420420 required_args = add_args (args , new_ctx )
421421 bc = 0
422422
@@ -455,11 +455,11 @@ def compile_fn_body(name, args, body, ctx):
455455 ctx .bytecode .append (code .MAKE_VARIADIC )
456456 ctx .bytecode .append (r_uint (required_args ))
457457
458- return required_args , rt .count (args ). int_val ()
458+ return required_args , rt .count (args )
459459
460460def compile_if (form , ctx ):
461461 form = form .next ()
462- affirm (2 <= rt .count (form ). int_val () <= 3 , u"If must have either 2 or 3 forms" )
462+ affirm (2 <= rt .count (form ) <= 3 , u"If must have either 2 or 3 forms" )
463463
464464 test = rt .first (form )
465465 form = rt .next (form )
@@ -547,7 +547,7 @@ def compile_let(form, ctx):
547547 ctx .disable_tail_call ()
548548
549549 binding_count = 0
550- for i in range (0 , rt .count (bindings ). int_val () , 2 ):
550+ for i in range (0 , rt .count (bindings ), 2 ):
551551 binding_count += 1
552552 name = rt .nth (bindings , rt .wrap (i ))
553553 affirm (isinstance (name , symbol .Symbol ), u"Let locals must be symbols" )
@@ -583,7 +583,7 @@ def compile_loop(form, ctx):
583583 ctx .disable_tail_call ()
584584
585585 binding_count = 0
586- for i in range (0 , rt .count (bindings ). int_val () , 2 ):
586+ for i in range (0 , rt .count (bindings ), 2 ):
587587 binding_count += 1
588588 name = rt .nth (bindings , rt .wrap (i ))
589589 affirm (isinstance (name , symbol .Symbol ), u"Loop must bindings must be symbols" )
@@ -615,7 +615,7 @@ def compile_comment(form, ctx):
615615 ctx .push_const (nil )
616616
617617def compile_ns (form , ctx ):
618- affirm (rt .count (form ). int_val () == 2 , u"ns only takes one argument, a symbol" )
618+ affirm (rt .count (form ) == 2 , u"ns only takes one argument, a symbol" )
619619
620620 nm = rt .first (rt .next (form ))
621621
0 commit comments