Closed GoogleCodeExporter closed 9 years ago
Maybe due to inlining we have more than 255 register used and the debug
operation is expecting a register code only on 8 bits (255) so the compiler
throw an error when the register overflow.
Joa maybe we can emit a warning for the debug operation if the register
overflow and continue anyway.
Patrick.
Original comment by leclech.patrick
on 11 Dec 2010 at 6:45
Probably the best way to handle this. But maybe also throw a warning that
significant register thrashing happens.
Original comment by joaebert
on 11 Dec 2010 at 7:05
Anyone care to comment what does it mean in terms of not-so-1337 programmers?
:) Does it mean that I can't debug "over-inlined" code?
Original comment by makc.the...@gmail.com
on 11 Dec 2010 at 8:55
You should see that inlining creates a lot of registers (local variables). This
can cause a severe performance decrease. You should carefully see if this
method is still faster.
It will contain a lot of memory and the JIT has to do a lot of work on such a
method. Inlining is no holy grail and can cause even performance problems.
What happened to your code? Imagine writing "var i0: int = 0, var i1: int = 0,
... var i256: int = 0". The Flash bytecode and probably the debug player can
handle only up to 255 of those local variables. During inlining you created
more than 255. In that case I can imagine your method got really huge which
would be less optimal for performance.
Inlining us usually performed on rather small methods and pieces of code that
you call/use very often.
Original comment by joaebert
on 11 Dec 2010 at 9:00
well, in this case it's solving polynomial, and it does need to be run often.
can there be some method to instruct inliner to re-use certain variables it
creates?
Original comment by makc.the...@gmail.com
on 11 Dec 2010 at 9:27
(actually, inlined.Macro worked much better in this particular case, I'm just
asking for general considerations)
Original comment by makc.the...@gmail.com
on 11 Dec 2010 at 9:29
The Apparat inline expansion is rather stupid and was just implemented due to
public demand. It is working on a very bare-bones representation of the Flash
bytecode which means we cannot perform sophisticated analysis without a big
hassle. That is why, for now, we will not do that.
Original comment by joaebert
on 11 Dec 2010 at 9:33
In fact Macro expansion is there to mitigate this issue since no registers are
created and less overhead (none) exists.
Original comment by joaebert
on 11 Dec 2010 at 9:34
Original comment by joaebert
on 20 Dec 2010 at 9:24
Original comment by joaebert
on 1 Feb 2011 at 7:00
Original issue reported on code.google.com by
makc.the...@gmail.com
on 10 Dec 2010 at 2:06Attachments: