summary refs log tree commit diff stats
path: root/compiler/jsgen.nim
diff options
context:
space:
mode:
Diffstat (limited to 'compiler/jsgen.nim')
-rw-r--r--compiler/jsgen.nim14
1 files changed, 2 insertions, 12 deletions
diff --git a/compiler/jsgen.nim b/compiler/jsgen.nim
index 51d23662c..1130e35f8 100644
--- a/compiler/jsgen.nim
+++ b/compiler/jsgen.nim
@@ -370,7 +370,7 @@ type
 
 const # magic checked op; magic unchecked op;
   jsMagics: TMagicOps = [
-    ["addInt", ""], # AddI
+    mAddI: ["addInt", ""],
     ["subInt", ""], # SubI
     ["mulInt", ""], # MulI
     ["divInt", ""], # DivI
@@ -414,7 +414,6 @@ const # magic checked op; magic unchecked op;
     ["", ""], # LeB
     ["", ""], # LtB
     ["", ""], # EqRef
-    ["", ""], # EqUntracedRef
     ["", ""], # LePtr
     ["", ""], # LtPtr
     ["", ""], # Xor
@@ -588,7 +587,6 @@ proc arithAux(p: PProc, n: PNode, r: var TCompRes, op: TMagic) =
   of mLeB: applyFormat("($1 <= $2)", "($1 <= $2)")
   of mLtB: applyFormat("($1 < $2)", "($1 < $2)")
   of mEqRef: applyFormat("($1 == $2)", "($1 == $2)")
-  of mEqUntracedRef: applyFormat("($1 == $2)", "($1 == $2)")
   of mLePtr: applyFormat("($1 <= $2)", "($1 <= $2)")
   of mLtPtr: applyFormat("($1 < $2)", "($1 < $2)")
   of mXor: applyFormat("($1 != $2)", "($1 != $2)")
@@ -631,7 +629,7 @@ proc arith(p: PProc, n: PNode, r: var TCompRes, op: TMagic) =
   of mCharToStr, mBoolToStr, mIntToStr, mInt64ToStr, mFloatToStr,
       mCStrToStr, mStrToStr, mEnumToStr:
     arithAux(p, n, r, op)
-  of mEqRef, mEqUntracedRef:
+  of mEqRef:
     if mapType(n[1].typ) != etyBaseIndex:
       arithAux(p, n, r, op)
     else:
@@ -1890,10 +1888,6 @@ proc genMagic(p: PProc, n: PNode, r: var TCompRes) =
   of mAddI..mStrToStr: arith(p, n, r, op)
   of mRepr: genRepr(p, n, r)
   of mSwap: genSwap(p, n)
-  of mUnaryLt:
-    # XXX: range checking?
-    if not (optOverflowCheck in p.options): unaryExpr(p, n, r, "", "$1 - 1")
-    else: unaryExpr(p, n, r, "subInt", "subInt($1, 1)")
   of mAppendStrCh:
     binaryExpr(p, n, r, "addChar",
         "if ($1 != null) { addChar($3, $2); } else { $3 = [$2]; }")
@@ -1959,8 +1953,6 @@ proc genMagic(p: PProc, n: PNode, r: var TCompRes) =
   of mOrd: genOrd(p, n, r)
   of mLengthStr, mLengthSeq, mLengthOpenArray, mLengthArray:
     unaryExpr(p, n, r, "", "($1 != null ? $2.length : 0)")
-  of mXLenStr, mXLenSeq:
-    unaryExpr(p, n, r, "", "$1.length")
   of mHigh:
     unaryExpr(p, n, r, "", "($1 != null ? ($2.length-1) : -1)")
   of mInc:
@@ -2007,8 +1999,6 @@ proc genMagic(p: PProc, n: PNode, r: var TCompRes) =
   of mEcho: genEcho(p, n, r)
   of mNLen..mNError, mSlurp, mStaticExec:
     localError(p.config, n.info, errXMustBeCompileTime % n[0].sym.name.s)
-  of mCopyStr:
-    binaryExpr(p, n, r, "", "($1.slice($2))")
   of mNewString: unaryExpr(p, n, r, "mnewString", "mnewString($1)")
   of mNewStringOfCap:
     unaryExpr(p, n, r, "mnewString", "mnewString(0)")