js generates spurious >>> on shr (#17767)
* js generates spurious >>> on shr * Add shr arithmetic test * fix variables from const to let during testing
This commit is contained in:
parent
4471141a1d
commit
fb32fff8dc
2 changed files with 50 additions and 2 deletions
|
|
@ -683,8 +683,7 @@ proc arith(p: PProc, n: PNode, r: var TCompRes, op: TMagic) =
|
|||
var x, y: TCompRes
|
||||
gen(p, n[1], x)
|
||||
gen(p, n[2], y)
|
||||
let trimmer = unsignedTrimmer(n[1].typ.skipTypes(abstractRange).size)
|
||||
r.res = "(($1 $2) >>> $3)" % [x.rdLoc, trimmer, y.rdLoc]
|
||||
r.res = "($1 >>> $2)" % [x.rdLoc, y.rdLoc]
|
||||
of mCharToStr, mBoolToStr, mIntToStr, mInt64ToStr, mFloatToStr,
|
||||
mCStrToStr, mStrToStr, mEnumToStr:
|
||||
arithAux(p, n, r, op)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue