From 8e0941576fc30643a4cdcb532e180d0ca973ed85 Mon Sep 17 00:00:00 2001 From: Zahary Karadjov Date: Tue, 31 Dec 2013 12:39:43 +0200 Subject: [PATCH] clean-up some obsolete code; close #602 --- compiler/options.nim | 2 - compiler/seminst.nim | 154 ++---------------------- compiler/semstmts.nim | 16 +-- compiler/semtypes.nim | 22 ++-- compiler/sigmatch.nim | 70 +++++------ tests/compile/tcompositetypeclasses.nim | 14 +++ 6 files changed, 73 insertions(+), 205 deletions(-) diff --git a/compiler/options.nim b/compiler/options.nim index f184deb698..9b0cbf0c9c 100644 --- a/compiler/options.nim +++ b/compiler/options.nim @@ -158,8 +158,6 @@ var const oKeepVariableNames* = true -const oUseLateInstantiation* = false - proc mainCommandArg*: string = ## This is intended for commands like check or parse ## which will work on the main project file unless diff --git a/compiler/seminst.nim b/compiler/seminst.nim index cec3567e27..370d59b107 100644 --- a/compiler/seminst.nim +++ b/compiler/seminst.nim @@ -131,157 +131,20 @@ proc sideEffectsCheck(c: PContext, s: PSym) = s.ast.sons[genericParamsPos].kind == nkEmpty: c.threadEntries.add(s) -proc lateInstantiateGeneric(c: PContext, invocation: PType, info: TLineInfo): PType = - internalAssert invocation.kind == tyGenericInvokation - - let cacheHit = searchInstTypes(invocation) - if cacheHit != nil: - result = cacheHit - else: - let s = invocation.sons[0].sym - let oldScope = c.currentScope - c.currentScope = s.typScope - openScope(c) - pushInfoContext(info) - for i in 0 ..