bootstrap the compiler with nimPreviewSlimSystem (#20176)

* bootstrap the compiler with nimPreviewSlimSystem

* threads
This commit is contained in:
ringabout 2022-08-09 16:32:29 +08:00 • committed by GitHub
commit e8ae2dc90b
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
19 changed files with 68 additions and 1 deletions

View file

@ -16,6 +16,10 @@ import modulegraphs
import std/[os, strutils, parseutils]
import std/private/globs
when defined(nimPreviewSlimSystem):
import std/assertions
type
TGen = object of PPassContext
module: PSym

View file

@ -23,6 +23,10 @@ from uri import encodeUrl
from std/private/globs import nativeToUnixPath
from nodejs import findNodeJs
when defined(nimPreviewSlimSystem):
import std/[assertions, syncio]
const
exportSection = skField
docCmdSkip = "skip"

View file

@ -37,6 +37,10 @@ import
import json, sets, math, tables, intsets, strutils
when defined(nimPreviewSlimSystem):
import std/[assertions, syncio]
type
TJSGen = object of PPassContext
module: PSym

View file

@ -5,6 +5,7 @@ hint[XDeclaredButNotUsed]:off
define:booting
define:nimcore
define:nimPreviewFloatRoundtrip
define:nimPreviewSlimSystem
#import:"$projectpath/testability"

View file

@ -16,6 +16,10 @@
import "." / [options, ast, lineinfos, idents, pathutils, msgs]
when defined(nimPreviewSlimSystem):
import std/assertions
proc getPackage*(conf: ConfigRef; cache: IdentCache; fileIdx: FileIndex): PSym =
## Return a new package symbol.
##

View file

@ -2,6 +2,10 @@ import strutils
import ast, options, msgs
when defined(nimPreviewSlimSystem):
import std/assertions
const isDebug = false
when isDebug:
import renderer

View file

@ -9,6 +9,10 @@
import renderer, strutils, ast, types
when defined(nimPreviewSlimSystem):
import std/assertions
const defaultParamSeparator* = ","
template mayNormalize(s: string): string =

View file

@ -32,7 +32,7 @@ from system/formatfloat import addFloatRoundtrip, addFloatSprintf
when defined(nimPreviewSlimSystem):
import std/[syncio, assertions]
import std/syncio
# There are some useful procs in vmconv.