Displaying 20 results from an estimated 25 matches for "definefunct".
Did you mean:
define_func1
2007 Oct 10
0
4 commits - libswfdec/Makefile.am libswfdec/swfdec_initialize.as libswfdec/swfdec_initialize.h m4/gtk-doc.m4 Makefile.am test/trace
...Makefile.am | 2
libswfdec/swfdec_initialize.as | 2
libswfdec/swfdec_initialize.h | 426 +++++++++++++--------------
m4/gtk-doc.m4 | 39 ++
test/trace/Makefile.am | 9
test/trace/definefunction-target-5.swf |binary
test/trace/definefunction-target-5.swf.trace | 2
test/trace/definefunction-target-6.swf |binary
test/trace/definefunction-target-6.swf.trace | 3
test/trace/definefunction-target-7.swf |binary
test/trace/definefunction-target-7.swf.trace | 3...
2007 Feb 08
0
3 commits - libswfdec/swfdec_loader.c libswfdec/swfdec_script.c libswfdec/swfdec_video.c
...;format);
+ return SWFDEC_STATUS_OK;
+ }
}
return SWFDEC_STATUS_OK;
}
diff-tree f95a7844826c8edf6e0d9edda090cf89d72b9d7f (from 998ea3e494c4d6f2d798085b3df1e4da07b18a68)
Author: Benjamin Otte <otte@gnome.org>
Date: Thu Feb 8 12:16:23 2007 +0100
fix potential segfault when DefineFunction is called inside DefineFunction
the problem is that constant pools may refer to the outermost function which the
old code asserted would not be possible.
diff --git a/libswfdec/swfdec_script.c b/libswfdec/swfdec_script.c
index c416f64..74b9934 100644
--- a/libswfdec/swfdec_script.c...
2007 Jun 08
0
Changes to 'refs/tags/0.4.2'
...reedesktop.org/git/swfdec
add swfedit binary to gitignore
Merge branch 'master' into interpreter
catch a case where fun->script is accessed unconditionally
check !JSVAL_IS_NULL in all JSVAL_IS_OBJECT checks
fix SwfdecScript reference handling
implement DefineFunction
return "[type Function]" from function.toString()
create a call object for calls to SWF code
implement CallFunction, BitRShift, BitLShift and BitURShift
add 2 tests for DefineFunction
add swfdec_movie_get_path
implement NextFrame, PreviousFrame, ToIn...
2007 Jan 31
0
Branch 'interpreter' - 3 commits - libswfdec/js libswfdec/swfdec_script.c
...ift } },
[0x65] = { "BitURShift", NULL, 2, 1, { NULL, NULL, swfdec_action_shift, swfdec_action_shift, swfdec_action_shift } },
@@ -1994,8 +2071,11 @@ swfdec_script_interpret (SwfdecScript *s
while (TRUE) {
/* check pc */
- if (pc == endpc) /* needed for scripts created via DefineFunction */
+ if (pc == endpc) {
+ /* scripts created via DefineFunction or the Return action use this way out */
+ *rval = fp->rval;
break;
+ }
if (pc < startpc || pc >= endpc) {
SWFDEC_ERROR ("pc %p not in valid range [%p, %p) anymore", pc, startpc,...
2007 Apr 27
0
Changes to 'refs/tags/0.4.3'
...reedesktop.org/git/swfdec
add swfedit binary to gitignore
Merge branch 'master' into interpreter
catch a case where fun->script is accessed unconditionally
check !JSVAL_IS_NULL in all JSVAL_IS_OBJECT checks
fix SwfdecScript reference handling
implement DefineFunction
return "[type Function]" from function.toString()
create a call object for calls to SWF code
implement CallFunction, BitRShift, BitLShift and BitURShift
add 2 tests for DefineFunction
add swfdec_movie_get_path
implement NextFrame, PreviousFrame, ToIn...
2007 Apr 04
0
Branch 'as' - 9 commits - 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_stack.c libswfdec/swfdec_as_stack.h
...ion_get_url2, swfdec_action_get_url2 } },
/* version 5 */
diff-tree 0bcc77dc0490f598b6cb499df78cd4bbbf403b69 (from 3f4a7c0d79bf74c1c615b94bdc8e0b7cc5d0d311)
Author: Benjamin Otte <otte@gnome.org>
Date: Wed Apr 4 16:23:18 2007 +0200
keep the buffer of the constant pool around in case DefineFunction wants it
diff --git a/libswfdec/swfdec_as_frame.c b/libswfdec/swfdec_as_frame.c
index ca2d201..4614f7c 100644
--- a/libswfdec/swfdec_as_frame.c
+++ b/libswfdec/swfdec_as_frame.c
@@ -36,6 +36,14 @@ swfdec_as_frame_dispose (GObject *object
g_slice_free1 (sizeof (SwfdecAsValue) * frame->n_re...
2007 Apr 27
0
Changes to 'refs/tags/0.4.4'
...reedesktop.org/git/swfdec
add swfedit binary to gitignore
Merge branch 'master' into interpreter
catch a case where fun->script is accessed unconditionally
check !JSVAL_IS_NULL in all JSVAL_IS_OBJECT checks
fix SwfdecScript reference handling
implement DefineFunction
return "[type Function]" from function.toString()
create a call object for calls to SWF code
implement CallFunction, BitRShift, BitLShift and BitURShift
add 2 tests for DefineFunction
add swfdec_movie_get_path
implement NextFrame, PreviousFrame, ToIn...
2007 Oct 12
0
Changes to 'refs/tags/0.5.3'
...with an empty frame
Merge branch 'master' of ssh://company at git.freedesktop.org/git/swfdec/swfdec
only assign ints as ints
use the original target as target of defined functions
don't set the target of functions defined in the init scripts
add a test for DefineFunction targets
install swfdec_rectangle.h
setTarget null does not reset the target
readd gtk-doc.m4
typo
make new drawn stuff appear above old stuff, not below it
Merge branch 'master' of ssh://company at git.freedesktop.org/git/swfdec/swfdec
fix z-orde...
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
...te_action (gconstpointer bytecode, guint action, const guint8 *data, guint len, gpointer scriptp)
+{
+ // TODO: get rid of this function
+ return TRUE;
+}
+
/*** PUBLIC API ***/
gboolean
@@ -230,9 +237,16 @@ swfdec_script_new_from_bits (SwfdecBits *bits, const char *name, guint version)
* DefineFunction and friends override this */
script->flags = SWFDEC_SCRIPT_SUPPRESS_ARGS;
- buffer = swfdec_bits_get_buffer (&org, -1);
- if (buffer == NULL)
+ if (!swfdec_script_foreach_internal (bits, validate_action, script)) {
+ swfdec_script_unref (script);
+ return NULL;
+ }
+ len -...
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
...ex 0000000..fd3c81a
--- /dev/null
+++ b/test/trace/scope2.swf.trace
@@ -0,0 +1,2 @@
+5
+5
diff-tree 4f71cc6f5f14bcc3c69cff4c0c9dca27b7f476fe (from aabc4fdacdad8392d185467be20a858d2bff1cad)
Author: Benjamin Otte <otte@gnome.org>
Date: Fri Feb 16 21:11:56 2007 +0100
use this as parent in DefineFunction
diff --git a/libswfdec/swfdec_script.c b/libswfdec/swfdec_script.c
index 95a5561..9a9dd75 100644
--- a/libswfdec/swfdec_script.c
+++ b/libswfdec/swfdec_script.c
@@ -1439,10 +1439,10 @@ swfdec_action_do_define_function (JSCont
n_args = swfdec_bits_get_u16 (&bits);
if (*function_name ==...
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
...nder (SwfdecMovie * movie,
cairo_t * cr,
const SwfdecColorTransform *trans,
diff-tree 75e9e227691415642b037d6be0ff7c2ccc90772c (from ae5cb38d44ea9dabd46c38fd5231ef3afcfd86ac)
Author: Benjamin Otte <otte@gnome.org>
Date: Wed Jan 31 10:32:33 2007 +0100
add 2 tests for DefineFunction
diff --git a/test/trace/Makefile.am b/test/trace/Makefile.am
index 635e098..443cba2 100644
--- a/test/trace/Makefile.am
+++ b/test/trace/Makefile.am
@@ -42,6 +42,10 @@ EXTRA_DIST = \
currentframe.swf.trace \
double.swf \
double.swf.trace \
+ function1.swf \
+ function1.swf.trace \
+ funct...
2007 Nov 22
0
5 commits - libswfdec/swfdec_as_interpret.c libswfdec/swfdec_bits.c libswfdec/swfdec_bits.h libswfdec/swfdec_debugger.c libswfdec/swfdec_movie.c libswfdec/swfdec_script.c libswfdec/swfdec_sprite_movie.c libswfdec/swfdec_tag.c libswfdec/swfdec_text_field.c
...s_get_string_with_version (&bits, cx->version);
+ swfdec_bits_get_string (&bits, cx->version);
}
if (swfdec_bits_left (&bits)) {
@@ -2855,7 +2855,7 @@ swfdec_action_print_define_function (guint action, const guint8 *data, guint len
string = g_string_new (v2 ? "DefineFunction2 " : "DefineFunction ");
swfdec_bits_init_data (&bits, data, len);
/* FIXME: version! */
- function_name = swfdec_bits_get_string_with_version (&bits, 7);
+ function_name = swfdec_bits_get_string (&bits, 7);
if (function_name == NULL) {
SWFDEC_ERROR (&q...
2007 Feb 22
0
3 commits - libswfdec/swfdec_js.c libswfdec/swfdec_js_movie.c libswfdec/swfdec_script.c
...set_target (JSContext *
/* FIXME: this whole function stops working the moment it's used together
* with With */
- if (target == cx->fp->scopeChain)
- return JS_TRUE;
- if (target == cx->fp->thisp) {
- /* FIXME: will probably break once SetTarget is called inside DefineFunctions */
- cx->fp->scopeChain = cx->fp->thisp;
- return JS_TRUE;
- }
with = js_NewObject(cx, &js_WithClass, target, cx->fp->scopeChain);
if (!with)
return JS_FALSE;
@@ -1271,6 +1286,17 @@ swfdec_action_do_set_target (JSContext *
}
static JSBool
+swfdec_acti...
2007 Feb 17
0
8 commits - configure.ac doc/swfdec-sections.txt libswfdec/swfdec_loader.c libswfdec/swfdec_player.c libswfdec/swfdec_player.h libswfdec/swfdec_player_internal.h libswfdec/swfdec_root_movie.c libswfdec/swfdec_scriptable.c libswfdec/swfdec_scriptable.h
...url2, swfdec_action_get_url2, swfdec_action_get_url2, swfdec_action_get_url2 } },
+ [0x9a] = { "GetURL2", swfdec_action_print_get_url2, 2, 0, { NULL, swfdec_action_get_url2, swfdec_action_get_url2, swfdec_action_get_url2, swfdec_action_get_url2 } },
/* version 5 */
[0x9b] = { "DefineFunction", swfdec_action_print_define_function, 0, -1, { NULL, NULL, swfdec_action_define_function, swfdec_action_define_function, swfdec_action_define_function } },
/* version 4 */
diff-tree 826758e8e3b45a7dd7f55d5e7891659da30d4daf (from d33393b8767f81772dee644af8bc7143e766e4bb)
Author: Benjamin...
2007 Apr 17
0
15 commits - libswfdec/jpeg libswfdec/swfdec_bits.c libswfdec/swfdec_edittext.c libswfdec/swfdec_font.c libswfdec/swfdec_image.c libswfdec/swfdec_root_sprite.c libswfdec/swfdec_script.c libswfdec/swfdec_shape.c libswfdec/swfdec_sprite.c
...s (bits);
- start = bits->ptr;
+ org = *bits;
+ len = swfdec_bits_left (bits) / 8;
script = g_new0 (SwfdecScript, 1);
script->refcount = 1;
script->name = g_strdup (name ? name : "Unnamed script");
@@ -2750,15 +2751,12 @@ swfdec_script_new (SwfdecBits *bits, con
* DefineFunction and friends override this */
script->flags = SWFDEC_SCRIPT_SUPPRESS_ARGS;
- if (!swfdec_script_foreach_internal (bits, validate_action, script)) {
- /* assign a random buffer here so we have something to unref */
- script->buffer = bits->buffer;
- swfdec_buffer_ref (scrip...
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
...ts, buffer);
+ if (*function_name) {
+ name = function_name;
+ } else if (cx->fp->sp > cx->fp->spbase) {
+ /* This is kind of a hack that uses a feature of the Adobe compiler:
+ * foo = function () {} is compiled as these actions:
+ * Push "foo", DefineFunction, SetVariable/SetMember
+ * With this knowledge we can inspect the topmost stack member, since
+ * it will contain the name this function will soon be assigned to.
+ */
+ if (JSVAL_IS_STRING (cx->fp->sp[-1]))
+ name = JS_GetStringBytes (JSVAL_TO_STRING (cx->fp->...
2007 Apr 17
0
Branch 'as' - 17 commits - libswfdec/jpeg libswfdec/swfdec_bits.c libswfdec/swfdec_font.c libswfdec/swfdec_image.c libswfdec/swfdec_root_sprite.c libswfdec/swfdec_script.c libswfdec/swfdec_shape.c libswfdec/swfdec_sound.c libswfdec/swfdec_sprite.c
...s (bits);
- start = bits->ptr;
+ org = *bits;
+ len = swfdec_bits_left (bits) / 8;
script = g_new0 (SwfdecScript, 1);
script->refcount = 1;
script->name = g_strdup (name ? name : "Unnamed script");
@@ -2750,15 +2751,12 @@ swfdec_script_new (SwfdecBits *bits, con
* DefineFunction and friends override this */
script->flags = SWFDEC_SCRIPT_SUPPRESS_ARGS;
- if (!swfdec_script_foreach_internal (bits, validate_action, script)) {
- /* assign a random buffer here so we have something to unref */
- script->buffer = bits->buffer;
- swfdec_buffer_ref (scrip...
2007 Feb 01
0
Branch 'interpreter' - 9 commits - libswfdec/js libswfdec/swfdec_script.c libswfdec/swfdec_script.h player/swfdec_debug_stack.c test/trace
...L);
gtk_tree_view_column_set_sort_column_id (column, COLUMN_CONTENT);
diff-tree 320efb52606b8b376880b9c3bc222a1f9810896a (from ae64862c94f18618313c90c28b4071d84693b7b5)
Author: Benjamin Otte <otte@gnome.org>
Date: Wed Jan 31 23:33:40 2007 +0100
implement ConstantPool inheritance for DefineFunction
diff --git a/libswfdec/swfdec_script.c b/libswfdec/swfdec_script.c
index 46ba618..85e6f7c 100644
--- a/libswfdec/swfdec_script.c
+++ b/libswfdec/swfdec_script.c
@@ -97,6 +97,26 @@ swfdec_constant_pool_free (SwfdecConstan
g_ptr_array_free (pool, TRUE);
}
+/* FIXME: this is a bit hacky */
+...
2007 Mar 28
0
Branch 'as' - 3 commits - 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_object.c libswfdec/swfdec_as_object.h libswfdec/swfdec_as_types.c
...n
script->refcount = 1;
script->name = g_strdup (name ? name : "Unnamed script");
script->version = version;
+ /* by default, a function has 4 registers */
+ script->n_registers = 5;
/* These flags are the default arguments used by scripts read from a file.
* DefineFunction and friends override this */
script->flags = SWFDEC_SCRIPT_SUPPRESS_ARGS;
@@ -3102,7 +3114,7 @@ swfdec_script_execute (SwfdecScript *scr
frame.scopeChain = obj;
frame.varobj = obj;
/* allocate stack for variables */
- frame.nvars = 4;
+ frame.nvars = script->n_registers;
f...
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
...l },
- /* version 3 */
- { 0x8a, "WaitForFrame", compile_wait_for_frame },
- { 0x8b, "SetTarget", compile_set_target },
- { 0x8c, "GotoLabel", compile_goto_label },
- /* version 4 */
- { 0x8d, "WaitForFrame2", NULL },
- /* version 7 */
- { 0x8e, "DefineFunction2", NULL },
- { 0x8f, "Try", NULL },
- /* version 5 */
- { 0x94, "With", NULL },
- /* version 4 */
- { 0x96, "Push", compile_push },
- { 0x99, "Jump", compile_jump },
- { 0x9a, "GetURL2", NULL },
- /* version 5 */
- { 0x9b, "Def...