summary refs log tree commit diff stats
path: root/compiler
Commit message (Expand)AuthorAgeFilesLines
...
| * | | | Rename some variables in the isCastable codeClay Sweetser2014-05-261-6/+6
| * | | | Fix issue #1203Clay Sweetser2014-05-261-0/+2
| * | | | Update 'isCastable' and 'semCast' doc-commentsClay Sweetser2014-05-261-2/+6
* | | | | Merge pull request #1228 from Varriount/compiler/document-parserSimon Hafner2014-05-291-20/+39
|\ \ \ \ \
| * | | | | Document parser structures and procedures.Clay Sweetser2014-05-251-20/+39
* | | | | | Merge pull request #1222 from Varriount/doc/fix-assertionAndreas Rumpf2014-05-2912-33/+34
|\ \ \ \ \ \
| * | | | | | Renamed considerAccents to considerQuotedIdentClay Sweetser2014-05-2611-31/+31
| * | | | | | Fixes #1200Clay Sweetser2014-05-241-1/+2
| * | | | | | Renamed 'considerAcc' to 'considerAccents' for clarityClay Sweetser2014-05-2412-33/+33
* | | | | | | Merge pull request #1230 from flaviut/fix1226Andreas Rumpf2014-05-292-2/+5
|\ \ \ \ \ \ \ | |_|_|/ / / / |/| | | | | |
| * | | | | | Document manglingflaviut2014-05-262-1/+5
| * | | | | | Fix #1226flaviut2014-05-261-2/+1
| |/ / / / /
* | | | | | Merge pull request #1132 from gradha/pr_index_improvementsAndreas Rumpf2014-05-261-2/+8
|\ \ \ \ \ \
| * | | | | | Moves TOC index entry generation to rstgen module.Grzegorz Adam Hankiewicz2014-04-211-25/+0
| * | | | | | Splits index into documents and APIs.Grzegorz Adam Hankiewicz2014-04-211-2/+2
| * | | | | | Adds documentation sections to the index.Grzegorz Adam Hankiewicz2014-04-211-0/+25
| * | | | | | Adds explicit titles to documentation index.Grzegorz Adam Hankiewicz2014-04-211-2/+8
* | | | | | | Merge branch 'devel' of https://github.com/Araq/Nimrod into develAraq2014-05-258-60/+31
|\ \ \ \ \ \ \
| * | | | | | | Added powerpc to the list of CPUs that C sources are built for.Dominik Picheta2014-05-251-1/+1
| | |_|/ / / / | |/| | | | |
| * | | | | | Merge pull request #1196 from EXetoC/cpp-target-fixesAndreas Rumpf2014-05-244-4/+5
| |\ \ \ \ \ \ | | |_|/ / / / | |/| | | | |
| | * | | | | Fix more 'undeclared identifier' errors.EXetoC2014-05-142-2/+3
| | * | | | | Resolve type mismatches.EXetoC2014-05-131-1/+1
| | * | | | | gpp -> gccEXetoC2014-05-091-1/+1
| | | |/ / / | | |/| | |
| * / | | | Make codegen for `1` and similar validflaviut2014-05-163-55/+25
| |/ / / /
* / / / / fixes the bug that keeps the template engine package from workingAraq2014-05-251-2/+4
|/ / / /
* | | | bugfix: bool for case statementsAraq2014-05-061-1/+1
* | | | 2nd attempt to fix bootstrappingAraq2014-05-061-1/+1
* | | | attempt to fix the bootstrappingAraq2014-05-061-3/+1
* | | | bootstraps works again; get rid of compile-time 'rand' (too weird)Araq2014-05-061-3/+2
* | | | Merge branch 'devel' of https://github.com/Araq/Nimrod into develAraq2014-05-061-3/+3
|\ \ \ \
| * | | | fixed constant typo (SimulateCaasMemReset)Simon Hafner2014-05-021-3/+3
* | | | | fixes #1140Araq2014-05-052-1/+3
* | | | | implemented builtin noncopying sliceAraq2014-05-025-16/+39
|/ / / /
* | | | compiler prepared for the new comment handlingAraq2014-04-307-4/+16
* | | | small bugfix for iteratorsAraq2014-04-301-1/+1
* | | | Merge branch 'devel' of https://github.com/Araq/Nimrod into develAraq2014-04-253-3/+24
|\ \ \ \
| * | | | devel is version 0.9.5Araq2014-04-221-2/+1
| | |_|/ | |/| |
| * | | Merge pull request #1118 from gradha/pr_show_boot_optionsVarriount2014-04-212-1/+23
| |\ \ \ | | |/ / | |/| |
| | * | Version switch displays options used during `koch boot`Grzegorz Adam Hankiewicz2014-04-202-1/+23
* | | | minor tweaks; updated todo.txtAraq2014-04-251-0/+1
|/ / /
* | | Merge branch 'devel' of https://github.com/Araq/Nimrod into develAraq2014-04-214-415/+0
|\ \ \
| * \ \ Merge pull request #1113 from flaviut/del_deadAndreas Rumpf2014-04-214-415/+0
| |\ \ \
| | * | | parsecfg is never used and is also part of the stdlibflaviut2014-04-191-346/+0
| | * | | charsets is never usedflaviut2014-04-191-49/+0
| | * | | Delete dead fileflaviut2014-04-192-20/+0
* | | | | version 0.9.4Araq2014-04-211-3/+3
* | | | | fixes #847Araq2014-04-211-2/+3
|/ / / /
* | | | fixes DLL generationAraq2014-04-212-1/+2
* | | | doc2 likes future.nim nowAraq2014-04-211-5/+3
* | | | some progress for #1082Araq2014-04-211-4/+9
">getSysSym(name: string): PSym = result = StrTableGet(systemModule.tab, getIdent(name)) if result == nil: rawMessage(errSystemNeeds, name) if result.kind == skStub: loadStub(result) proc sysTypeFromName*(name: string): PType = result = getSysSym(name).typ proc getSysType(kind: TTypeKind): PType = result = gSysTypes[kind] if result == nil: case kind of tyInt: result = sysTypeFromName("int") of tyInt8: result = sysTypeFromName("int8") of tyInt16: result = sysTypeFromName("int16") of tyInt32: result = sysTypeFromName("int32") of tyInt64: result = sysTypeFromName("int64") of tyUInt: result = sysTypeFromName("uint") of tyUInt8: result = sysTypeFromName("uint8") of tyUInt16: result = sysTypeFromName("uint16") of tyUInt32: result = sysTypeFromName("uint32") of tyUInt64: result = sysTypeFromName("uint64") of tyFloat: result = sysTypeFromName("float") of tyFloat32: result = sysTypeFromName("float32") of tyFloat64: result = sysTypeFromName("float64") of tyFloat128: result = sysTypeFromName("float128") of tyBool: result = sysTypeFromName("bool") of tyChar: result = sysTypeFromName("char") of tyString: result = sysTypeFromName("string") of tyCstring: result = sysTypeFromName("cstring") of tyPointer: result = sysTypeFromName("pointer") of tyNil: result = newSysType(tyNil, ptrSize) else: InternalError("request for typekind: " & $kind) gSysTypes[kind] = result if result.kind != kind: InternalError("wanted: " & $kind & " got: " & $result.kind) if result == nil: InternalError("type not found: " & $kind) var intTypeCache: array[-5..64, PType] proc getIntLitType*(literal: PNode): PType = # we cache some common integer literal types for performance: let value = literal.intVal if value >= low(intTypeCache) and value <= high(intTypeCache): result = intTypeCache[value.int] if result == nil: let ti = getSysType(tyInt) result = copyType(ti, ti.owner, false) result.n = literal intTypeCache[value.int] = result else: let ti = getSysType(tyInt) result = copyType(ti, ti.owner, false) result.n = literal proc skipIntLit*(t: PType): PType {.inline.} = if t.kind == tyInt and t.n != nil: result = getSysType(tyInt) else: result = t proc AddSonSkipIntLit*(father, son: PType) = if isNil(father.sons): father.sons = @[] add(father.sons, son.skipIntLit) proc setIntLitType*(result: PNode) = let i = result.intVal case platform.IntSize of 8: result.typ = getIntLitType(result) of 4: if i >= low(int32) and i <= high(int32): result.typ = getIntLitType(result) else: result.typ = getSysType(tyInt64) of 2: if i >= low(int16) and i <= high(int16): result.typ = getIntLitType(result) elif i >= low(int32) and i <= high(int32): result.typ = getSysType(tyInt32) else: result.typ = getSysType(tyInt64) of 1: # 8 bit CPUs are insane ... if i >= low(int8) and i <= high(int8): result.typ = getIntLitType(result) elif i >= low(int16) and i <= high(int16): result.typ = getSysType(tyInt16) elif i >= low(int32) and i <= high(int32): result.typ = getSysType(tyInt32) else: result.typ = getSysType(tyInt64) else: InternalError(result.info, "invalid int size") proc getCompilerProc(name: string): PSym = var ident = getIdent(name, hashIgnoreStyle(name)) result = StrTableGet(compilerprocs, ident) if result == nil: result = StrTableGet(rodCompilerProcs, ident) if result != nil: strTableAdd(compilerprocs, result) if result.kind == skStub: loadStub(result) proc registerCompilerProc(s: PSym) = strTableAdd(compilerprocs, s) proc InitSystem(tab: var TSymTab) = nil proc FinishSystem(tab: TStrTable) = nil initStrTable(compilerprocs)