search for: swfdec_as_super_new

Displaying 7 results from an estimated 7 matches for "swfdec_as_super_new".

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
...ec/swfdec_as_super.h | 10 ++- 7 files changed, 159 insertions(+), 115 deletions(-) New commits: commit 9df5ed45ad9076f38f69903016298dc87b661efe Author: Benjamin Otte <otte at gnome.org> Date: Wed Nov 14 17:03:15 2007 +0100 work instantiating of super objects once again swfdec_as_super_new () now takes a this object and a reference object. Usually, the reference will 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 +++...
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
.../swfdec_as_frame.c +++ b/libswfdec/swfdec_as_frame.c @@ -297,16 +297,14 @@ swfdec_as_frame_preload (SwfdecAsFrame * swfdec_as_object_set_variable (object, SWFDEC_AS_STR_arguments, &val); } } - if (script->flags & SWFDEC_SCRIPT_PRELOAD_SUPER) { - SwfdecAsObject *super = swfdec_as_super_new (object->context); + if (!(script->flags & SWFDEC_SCRIPT_SUPPRESS_SUPER)) { + SwfdecAsObject *super = swfdec_as_super_new (frame); if (super) { - SWFDEC_AS_VALUE_SET_OBJECT (&frame->registers[current_reg++], super); - } - } else if (!(script->flags & SWFDEC...
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
...args), cur); } - } else if (!(script->flags & SWFDEC_SCRIPT_SUPPRESS_THIS)) { + } else { + /* silence gcc */ + args = NULL; + } + if ((script->flags & (SWFDEC_SCRIPT_PRELOAD_SUPER | SWFDEC_SCRIPT_SUPPRESS_SUPER)) != SWFDEC_SCRIPT_SUPPRESS_SUPER) { + frame->super = swfdec_as_super_new (frame); + } + + /* set the default variables (unless suppressed */ + if (!(script->flags & SWFDEC_SCRIPT_SUPPRESS_THIS)) { if (frame->thisp) { SWFDEC_AS_VALUE_SET_OBJECT (&val, frame->thisp); } else { @@ -580,34 +593,59 @@ swfdec_as_frame_preload (SwfdecAsFrame...
2007 Jul 07
0
Branch 'as' - 7 commits - libswfdec/swfdec_as_context.c libswfdec/swfdec_as_interpret.c libswfdec/swfdec_as_object.c libswfdec/swfdec_as_object.h libswfdec/swfdec_as_super.c libswfdec/swfdec_as_super.h libswfdec/swfdec_as_with.c test/trace
...== NULL) { + SWFDEC_WARNING ("super.%s () called without a prototype.", variable); + return FALSE; + } + if (!swfdec_as_object_get_variable_and_flags (super->object->prototype, variable, val, NULL, NULL)) return FALSE; *flags = 0; return TRUE; @@ -139,3 +143,41 @@ swfdec_as_super_new (SwfdecAsFrame *fram return ret; } +/** + * swfdec_as_super_replace: + * @super: the super object to replace from + * @function_name: garbage-collected name of the function that was called on + * @super or %NULL + * + * This is an internal function used to replace the current...
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
...t;prototype == NULL) - return FALSE; - if (!swfdec_as_object_get_variable (super->object->prototype->prototype, variable, val)) + if (!swfdec_as_object_get_variable (super->object->prototype, variable, val)) return FALSE; *flags = 0; return TRUE; @@ -136,22 +132,10 @@ swfdec_as_super_new (SwfdecAsFrame *fram if (!swfdec_as_context_use_mem (context, sizeof (SwfdecAsSuper))) return NULL; ret = g_object_new (SWFDEC_TYPE_AS_SUPER, NULL); - super = SWFDEC_AS_SUPER (ret); - if (frame->thisp) { - SwfdecAsValue val; - super->object = frame->thisp; - swfdec_as...
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
...s it. + * And b) it makes more sense reading the constructor's name than reading "super" + * in a debugger + */ + frame->function = super->constructor; /* FIXME: this is ugly */ swfdec_as_frame_set_this (frame, super->object); return frame; @@ -82,7 +87,7 @@ swfdec_as_super_new (SwfdecAsFrame *fram swfdec_as_object_get_variable (frame->thisp, SWFDEC_AS_STR___proto__, &val); if (SWFDEC_AS_VALUE_IS_OBJECT (&val)) { SwfdecAsObject *proto = SWFDEC_AS_VALUE_GET_OBJECT (&val); - swfdec_as_object_get_variable (proto, SWFDEC_AS_STR___construct...
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
...gnome.org> Date: Wed May 23 16:29:45 2007 +0200 it's the prototype, not the constructor, stupid diff --git a/libswfdec/swfdec_as_super.c b/libswfdec/swfdec_as_super.c index e5b9728..ffbc0b5 100644 --- a/libswfdec/swfdec_as_super.c +++ b/libswfdec/swfdec_as_super.c @@ -79,10 +79,10 @@ swfdec_as_super_new (SwfdecAsFrame *fram if (frame->thisp) { SwfdecAsValue val; super->object = frame->thisp; - swfdec_as_object_get_variable (frame->thisp, SWFDEC_AS_STR_constructor, &val); + swfdec_as_object_get_variable (frame->thisp, SWFDEC_AS_STR___proto__, &val); if...