nitlanguage
/
nit.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
60c2a08
)
abstract_compiler: can inline methods with `constant_value` (defined with -D)
author
Jean Privat
<jean@pryen.org>
Wed, 28 Oct 2015 19:58:56 +0000
(15:58 -0400)
committer
Jean Privat
<jean@pryen.org>
Wed, 28 Oct 2015 19:58:56 +0000
(15:58 -0400)
Signed-off-by: Jean Privat <jean@pryen.org>
src/compiler/abstract_compiler.nit
patch
|
blob
|
history
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