nitlanguage
/
nit.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
02800f2
)
sep_comp: SeparateRuntimeFunction::compile_to_c only declare if module is dead
author
Jean Privat
<jean@pryen.org>
Wed, 17 Jun 2015 01:23:45 +0000
(21:23 -0400)
committer
Jean Privat
<jean@pryen.org>
Wed, 17 Jun 2015 12:42:17 +0000
(08:42 -0400)
Signed-off-by: Jean Privat <jean@pryen.org>
src/compiler/separate_compiler.nit
patch
|
blob
|
history
diff --git
a/src/compiler/separate_compiler.nit
b/src/compiler/separate_compiler.nit
index
79cdb2f
..
b971cdb
100644
(file)
--- a/
src/compiler/separate_compiler.nit
+++ b/
src/compiler/separate_compiler.nit
@@
-2216,6
+2216,11
@@
class SeparateRuntimeFunction
var sig = "{c_ret} {c_name}{c_sig}"
compiler.provide_declaration(self.c_name, "{sig};")
+ var rta = compiler.as(SeparateCompiler).runtime_type_analysis
+ if rta != null and not rta.live_mmodules.has(mmethoddef.mclassdef.mmodule) then
+ return
+ end
+
var recv = self.mmethoddef.mclassdef.bound_mtype
var v = compiler.new_visitor
var selfvar = new RuntimeVariable("self", called_recv, recv)