[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Gnash-commit] gnash/server action.cpp
From: |
strk |
Subject: |
[Gnash-commit] gnash/server action.cpp |
Date: |
Tue, 07 Feb 2006 02:45:20 +0000 |
CVSROOT: /sources/gnash
Module name: gnash
Branch:
Changes by: strk <address@hidden> 06/02/07 02:45:20
Modified files:
server : action.cpp
Log message:
Fixed <as_function 0x0x####>, cleanups.
CVSWeb URLs:
http://cvs.savannah.gnu.org/viewcvs/gnash/gnash/server/action.cpp.diff?tr1=1.26&tr2=1.27&r1=text&r2=text
Patches:
Index: gnash/server/action.cpp
diff -u gnash/server/action.cpp:1.26 gnash/server/action.cpp:1.27
--- gnash/server/action.cpp:1.26 Mon Feb 6 18:54:30 2006
+++ gnash/server/action.cpp Tue Feb 7 02:45:20 2006
@@ -232,7 +232,7 @@
as_value call_method(
const as_value& method,
as_environment* env,
- as_object_interface* this_ptr,
+ as_object_interface* this_ptr, // this is ourself
int nargs,
int first_arg_bottom_index)
// first_arg_bottom_index is the stack index, from the bottom, of the
first argument.
@@ -2069,8 +2069,7 @@
{
int array_size = (int)
env->pop().to_number();
- log_msg("xxx init array: size = %d, top
of stack = %d\n",
- array_size,
env->get_top_index());//xxxxx
+ //log_msg("xxx init array: size = %d,
top of stack = %d\n", array_size, env->get_top_index());//xxxxx
// Call the array constructor, to
create an empty array.
as_value result;
@@ -2090,8 +2089,7 @@
env->push(result);
- log_msg("xxx init array end: top of
stack = %d, trace(top(0)) =",
- env->get_top_index());//xxxxxxx
+ //log_msg("xxx init array end: top of
stack = %d, trace(top(0)) =", env->get_top_index());//xxxxxxx
as_global_trace(fn_call(NULL, NULL,
env, 1, env->get_top_index())); //xxxx
@@ -2346,12 +2344,24 @@
case SWF::ACTION_DECREMENT: // decrement
env->top(0) -= 1;
break;
+
case SWF::ACTION_CALLMETHOD: // call method
{
- int nargs = (int)
env->top(2).to_number();
- as_value result;
+
+ // Get name of the method
const tu_string& method_name =
env->top(0).to_tu_string();
+ //log_msg(" method name: %s\n",
method_name.c_str());
+
+ // Get an object
as_object_interface* obj =
env->top(1).to_object();
+ //log_msg(" method object: %p\n", obj);
+
+ // Get number of arguments
+ int nargs = (int)
env->top(2).to_number();
+ //log_msg(" method nargs: %d\n", nargs);
+
+ as_value result;
+
if (obj)
{
as_value method;
@@ -3215,7 +3225,7 @@
else if (m_type == AS_FUNCTION)
{
char buffer[50];
- snprintf(buffer, 50, "<as_function 0x%p>", (void *)
m_as_function_value);
+ snprintf(buffer, 50, "<as_function %p>", (void *)
m_as_function_value);
m_string_value = buffer;
}
else