mirror of
https://github.com/nim-lang/Nim.git
synced 2026-02-15 07:43:26 +00:00
remove php code from jsgen (#23502)
follow up https://github.com/nim-lang/Nim/pull/7606 https://github.com/nim-lang/Nim/pull/13466
This commit is contained in:
@@ -110,7 +110,6 @@ type
|
||||
unique: int # for temp identifier generation
|
||||
blocks: seq[TBlock]
|
||||
extraIndent: int
|
||||
declaredGlobals: IntSet
|
||||
previousFileName: string # For frameInfo inside templates.
|
||||
|
||||
template config*(p: PProc): ConfigRef = p.module.config
|
||||
@@ -169,10 +168,6 @@ proc initProcOptions(module: BModule): TOptions =
|
||||
proc newInitProc(globals: PGlobals, module: BModule): PProc =
|
||||
result = newProc(globals, module, nil, initProcOptions(module))
|
||||
|
||||
proc declareGlobal(p: PProc; id: int; r: Rope) =
|
||||
if p.prc != nil and not p.declaredGlobals.containsOrIncl(id):
|
||||
p.locals.addf("global $1;$n", [r])
|
||||
|
||||
const
|
||||
MappedToObject = {tyObject, tyArray, tyTuple, tyOpenArray,
|
||||
tySet, tyVarargs}
|
||||
@@ -3120,15 +3115,6 @@ proc wholeCode(graph: ModuleGraph; m: BModule): Rope =
|
||||
|
||||
result = globals.typeInfo & globals.constants & globals.code
|
||||
|
||||
proc getClassName(t: PType): Rope =
|
||||
var s = t.sym
|
||||
if s.isNil or sfAnon in s.flags:
|
||||
s = skipTypes(t, abstractPtrs).sym
|
||||
if s.isNil or sfAnon in s.flags:
|
||||
doAssert(false, "cannot retrieve class name")
|
||||
if s.loc.r != "": result = s.loc.r
|
||||
else: result = rope(s.name.s)
|
||||
|
||||
proc finalJSCodeGen*(graph: ModuleGraph; b: PPassContext, n: PNode): PNode =
|
||||
## Finalize JS code generation of a Nim module.
|
||||
## Param `n` may contain nodes returned from the last module close call.
|
||||
|
||||
Reference in New Issue
Block a user