Displaying 13 results from an estimated 13 matches for "swfdec_action_define_local".
2007 Jan 31
0
Branch 'interpreter' - 3 commits - libswfdec/js libswfdec/swfdec_script.c
...+ return JS_NewNumberValue (cx, d, &cx->fp->sp[-1]);
+}
+
+static JSBool
swfdec_action_shift (JSContext *cx, guint action, const guint8 *data, guint len)
{
guint32 amount, value;
@@ -1414,6 +1443,54 @@ swfdec_action_target_path (JSContext *cx
return JS_TRUE;
}
+static JSBool
+swfdec_action_define_local (JSContext *cx, guint action, const guint8 *data, guint len)
+{
+ const char *name;
+
+ if (cx->fp->callobj == NULL) {
+ SWFDEC_ERROR ("FIXME: no local scope");
+ return JS_FALSE;
+ }
+ name = swfdec_js_to_string (cx, cx->fp->sp[-2]);
+ if (name == NULL)
+ return...
2007 Feb 16
0
11 commits - libswfdec/swfdec_font.c libswfdec/swfdec_font.h libswfdec/swfdec_js_movie.c libswfdec/swfdec_script.c libswfdec/swfdec_script.h test/.gitignore test/trace
...untime->jsNaN);
+ return JS_TRUE;
+ } else {
+ return JS_NewNumberValue (cx, x, &cx->fp->sp[-1]);
+ }
+}
+
/*** PRINT FUNCTIONS ***/
static char *
@@ -2020,7 +2058,7 @@ static const SwfdecActionSpec actions[25
[0x3c] = { "DefineLocal", NULL, 2, 0, { NULL, NULL, swfdec_action_define_local, swfdec_action_define_local, swfdec_action_define_local } },
[0x3d] = { "CallFunction", NULL, -1, 1, { NULL, NULL, swfdec_action_call_function, swfdec_action_call_function, swfdec_action_call_function } },
[0x3e] = { "Return", NULL, 1, 0, { NULL, NULL, swfdec_action_return...
2007 May 29
0
Branch 'as' - 6 commits - libswfdec/swfdec_as_interpret.c libswfdec/swfdec_js_xml.c libswfdec/swfdec_tag.c player/swfplay.c
...delete, swfdec_action_delete, swfdec_action_delete } },
+ [SWFDEC_AS_ACTION_DELETE2] = { "Delete2", NULL, 1, 0, { NULL, NULL, swfdec_action_delete2, swfdec_action_delete2, swfdec_action_delete2 } },
[SWFDEC_AS_ACTION_DEFINE_LOCAL] = { "DefineLocal", NULL, 2, 0, { NULL, NULL, swfdec_action_define_local, swfdec_action_define_local, swfdec_action_define_local } },
[SWFDEC_AS_ACTION_CALL_FUNCTION] = { "CallFunction", NULL, -1, 1, { NULL, NULL, swfdec_action_call_function, swfdec_action_call_function, swfdec_action_call_function } },
[SWFDEC_AS_ACTION_RETURN] = { "Return", N...
2007 Apr 12
0
Branch 'as' - 14 commits - libswfdec-gtk/swfdec_playback_alsa.c 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
...Otte <otte@gnome.org>
Date: Thu Apr 12 16:05:06 2007 +0200
implement Return
diff --git a/libswfdec/swfdec_as_interpret.c b/libswfdec/swfdec_as_interpret.c
index 7abef77..6925052 100644
--- a/libswfdec/swfdec_as_interpret.c
+++ b/libswfdec/swfdec_as_interpret.c
@@ -1590,18 +1590,16 @@ swfdec_action_define_local2 (SwfdecAsCon
cx->fp->sp--;
return JS_TRUE;
}
+#endif
static void
swfdec_action_return (SwfdecAsContext *cx, guint action, const guint8 *data, guint len)
{
- SwfdecScript *script = cx->fp->swf;
-
- cx->fp->rval = cx->fp->sp[-1];
- cx->fp->pc = script->...
2007 Mar 05
0
11 commits - configure.ac libswfdec/swfdec_js_movie.c libswfdec/swfdec_root_movie.c libswfdec/swfdec_root_movie.h libswfdec/swfdec_script.c libswfdec/swfdec_sprite.c libswfdec/swfdec_sprite.h libswfdec/swfdec_sprite_movie.c libswfdec/swfdec_swf_decoder.c
...n_delete, swfdec_action_delete, swfdec_action_delete } },
- [0x3b] = { "Delete2", NULL },
+ [0x3b] = { "Delete2", NULL, 1, 0, { NULL, NULL, swfdec_action_delete2, swfdec_action_delete2, swfdec_action_delete2 } },
[0x3c] = { "DefineLocal", NULL, 2, 0, { NULL, NULL, swfdec_action_define_local, swfdec_action_define_local, swfdec_action_define_local } },
[0x3d] = { "CallFunction", NULL, -1, 1, { NULL, NULL, swfdec_action_call_function, swfdec_action_call_function, swfdec_action_call_function } },
[0x3e] = { "Return", NULL, 1, 0, { NULL, NULL, swfdec_action_return...
2007 Jun 20
1
Branch 'as' - 2 commits - libswfdec/swfdec_as_interpret.c
libswfdec/swfdec_as_interpret.c | 5 ++---
1 files changed, 2 insertions(+), 3 deletions(-)
New commits:
diff-tree 9c5cb7cb9f6278896bc8a1e7cd7fb541b079c8de (from 1e19719b58b5cfcb800c81a5f5432c3ad662dbbc)
Author: Benjamin Otte <otte at gnome.org>
Date: Wed Jun 20 20:58:52 2007 +0200
the modulo arguments were mixed
diff --git a/libswfdec/swfdec_as_interpret.c
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
...delete, swfdec_action_delete, swfdec_action_delete } },
- [SWFDEC_AS_ACTION_DELETE2] = { "Delete2", NULL, 1, 1, { NULL, NULL, swfdec_action_delete2, swfdec_action_delete2, swfdec_action_delete2 } },
- [SWFDEC_AS_ACTION_DEFINE_LOCAL] = { "DefineLocal", NULL, 2, 0, { NULL, NULL, swfdec_action_define_local, swfdec_action_define_local, swfdec_action_define_local } },
- [SWFDEC_AS_ACTION_CALL_FUNCTION] = { "CallFunction", NULL, -1, 1, { NULL, NULL, swfdec_action_call_function, swfdec_action_call_function, swfdec_action_call_function } },
- [SWFDEC_AS_ACTION_RETURN] = { "Return", N...
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
...fp->sp[-1] = JSVAL_VOID;
+ } else {
+ char *s = swfdec_movie_get_path (movie);
+ JSString *string = JS_NewStringCopyZ (cx, s);
+ g_free (s);
+ if (string == NULL)
+ return JS_FALSE;
+ cx->fp->sp[-1] = STRING_TO_JSVAL (string);
+ }
+ return JS_TRUE;
+}
+
+static void
+swfdec_action_define_local (SwfdecAsContext *cx, guint action, const guint8 *data, guint len)
+{
+ const char *name;
+
+ g_assert (cx->fp->scopeChain != NULL);
+ name = swfdec_js_to_string (cx, cx->fp->sp[-2]);
+ if (name == NULL)
+ return JS_FALSE;
+ if (!JS_SetProperty (cx, cx->fp->scopeChain, nam...
2007 Jan 31
0
Branch 'interpreter' - 20 commits - autogen.sh configure.ac libswfdec/js libswfdec/swfdec_debug.h libswfdec/swfdec_js.c libswfdec/swfdec_js_color.c libswfdec/swfdec_js_movie.c libswfdec/swfdec_movie.c libswfdec/swfdec_movie.h libswfdec/swfdec_script.c
...t SwfdecActionSpec actions[25
/* version 5 */
[0x3a] = { "Delete", NULL },
[0x3b] = { "Delete2", NULL },
- [0x3c] = { "DefineLocal", NULL },
- [0x3d] = { "CallFunction", NULL },
+ [0x3c] = { "DefineLocal", NULL }, //, 2, 0, { NULL, NULL, swfdec_action_define_local, swfdec_action_define_local, swfdec_action_define_local } },
+ [0x3d] = { "CallFunction", NULL, -1, 1, { NULL, NULL, swfdec_action_call_function, swfdec_action_call_function, swfdec_action_call_function } },
[0x3e] = { "Return", NULL },
[0x3f] = { "Modulo", NULL...
2007 Feb 19
0
22 commits - libswfdec/js libswfdec/swfdec_debugger.c libswfdec/swfdec_js.c libswfdec/swfdec_js_global.c libswfdec/swfdec_js_movie.c libswfdec/swfdec_movie.c libswfdec/swfdec_player.c libswfdec/swfdec_player_internal.h libswfdec/swfdec_script.c
...p->scopeChain);
+ obj = cx->fp->thisp;
}
return OBJ_SET_PROPERTY (cx, obj, (jsid) atom, ret);
}
diff --git a/libswfdec/swfdec_script.c b/libswfdec/swfdec_script.c
index d46687f..824861b 100644
--- a/libswfdec/swfdec_script.c
+++ b/libswfdec/swfdec_script.c
@@ -1643,11 +1643,11 @@ swfdec_action_define_local (JSContext *c
{
const char *name;
- g_assert (cx->fp->callobj != NULL);
+ g_assert (cx->fp->scopeChain != NULL);
name = swfdec_js_to_string (cx, cx->fp->sp[-2]);
if (name == NULL)
return JS_FALSE;
- if (!JS_SetProperty (cx, cx->fp->callobj, name, &cx-...
2007 Feb 06
0
109 commits - configure.ac libswfdec/js libswfdec/Makefile.am libswfdec/swfdec_bits.c libswfdec/swfdec_bits.h libswfdec/swfdec_buffer.c libswfdec/swfdec_button_movie.c libswfdec/swfdec_codec_screen.c libswfdec/swfdec_color.c libswfdec/swfdec_color.h
...+ return JS_NewNumberValue (cx, d, &cx->fp->sp[-1]);
+}
+
+static JSBool
swfdec_action_shift (JSContext *cx, guint action, const guint8 *data, guint len)
{
guint32 amount, value;
@@ -1414,6 +1443,54 @@ swfdec_action_target_path (JSContext *cx
return JS_TRUE;
}
+static JSBool
+swfdec_action_define_local (JSContext *cx, guint action, const guint8 *data, guint len)
+{
+ const char *name;
+
+ if (cx->fp->callobj == NULL) {
+ SWFDEC_ERROR ("FIXME: no local scope");
+ return JS_FALSE;
+ }
+ name = swfdec_js_to_string (cx, cx->fp->sp[-2]);
+ if (name == NULL)
+ return...
2007 Aug 20
0
Branch 'vivi' - 60 commits - libswfdec-gtk/swfdec_gtk_loader.c libswfdec/Makefile.am libswfdec/swfdec_as_array.c libswfdec/swfdec_as_context.c libswfdec/swfdec_as_frame.c libswfdec/swfdec_as_frame_internal.h libswfdec/swfdec_as_interpret.c
...delete, swfdec_action_delete, swfdec_action_delete } },
+ [SWFDEC_AS_ACTION_DELETE2] = { "Delete2", NULL, 1, 1, { NULL, NULL, swfdec_action_delete2, swfdec_action_delete2, swfdec_action_delete2 } },
[SWFDEC_AS_ACTION_DEFINE_LOCAL] = { "DefineLocal", NULL, 2, 0, { NULL, NULL, swfdec_action_define_local, swfdec_action_define_local, swfdec_action_define_local } },
[SWFDEC_AS_ACTION_CALL_FUNCTION] = { "CallFunction", NULL, -1, 1, { NULL, NULL, swfdec_action_call_function, swfdec_action_call_function, swfdec_action_call_function } },
[SWFDEC_AS_ACTION_RETURN] = { "Return", N...
2007 Jun 27
0
Branch 'as' - 16 commits - configure.ac libswfdec/Makefile.am libswfdec/swfdec_as_context.c libswfdec/swfdec_as_frame.c libswfdec/swfdec_as_frame.h libswfdec/swfdec_as_function.c libswfdec/swfdec_as_interpret.c libswfdec/swfdec_as_script_function.c
..._as_object_set_variable (frame->var_object, function_name, &funval);
+ swfdec_as_object_set_variable (frame->target, function_name, &funval);
swfdec_as_object_unroot (SWFDEC_AS_OBJECT (fun));
}
@@ -1673,10 +1645,16 @@ swfdec_action_target_path (SwfdecAsConte
static void
swfdec_action_define_local (SwfdecAsContext *cx, guint action, const guint8 *data, guint len)
{
+ SwfdecAsObject *target;
const char *name;
name = swfdec_as_value_to_string (cx, swfdec_as_stack_peek (cx->frame->stack, 2));
- swfdec_as_object_set_variable (cx->frame->var_object, name,
+ if (cx->fram...