[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Gnash-commit] gnash ChangeLog server/vm/ASHandlers.cpp server...
From: |
Benjamin Wolsey |
Subject: |
[Gnash-commit] gnash ChangeLog server/vm/ASHandlers.cpp server... |
Date: |
Fri, 13 Jun 2008 10:33:38 +0000 |
CVSROOT: /sources/gnash
Module name: gnash
Changes by: Benjamin Wolsey <bwy> 08/06/13 10:33:38
Modified files:
. : ChangeLog
server/vm : ASHandlers.cpp ActionExec.cpp
Log message:
* server/vm/ActionExec.cpp: return an exception if there is no
'finally' block. I'm not yet sure why (or if) this is correct,
but it fixes the mtasc tests again.
* server/vm/ASHandlers.cpp: fix typo in debugging message.
CVSWeb URLs:
http://cvs.savannah.gnu.org/viewcvs/gnash/ChangeLog?cvsroot=gnash&r1=1.6917&r2=1.6918
http://cvs.savannah.gnu.org/viewcvs/gnash/server/vm/ASHandlers.cpp?cvsroot=gnash&r1=1.245&r2=1.246
http://cvs.savannah.gnu.org/viewcvs/gnash/server/vm/ActionExec.cpp?cvsroot=gnash&r1=1.79&r2=1.80
Patches:
Index: ChangeLog
===================================================================
RCS file: /sources/gnash/gnash/ChangeLog,v
retrieving revision 1.6917
retrieving revision 1.6918
diff -u -b -r1.6917 -r1.6918
--- ChangeLog 13 Jun 2008 09:17:26 -0000 1.6917
+++ ChangeLog 13 Jun 2008 10:33:36 -0000 1.6918
@@ -1,3 +1,10 @@
+2008-06-13 Benjamin Wolsey <address@hidden>
+
+ * server/vm/ActionExec.cpp: return an exception if there is no
+ 'finally' block. I'm not yet sure why (or if) this is correct,
+ but it fixes the mtasc tests again.
+ * server/vm/ASHandlers.cpp: fix typo in debugging message.
+
2008-06-12 Zou Lunkai <address@hidden>
* libbase/utility.h,
Index: server/vm/ASHandlers.cpp
===================================================================
RCS file: /sources/gnash/gnash/server/vm/ASHandlers.cpp,v
retrieving revision 1.245
retrieving revision 1.246
diff -u -b -r1.245 -r1.246
--- server/vm/ASHandlers.cpp 12 Jun 2008 12:44:58 -0000 1.245
+++ server/vm/ASHandlers.cpp 13 Jun 2008 10:33:37 -0000 1.246
@@ -2784,7 +2784,7 @@
if (!obj->get_member(NSV::PROP_CONSTRUCTOR, &function) )
{
IF_VERBOSE_ASCODING_ERRORS (
- log_aserror(_("Object doensn't have a constructor"));
+ log_aserror(_("Object doesn't have a constructor"));
)
}
}
Index: server/vm/ActionExec.cpp
===================================================================
RCS file: /sources/gnash/gnash/server/vm/ActionExec.cpp,v
retrieving revision 1.79
retrieving revision 1.80
diff -u -b -r1.79 -r1.80
--- server/vm/ActionExec.cpp 12 Jun 2008 12:44:59 -0000 1.79
+++ server/vm/ActionExec.cpp 13 Jun 2008 10:33:37 -0000 1.80
@@ -55,7 +55,7 @@
# define STACK_DUMP_LIMIT 32
// Define to get debugging messages for try / catch
-//#define GNASH_DEBUG_TRY 1
+#define GNASH_DEBUG_TRY 1
#endif
@@ -200,7 +200,6 @@
{
if (pc >= stop_pc)
{
-
// No try blocks
if (_tryList.empty()) {
@@ -211,7 +210,7 @@
// Stop execution (for how long?) if an exception
// is still on the stack and there is nothing
// left to catch it.
- throw ActionScriptException();
+ //throw ActionScriptException();
}
break;
}
@@ -245,9 +244,9 @@
{
if (env.stack_size() && env.top(0).is_exception())
{
+#ifdef GNASH_DEBUG_TRY
as_value ex = env.top(0);
ex.unflag_exception();
-#ifdef GNASH_DEBUG_TRY
log_debug("TRY block: Encountered exception (%s). Set
PC to catch.", ex);
#endif
// We have an exception. Don't execute any more of the
try
@@ -276,7 +275,6 @@
#endif
env.global_register(t._registerIndex) = ex;
}
- //continue;
}
}
else
@@ -294,21 +292,23 @@
}
else if (t._tryState == tryBlock::TRY_CATCH)
{
+#ifdef GNASH_DEBUG_TRY
log_debug("CATCH: tryBlock name = %s", t._name);
+#endif
// Process exceptions. The code in catch { } will
// be executed whether this block is reached or not.
if (env.stack_size() && env.top(0).is_exception())
{
- // Should be renamed to "currentException"
// This was thrown in "try". Remove it from
// the stack and remember it so that
// further exceptions can be caught.
t._lastThrow = env.pop();
+#ifdef GNASH_DEBUG_TRY
as_value ex = t._lastThrow;
ex.unflag_exception();
-
log_debug("CATCH block: top of stack is an exception
(%s)", ex);
+#endif
if (t._hasName && !t._name.empty())
{
@@ -355,7 +355,6 @@
// If there's no exception here, we can execute the
// rest of the code. If there is, it will be caught
// by the next TryBlock or stop execution.
-
if (env.stack_size() && env.top(0).is_exception())
{
// Check for exception handlers straight away
@@ -380,6 +379,16 @@
"uncaught one (%s) back", ex);
#endif
env.push(t._lastThrow);
+ if ((t._finallyOffset == t._savedEndOffset) && retval)
+ {
+ // This was taken over from the previous
+ // implementation. It happens when there is
+ // no 'finally' block. It seems to be a bit of
+ // a hack now, though it may be correct. It
+ // passes misc-mtasc.all/exceptions.swf.
+ // TODO: more tests needed.
+ *retval = t._lastThrow;
+ }
_tryList.pop_back();
continue;
}
@@ -749,7 +758,6 @@
{
if ( ! with_stack.empty() )
{
- //return const_cast<as_object*>(with_stack.back().object());
return with_stack.back().object();
}
else
@@ -766,6 +774,7 @@
stop_pc = t._catchOffset;
_tryList.push_back(t);
+
}
void
- [Gnash-commit] gnash ChangeLog server/vm/ASHandlers.cpp server..., Benjamin Wolsey, 2008/06/12
- [Gnash-commit] gnash ChangeLog server/vm/ASHandlers.cpp server..., Benjamin Wolsey, 2008/06/12
- [Gnash-commit] gnash ChangeLog server/vm/ASHandlers.cpp server...,
Benjamin Wolsey <=
- [Gnash-commit] gnash ChangeLog server/vm/ASHandlers.cpp server..., Benjamin Wolsey, 2008/06/13
- [Gnash-commit] gnash ChangeLog server/vm/ASHandlers.cpp server..., Benjamin Wolsey, 2008/06/16
- [Gnash-commit] gnash ChangeLog server/vm/ASHandlers.cpp server..., Benjamin Wolsey, 2008/06/16
- [Gnash-commit] gnash ChangeLog server/vm/ASHandlers.cpp server..., Benjamin Wolsey, 2008/06/17