search for: swfdec_action_extend

Displaying 17 results from an estimated 17 matches for "swfdec_action_extend".

Did you mean: swfdec_action_extends
2007 Nov 01
0
libswfdec/swfdec_as_interpret.c
libswfdec/swfdec_as_interpret.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) New commits: commit 0041248c7266dc65865c616e7c474b02a0ef76b4 Author: Pekka Lampila <pekka.lampila at iki.fi> Date: Thu Nov 1 16:47:56 2007 +0200 Don't assert in swfdec_action_extends if creating new object fails diff --git a/libswfdec/swfdec_as_interpret.c b/libswfdec/swfdec_as_interpret.c index 234ba33..24e1bb9 100644 --- a/libswfdec/swfdec_as_interpret.c +++ b/libswfdec/swfdec_as_interpret.c @@ -2321,7 +2321,7 @@ swfdec_action_extends (SwfdecAsContext *cx, guint action, con...
2007 Mar 07
1
2 commits - libswfdec/swfdec_script.c test/trace
libswfdec/swfdec_script.c | 14 ++++++++++++-- test/trace/Makefile.am | 2 ++ test/trace/gotoframe.swf |binary test/trace/gotoframe.swf.trace | 13 +++++++++++++ 4 files changed, 27 insertions(+), 2 deletions(-) New commits: diff-tree 12348410a3509928a6e8e4c8ca00292a58ff542c (from 46e62d4410c20c19774a45758d8ebf11cd0bdf96) Author: Benjamin Otte <otte@gnome.org>
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
...", NULL, 2, 1, swfdec_action_binary, 4 }, @@ -3196,16 +3197,17 @@ const SwfdecActionSpec swfdec_as_actions[256] = { [SWFDEC_AS_ACTION_STRING_GREATER] = { "StringGreater", NULL, -1, -1, NULL, 6 }, /* version 7 */ [SWFDEC_AS_ACTION_EXTENDS] = { "Extends", NULL, 2, 0, swfdec_action_extends, 7 }, - /* version 3 */ - [SWFDEC_AS_ACTION_GOTO_FRAME] = { "GotoFrame", swfdec_action_print_goto_frame, 0, 0, swfdec_action_goto_frame, 3 }, - [SWFDEC_AS_ACTION_GET_URL] = { "GetURL", swfdec_action_print_get_url, 0, 0, swfdec_action_get_url, 3 }, + /* version 1 */ + [SWFD...
2007 May 20
0
Branch 'as' - libswfdec/swfdec_as_context.c libswfdec/swfdec_as_context.h libswfdec/swfdec_as_interpret.c libswfdec/swfdec_player.c
...+ diff *= 1000; + diff = diff + (tv.tv_usec - cx->start_time.tv_usec) / 1000; - *cx->fp->sp++ = INT_TO_JSVAL ((int) SWFDEC_TICKS_TO_MSECS (player->time)); - return JS_TRUE; + SWFDEC_AS_VALUE_SET_INT (swfdec_as_stack_push (cx->frame->stack), diff); } -#endif static void swfdec_action_extends (SwfdecAsContext *cx, guint action, const guint8 *data, guint len) @@ -2070,9 +2077,7 @@ const SwfdecActionSpec swfdec_as_actions [SWFDEC_AS_ACTION_MB_STRING_LENGTH] = { "MBStringLength", NULL }, [SWFDEC_AS_ACTION_CHAR_TO_ASCII] = { "CharToAscii", NULL }, [SWFDEC_AS_AC...
2007 May 24
0
Branch 'as' - 11 commits - libswfdec/swfdec_as_array.c libswfdec/swfdec_as_context.c libswfdec/swfdec_as_function.c libswfdec/swfdec_as_interpret.c libswfdec/swfdec_as_native_function.c libswfdec/swfdec_as_number.c libswfdec/swfdec_as_object.c
...u May 24 16:37:09 2007 +0200 fix ActionExtends to set __constructor__, not constructor diff --git a/libswfdec/swfdec_as_interpret.c b/libswfdec/swfdec_as_interpret.c index f0d27ce..70f5f78 100644 --- a/libswfdec/swfdec_as_interpret.c +++ b/libswfdec/swfdec_as_interpret.c @@ -1675,7 +1675,7 @@ swfdec_action_extends (SwfdecAsContext * swfdec_as_object_get_variable (SWFDEC_AS_OBJECT (super), SWFDEC_AS_STR_prototype, &proto); swfdec_as_object_set_variable (prototype, SWFDEC_AS_STR___proto__, &proto); - swfdec_as_object_set_variable (prototype, SWFDEC_AS_STR_constructor, + swfdec_as_object...
2007 Jul 04
0
Branch 'as' - 25 commits - libswfdec/Makefile.am libswfdec/swfdec_as_boolean.c libswfdec/swfdec_as_boolean.h 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
...;Greater", NULL, 2, 1, { NULL, NULL, NULL, swfdec_action_new_comparison, swfdec_action_new_comparison } }, [SWFDEC_AS_ACTION_STRING_GREATER] = { "StringGreater", NULL }, /* version 7 */ - [SWFDEC_AS_ACTION_EXTENDS] = { "Extends", NULL, 2, 0, { NULL, NULL, NULL, NULL, swfdec_action_extends } }, + [SWFDEC_AS_ACTION_EXTENDS] = { "Extends", NULL, 2, 0, { NULL, NULL, NULL, swfdec_action_extends, swfdec_action_extends } }, /* version 3 */ [SWFDEC_AS_ACTION_GOTO_FRAME] = { "GotoFrame", swfdec_action_print_goto_frame, 0, 0, { swfdec_action_goto_frame, swfdec_acti...
2007 Oct 26
0
2 commits - libswfdec/swfdec_as_interpret.c libswfdec/swfdec_as_object.h test/trace
...E_GET_OBJECT (&argv[i]); + swfdec_as_object_get_variable (interface, SWFDEC_AS_STR_prototype, val); + if (!SWFDEC_AS_VALUE_IS_OBJECT (val)) + continue; + proto->interfaces = + g_slist_prepend (proto->interfaces, SWFDEC_AS_VALUE_GET_OBJECT (val)); + } +} + +static void swfdec_action_extends (SwfdecAsContext *cx, guint action, const guint8 *data, guint len) { SwfdecAsValue *superclass, *subclass, proto; @@ -2907,7 +2961,7 @@ const SwfdecActionSpec swfdec_as_actions[256] = { /* version 7 */ [SWFDEC_AS_ACTION_THROW] = { "Throw", NULL }, [SWFDEC_AS_ACTION_CAST] = {...
2007 Apr 16
0
Branch 'as' - 3 commits - libswfdec/swfdec_as_interpret.c libswfdec/swfdec_as_object.c libswfdec/swfdec_as_object.h
...un Apr 15 16:12:29 2007 +0200 implement Enumerate and Enumerate2 (untested) diff --git a/libswfdec/swfdec_as_interpret.c b/libswfdec/swfdec_as_interpret.c index 9fca9af..dfcefb1 100644 --- a/libswfdec/swfdec_as_interpret.c +++ b/libswfdec/swfdec_as_interpret.c @@ -1790,40 +1790,60 @@ swfdec_action_extends (SwfdecAsContext * return JS_FALSE; return JS_TRUE; } +#endif + +static gboolean +swfdec_action_do_enumerate (SwfdecAsObject *object, const SwfdecAsValue *val, + SwfdecAsVariable *var, gpointer stackp) +{ + SwfdecAsStack *stack = stackp; + + if (var->flags | SWFDEC_AS_VARIABLE_DON...
2007 Aug 17
0
4 commits - libswfdec/swfdec_as_context.c libswfdec/swfdec_as_interpret.c libswfdec/swfdec_as_object.c libswfdec/swfdec_as_object.h test/trace
...C_AS_VARIABLE_HIDDEN and SWFDEC_AS_VARIABLE_READONLY is now SWFDEC_AS_VARIABLE_CONSTANT diff --git a/libswfdec/swfdec_as_interpret.c b/libswfdec/swfdec_as_interpret.c index 47e62d5..f9a2cc2 100644 --- a/libswfdec/swfdec_as_interpret.c +++ b/libswfdec/swfdec_as_interpret.c @@ -1870,6 +1870,8 @@ swfdec_action_extends (SwfdecAsContext * swfdec_as_object_delete_variable (prototype, SWFDEC_AS_STR_constructor); swfdec_as_object_set_variable (prototype, SWFDEC_AS_STR___constructor__, superclass); + swfdec_as_object_set_variable_flags (prototype, SWFDEC_AS_STR___constructor__, + SWFDEC_AS_VARIABLE...
2007 Oct 25
0
6 commits - libswfdec/swfdec_as_interpret.c test/trace
...SWFDEC_AS_VALUE_SET_NULL (swfdec_as_stack_push (cx)); + return; + } + + if (swfdec_action_is_instance_of (object, constructor)) { + SWFDEC_AS_VALUE_SET_OBJECT (swfdec_as_stack_push (cx), object); + } else { + SWFDEC_AS_VALUE_SET_NULL (swfdec_as_stack_push (cx)); + } +} + +static void swfdec_action_extends (SwfdecAsContext *cx, guint action, const guint8 *data, guint len) { SwfdecAsValue *superclass, *subclass, proto; @@ -2873,7 +2907,7 @@ const SwfdecActionSpec swfdec_as_actions[256] = { [SWFDEC_AS_ACTION_STRING_LESS] = { "StringLess", NULL, 2, 1, { NULL, swfdec_action_string_compa...
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
...S_TRUE; +} + +static void +swfdec_action_get_time (SwfdecAsContext *cx, guint action, const guint8 *data, guint len) +{ + SwfdecPlayer *player = JS_GetContextPrivate (cx); + + *cx->fp->sp++ = INT_TO_JSVAL ((int) SWFDEC_TICKS_TO_MSECS (player->time)); + return JS_TRUE; +} + +static void +swfdec_action_extends (SwfdecAsContext *cx, guint action, const guint8 *data, guint len) +{ + jsval superclass, subclass, proto; + JSObject *prototype; + + superclass = cx->fp->sp[-1]; + subclass = cx->fp->sp[-2]; + cx->fp->sp -= 2; + if (!JSVAL_IS_OBJECT (superclass) || superclass == JSVAL_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
...= { "Greater", NULL, 2, 1, { NULL, NULL, NULL, swfdec_action_new_comparison_6, swfdec_action_new_comparison_7 } }, + [SWFDEC_AS_ACTION_STRING_GREATER] = { "StringGreater", NULL }, /* version 7 */ +#if 0 [0x69] = { "Extends", NULL, 2, 0, { NULL, NULL, NULL, NULL, swfdec_action_extends } }, +#endif /* version 3 */ -#endif [SWFDEC_AS_ACTION_GOTO_FRAME] = { "GotoFrame", swfdec_action_print_goto_frame, 0, 0, { swfdec_action_goto_frame, swfdec_action_goto_frame, swfdec_action_goto_frame, swfdec_action_goto_frame, swfdec_action_goto_frame } }, #if 0 [0x83] = { &...
2007 Oct 25
0
12 commits - libswfdec/swfdec_as_internal.h libswfdec/swfdec_as_interpret.c libswfdec/swfdec_as_object.c libswfdec/swfdec_text_field_movie_as.c libswfdec/swfdec_text_field_movie.c test/trace
...CT (&val)) + { + class = SWFDEC_AS_VALUE_GET_OBJECT (&val); + if (class == prototype) { + SWFDEC_AS_VALUE_SET_BOOLEAN (swfdec_as_stack_peek (cx, 1), TRUE); + break; + } + swfdec_as_object_get_variable (class, SWFDEC_AS_STR___proto__, &val); + } +} + +static void swfdec_action_extends (SwfdecAsContext *cx, guint action, const guint8 *data, guint len) { SwfdecAsValue *superclass, *subclass, proto; @@ -2856,7 +2900,7 @@ const SwfdecActionSpec swfdec_as_actions[256] = { [SWFDEC_AS_ACTION_CALL_METHOD] = { "CallMethod", NULL, -1, 1, { NULL, NULL, swfdec_action_call_...
2007 Sep 03
0
20 commits - libswfdec/Makefile.am libswfdec/swfdec_as_context.c libswfdec/swfdec_as_function.c libswfdec/swfdec_as_initialize.as libswfdec/swfdec_as_initialize.h libswfdec/swfdec_as_internal.h libswfdec/swfdec_as_interpret.c libswfdec/swfdec_as_number.c
....org> Date: Mon Sep 3 14:15:43 2007 +0200 __constructor__ is a Flash 6 invention diff --git a/libswfdec/swfdec_as_interpret.c b/libswfdec/swfdec_as_interpret.c index e8f6e64..32613a2 100644 --- a/libswfdec/swfdec_as_interpret.c +++ b/libswfdec/swfdec_as_interpret.c @@ -1884,8 +1884,10 @@ swfdec_action_extends (SwfdecAsContext * return; swfdec_as_object_get_variable (super, SWFDEC_AS_STR_prototype, &proto); swfdec_as_object_set_variable (prototype, SWFDEC_AS_STR___proto__, &proto); - swfdec_as_object_set_variable_and_flags (prototype, SWFDEC_AS_STR___constructor__, - superclass,...
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
...pty object and sets properties on it instead resetting properties on a default object diff --git a/libswfdec/swfdec_as_interpret.c b/libswfdec/swfdec_as_interpret.c index 3b7c01f..72cf447 100644 --- a/libswfdec/swfdec_as_interpret.c +++ b/libswfdec/swfdec_as_interpret.c @@ -1865,16 +1865,13 @@ swfdec_action_extends (SwfdecAsContext * goto fail; } super = SWFDEC_AS_VALUE_GET_OBJECT (superclass); - prototype = swfdec_as_object_new (cx); + prototype = swfdec_as_object_new_empty (cx); if (prototype == NULL) return; swfdec_as_object_get_variable (super, SWFDEC_AS_STR_prototype, &proto)...
2007 Nov 15
2
Changes to 'refs/tags/0.5.4'
Tag '0.5.4' created by Benjamin Otte <otte at gnome.org> at 2007-11-15 10:12 -0800 release 0.5.4 ("Turkish Cycling Federation") -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.6 (GNU/Linux) iD8DBQBHPBurvMv5VCdLq8QRAj1KAJ40NHRRS3gKyJjSjyyoH7gDaGi/tQCeOha/ R5PF4bZQqmSdJ64t8EbD4cA= =8qBy -----END PGP SIGNATURE----- Changes since the dawn of time: Benjamin Otte (40):
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
...g *s; + s = JS_ValueToString(cx, cx->fp->sp[-1]); + if (!s) + return JS_FALSE; + cx->fp->sp[-1] = STRING_TO_JSVAL (s); + return JS_TRUE; +} + +static JSBool swfdec_action_type_of (JSContext *cx, guint action, const guint8 *data, guint len) { jsval val; @@ -2010,6 +2070,71 @@ swfdec_action_extends (JSContext *cx, gu return JS_TRUE; } +static JSBool +swfdec_action_enumerate2 (JSContext *cx, guint action, const guint8 *data, guint len) +{ + JSObject *obj; + JSIdArray *array; + guint i; + + if (!JSVAL_IS_OBJECT (cx->fp->sp[-1]) || cx->fp->sp[-1] == JSVAL_NULL) { + SWFD...