search for: n_arguments

Displaying 8 results from an estimated 8 matches for "n_arguments".

2007 Jul 30
0
10 commits - libswfdec/swfdec_as_frame.c libswfdec/swfdec_as_interpret.c libswfdec/swfdec_as_super.c libswfdec/swfdec_video_movie_as.c test/trace
...rguments (&iter, frame); cur != NULL; - cur = swfdec_as_stack_iterator_next (&iter)) { - swfdec_as_array_push (SWFDEC_AS_ARRAY (args), cur); + /* set and preload argument variables */ + cur = swfdec_as_stack_iterator_init_arguments (&iter, frame); + for (i = 0; i < script->n_arguments; i++) { + if (cur == NULL) + cur = &val; + /* set this value at the right place */ + if (script->arguments[i].preload) { + if (script->arguments[i].preload < frame->n_registers) { + frame->registers[script->arguments[i].preload] = *cur; + } else { + SWF...
2007 Aug 09
0
Branch 'vivi' - 12 commits - libswfdec-gtk/swfdec_gtk_player.c libswfdec-gtk/swfdec_gtk_player.h libswfdec/Makefile.am libswfdec/swfdec_as_array.h libswfdec/swfdec_as_context.c libswfdec/swfdec_as_context.h libswfdec/swfdec_as_debugger.c
...count; /* reference count */ - char * name; /* name identifying this script */ - guint version; /* version of the script */ - guint n_registers; /* number of registers */ - SwfdecBuffer * constant_pool; /* constant pool action */ - guint flags; /* SwfdecScriptFlags */ - guint n_arguments; /* number of arguments */ - SwfdecScriptArgument *arguments; /* arguments or NULL if none */ -}; - -struct _SwfdecScriptArgument { - char * name; /* name of the argument (not GC'ed) */ - guint preload; /* preload slot to preload to or 0 */ -}; - -const char * swfdec_action_get_nam...
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
...le (scope->next) scope = scope->next; - fun = swfdec_as_function_new (scope); + fun = swfdec_as_script_function_new (scope); } if (fun == NULL) return; @@ -1342,7 +1343,7 @@ swfdec_action_define_function (SwfdecAsC script->n_registers = n_registers; script->n_arguments = n_args; script->arguments = args; - fun->script = script; + SWFDEC_AS_SCRIPT_FUNCTION (fun)->script = script; swfdec_script_add_to_context (script, cx); /* attach the function */ if (*function_name == '\0') { diff --git a/libswfdec/swfdec_as_native_function.c b/libs...
2007 Jul 31
0
10 commits - doc/swfdec-docs.sgml doc/swfdec-sections.txt libswfdec-gtk/swfdec_gtk_loader.c libswfdec/Makefile.am libswfdec/swfdec_as_context.c libswfdec/swfdec_as_frame.c libswfdec/swfdec_buffer.c libswfdec/swfdec_debugger.c libswfdec/swfdec.h
...*context; SwfdecAsStackIterator iter; @@ -606,6 +606,7 @@ swfdec_as_frame_preload (SwfdecAsFrame * } /* set and preload argument variables */ + SWFDEC_AS_VALUE_SET_UNDEFINED (&val); cur = swfdec_as_stack_iterator_init_arguments (&iter, frame); for (i = 0; i < script->n_arguments; i++) { if (cur == NULL) diff-tree ca750ef4ead8812a0aeff906a2b48f54ad43cb37 (from c7fb0f56f3782d11b9f438043fbc070dae1947d5) Author: Benjamin Otte <otte at gnome.org> Date: Tue Jul 31 13:03:48 2007 +0200 move SwfdecLoader to use a SwfdecURL instead of a char * diff --git a/libswfd...
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
...on_new (scope, frame->target); - } - if (fun == NULL) - return; n_args = swfdec_bits_get_u16 (&bits); if (v2) { n_registers = swfdec_bits_get_u8 (&bits); @@ -1565,7 +1553,18 @@ swfdec_action_define_function (SwfdecAsC script->n_registers = n_registers; script->n_arguments = n_args; script->arguments = args; - SWFDEC_AS_SCRIPT_FUNCTION (fun)->script = script; + /* see function-scope tests */ + if (cx->version > 5) { + /* FIXME: or original target? */ + fun = swfdec_as_script_function_new (frame->scope ? frame->scope : SWFDEC_AS_SCOPE (fr...
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
...unction_debug (SwfdecAsObject *object) +{ + SwfdecAsScriptFunction *script = SWFDEC_AS_SCRIPT_FUNCTION (object); + SwfdecScript *s = script->script; + GString *string; + guint i; + + string = g_string_new (s->name); + g_string_append (string, " ("); + for (i = 0; i < s->n_arguments; i++) { + if (i > 0) + g_string_append (string, ", "); + g_string_append (string, s->arguments[i].name); + } + g_string_append (string, ")"); + + return g_string_free (string, FALSE); +} + static void swfdec_as_script_function_class_init (SwfdecAsScriptFunc...
2007 Aug 22
0
163 commits - autogen.sh configure.ac doc/swfdec-sections.txt libswfdec-gtk/swfdec_gtk_player.c libswfdec-gtk/swfdec_gtk_player.h libswfdec-gtk/swfdec_gtk_widget.c libswfdec-gtk/swfdec_source.c libswfdec/Makefile.am libswfdec/swfdec_as_array.c
...on_new (scope, frame->target); - } - if (fun == NULL) - return; n_args = swfdec_bits_get_u16 (&bits); if (v2) { n_registers = swfdec_bits_get_u8 (&bits); @@ -1565,7 +1553,18 @@ swfdec_action_define_function (SwfdecAsC script->n_registers = n_registers; script->n_arguments = n_args; script->arguments = args; - SWFDEC_AS_SCRIPT_FUNCTION (fun)->script = script; + /* see function-scope tests */ + if (cx->version > 5) { + /* FIXME: or original target? */ + fun = swfdec_as_script_function_new (frame->scope ? frame->scope : SWFDEC_AS_SCOPE (fr...
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
...- compile_state_add_code (state, command, 3); -} -#endif - -static void -push_uint16 (CompileState *state, unsigned int i) -{ - g_assert (i <= G_MAXUINT16); - SWFDEC_LOG ("pushing %u", i); - THREELINER_INT (state, JSOP_UINT16, i); -} - -static void -call (CompileState *state, guint n_arguments) -{ - THREELINER_INT (state, JSOP_CALL, n_arguments); -} - -static void -call_void_function (CompileState *state, const char *name) -{ - push_prop (state, name); - PUSH_OBJ (state); - call (state, 0); - POP (state); -} - -/* 13 bytes */ -#define DEBUG_TRACE(state) G_STMT_START { \ - ONELINER...