nitlanguage
/
nit.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(from parent 1:
1be2b9b
)
sepcomp: shortcut an inline most intern methods of Object
author
Jean Privat
<jean@pryen.org>
Fri, 27 Feb 2015 14:02:54 +0000
(21:02 +0700)
committer
Jean Privat
<jean@pryen.org>
Fri, 27 Feb 2015 14:02:54 +0000
(21:02 +0700)
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
4321eb0
..
a33c098
100644
(file)
--- a/
src/compiler/separate_compiler.nit
+++ b/
src/compiler/separate_compiler.nit
@@
-1163,6
+1163,12
@@
class SeparateCompilerVisitor
return direct_call(tgs.first, args)
end
end
+ # Shortcut intern methods as they are not usually redefinable
+ if callsite.mpropdef.is_intern and callsite.mproperty.name != "object_id" then
+ # `object_id` is the only redefined intern method, so it can not be directly called.
+ # TODO find a less ugly approach?
+ return direct_call(callsite.mpropdef, args)
+ end
return super
end