diff options
author | ringabout <43030857+ringabout@users.noreply.github.com> | 2023-01-26 03:58:52 +0800 |
---|---|---|
committer | GitHub <noreply@github.com> | 2023-01-25 14:58:52 -0500 |
commit | af0f3639ec6fabc00bf8357615b62641ee0b4508 (patch) | |
tree | b684ce8d055d49086e19bdb3199f147b97c42311 | |
parent | c4d3d650baa88820dadeafa81ca75b6e495084f2 (diff) | |
download | Nim-af0f3639ec6fabc00bf8357615b62641ee0b4508.tar.gz |
remove dead code in VM (#21296)
remove deadcode in VM
-rw-r--r-- | compiler/ast.nim | 2 | ||||
-rw-r--r-- | compiler/vm.nim | 6 | ||||
-rw-r--r-- | compiler/vmdef.nim | 2 | ||||
-rw-r--r-- | compiler/vmgen.nim | 3 |
4 files changed, 2 insertions, 11 deletions
diff --git a/compiler/ast.nim b/compiler/ast.nim index c85a94860..aa0ca98c9 100644 --- a/compiler/ast.nim +++ b/compiler/ast.nim @@ -706,7 +706,7 @@ type mNctPut, mNctLen, mNctGet, mNctHasNext, mNctNext, mNIntVal, mNFloatVal, mNSymbol, mNIdent, mNGetType, mNStrVal, mNSetIntVal, - mNSetFloatVal, mNSetSymbol, mNSetIdent, mNSetType, mNSetStrVal, mNLineInfo, + mNSetFloatVal, mNSetSymbol, mNSetIdent, mNSetStrVal, mNLineInfo, mNNewNimNode, mNCopyNimNode, mNCopyNimTree, mStrToIdent, mNSigHash, mNSizeOf, mNBindSym, mNCallSite, mEqIdent, mEqNimrodNode, mSameNodeType, mGetImpl, mNGenSym, diff --git a/compiler/vm.nim b/compiler/vm.nim index b8c23290e..c6ca228ff 100644 --- a/compiler/vm.nim +++ b/compiler/vm.nim @@ -2071,12 +2071,6 @@ proc rawExecute(c: PCtx, start: int, tos: PStackFrame): TFullReg = dest.ident = regs[rb].node.ident else: stackTrace(c, tos, pc, errFieldXNotFound & "ident") - of opcNSetType: - decodeB(rkNode) - let b = regs[rb].node - internalAssert c.config, b.kind == nkSym and b.sym.kind == skType - internalAssert c.config, regs[ra].node != nil - regs[ra].node.typ = b.sym.typ of opcNSetStrVal: decodeB(rkNode) var dest = regs[ra].node diff --git a/compiler/vmdef.nim b/compiler/vmdef.nim index 114a49557..0af15e5c9 100644 --- a/compiler/vmdef.nim +++ b/compiler/vmdef.nim @@ -127,7 +127,7 @@ type opcNGetSize, opcNSetIntVal, - opcNSetFloatVal, opcNSetSymbol, opcNSetIdent, opcNSetType, opcNSetStrVal, + opcNSetFloatVal, opcNSetSymbol, opcNSetIdent, opcNSetStrVal, opcNNewNimNode, opcNCopyNimNode, opcNCopyNimTree, opcNDel, opcGenSym, opcNccValue, opcNccInc, opcNcsAdd, opcNcsIncl, opcNcsLen, opcNcsAt, diff --git a/compiler/vmgen.nim b/compiler/vmgen.nim index 6a2ab1d11..ba3a05481 100644 --- a/compiler/vmgen.nim +++ b/compiler/vmgen.nim @@ -1313,9 +1313,6 @@ proc genMagic(c: PCtx; n: PNode; dest: var TDest; m: TMagic) = of mNSetIdent: unused(c, n, dest) genBinaryStmt(c, n, opcNSetIdent) - of mNSetType: - unused(c, n, dest) - genBinaryStmt(c, n, opcNSetType) of mNSetStrVal: unused(c, n, dest) genBinaryStmt(c, n, opcNSetStrVal) |