Commit message (Collapse) | Author | Age | Files | Lines | |
---|---|---|---|---|---|
* | fixes #1085 | Araq | 2014-04-21 | 1 | -1/+1 |
| | |||||
* | made large parts of the stdlib gcsafe | Araq | 2014-04-20 | 1 | -37/+40 |
| | |||||
* | merged better html links #850 | Araq | 2014-04-08 | 1 | -2/+2 |
| | |||||
* | failing test case preventing the use of --gc:v2: tsymchoicefield | Zahary Karadjov | 2014-03-24 | 1 | -3/+3 |
| | |||||
* | split the inline and closure iterators into different symbol kinds for ↵ | Zahary Karadjov | 2014-03-06 | 1 | -1/+1 |
| | | | | easier discrimination between them | ||||
* | newProc can now be used to construct iterator defs. | Dominik Picheta | 2014-02-12 | 1 | -1/+1 |
| | |||||
* | macro tests almost green | Araq | 2014-02-03 | 1 | -14/+14 |
| | |||||
* | next steps for closure iterators | Araq | 2014-01-22 | 1 | -2/+2 |
| | |||||
* | parser support anon iterators | Araq | 2014-01-20 | 1 | -6/+12 |
| | |||||
* | Merge branch 'devel' of https://github.com/Araq/Nimrod into devel | Araq | 2014-01-13 | 1 | -11/+11 |
|\ | |||||
| * | Merge branch 'upstream' into devel | Zahary Karadjov | 2013-12-29 | 1 | -11/+11 |
| |\ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Conflicts: compiler/ccgutils.nim compiler/msgs.nim compiler/sem.nim compiler/semexprs.nim compiler/seminst.nim compiler/semmagic.nim compiler/semstmts.nim compiler/semtypes.nim compiler/semtypinst.nim compiler/sigmatch.nim compiler/types.nim compiler/vmgen.nim lib/core/macros.nim lib/system.nim tests/reject/tenummix.nim web/news.txt | ||||
| | * | static params: expr[T] is now static[T] | Zahary Karadjov | 2013-12-19 | 1 | -9/+11 |
| | | | | | | | | | | | | | | | | | | | | | This introduces tyStatic and successfully bootstraps and handles few simple test cases. Static params within macros are no longer treated as PNimrodNodes - they are now equivalent to constants of the designated type. | ||||
* | | | case consistency improvements | Araq | 2014-01-11 | 1 | -25/+25 |
|/ / | |||||
* | | case consistency part 6 | Araq | 2013-12-28 | 1 | -15/+15 |
| | | |||||
* | | Merge branch 'master' of https://github.com/Araq/Nimrod into vm2 | Araq | 2013-12-23 | 1 | -2/+34 |
|\ \ | | | | | | | | | | | | | Conflicts: web/news.txt | ||||
| * \ | Merge pull request #764 from gradha/pr_doc_improvements | Andreas Rumpf | 2013-12-20 | 1 | -0/+32 |
| |\ \ | | | | | | | | | Documentation improvements | ||||
| | * | | Adds docstring to macros.newIdentDefs. | Grzegorz Adam Hankiewicz | 2013-12-20 | 1 | -0/+28 |
| | | | | |||||
| | * | | Adds missing ``code-block`` to macros' docstrings. | Grzegorz Adam Hankiewicz | 2013-12-18 | 1 | -0/+4 |
| | |/ | |||||
| * / | Update macros.nim | Billingsly Wetherfordshire | 2013-12-20 | 1 | -2/+2 |
| |/ | |||||
* | | Merge branch 'master' into vm2 | Araq | 2013-12-05 | 1 | -1/+1 |
|\| | | | | | | | | | Conflicts: compiler/sem.nim | ||||
| * | removed 'system.eval' | Araq | 2013-11-27 | 1 | -1/+1 |
| | | |||||
* | | new VM is getting stable | Araq | 2013-10-29 | 1 | -1/+7 |
|/ | |||||
* | support for multiple modules of the same name; niminst supports 'platforms'; ↵ | Araq | 2013-09-24 | 1 | -1/+1 |
| | | | | minor bugfixes | ||||
* | added 'newLit' | Araq | 2013-09-10 | 1 | -1/+21 |
| | |||||
* | Merge branch 'type-classes' into upstream | Zahary Karadjov | 2013-09-03 | 1 | -2/+2 |
|\ | |||||
| * | implemented the using statement | Zahary Karadjov | 2013-08-31 | 1 | -1/+1 |
| | | |||||
| * | parsing of user defined type classes | Zahary Karadjov | 2013-08-23 | 1 | -1/+1 |
| | | |||||
* | | tester compiles again | Araq | 2013-08-30 | 1 | -1/+1 |
|/ | |||||
* | Improved documentation for macros.newProc. | Dominik Picheta | 2013-07-31 | 1 | -0/+3 |
| | |||||
* | Added macros.newIfStmt and macros.newVarStmt. | Dominik Picheta | 2013-07-25 | 1 | -1/+23 |
| | |||||
* | added macros.genSym | Araq | 2013-07-24 | 1 | -3/+10 |
| | |||||
* | bugfix: marshal supports unsigned numbers | Araq | 2013-06-27 | 1 | -2/+10 |
| | |||||
* | made macros.dumptree and dumplisp immediate, deprecated the *_imm versions | Billingsly Wetherfordshire | 2013-06-04 | 1 | -4/+4 |
| | |||||
* | don't deprecate macros.! breaks too much code | Araq | 2013-05-20 | 1 | -28/+30 |
| | |||||
* | Update macros.nim | Billingsly Wetherfordshire | 2013-05-19 | 1 | -29/+33 |
| | |||||
* | add macro_dsl api | Billingsly Wetherfordshire | 2013-05-19 | 1 | -0/+233 |
| | |||||
* | Update macros.nim | Billingsly Wetherfordshire | 2013-04-25 | 1 | -6/+8 |
| | nil let vm = PCtx(i.graph.vm) vm.registerCallback(pkg & "." & module & "." & name, impl) proc evalScript*(i: Interpreter; scriptStream: PLLStream = nil) = ## This can also be used to *reload* the script. assert i != nil assert i.mainModule != nil, "no main module selected" initStrTable(i.mainModule.semtab(i.graph)) i.mainModule.ast = nil let s = if scriptStream != nil: scriptStream else: llStreamOpen(findFile(i.graph.config, i.scriptName), fmRead) processModule(i.graph, i.mainModule, i.idgen, s) proc findNimStdLib*(): string = ## Tries to find a path to a valid "system.nim" file. ## Returns "" on failure. try: let nimexe = os.findExe("nim") # this can't work with choosenim shims, refs https://github.com/dom96/choosenim/issues/189 # it'd need `nim dump --dump.format:json . | jq -r .libpath` # which we should simplify as `nim dump --key:libpath` if nimexe.len == 0: return "" result = nimexe.splitPath()[0] /../ "lib" if not fileExists(result / "system.nim"): when defined(unix): result = nimexe.expandSymlink.splitPath()[0] /../ "lib" if not fileExists(result / "system.nim"): return "" except OSError, ValueError: return "" proc findNimStdLibCompileTime*(): string = ## Same as `findNimStdLib` but uses source files used at compile time, ## and asserts on error. result = querySetting(libPath) doAssert fileExists(result / "system.nim"), "result:" & result proc createInterpreter*(scriptName: string; searchPaths: openArray[string]; flags: TSandboxFlags = {}, defines = @[("nimscript", "true")], registerOps = true): Interpreter = var conf = newConfigRef() var cache = newIdentCache() var graph = newModuleGraph(cache, conf) connectCallbacks(graph) initDefines(conf.symbols) for define in defines: defineSymbol(conf.symbols, define[0], define[1]) registerPass(graph, semPass) registerPass(graph, evalPass) for p in searchPaths: conf.searchPaths.add(AbsoluteDir p) if conf.libpath.isEmpty: conf.libpath = AbsoluteDir p var m = graph.makeModule(scriptName) incl(m.flags, sfMainModule) var idgen = idGeneratorFromModule(m) var vm = newCtx(m, cache, graph, idgen) vm.mode = emRepl vm.features = flags if registerOps: vm.registerAdditionalOps() # Required to register parts of stdlib modules graph.vm = vm graph.compileSystemModule() result = Interpreter(mainModule: m, graph: graph, scriptName: scriptName, idgen: idgen) proc destroyInterpreter*(i: Interpreter) = ## destructor. discard "currently nothing to do." proc registerErrorHook*(i: Interpreter, hook: proc (config: ConfigRef; info: TLineInfo; msg: string; severity: Severity) {.gcsafe.}) = i.graph.config.structuredErrorHook = hook proc runRepl*(r: TLLRepl; searchPaths: openArray[string]; supportNimscript: bool) = ## deadcode but please don't remove... might be revived var conf = newConfigRef() var cache = newIdentCache() var graph = newModuleGraph(cache, conf) for p in searchPaths: conf.searchPaths.add(AbsoluteDir p) if conf.libpath.isEmpty: conf.libpath = AbsoluteDir p conf.cmd = cmdInteractive # see also `setCmd` conf.setErrorMaxHighMaybe initDefines(conf.symbols) defineSymbol(conf.symbols, "nimscript") if supportNimscript: defineSymbol(conf.symbols, "nimconfig") when hasFFI: defineSymbol(graph.config.symbols, "nimffi") registerPass(graph, verbosePass) registerPass(graph, semPass) registerPass(graph, evalPass) var m = graph.makeStdinModule() incl(m.flags, sfMainModule) var idgen = idGeneratorFromModule(m) if supportNimscript: graph.vm = setupVM(m, cache, "stdin", graph, idgen) graph.compileSystemModule() processModule(graph, m, idgen, llStreamOpenStdIn(r)) |