Displaying 8 results from an estimated 8 matches for "swfdec_action_swap".
Did you mean:
swfdec_action_stop
2007 Apr 11
0
Branch 'as' - 4 commits - libswfdec/swfdec_as_interpret.c libswfdec/swfdec_as_types.c libswfdec/swfdec_as_types.h
...Apr 11 19:58:44 2007 +0200
reenable ToNumber and ToString code
untested...
diff --git a/libswfdec/swfdec_as_interpret.c b/libswfdec/swfdec_as_interpret.c
index a679c0a..2421fbd 100644
--- a/libswfdec/swfdec_as_interpret.c
+++ b/libswfdec/swfdec_as_interpret.c
@@ -1705,27 +1705,21 @@ swfdec_action_swap (SwfdecAsContext *cx,
*swfdec_as_stack_peek (cx->frame->stack, 2) = val;
}
-#if 0
static void
swfdec_action_to_number (SwfdecAsContext *cx, guint action, const guint8 *data, guint len)
{
- double d;
- if (!JS_ValueToNumber (cx, cx->fp->sp[-1], &d))
- return JS_FALSE;
-...
2007 Mar 05
0
5 commits - libswfdec/swfdec_js.h libswfdec/swfdec_js_movie.c libswfdec/swfdec_script.c test/trace
...gt;sp -= 2 + n_args;
+ fp->sp[-1] = JSVAL_VOID;
+ return JS_TRUE;
+}
+
+static JSBool
swfdec_action_init_object (JSContext *cx, guint action, const guint8 *data, guint len)
{
JSStackFrame *fp = cx->fp;
@@ -1835,6 +1888,15 @@ swfdec_action_modulo_7 (JSContext *cx, g
}
static JSBool
+swfdec_action_swap (JSContext *cx, guint action, const guint8 *data, guint len)
+{
+ jsval tmp = cx->fp->sp[-2];
+ cx->fp->sp[-2] = cx->fp->sp[-1];
+ cx->fp->sp[-2] = tmp;
+ return JS_TRUE;
+}
+
+static JSBool
swfdec_action_to_number (JSContext *cx, guint action, const guint8 *data, guint...
2007 Apr 05
0
Branch 'as' - 9 commits - configure.ac libswfdec/swfdec_as_context.c libswfdec/swfdec_as_frame.c libswfdec/swfdec_as_frame.h libswfdec/swfdec_as_function.h libswfdec/swfdec_as_interpret.c libswfdec/swfdec_as_object.c libswfdec/swfdec_as_object.h
..., swfdec_action_to_string, swfdec_action_to_string, swfdec_action_to_string } },
[0x4c] = { "PushDuplicate", NULL, 1, 2, { NULL, NULL, swfdec_action_push_duplicate, swfdec_action_push_duplicate, swfdec_action_push_duplicate } },
[0x4d] = { "Swap", NULL, 2, 2, { NULL, NULL, swfdec_action_swap, swfdec_action_swap, swfdec_action_swap } },
- [0x4e] = { "GetMember", NULL, 2, 1, { NULL, swfdec_action_get_member, swfdec_action_get_member, swfdec_action_get_member, swfdec_action_get_member } },
- [0x4f] = { "SetMember", NULL, 3, 0, { NULL, swfdec_action_set_member, swfdec...
2007 Nov 07
0
14 commits - libswfdec/swfdec_as_context.c libswfdec/swfdec_as_interpret.c libswfdec/swfdec_as_interpret.h libswfdec/swfdec_net_stream.c libswfdec/swfdec_script.c libswfdec/swfdec_sprite_movie.c libswfdec/swfdec_tag.c libswfdec/swfdec_text_field_movie.c
...string, swfdec_action_to_string } },
- [SWFDEC_AS_ACTION_PUSH_DUPLICATE] = { "PushDuplicate", NULL, 1, 2, { NULL, NULL, swfdec_action_push_duplicate, swfdec_action_push_duplicate, swfdec_action_push_duplicate } },
- [SWFDEC_AS_ACTION_SWAP] = { "Swap", NULL, 2, 2, { NULL, NULL, swfdec_action_swap, swfdec_action_swap, swfdec_action_swap } },
- [SWFDEC_AS_ACTION_GET_MEMBER] = { "GetMember", NULL, 2, 1, { NULL, swfdec_action_get_member, swfdec_action_get_member, swfdec_action_get_member, swfdec_action_get_member } },
- [SWFDEC_AS_ACTION_SET_MEMBER] = { "SetMember", NULL,...
2007 Apr 12
0
Branch 'as' - 15 commits - libswfdec/swfdec_as_context.c libswfdec/swfdec_as_context.h libswfdec/swfdec_as_frame.c libswfdec/swfdec_as_frame.h libswfdec/swfdec_as_function.c libswfdec/swfdec_as_function.h libswfdec/swfdec_as_interpret.c
...swfdec_as_value_to_number (cx, val) + 1);
}
+#if 0
static void
swfdec_action_get_url (SwfdecAsContext *cx, guint action, const guint8 *data, guint len)
{
@@ -2202,10 +2200,8 @@ const SwfdecActionSpec swfdec_as_actions
[SWFDEC_AS_ACTION_SWAP] = { "Swap", NULL, 2, 2, { NULL, NULL, swfdec_action_swap, swfdec_action_swap, swfdec_action_swap } },
[SWFDEC_AS_ACTION_GET_MEMBER] = { "GetMember", NULL, 2, 1, { NULL, swfdec_action_get_member, swfdec_action_get_member, swfdec_action_get_member, swfdec_action_get_member } },
[SWFDEC_AS_ACTION_SET_MEMBER] = { "SetMember", NULL,...
2007 Apr 04
0
Branch 'as' - 4 commits - libswfdec/Makefile.am libswfdec/swfdec_as_context.c libswfdec/swfdec_as_frame.c libswfdec/swfdec_as_interpret.c libswfdec/swfdec_as_interpret.h libswfdec/swfdec_as_object.c libswfdec/swfdec_as_types.c libswfdec/swfdec_as_types.h
...;y))
+ return JS_FALSE;
+ cx->fp->sp--;
+ errno = 0;
+ x = fmod (x, y);
+ if (errno != 0) {
+ cx->fp->sp[-1] = DOUBLE_TO_JSVAL (cx->runtime->jsNaN);
+ return JS_TRUE;
+ } else {
+ return JS_NewNumberValue (cx, x, &cx->fp->sp[-1]);
+ }
+}
+
+static void
+swfdec_action_swap (SwfdecAsContext *cx, guint action, const guint8 *data, guint len)
+{
+ jsval tmp = cx->fp->sp[-2];
+ cx->fp->sp[-2] = cx->fp->sp[-1];
+ cx->fp->sp[-1] = tmp;
+ return JS_TRUE;
+}
+
+static void
+swfdec_action_to_number (SwfdecAsContext *cx, guint action, const guint8 *d...
2007 Mar 07
0
11 commits - libswfdec/swfdec_event.c libswfdec/swfdec_event.h libswfdec/swfdec_js_movie.c libswfdec/swfdec_movie.c libswfdec/swfdec_scriptable.c libswfdec/swfdec_scriptable.h libswfdec/swfdec_script.c libswfdec/swfdec_sprite.c libswfdec/swfdec_sprite.h
....org>
Date: Tue Mar 6 12:56:51 2007 +0100
apaprently i'm too stupid to implement ActionSwap correctly
diff --git a/libswfdec/swfdec_script.c b/libswfdec/swfdec_script.c
index f00a6f1..88b1b1d 100644
--- a/libswfdec/swfdec_script.c
+++ b/libswfdec/swfdec_script.c
@@ -1902,7 +1902,7 @@ swfdec_action_swap (JSContext *cx, guint
{
jsval tmp = cx->fp->sp[-2];
cx->fp->sp[-2] = cx->fp->sp[-1];
- cx->fp->sp[-2] = tmp;
+ cx->fp->sp[-1] = tmp;
return JS_TRUE;
}
2007 Mar 12
0
11 commits - libswfdec/js libswfdec/swfdec_loader.c libswfdec/swfdec_root_sprite.c libswfdec/swfdec_script.c player/swfdebug.c player/swfdec_player_manager.c test/trace
..., swfdec_action_to_string, swfdec_action_to_string, swfdec_action_to_string } },
[0x4c] = { "PushDuplicate", NULL, 1, 2, { NULL, NULL, swfdec_action_push_duplicate, swfdec_action_push_duplicate, swfdec_action_push_duplicate } },
[0x4d] = { "Swap", NULL, 2, 2, { NULL, NULL, swfdec_action_swap, swfdec_action_swap, swfdec_action_swap } },
[0x4e] = { "GetMember", NULL, 2, 1, { NULL, swfdec_action_get_member, swfdec_action_get_member, swfdec_action_get_member, swfdec_action_get_member } },
@@ -2383,7 +2508,7 @@ static const SwfdecActionSpec actions[25
[0x53] = { "NewMet...