summary refs log tree commit diff stats
path: root/compiler
diff options
context:
space:
mode:
authorringabout <43030857+ringabout@users.noreply.github.com>2024-04-19 03:53:27 +0800
committerGitHub <noreply@github.com>2024-04-18 21:53:27 +0200
commitf12683873f35ecea72cb6be0da1519798c0556fc (patch)
tree71860d3b51ab3ce9bbdcb3d9dc30f712c8cc5fb9 /compiler
parentdeae83b6abd7943c60095ffead4efbc13ffa19f7 (diff)
downloadNim-f12683873f35ecea72cb6be0da1519798c0556fc.tar.gz
remove php code from jsgen (#23502)
follow up https://github.com/nim-lang/Nim/pull/7606
https://github.com/nim-lang/Nim/pull/13466
Diffstat (limited to 'compiler')
-rw-r--r--compiler/jsgen.nim14
1 files changed, 0 insertions, 14 deletions
diff --git a/compiler/jsgen.nim b/compiler/jsgen.nim
index 4031796a3..baebfe188 100644
--- a/compiler/jsgen.nim
+++ b/compiler/jsgen.nim
@@ -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.