nitlanguage
/
nit.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
| inline |
side by side
abstract_compiler: can inline methods with `constant_value` (defined with -D)
[nit.git]
/
src
/
compiler
/
abstract_compiler.nit
diff --git
a/src/compiler/abstract_compiler.nit
b/src/compiler/abstract_compiler.nit
index
c6cdb26
..
9584179
100644
(file)
--- a/
src/compiler/abstract_compiler.nit
+++ b/
src/compiler/abstract_compiler.nit
@@
-2022,6
+2022,7
@@
redef class MMethodDef
fun can_inline(v: VISITOR): Bool
do
if is_abstract then return true
+ if constant_value != null then return true
var modelbuilder = v.compiler.modelbuilder
var node = modelbuilder.mpropdef2node(self)
if node isa APropdef then