@@ -364,12 +364,7 @@ static PrimitiveNativeWrapper doIntegerSmall(@SuppressWarnings("unused") CExtCon
364
364
static PrimitiveNativeWrapper doInteger (@ SuppressWarnings ("unused" ) CExtContext cextContext , int i ,
365
365
@ Shared ("contextRef" ) @ CachedContext (PythonLanguage .class ) ContextReference <PythonContext > contextRef ) {
366
366
if (CApiGuards .isSmallInteger (i )) {
367
- if (CompilerDirectives .inInterpreter ()) {
368
- return doIntegerSmall (cextContext , i , contextRef );
369
- } else {
370
- // for explanation: see method doc
371
- return doIntegerSmall (cextContext , i , contextRef ).copy ();
372
- }
367
+ return doIntegerSmall (cextContext , i , contextRef );
373
368
}
374
369
return PrimitiveNativeWrapper .createInt (i );
375
370
}
@@ -388,12 +383,7 @@ static PrimitiveNativeWrapper doLongSmall(@SuppressWarnings("unused") CExtContex
388
383
static PrimitiveNativeWrapper doLong (@ SuppressWarnings ("unused" ) CExtContext cextContext , long l ,
389
384
@ Shared ("contextRef" ) @ CachedContext (PythonLanguage .class ) ContextReference <PythonContext > contextRef ) {
390
385
if (CApiGuards .isSmallLong (l )) {
391
- // for explanation of this construct: see 'ToSulongNode.doInteger'
392
- if (CompilerDirectives .inInterpreter ()) {
393
- return doLongSmall (cextContext , l , contextRef );
394
- } else {
395
- return doLongSmall (cextContext , l , contextRef ).copy ();
396
- }
386
+ return doLongSmall (cextContext , l , contextRef );
397
387
}
398
388
return PrimitiveNativeWrapper .createLong (l );
399
389
}
@@ -622,12 +612,7 @@ static PrimitiveNativeWrapper doLongSmall(@SuppressWarnings("unused") CExtContex
622
612
static PrimitiveNativeWrapper doInteger (CExtContext cextContext , int i ,
623
613
@ Shared ("contextRef" ) @ CachedContext (PythonLanguage .class ) ContextReference <PythonContext > contextRef ) {
624
614
if (CApiGuards .isSmallInteger (i )) {
625
- // for explanation of this construct: see 'ToSulongNode.doInteger'
626
- if (CompilerDirectives .inInterpreter ()) {
627
- return doIntegerSmall (cextContext , i , contextRef );
628
- } else {
629
- return doIntegerSmall (cextContext , i , contextRef ).copy ();
630
- }
615
+ return doIntegerSmall (cextContext , i , contextRef );
631
616
}
632
617
return PrimitiveNativeWrapper .createInt (i );
633
618
}
@@ -636,12 +621,7 @@ static PrimitiveNativeWrapper doInteger(CExtContext cextContext, int i,
636
621
static PrimitiveNativeWrapper doLong (CExtContext cextContext , long l ,
637
622
@ Shared ("contextRef" ) @ CachedContext (PythonLanguage .class ) ContextReference <PythonContext > contextRef ) {
638
623
if (CApiGuards .isSmallLong (l )) {
639
- // for explanation of this construct: see 'ToSulongNode.doInteger'
640
- if (CompilerDirectives .inInterpreter ()) {
641
- return doLongSmall (cextContext , l , contextRef );
642
- } else {
643
- return doLongSmall (cextContext , l , contextRef ).copy ();
644
- }
624
+ return doLongSmall (cextContext , l , contextRef );
645
625
}
646
626
return PrimitiveNativeWrapper .createLong (l );
647
627
}
0 commit comments