search for: swfdecasfunct

Displaying 20 results from an estimated 60 matches for "swfdecasfunct".

Did you mean: swfdecasfunctio
2007 May 18
0
Branch 'as' - libswfdec/Makefile.am libswfdec/swfdec_as_context.c libswfdec/swfdec_as_function.c libswfdec/swfdec_as_function.h libswfdec/swfdec_as_interpret.c libswfdec/swfdec_as_native_function.c libswfdec/swfdec_as_native_function.h
...rt; diff --git a/libswfdec/swfdec_as_function.c b/libswfdec/swfdec_as_function.c index c6a7c92..dd91fcc 100644 --- a/libswfdec/swfdec_as_function.c +++ b/libswfdec/swfdec_as_function.c @@ -27,63 +27,32 @@ #include "swfdec_as_stack.h" #include "swfdec_debug.h" -G_DEFINE_TYPE (SwfdecAsFunction, swfdec_as_function, SWFDEC_TYPE_AS_OBJECT) - -static void -swfdec_as_function_dispose (GObject *object) -{ - SwfdecAsFunction *function = SWFDEC_AS_FUNCTION (object); - - if (function->script) { - swfdec_script_unref (function->script); - function->script = NULL; - } - g_free...
2007 Nov 14
0
7 commits - libswfdec/swfdec_as_frame.c libswfdec/swfdec_as_function.c libswfdec/swfdec_as_internal.h libswfdec/swfdec_as_interpret.c libswfdec/swfdec_as_object.c libswfdec/swfdec_as_super.c libswfdec/swfdec_as_super.h
...ill be this->prototype, but in special cases, this is not true. diff --git a/libswfdec/swfdec_as_function.c b/libswfdec/swfdec_as_function.c index ef60c0b..c64df5e 100644 --- a/libswfdec/swfdec_as_function.c +++ b/libswfdec/swfdec_as_function.c @@ -164,10 +164,10 @@ swfdec_as_function_call (SwfdecAsFunction *function, SwfdecAsObject *thisp, guin if (frame == NULL) return; if (thisp != NULL) { - swfdec_as_super_new (frame, thisp, FALSE); + swfdec_as_super_new (frame, thisp, thisp->prototype); } else { SWFDEC_FIXME ("does the super object really reference the function...
2007 Jul 13
0
12 commits - AUTHORS doc/Makefile.am doc/swfdec-docs.sgml doc/swfdec-sections.txt libswfdec/Makefile.am libswfdec/swfdec_as_array.c libswfdec/swfdec_as_array.h libswfdec/swfdec_as_context.c libswfdec/swfdec_as_function.c libswfdec/swfdec_as_function.h
...- a/doc/swfdec-docs.sgml +++ b/doc/swfdec-docs.sgml @@ -27,5 +27,6 @@ <xi:include href="xml/SwfdecAsContext.xml"/> <xi:include href="xml/SwfdecAsObject.xml"/> <xi:include href="xml/SwfdecAsArray.xml"/> + <xi:include href="xml/SwfdecAsFunction.xml"/> </chapter> </book> diff --git a/doc/swfdec-sections.txt b/doc/swfdec-sections.txt index fd2f296..7773b37 100644 --- a/doc/swfdec-sections.txt +++ b/doc/swfdec-sections.txt @@ -296,4 +296,35 @@ SWFDEC_AS_ARRAY_CLASS SWFDEC_AS_ARRAY_GET_CLASS SWFDEC_IS_AS_ARRAY SW...
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
...xt_get_string (SwfdecAsContext * context, const char * string); diff --git a/libswfdec/swfdec_as_function.c b/libswfdec/swfdec_as_function.c index 643fed5..8f404b7 100644 --- a/libswfdec/swfdec_as_function.c +++ b/libswfdec/swfdec_as_function.c @@ -139,7 +139,38 @@ swfdec_as_function_call (SwfdecAsFunctio frame->function_name = function->name; } else { frame = swfdec_as_frame_new (thisp, function->script); - /* FIXME: do the preloading here */ + SWFDEC_ERROR ("do the preloading here"); } } +/*** AS CODE ***/ + +static void +swfdec_as_function_construct (...
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
...hu May 24 17:13:15 2007 +0200 Flash <= 5 has no Function object diff --git a/libswfdec/swfdec_as_function.c b/libswfdec/swfdec_as_function.c index 2f0f0e7..1f174fb 100644 --- a/libswfdec/swfdec_as_function.c +++ b/libswfdec/swfdec_as_function.c @@ -101,12 +101,6 @@ swfdec_as_function_call (SwfdecAsFunctio /*** AS CODE ***/ -static void -swfdec_as_function_construct (SwfdecAsObject *object, guint argc, SwfdecAsValue *argv, SwfdecAsValue *ret) -{ - -} - void swfdec_as_function_init_context (SwfdecAsContext *context, guint version) { @@ -116,9 +110,13 @@ swfdec_as_function_init_context (Swfde...
2007 May 21
0
Branch 'as' - libswfdec/swfdec_as_frame.c libswfdec/swfdec_as_frame.h libswfdec/swfdec_as_function.c libswfdec/swfdec_as_function.h libswfdec/swfdec_as_native_function.c libswfdec/swfdec_as_object.c libswfdec/swfdec_as_script_function.c
...; SwfdecAsObject *swfdec_as_frame_find_variable (SwfdecAsFrame * frame, diff --git a/libswfdec/swfdec_as_function.c b/libswfdec/swfdec_as_function.c index dd91fcc..8928f68 100644 --- a/libswfdec/swfdec_as_function.c +++ b/libswfdec/swfdec_as_function.c @@ -83,8 +83,10 @@ swfdec_as_function_call (SwfdecAsFunctio SWFDEC_AS_VALUE_SET_UNDEFINED (return_value); klass = SWFDEC_AS_FUNCTION_GET_CLASS (function); g_assert (klass->call); - klass->call (function, thisp); + klass->call (function); frame = context->frame; + if (thisp) + swfdec_as_frame_set_this (frame, thisp); frame-...
2007 Sep 10
0
3 commits - libswfdec/swfdec_as_interpret.c libswfdec/swfdec_as_object.c libswfdec/swfdec_as_object.h
...(un)watch functions diff --git a/libswfdec/swfdec_as_object.c b/libswfdec/swfdec_as_object.c index 1fbf1d0..a331030 100644 --- a/libswfdec/swfdec_as_object.c +++ b/libswfdec/swfdec_as_object.c @@ -113,11 +113,14 @@ struct _SwfdecAsVariable { SwfdecAsValue value; /* value of property */ SwfdecAsFunction * get; /* getter set with swfdec_as_object_add_property */ SwfdecAsFunction * set; /* setter or %NULL */ - SwfdecAsFunction * watch; /* watcher or %NULL */ - SwfdecAsValue * watch_data; /* user data to watcher */ - gint8 watch_recurse; /* times the watch function has been called witho...
2007 Aug 17
0
Branch 'vivi' - 9 commits - libswfdec/swfdec_as_array.c libswfdec/swfdec_as_function.c libswfdec/swfdec_as_function.h libswfdec/swfdec_as_internal.h libswfdec/swfdec_as_interpret.c libswfdec/swfdec_as_native_function.c
...e first time. Especially all members are supposed to be set already. diff --git a/libswfdec/swfdec_as_function.c b/libswfdec/swfdec_as_function.c index 3e9b6dd..879ed9d 100644 --- a/libswfdec/swfdec_as_function.c +++ b/libswfdec/swfdec_as_function.c @@ -67,40 +67,31 @@ swfdec_as_function_init (SwfdecAsFunctio } /** - * swfdec_as_function_create: - * @context: a #SwfdecAsFunction - * @type: the type of function to create - * @size: size of @type + * swfdec_as_function_set_constructor: + * @fun: a #SwfdecAsFunction * - * Creates a new function. The function will be of @type. It will be added to -...
2007 Jul 26
0
5 commits - doc/Makefile.am doc/swfdec-sections.txt libswfdec/Makefile.am libswfdec/swfdec_as_object.c libswfdec/swfdec_as_object.h libswfdec/swfdec_initialize.as libswfdec/swfdec_initialize.h libswfdec/swfdec_player_as.c
...e "swfdec_interval.h" +/* FIXME: to avoid duplicate definitions */ +#undef SWFDEC_AS_NATIVE +#define SWFDEC_AS_NATIVE(x, y, func) /*** INTERVALS ***/ @@ -90,29 +95,80 @@ swfdec_player_clearInterval (SwfdecAsCon swfdec_interval_remove (player, id); } +/*** VARIOUS ***/ + +static SwfdecAsFunction * +swfdec_get_asnative (SwfdecAsContext *cx, guint x, guint y) +{ + guint i; + + for (i = 0; native_funcs[i].func != NULL; i++) { + if (native_funcs[i].x == x && native_funcs[i].y == y) { + return swfdec_as_native_function_new (cx, native_funcs[i].name, + native_funcs[i].func...
2007 May 22
0
Branch 'as' - 9 commits - libswfdec/swfdec_as_frame.c libswfdec/swfdec_as_function.c libswfdec/swfdec_as_function.h libswfdec/swfdec_as_interpret.c libswfdec/swfdec_as_native_function.c libswfdec/swfdec_as_object.c libswfdec/swfdec_as_script_function.c
...er.c @@ -29,11 +29,32 @@ #include "swfdec_as_function.h" #include "swfdec_debug.h" -G_DEFINE_TYPE (SwfdecAsSuper, swfdec_as_super, SWFDEC_TYPE_AS_OBJECT) +G_DEFINE_TYPE (SwfdecAsSuper, swfdec_as_super, SWFDEC_TYPE_AS_FUNCTION) + +static SwfdecAsFrame * +swfdec_as_super_call (SwfdecAsFunction *function) +{ + SwfdecAsSuper *super = SWFDEC_AS_SUPER (function); + SwfdecAsFunctionClass *klass; + SwfdecAsFrame *frame; + + if (super->constructor == NULL) { + SWFDEC_FIXME ("figure out what happens when super doesn't have a constructor"); + return NULL; + } + kla...
2007 Mar 29
0
Branch 'as' - 9 commits - libswfdec-gtk/swfdec_playback_alsa.c libswfdec/js libswfdec/Makefile.am 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
...1301 USA + */ + +#ifdef HAVE_CONFIG_H +#include "config.h" +#endif + +#include "swfdec_as_function.h" +#include "swfdec_as_context.h" +#include "swfdec_as_frame.h" +#include "swfdec_as_stack.h" +#include "swfdec_debug.h" + +G_DEFINE_TYPE (SwfdecAsFunction, swfdec_as_function, SWFDEC_TYPE_AS_OBJECT) + +static void +swfdec_as_function_dispose (GObject *object) +{ + SwfdecAsFunction *function = SWFDEC_AS_FUNCTION (object); + + if (function->script) { + swfdec_script_unref (function->script); + function->script = NULL; + } + + G_OB...
2007 Oct 23
0
6 commits - libswfdec/swfdec_as_frame.c libswfdec/swfdec_as_internal.h libswfdec/swfdec_as_interpret.c libswfdec/swfdec_as_interpret.h libswfdec/swfdec_as_object.c libswfdec/swfdec_as_script_function.c libswfdec/swfdec_flash_security.c
...SwfdecAsObject *object, SwfdecScript *script) g_object_unref (sec); } +void +swfdec_as_object_call_with_security (SwfdecAsObject *object, SwfdecSecurity *sec, + const char *name, guint argc, SwfdecAsValue *argv, SwfdecAsValue *return_value) +{ + static SwfdecAsValue tmp; /* ignored */ + SwfdecAsFunction *fun; + + g_return_if_fail (SWFDEC_IS_AS_OBJECT (object)); + g_return_if_fail (SWFDEC_IS_SECURITY (sec)); + g_return_if_fail (name != NULL); + g_return_if_fail (argc == 0 || argv != NULL); + g_return_if_fail (argc == 0 || argv != NULL); + + if (return_value) + SWFDEC_AS_VALUE_SET_UNDEFI...
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
...action_trace (SwfdecAsContext *cx /* stack looks like this: [ function, this, arg1, arg2, ... ] */ /* stack must be at least 2 elements big */ static gboolean -swfdec_action_call (SwfdecAsContext *cx, guint n_args) +swfdec_action_call (SwfdecAsContext *cx, guint n_args, gboolean use_super) { SwfdecAsFunction *fun; SwfdecAsObject *thisp; @@ -591,6 +592,13 @@ swfdec_action_call (SwfdecAsContext *cx, swfdec_as_stack_pop_n (frame->stack, n_args); swfdec_as_function_call (fun, thisp, n_args, swfdec_as_stack_peek (frame->stack, 0), swfdec_as_stack_peek (frame->stack, 1)); + if...
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
...s_to_string (cx, fp->sp[-1]); - if (s == NULL) - return JS_FALSE; - if (!JS_ValueToECMAUint32 (cx, fp->sp[-3], &n_args)) - return JS_FALSE; - - if (!JS_ValueToObject (cx, fp->sp[-2], &object)) - return JS_FALSE; - if (object == NULL) + SwfdecAsValue *constructor; + SwfdecAsFunction *fun; + guint n_args; + const char *name; + + swfdec_as_stack_ensure_size (cx->frame->stack, 3); + name = swfdec_as_value_to_string (cx, swfdec_as_stack_pop (cx->frame->stack)); + + constructor = swfdec_as_stack_pop (cx->frame->stack); + n_args = swfdec_as_value_to_intege...
2007 Nov 15
0
4 commits - libswfdec/swfdec_asbroadcaster.c libswfdec/swfdec_as_frame.c libswfdec/swfdec_as_frame_internal.h libswfdec/swfdec_as_function.c libswfdec/swfdec_as_interpret.c test/trace
...nternal.h b/libswfdec/swfdec_as_frame_internal.h index 44a87af..d50a9ce 100644 --- a/libswfdec/swfdec_as_frame_internal.h +++ b/libswfdec/swfdec_as_frame_internal.h @@ -33,7 +33,6 @@ struct _SwfdecAsFrame { SwfdecAsFrame * next; /* next frame (FIXME: keep a list in the context instead?) */ SwfdecAsFunction * function; /* function we're executing or NULL if toplevel */ - gboolean caller; /* this function can be used as arguments.caller */ SwfdecAsObject * thisp; /* this object in current frame or NULL if none */ SwfdecAsObject * super; /* super object in current frame or NULL if none...
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
...t;</informalexample> + **/ void -swfdec_as_object_call (SwfdecAsObject *object, const char *name, guint argc, SwfdecAsValue *argv) +swfdec_as_object_call (SwfdecAsObject *object, const char *name, guint argc, + SwfdecAsValue *argv, SwfdecAsValue *return_value) { + SwfdecAsValue tmp; + SwfdecAsFunction *fun; + g_return_if_fail (SWFDEC_IS_AS_OBJECT (object)); g_return_if_fail (name != NULL); g_return_if_fail (argc == 0 || argv != NULL); + + if (return_value) + SWFDEC_AS_VALUE_SET_UNDEFINED (return_value); + swfdec_as_object_get (object, name, &tmp); + if (!SWFDEC_AS_VALUE_IS_...
2007 Nov 14
0
2 commits - libswfdec/swfdec_as_array.c libswfdec/swfdec_asbroadcaster.c libswfdec/swfdec_as_object.c libswfdec/swfdec_as_string.c libswfdec/swfdec_color_as.c libswfdec/swfdec_initialize.as
...t argc, SwfdecAsObject *object_new; SwfdecAsArray *array_new; + if (object == NULL) + return; + length = swfdec_as_array_length (object); if (argc > 0) { @@ -1260,6 +1290,9 @@ swfdec_as_array_sort (SwfdecAsContext *cx, SwfdecAsObject *object, guint argc, gint32 options; SwfdecAsFunction *custom_compare_func; + if (object == NULL) + return; + pos = 0; if (argc > 0 && !SWFDEC_AS_VALUE_IS_NUMBER (&argv[0])) { SwfdecAsFunction *fun; @@ -1290,6 +1323,9 @@ swfdec_as_array_sortOn (SwfdecAsContext *cx, SwfdecAsObject *object, guint argc, const char **...
2007 May 17
0
Branch 'as' - 8 commits - libswfdec/.gitignore libswfdec/swfdec_as_frame.c libswfdec/swfdec_as_function.c libswfdec/swfdec_as_object.h libswfdec/swfdec_movie.c libswfdec/swfdec_sprite_movie_as.c
...-defined function have an implicit prototype property diff --git a/libswfdec/swfdec_as_function.c b/libswfdec/swfdec_as_function.c index 9256b31..c6a7c92 100644 --- a/libswfdec/swfdec_as_function.c +++ b/libswfdec/swfdec_as_function.c @@ -100,13 +100,22 @@ swfdec_as_function_do_create (SwfdecAsCo SwfdecAsFunction * swfdec_as_function_new (SwfdecAsScope *scope) { + SwfdecAsValue val; SwfdecAsFunction *fun; + SwfdecAsObject *proto; g_return_val_if_fail (SWFDEC_IS_AS_SCOPE (scope), NULL); fun = swfdec_as_function_do_create (SWFDEC_AS_OBJECT (scope)->context); if (fun == NULL) ret...
2008 Jun 02
4
[Bug 16206] New: Charts in Yahoo Finance crash swfdec
http://bugs.freedesktop.org/show_bug.cgi?id=16206 Summary: Charts in Yahoo Finance crash swfdec Product: swfdec Version: git Platform: Other URL: http://finance.yahoo.com/echarts?s=%5EDJI#symbol=%5EDJI; range=1d OS/Version: All Status: NEW Severity: critical Priority: medium
2007 Jul 21
0
12 commits - configure.ac doc/Makefile.am doc/swfdec-sections.txt libswfdec/jpeg libswfdec/swfdec_as_array.c libswfdec/swfdec_as_object.c libswfdec/swfdec_as_strings.c libswfdec/swfdec_player.c libswfdec/swfdec_player.h libswfdec/swfdec_player_internal.h
...>context); } } else { var->value = *val; @@ -912,6 +925,43 @@ swfdec_as_object_set_constructor (Swfdec /*** AS CODE ***/ static void +swfdec_as_object_addProperty (SwfdecAsContext *cx, SwfdecAsObject *object, + guint argc, SwfdecAsValue *argv, SwfdecAsValue *retval) +{ + SwfdecAsFunction *get, *set; + SwfdecAsVariable *var; + const char *name; + + SWFDEC_AS_VALUE_SET_BOOLEAN (retval, FALSE); + if (argc < 3) + return; + name = swfdec_as_value_to_string (cx, &argv[0]); + if (!SWFDEC_AS_VALUE_IS_OBJECT (&argv[1]) || + !SWFDEC_IS_AS_FUNCTION ((get = (SwfdecA...