[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Gnash-commit] /srv/bzr/gnash/trunk r11705: Drop useless variable and op
From: |
Sandro Santilli |
Subject: |
[Gnash-commit] /srv/bzr/gnash/trunk r11705: Drop useless variable and open up the branch back condition as it looks like a good point where other housecleaning could be done (like GC) |
Date: |
Wed, 16 Dec 2009 22:37:26 +0100 |
User-agent: |
Bazaar (2.0.2) |
------------------------------------------------------------
revno: 11705
committer: Sandro Santilli <address@hidden>
branch nick: trunk
timestamp: Wed 2009-12-16 22:37:26 +0100
message:
Drop useless variable and open up the branch back condition as it looks like
a good point where other housecleaning could be done (like GC)
modified:
libcore/vm/ActionExec.cpp
=== modified file 'libcore/vm/ActionExec.cpp'
--- a/libcore/vm/ActionExec.cpp 2009-12-09 13:49:55 +0000
+++ b/libcore/vm/ActionExec.cpp 2009-12-16 21:37:26 +0000
@@ -236,7 +236,6 @@
// Get the opcode.
boost::uint8_t action_id = code[pc];
- size_t oldPc = pc;
IF_VERBOSE_ACTION (
log_action("PC:%d - EX: %s", pc, code.disasm(pc));
@@ -326,15 +325,23 @@
);
#endif
+
+ // Do some housecleaning on branch back
+ if ( next_pc <= pc )
+ {
+ // Check for script limits hit.
+ // See: http://www.gnashdev.org/wiki/index.php/ScriptLimits
+ if (clock.elapsed() > maxTime) {
+ boost::format fmt(_("Time exceeded"));
+ throw ActionLimitException(fmt.str());
+ }
+
+ // TODO: Run garbage collector ? If stack isn't too big ?
+ }
+
// Control flow actions will change the PC (next_pc)
pc = next_pc;
- // Check for script limits hit.
- // See: http://www.gnashdev.org/wiki/index.php/ScriptLimits
- if (pc <= oldPc && clock.elapsed() > maxTime) {
- boost::format fmt(_("Time exceeded"));
- throw ActionLimitException(fmt.str());
- }
}
}
catch (ActionLimitException& ex) {
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [Gnash-commit] /srv/bzr/gnash/trunk r11705: Drop useless variable and open up the branch back condition as it looks like a good point where other housecleaning could be done (like GC),
Sandro Santilli <=