search for: swfdec_action_init_object

Displaying 16 results from an estimated 16 matches for "swfdec_action_init_object".

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 Mar 05
0
5 commits - libswfdec/swfdec_js.h libswfdec/swfdec_js_movie.c libswfdec/swfdec_script.c test/trace
...fdec_action_define_local2, swfdec_action_define_local2, swfdec_action_define_local2 } }, [0x42] = { "InitArray", NULL, -1, 1, { NULL, NULL, swfdec_action_init_array, swfdec_action_init_array, swfdec_action_init_array } }, [0x43] = { "InitObject", NULL, -1, 1, { NULL, NULL, swfdec_action_init_object, swfdec_action_init_object, swfdec_action_init_object } }, - [0x44] = { "Typeof", NULL }, + [0x44] = { "TypeOf", NULL, 1, 1, { NULL, NULL, swfdec_action_type_of, swfdec_action_type_of, swfdec_action_type_of } }, [0x45] = { "TargetPath", NULL, 1, 1, { NULL, NULL, s...
2007 May 23
0
Branch 'as' - 7 commits - libswfdec/Makefile.am libswfdec/swfdec_as_context.c libswfdec/swfdec_as_frame.c libswfdec/swfdec_as_frame.h libswfdec/swfdec_as_interpret.c libswfdec/swfdec_as_object.c libswfdec/swfdec_as_object.h libswfdec/swfdec_as_strings.c
...action diff --git a/libswfdec/swfdec_as_interpret.c b/libswfdec/swfdec_as_interpret.c index 63b53a6..f5503fb 100644 --- a/libswfdec/swfdec_as_interpret.c +++ b/libswfdec/swfdec_as_interpret.c @@ -1192,35 +1192,31 @@ fail: fp->sp[-1] = JSVAL_VOID; return JS_TRUE; } +#endif static void swfdec_action_init_object (SwfdecAsContext *cx, guint action, const guint8 *data, guint len) { - JSStackFrame *fp = cx->fp; - JSObject *object; - guint n_args; - gulong i; + SwfdecAsStack *stack = cx->frame->stack; + SwfdecAsObject *object; + guint i, n_args; - if (!JS_ValueToECMAUint32 (cx, fp->sp[-1...
2007 Jan 31
0
Branch 'interpreter' - 3 commits - libswfdec/js libswfdec/swfdec_script.c
...quot;DefineLocal2", NULL }, + [0x41] = { "DefineLocal2", NULL, 1, 0, { NULL, NULL, swfdec_action_define_local2, swfdec_action_define_local2, swfdec_action_define_local2 } }, [0x42] = { "InitArray", NULL }, [0x43] = { "InitObject", NULL, -1, 1, { NULL, NULL, swfdec_action_init_object, swfdec_action_init_object, swfdec_action_init_object } }, [0x44] = { "Typeof", NULL }, @@ -1731,9 +1808,9 @@ static const SwfdecActionSpec actions[25 [0x54] = { "InstanceOf", NULL }, [0x55] = { "Enumerate2", NULL }, /* version 5 */ - [0x60] = { "BitA...
2007 Apr 11
0
Branch 'as' - 4 commits - libswfdec/swfdec_as_interpret.c libswfdec/swfdec_as_types.c libswfdec/swfdec_as_types.h
...fdec_action_define_local2, swfdec_action_define_local2, swfdec_action_define_local2 } }, [0x42] = { "InitArray", NULL, -1, 1, { NULL, NULL, swfdec_action_init_array, swfdec_action_init_array, swfdec_action_init_array } }, [0x43] = { "InitObject", NULL, -1, 1, { NULL, NULL, swfdec_action_init_object, swfdec_action_init_object, swfdec_action_init_object } }, - [0x44] = { "TypeOf", NULL, 1, 1, { NULL, NULL, swfdec_action_type_of, swfdec_action_type_of, swfdec_action_type_of } }, +#endif + [SWFDEC_AS_ACTION_TYPE_OF] = { "TypeOf", NULL, 1, 1, { NULL, NULL, swfdec_action_type_...
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
...Author: Benjamin Otte <otte@gnome.org> Date: Sun Mar 4 19:35:17 2007 +0100 implement ActionInitArray diff --git a/libswfdec/swfdec_script.c b/libswfdec/swfdec_script.c index 6e75785..6a3e90c 100644 --- a/libswfdec/swfdec_script.c +++ b/libswfdec/swfdec_script.c @@ -1459,6 +1459,36 @@ swfdec_action_init_object (JSContext *cx } static JSBool +swfdec_action_init_array (JSContext *cx, guint action, const guint8 *data, guint len) +{ + JSStackFrame *fp = cx->fp; + JSObject *array; + int i, j; + guint n_items; + + if (!JS_ValueToECMAUint32 (cx, fp->sp[-1], &n_items)) + return JS_FALSE; +...
2007 Jan 29
0
Branch 'interpreter' - 18 commits - libswfdec/swfdec_image.c libswfdec/swfdec_image.h libswfdec/swfdec_js.c libswfdec/swfdec_js_color.c libswfdec/swfdec_js_sound.c libswfdec/swfdec_pattern.c libswfdec/swfdec_scriptable.c libswfdec/swfdec_script.c
...7 +0100 implement InitObject action all tests pass now diff --git a/libswfdec/swfdec_script.c b/libswfdec/swfdec_script.c index b1f1a63..64f0746 100644 --- a/libswfdec/swfdec_script.c +++ b/libswfdec/swfdec_script.c @@ -1105,6 +1105,35 @@ fail: return JS_TRUE; } +static JSBool +swfdec_action_init_object (JSContext *cx, guint action, const guint8 *data, guint len) +{ + JSStackFrame *fp = cx->fp; + JSObject *object; + guint i, n_args; + + if (!JS_ValueToECMAUint32 (cx, fp->sp[-1], &n_args)) + return JS_FALSE; + if ((guint) (fp->sp - fp->spbase) < 2 * n_args + 1) { + SWF...
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
..._local2, swfdec_action_define_local2 } }, - [SWFDEC_AS_ACTION_INIT_ARRAY] = { "InitArray", NULL, -1, 1, { NULL, NULL, swfdec_action_init_array, swfdec_action_init_array, swfdec_action_init_array } }, - [SWFDEC_AS_ACTION_INIT_OBJECT] = { "InitObject", NULL, -1, 1, { NULL, NULL, swfdec_action_init_object, swfdec_action_init_object, swfdec_action_init_object } }, - [SWFDEC_AS_ACTION_TYPE_OF] = { "TypeOf", NULL, 1, 1, { NULL, NULL, swfdec_action_type_of, swfdec_action_type_of, swfdec_action_type_of } }, - [SWFDEC_AS_ACTION_TARGET_PATH] = { "TargetPath", NULL, 1, 1, { NULL, NULL,...
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
...c_action_create (fun, n_args); + return; fail: - fp->sp -= 2 + n_args; - fp->sp[-1] = JSVAL_VOID; - return JS_TRUE; + swfdec_as_stack_pop_n (cx->frame->stack, n_args); + SWFDEC_AS_VALUE_SET_UNDEFINED (swfdec_as_stack_peek (cx->frame->stack, 1)); } -#endif static void swfdec_action_init_object (SwfdecAsContext *cx, guint action, const guint8 *data, guint len) @@ -2275,10 +2265,8 @@ const SwfdecActionSpec swfdec_as_actions [SWFDEC_AS_ACTION_INCREMENT] = { "Increment", NULL, 1, 1, { NULL, NULL, swfdec_action_increment, swfdec_action_increment, swfdec_action_increment } }, [...
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
...0, { NULL, swfdec_action_set_property, swfdec_action_set_property, swfdec_action_set_property, swfdec_action_set_property } }, @@ -1532,7 +1693,7 @@ static const SwfdecActionSpec actions[25 [0x42] = { "InitArray", NULL }, [0x43] = { "InitObject", NULL, -1, 1, { NULL, NULL, swfdec_action_init_object, swfdec_action_init_object, swfdec_action_init_object } }, [0x44] = { "Typeof", NULL }, - [0x45] = { "TargetPath", NULL }, + [0x45] = { "TargetPath", NULL, 1, 1, { NULL, NULL, swfdec_action_target_path, swfdec_action_target_path, swfdec_action_target_path } },...
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[-2] = OBJECT_TO_JSVAL (object); + if (!swfdec_action_call (cx, n_args, JSINVOKE_CONSTRUCT)) + return JS_FALSE; + fp->sp[-1] = OBJECT_TO_JSVAL (object); + return JS_TRUE; + +fail: + fp->sp -= 2 + n_args; + fp->sp[-1] = JSVAL_VOID; + return JS_TRUE; +} + +static void +swfdec_action_init_object (SwfdecAsContext *cx, guint action, const guint8 *data, guint len) +{ + JSStackFrame *fp = cx->fp; + JSObject *object; + guint n_args; + gulong i; + + if (!JS_ValueToECMAUint32 (cx, fp->sp[-1], &n_args)) + return JS_FALSE; + if (!swfdec_script_ensure_stack (cx, 2 * n_args + 1)) +...
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
...efineFunction2 really work (it used to not work before) - allocate 4 local variables in swfdec_script_interpret diff --git a/libswfdec/swfdec_script.c b/libswfdec/swfdec_script.c index dc8b2a5..95a5561 100644 --- a/libswfdec/swfdec_script.c +++ b/libswfdec/swfdec_script.c @@ -1418,7 +1418,8 @@ swfdec_action_init_object (JSContext *cx } static JSBool -swfdec_action_define_function (JSContext *cx, guint action, const guint8 *data, guint len) +swfdec_action_do_define_function (JSContext *cx, guint action, + const guint8 *data, guint len, gboolean v2) { const char *function_name; guint i, n_args, size;...
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
...quot;DefineLocal2", NULL }, + [0x41] = { "DefineLocal2", NULL, 1, 0, { NULL, NULL, swfdec_action_define_local2, swfdec_action_define_local2, swfdec_action_define_local2 } }, [0x42] = { "InitArray", NULL }, [0x43] = { "InitObject", NULL, -1, 1, { NULL, NULL, swfdec_action_init_object, swfdec_action_init_object, swfdec_action_init_object } }, [0x44] = { "Typeof", NULL }, @@ -1731,9 +1808,9 @@ static const SwfdecActionSpec actions[25 [0x54] = { "InstanceOf", NULL }, [0x55] = { "Enumerate2", NULL }, /* version 5 */ - [0x60] = { "BitA...
2007 Apr 27
0
Changes to 'refs/tags/0.4.3'
...allow --disable-ffmpeg and --disable-mad configure options (#10333, Mikel Olasagasti) Merge branch 'master' of ssh://company@git.freedesktop.org/git/swfdec make Spidermonkey 64bit clean make this code use unsigned variables so array indexes get 64bit clean fix swfdec_action_init_object indexing pointer arrays with overflowing uints instead of ulongs fix printf arguments to be 64bit clean performance: don't create ARGB surfaces for video implement NetStream::pause add GLOBAL_CFLAGS to tests, too - they should get -Wall, too return a const componen...
2007 Mar 09
0
17 commits - libswfdec/js libswfdec/swfdec_js.c libswfdec/swfdec_js_global.c libswfdec/swfdec_js.h libswfdec/swfdec_js_movie.c libswfdec/swfdec_movie.c libswfdec/swfdec_player.c libswfdec/swfdec_player_internal.h libswfdec/swfdec_root_movie.c
...(!JS_ValueToECMAUint32 (cx, fp->sp[-3], &n_args)) return JS_FALSE; - if (n_args + 3 > (guint) (fp->sp - fp->spbase)) + if (!swfdec_script_ensure_stack (cx, n_args + 3)) return JS_FALSE; if (!JS_ValueToObject (cx, fp->sp[-2], &object)) @@ -1489,10 +1525,8 @@ swfdec_action_init_object (JSContext *cx if (!JS_ValueToECMAUint32 (cx, fp->sp[-1], &n_args)) return JS_FALSE; - if ((guint) (fp->sp - fp->spbase) < 2 * n_args + 1) { - SWFDEC_ERROR ("not enough stack space"); + if (!swfdec_script_ensure_stack (cx, 2 * n_args + 1)) return JS_FAL...
2007 Apr 27
0
Changes to 'refs/tags/0.4.4'
...allow --disable-ffmpeg and --disable-mad configure options (#10333, Mikel Olasagasti) Merge branch 'master' of ssh://company@git.freedesktop.org/git/swfdec make Spidermonkey 64bit clean make this code use unsigned variables so array indexes get 64bit clean fix swfdec_action_init_object indexing pointer arrays with overflowing uints instead of ulongs fix printf arguments to be 64bit clean performance: don't create ARGB surfaces for video implement NetStream::pause add GLOBAL_CFLAGS to tests, too - they should get -Wall, too return a const componen...