search for: var_object

Displaying 15 results from an estimated 15 matches for "var_object".

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
...bject diff --git a/libswfdec/swfdec_as_frame.c b/libswfdec/swfdec_as_frame.c index 23b3c41..75e0534 100644 --- a/libswfdec/swfdec_as_frame.c +++ b/libswfdec/swfdec_as_frame.c @@ -68,7 +68,8 @@ swfdec_as_frame_mark (SwfdecAsObject *ob if (frame->script) { swfdec_as_object_mark (frame->var_object); } - swfdec_as_object_mark (frame->thisp); + if (frame->thisp) + swfdec_as_object_mark (frame->thisp); if (frame->target) swfdec_as_object_mark (frame->target); if (frame->function) @@ -76,7 +77,6 @@ swfdec_as_frame_mark (SwfdecAsObject *ob for (i = 0; i &lt...
2007 Jun 27
0
Branch 'as' - 16 commits - configure.ac libswfdec/Makefile.am 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_script_function.c
...includes a rework of the target management. Every frame now contains a ->target member that is always set to the current target. It also has an ->original_target member that remembers the original target, so a SetTarget call can correctly reset it. The previous notion of ->var_object has been removed. An ->is_local property has been added. This porperty is used during DefineLocal actions to decide wether to set proeprties on the current frame or on the target. (FIXME: needs checking that those variables really are set on the target) diff --git a/libswfd...
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
...)->dispose (object); +} + +static void +swfdec_as_frame_mark (SwfdecAsObject *object) +{ + SwfdecAsFrame *frame = SWFDEC_AS_FRAME (object); + guint i; + + swfdec_as_object_mark (SWFDEC_AS_OBJECT (frame->next)); + swfdec_as_object_mark (frame->scope); + swfdec_as_object_mark (frame->var_object); + for (i = 0; i < frame->n_registers; i++) { + swfdec_as_value_mark (&frame->registers[i]); + } + SWFDEC_AS_OBJECT_CLASS (swfdec_as_frame_parent_class)->mark (object); +} + +static void +swfdec_as_frame_class_init (SwfdecAsFrameClass *klass) +{ + GObjectClass *object_class...
2007 Apr 05
0
Branch 'as' - 9 commits - configure.ac libswfdec/swfdec_as_context.c libswfdec/swfdec_as_frame.c libswfdec/swfdec_as_frame.h libswfdec/swfdec_as_function.h libswfdec/swfdec_as_interpret.c libswfdec/swfdec_as_object.c libswfdec/swfdec_as_object.h
...sion > 4 ? 21 : 18)) { + SWFDEC_WARNING ("trying to SetProperty %u, not allowed", id); + goto out; + } + val = swfdec_as_stack_peek (cx->frame->stack, 2); + swfdec_as_interpret_eval (cx, NULL, val); + if (SWFDEC_AS_VALUE_IS_UNDEFINED (val)) { + obj = cx->frame->var_object; + } else if (SWFDEC_AS_VALUE_IS_OBJECT (val)) { + obj = SWFDEC_AS_VALUE_GET_OBJECT (val); + } else { + SWFDEC_WARNING ("not an object, can't get SetProperty"); + goto out; + } + swfdec_as_object_set (obj, SWFDEC_AS_STR_CONSTANT (CONSTANT_INDEX + id), + swfdec_as_sta...
2007 Jun 23
1
Patches to make blocky.swf playable
So here is the patch series to make blocky.swf work with branch 'as'. Summary: Nguy?n Th?i Ng?c Duy (7): Add a missing else statement Create swfdec_movie_duplicate Implement action CloneSprite with swfdec_movie_duplicate Add action RemoveSprite Add new variables to the target Remove movies with the same name when adding new movie We don't
2007 Jun 10
1
variable scope
...ething. When on(release) is run, it cannot find border[XY]current and hence fail to run properly. I did a stupid hack in swfdec_as_context_eval_set_property. It checked for border[XY]start. If it was the case then set variable in cx->global (which i suspected global scope), not cx->frame->var_object. It worked. So I think swfdec_as_context_eval_set_property needs to be rechecked. blocky.swf is flash 6, according to swfmill. button 155 { on (press) { if (_root.playgame) { borderXstart = Math.floor((_xmouse - 13) / CellSize) * CellSize + 13; borderYstart = Math.flo...
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
...struct _SwfdecAsContextClass { diff --git a/libswfdec/swfdec_as_frame.c b/libswfdec/swfdec_as_frame.c index ee6c8ca..9f9381f 100644 --- a/libswfdec/swfdec_as_frame.c +++ b/libswfdec/swfdec_as_frame.c @@ -59,9 +59,15 @@ swfdec_as_frame_mark (SwfdecAsObject *ob swfdec_as_object_mark (frame->var_object); if (frame->target) swfdec_as_object_mark (frame->target); + if (frame->function) + swfdec_as_object_mark (SWFDEC_AS_OBJECT (frame->function)); for (i = 0; i < frame->n_registers; i++) { swfdec_as_value_mark (&frame->registers[i]); } + /* FIXME: do...
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
...index da19217..36db616 100644 --- a/libswfdec/swfdec_as_frame.c +++ b/libswfdec/swfdec_as_frame.c @@ -57,6 +57,8 @@ swfdec_as_frame_mark (SwfdecAsObject *ob swfdec_as_object_mark (SWFDEC_AS_OBJECT (frame->next)); swfdec_as_object_mark (frame->scope); swfdec_as_object_mark (frame->var_object); + if (frame->target) + swfdec_as_object_mark (frame->target); for (i = 0; i < frame->n_registers; i++) { swfdec_as_value_mark (&frame->registers[i]); } @@ -143,24 +145,54 @@ swfdec_as_frame_new_native (SwfdecAsObje SwfdecAsObject * swfdec_as_frame_find_variable...
2007 Jun 05
0
Branch 'as' - 8 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_number.c libswfdec/swfdec_as_scope.h
...s_frame_new (SwfdecAsContext *co SWFDEC_DEBUG ("new frame for function %s", frame->function_name); frame->pc = script->buffer->data; frame->stack = stack; - frame->scope = NULL; + frame->scope = SWFDEC_AS_SCOPE (frame); if (frame->next) frame->var_object = frame->next->var_object; frame->n_registers = script->n_registers; @@ -202,7 +202,7 @@ swfdec_as_frame_find_variable (SwfdecAsF g_return_val_if_fail (SWFDEC_IS_AS_FRAME (frame), NULL); g_return_val_if_fail (variable != NULL, NULL); - cur = SWFDEC_AS_SCOPE (frame); + cur =...
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
...ion); g_assert (klass->call); - klass->call (function); - frame = context->frame; + frame = klass->call (function); + /* FIXME: figure out what to do in these situations */ + if (frame == NULL) + return; if (thisp) swfdec_as_frame_set_this (frame, thisp); frame->var_object = SWFDEC_AS_OBJECT (frame); @@ -93,6 +95,9 @@ swfdec_as_function_call (SwfdecAsFunctio frame->return_value = return_value; frame->function = function; swfdec_as_frame_preload (frame); + /* FIXME: make this a seperate function? */ + frame->next = context->frame; + context-&gt...
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
...p, function->script); - SWFDEC_AS_SCOPE (frame)->next = function->scope; - frame->scope = SWFDEC_AS_SCOPE (frame); - } + klass = SWFDEC_AS_FUNCTION_GET_CLASS (function); + g_assert (klass->call); + klass->call (function, thisp); + frame = context->frame; frame->var_object = SWFDEC_AS_OBJECT (frame); frame->argc = n_args; frame->argv = args; @@ -171,28 +93,6 @@ swfdec_as_function_call (SwfdecAsFunctio swfdec_as_frame_preload (frame); } -/** - * swfdec_as_function_set_object_type: - * @function: a native #SwfdecAsFunction - * @type: required #GType f...
2007 Mar 29
0
Branch 'as' - 9 commits - configure.ac doc/swfdec-sections.txt 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_stack.c
...fdec_as_frame_new (SwfdecAsContext *co g_object_unref (frame); frame->next = context->frame; context->frame = frame; + frame->script = swfdec_script_ref (script); + frame->pc = script->buffer->data; + frame->stack = stack; frame->scope = thisp; frame->var_object = thisp; frame->registers = g_slice_alloc0 (sizeof (SwfdecAsValue) * script->n_registers); diff --git a/libswfdec/swfdec_as_frame.h b/libswfdec/swfdec_as_frame.h index f55cc8f..10825de 100644 --- a/libswfdec/swfdec_as_frame.h +++ b/libswfdec/swfdec_as_frame.h @@ -45,7 +45,8 @@ struct _Swfd...
2007 May 31
0
Branch 'as' - 8 commits - libswfdec/swfdec_as_context.c libswfdec/swfdec_as_interpret.c libswfdec/swfdec_as_string.c libswfdec/swfdec_as_strings.c libswfdec/swfdec_as_types.c test/trace
...swfdec_as_context.c +++ b/libswfdec/swfdec_as_context.c @@ -626,7 +626,7 @@ swfdec_as_context_eval_set_property (Swf return; } obj = swfdec_as_frame_find_variable (cx->frame, name); - if (obj == NULL) + if (obj == NULL || obj == cx->global) obj = cx->frame->var_object; } swfdec_as_object_set_variable (obj, name, ret); diff-tree 58d960c87799a285ee740b474ab763dcc024db18 (from debd20cff40ff22082d31f715bc04a39dd0c3a27) Author: Benjamin Otte <otte at gnome.org> Date: Thu May 31 11:36:12 2007 +0200 add test to check that automatic to-object conversi...
2007 Jun 06
0
Branch 'as' - 13 commits - libswfdec/swfdec_as_context.c libswfdec/swfdec_as_context.h 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
...t being executed */ - SwfdecAsScope * scope; /* first object in scope chain (can be NULL) */ + SwfdecAsScope * scope; /* first object in scope chain (either this frame or a with object) */ SwfdecAsObject * target; /* target to use instead of last object in scope chain */ SwfdecAsObject * var_object; /* new variables go here */ SwfdecAsValue * registers; /* the registers */
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
...EC_DEBUG ("new frame"); swfdec_as_object_add (SWFDEC_AS_OBJECT (frame), context, size); frame->next = context->frame; context->frame = frame; @@ -101,7 +102,8 @@ swfdec_as_frame_new (SwfdecAsObject *thi frame->stack = stack; frame->scope = thisp; frame->var_object = thisp; - frame->registers = g_slice_alloc0 (sizeof (SwfdecAsValue) * script->n_registers); + frame->n_registers = script->n_registers; + frame->registers = g_slice_alloc0 (sizeof (SwfdecAsValue) * frame->n_registers); SWFDEC_AS_VALUE_SET_OBJECT (&val, thisp); swfdec...