nitlanguage
/
nit.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
74a3710
)
compiler: do not initialize attributes at NULL in NEW_*
author
Jean Privat
<jean@pryen.org>
Fri, 6 Mar 2015 15:44:58 +0000
(22:44 +0700)
committer
Jean Privat
<jean@pryen.org>
Fri, 6 Mar 2015 15:44:58 +0000
(22:44 +0700)
is is already done by the zeroing
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
b53a7a2
..
23927b6
100644
(file)
--- a/
src/compiler/abstract_compiler.nit
+++ b/
src/compiler/abstract_compiler.nit
@@
-2304,7
+2304,7
@@
redef class AAttrPropdef
fun init_expr(v: AbstractCompilerVisitor, recv: RuntimeVariable)
do
- if has_value and not is_lazy then evaluate_expr(v, recv)
+ if has_value and not is_lazy and not n_expr isa ANullExpr then evaluate_expr(v, recv)
end
# Evaluate, store and return the default value of the attribute