summary refs log tree commit diff stats
path: root/compiler
diff options
context:
space:
mode:
authorAndreas Rumpf <rumpf_a@web.de>2019-07-27 10:23:14 +0200
committerAndreas Rumpf <rumpf_a@web.de>2019-07-27 14:01:28 +0200
commitceb1a1b6884b28f3f3f88a4be5663d7f0b1f1155 (patch)
tree62bd95dfc772bda027c18bd3e29b93b5f734529c /compiler
parentf58d87cb43a7ddb35bc60b73ecf758842decb1a2 (diff)
downloadNim-ceb1a1b6884b28f3f3f88a4be5663d7f0b1f1155.tar.gz
IR: minor refactoring
Diffstat (limited to 'compiler')
-rw-r--r--compiler/passes.nim5
1 files changed, 4 insertions, 1 deletions
diff --git a/compiler/passes.nim b/compiler/passes.nim
index 82314b789..e917c1ce4 100644
--- a/compiler/passes.nim
+++ b/compiler/passes.nim
@@ -120,6 +120,9 @@ proc prepareConfigNotes(graph: ModuleGraph; module: PSym) =
     if graph.config.mainPackageNotes == {}: graph.config.mainPackageNotes = graph.config.notes
     graph.config.notes = graph.config.foreignPackageNotes
 
+proc moduleHasChanged*(graph: ModuleGraph; module: PSym): bool {.inline.} =
+  result = module.id >= 0
+
 proc processModule*(graph: ModuleGraph; module: PSym, stream: PLLStream): bool {.discardable.} =
   if graph.stopCompile(): return true
   var
@@ -128,7 +131,7 @@ proc processModule*(graph: ModuleGraph; module: PSym, stream: PLLStream): bool {
     s: PLLStream
     fileIdx = module.fileIdx
   prepareConfigNotes(graph, module)
-  if module.id < 0:
+  if not moduleHasChanged(graph, module):
     # new module caching mechanism:
     for i in 0 ..< graph.passes.len:
       if not isNil(graph.passes[i].open) and not graph.passes[i].isFrontend:
7:14:45 -0800 775 - starting to reorg C++ mu to use layers' href='/akkartik/mu/commit/cpp/literate/001test?h=main&id=515309164793b2e03c15954bf8a89f0f288a7f2c'>51530916 ^
2ed1aa9c ^
51530916 ^

de49fb42 ^


b39ceb27 ^
df0b469f ^
b39ceb27 ^






51530916 ^
b39ceb27 ^
9e608a77 ^

ac0e9db5 ^
6c1376f8 ^
9e608a77 ^


b39ceb27 ^
683d53ca ^
b39ceb27 ^


683d53ca ^

b39ceb27 ^
df0b469f ^
ccd792da ^
51530916 ^
ac0e9db5 ^
7d13531e ^



eb3a527a ^


fb4836dc ^
eb3a527a ^
51530916 ^

0f125d5f ^
37537bf3 ^


86acd630 ^

0f125d5f ^
eb3a527a ^
65ccad4c ^
6673e1fc ^
40be2522 ^
eb3a527a ^



37537bf3 ^









51530916 ^
f278a15d ^
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110