parent
3f5599b344
commit
8df745a42e
2 changed files with 6 additions and 3 deletions
|
|
@ -1059,7 +1059,7 @@ template `[]`*(n: Indexable, i: BackwardsIndex): Indexable = n[n.len - i.int]
|
||||||
template `[]=`*(n: Indexable, i: BackwardsIndex; x: Indexable) = n[n.len - i.int] = x
|
template `[]=`*(n: Indexable, i: BackwardsIndex; x: Indexable) = n[n.len - i.int] = x
|
||||||
|
|
||||||
when defined(useNodeIds):
|
when defined(useNodeIds):
|
||||||
const nodeIdToDebug* = 2322967# 2322968
|
const nodeIdToDebug* = -1 # 2322968
|
||||||
var gNodeId: int
|
var gNodeId: int
|
||||||
|
|
||||||
proc newNode*(kind: TNodeKind): PNode =
|
proc newNode*(kind: TNodeKind): PNode =
|
||||||
|
|
|
||||||
|
|
@ -50,6 +50,9 @@ proc newIntNodeT*(intVal: Int128, n: PNode; g: ModuleGraph): PNode =
|
||||||
result.info = n.info
|
result.info = n.info
|
||||||
|
|
||||||
proc newFloatNodeT*(floatVal: BiggestFloat, n: PNode; g: ModuleGraph): PNode =
|
proc newFloatNodeT*(floatVal: BiggestFloat, n: PNode; g: ModuleGraph): PNode =
|
||||||
|
if n.typ.skipTypes(abstractInst).kind == tyFloat32:
|
||||||
|
result = newFloatNode(nkFloat32Lit, floatVal)
|
||||||
|
else:
|
||||||
result = newFloatNode(nkFloatLit, floatVal)
|
result = newFloatNode(nkFloatLit, floatVal)
|
||||||
result.typ = n.typ
|
result.typ = n.typ
|
||||||
result.info = n.info
|
result.info = n.info
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue