diff options
Diffstat (limited to 'compiler')
-rw-r--r-- | compiler/main.nim | 20 | ||||
-rw-r--r-- | compiler/semexprs.nim | 6 |
2 files changed, 2 insertions, 24 deletions
diff --git a/compiler/main.nim b/compiler/main.nim index 82e55058c..6afd9a73e 100644 --- a/compiler/main.nim +++ b/compiler/main.nim @@ -19,12 +19,6 @@ import from magicsys import systemModule, resetSysTypes -const - hasLLVM_Backend = false - -when hasLLVM_Backend: - import llvmgen - proc rodPass = if optSymbolFiles in gGlobalOptions: registerPass(rodwritePass) @@ -111,14 +105,6 @@ proc commandCompileToC = ccgutils.resetCaches() GC_fullCollect() -when hasLLVM_Backend: - proc commandCompileToLLVM = - semanticPasses() - registerPass(llvmgen.llvmgenPass()) - rodPass() - #registerPass(cleanupPass()) - compileProject() - proc commandCompileToJS = #incl(gGlobalOptions, optSafeCode) setTarget(osJS, cpuJS) @@ -290,12 +276,6 @@ proc mainCommand* = of "js", "compiletojs": gCmd = cmdCompileToJS commandCompileToJS() - of "compiletollvm": - gCmd = cmdCompileToLLVM - when hasLLVM_Backend: - CommandCompileToLLVM() - else: - rawMessage(errInvalidCommandX, command) of "doc": wantMainModule() gCmd = cmdDoc diff --git a/compiler/semexprs.nim b/compiler/semexprs.nim index 89110a479..9bf04c955 100644 --- a/compiler/semexprs.nim +++ b/compiler/semexprs.nim @@ -926,8 +926,7 @@ const proc readTypeParameter(c: PContext, typ: PType, paramName: PIdent, info: TLineInfo): PNode = let ty = if typ.kind == tyGenericInst: typ.skipGenericAlias - else: (internalAssert(typ.kind == tyCompositeTypeClass); - typ.sons[1].skipGenericAlias) + else: (internalAssert(typ.kind == tyCompositeTypeClass); typ.sons[1]) #debug ty let tbody = ty.sons[0] for s in countup(0, tbody.len-2): @@ -966,7 +965,6 @@ proc builtinFieldAccess(c: PContext, n: PNode, flags: TExprFlags): PNode = var ty = n.sons[0].typ var f: PSym = nil result = nil - if isTypeExpr(n.sons[0]) or (ty.kind == tyTypeDesc and ty.base.kind != tyNone): if ty.kind == tyTypeDesc: ty = ty.base ty = ty.skipTypes(tyDotOpTransparent) @@ -1055,7 +1053,7 @@ proc dotTransformation(c: PContext, n: PNode): PNode = proc semFieldAccess(c: PContext, n: PNode, flags: TExprFlags): PNode = # this is difficult, because the '.' is used in many different contexts - # in Nimrod. We first allow types in the semantic checking. + # in Nim. We first allow types in the semantic checking. result = builtinFieldAccess(c, n, flags) if result == nil: result = dotTransformation(c, n) |