GNOME Bugzilla – Bug 789071
To many variable copies
Last modified: 2018-05-22 15:55:17 UTC
Vala C code create lot of pointer copies, this is one reason to retro-gtk, to move away from Vala: http://bytesgnomeschozo.blogspot.mx/2017/10/retro-gtk-renaissance.html Vala's code generator may have a -O like switch, to produce better quality code by avoiding apparent unnecessary C code. This new switch, will slowness C code generation and will hit general compilation time. This switch can help Vala projects to port to C, by reducing the work on rewrite, helping to attract other C developers to use Vala for prototype their projects in Vala and then switch to C if they wish. GXml can take advantage of this, because it can be ported to C in order to be merged in GLib.
It would indeed indeed be great if Vala didn't make so many copies, it makes the c code much harder to read. (Which in an ideal world wouldn't be necessary but it sometimes is essential when debugging.)
Created attachment 364002 [details] [review] codegen: No tmp for method-calls without ref/out params returning ValueType
Review of attachment 364002 [details] [review]: Break libgee testsuite: ERROR:testcollection.c:4273:__lambda24_: assertion failed: (iter.has_next ())
Created attachment 364141 [details] [review] codegen: Avoid use of temp-var to access in/ref parameters
Created attachment 364234 [details] [review] codegen: Avoid use of temp-var to access in/ref parameters
Created attachment 364235 [details] [review] codegen: Avoid use of temp-var for some callables returning ValueType It is safe to do for callables which don't have out/ref parameters without breaking the control-flow.
-- GitLab Migration Automatic Message -- This bug has been migrated to GNOME's GitLab instance and has been closed from further activity. You can subscribe and participate further through the new bug through this link to our GitLab instance: https://gitlab.gnome.org/GNOME/vala/issues/599.