Displaying 20 results from an estimated 23 matches for "swfdec_as_frame_preload".
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
...| 45 ++++
17 files changed, 300 insertions(+), 77 deletions(-)
New commits:
diff-tree 687fb9322f3f8ef29953d523c503c341e1bc6299 (from 33e2ea86862093d73fc9be0ff9cf9eac39d8f1bc)
Author: Benjamin Otte <otte at gnome.org>
Date: Mon Jul 30 15:51:25 2007 +0200
add tests for swfdec_as_frame_preload order
diff --git a/test/trace/Makefile.am b/test/trace/Makefile.am
index d840712..4136972 100644
--- a/test/trace/Makefile.am
+++ b/test/trace/Makefile.am
@@ -209,9 +209,18 @@ EXTRA_DIST = \
countdown.swf.trace \
currentframe.swf \
currentframe.swf.trace \
+ definefunction2-arguments.swf \
+...
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
...} else {
SWFDEC_FIXME ("does the super object really reference the function when thisp is NULL?");
- swfdec_as_super_new (frame, SWFDEC_AS_OBJECT (function), FALSE);
+ swfdec_as_super_new (frame, SWFDEC_AS_OBJECT (function), SWFDEC_AS_OBJECT (function)->prototype);
}
swfdec_as_frame_preload (frame);
}
diff --git a/libswfdec/swfdec_as_interpret.c b/libswfdec/swfdec_as_interpret.c
index c911276..cb44953 100644
--- a/libswfdec/swfdec_as_interpret.c
+++ b/libswfdec/swfdec_as_interpret.c
@@ -876,6 +876,7 @@ swfdec_action_call_method (SwfdecAsContext *cx, guint action, const guint8 *data...
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
...+ * @thisp: object to use as the this object
+ *
+ * Sets the object to be used as this pointer. If this function is not called,
+ * the this value will be undefined.
+ * You may only call this function once per @frame and it must be called
+ * directly after creating the frame and before calling swfdec_as_frame_preload().
+ **/
+void
+swfdec_as_frame_set_this (SwfdecAsFrame *frame, SwfdecAsObject *thisp)
+{
+ g_return_if_fail (SWFDEC_IS_AS_FRAME (frame));
+ g_return_if_fail (frame->thisp == NULL);
+ g_return_if_fail (SWFDEC_IS_AS_OBJECT (thisp));
+
+ frame->thisp = thisp;
+ if (frame->var_object ==...
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
...in Otte <otte at gnome.org>
Date: Tue May 22 14:01:12 2007 +0200
fix up super object some more
diff --git a/libswfdec/swfdec_as_frame.c b/libswfdec/swfdec_as_frame.c
index 9f99031..3c5fe2c 100644
--- a/libswfdec/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_S...
2007 Jul 11
0
Branch 'as' - libswfdec/swfdec_as_object.c
...AS_OBJECT_HAS_CONTEXT (object));
g_return_if_fail (script != NULL);
- frame = swfdec_as_frame_new (object->context, script);
+ context = object->context;
+ frame = swfdec_as_frame_new (context, script);
if (frame == NULL)
return;
swfdec_as_frame_set_this (frame, object);
swfdec_as_frame_preload (frame);
- swfdec_as_context_run (object->context);
+ swfdec_as_context_run (context);
+ swfdec_as_stack_pop (context);
}
/**
2007 Nov 15
0
4 commits - libswfdec/swfdec_asbroadcaster.c libswfdec/swfdec_as_frame.c libswfdec/swfdec_as_frame_internal.h libswfdec/swfdec_as_function.c libswfdec/swfdec_as_interpret.c test/trace
...@ -378,7 +378,6 @@ swfdec_as_frame_init (SwfdecAsFrame *frame)
frame->function_name = "unnamed";
frame->blocks = g_array_new (FALSE, FALSE, sizeof (SwfdecAsFrameBlock));
frame->block_end = (gpointer) -1;
- frame->caller = TRUE;
}
static void
@@ -699,10 +698,11 @@ swfdec_as_frame_preload (SwfdecAsFrame *frame)
}
next = frame->next;
- while (next && next->caller == FALSE) {
+ while (next != NULL && (next->function == NULL ||
+ SWFDEC_IS_AS_NATIVE_FUNCTION (next->function))) {
next = next->next;
}
- if (next != NULL &...
2007 Sep 13
0
5 commits - libswfdec/Makefile.am libswfdec/swfdec_as_context.c libswfdec/swfdec_as_frame.c libswfdec/swfdec_as_frame_internal.h libswfdec/swfdec_as_interpret.c libswfdec/swfdec_as_scope.c libswfdec/swfdec_as_scope.h libswfdec/swfdec_as_script_function.c
...->data;
+ break;
+ }
+ }
+ if (set == NULL)
+ set = frame->target;
+
+ swfdec_as_object_set_variable_and_flags (set, variable, value, default_flags);
+}
+
SwfdecAsDeleteReturn
swfdec_as_frame_delete_variable (SwfdecAsFrame *frame, const char *variable)
{
@@ -721,25 +748,14 @@ swfdec_as_frame_preload (SwfdecAsFrame *
}
}
if (script->flags & SWFDEC_SCRIPT_PRELOAD_ROOT && current_reg < script->n_registers) {
- SwfdecAsObject *obj;
-
- obj = swfdec_as_frame_find_variable (frame, SWFDEC_AS_STR__root);
- if (obj) {
- swfdec_as_object_get_variable (ob...
2007 Aug 03
0
Changes to 'refs/tags/0.5.1'
...erator
create arguments variable using a SwfdecAsStackIterator
fix typo
add test for argument preloading in registers
use the right number of registers
if not enoguh registers are available, push undefined
add a test for how registers are handled
reorganize swfdec_as_frame_preload() order to match tests
add tests for swfdec_as_frame_preload order
allow running scripts in NEW state
run initialization scripts in NEW state
ignore (automatic) breakpoints during initialization
remove code that got rid of gnome-vfs
add SwfdecURL type
no ne...
2007 Jul 13
0
3 commits - doc/Makefile.am doc/swfdec-docs.sgml doc/swfdec-sections.txt libswfdec/Makefile.am libswfdec/swfdec_as_array.c libswfdec/swfdec_as_boolean.c libswfdec/swfdec_as_context.c libswfdec/swfdec_as_context.h libswfdec/swfdec_as_frame.c
...,
- SwfdecScript * script);
-SwfdecAsFrame * swfdec_as_frame_new_native (SwfdecAsContext * context);
-void swfdec_as_frame_return (SwfdecAsFrame * frame,
- SwfdecAsValue * return_value);
-
-void swfdec_as_frame_set_this (SwfdecAsFrame * frame,
- SwfdecAsObject * thisp);
-void swfdec_as_frame_preload (SwfdecAsFrame * frame);
-
-SwfdecAsObject *swfdec_as_frame_find_variable (SwfdecAsFrame * frame,
- const char * variable);
-gboolean swfdec_as_frame_delete_variable (SwfdecAsFrame * frame,
- const char * variable);
-
-void swfdec_as_frame_set_target (SwfdecAsFrame * frame,
-...
2007 Aug 15
0
Branch 'vivi' - 13 commits - doc/swfdec-sections.txt libswfdec/swfdec_as_debugger.h libswfdec/swfdec_as_frame.c libswfdec/swfdec_as_frame.h libswfdec/swfdec_as_types.h vivified/core vivified/ui
...s = SWFDEC_AS_DEBUGGER_GET_CLASS (context->debugger);
+
+ if (klass->finish_frame)
+ klass->finish_frame (context->debugger, context, frame, &retval);
+ }
/* set return value */
if (frame->return_value) {
*frame->return_value = retval;
@@ -569,12 +575,13 @@ swfdec_as_frame_preload (SwfdecAsFrame *
g_return_if_fail (SWFDEC_IS_AS_FRAME (frame));
- if (frame->script == NULL)
- return;
+
/* setup */
object = SWFDEC_AS_OBJECT (frame);
context = object->context;
script = frame->script;
+ if (frame->script == NULL)
+ goto out;
/* create a...
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
....org>
Date: Tue Jul 31 13:32:41 2007 +0200
make sure excess function parameters are st to undefined
diff --git a/libswfdec/swfdec_as_frame.c b/libswfdec/swfdec_as_frame.c
index fec2389..612ed70 100644
--- a/libswfdec/swfdec_as_frame.c
+++ b/libswfdec/swfdec_as_frame.c
@@ -552,7 +552,7 @@ swfdec_as_frame_preload (SwfdecAsFrame *
SwfdecAsObject *object, *args;
guint i, current_reg = 1;
SwfdecScript *script;
- SwfdecAsValue val = { 0, };
+ SwfdecAsValue val;
const SwfdecAsValue *cur;
SwfdecAsContext *context;
SwfdecAsStackIterator iter;
@@ -606,6 +606,7 @@ swfdec_as_frame_preload (SwfdecA...
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
...gt;scope));
if (frame->thisp)
swfdec_as_object_mark (frame->thisp);
+ if (frame->super)
+ swfdec_as_object_mark (frame->super);
swfdec_as_object_mark (frame->target);
swfdec_as_object_mark (frame->original_target);
if (frame->function)
@@ -356,12 +358,12 @@ swfdec_as_frame_preload (SwfdecAsFrame *
}
}
if (!(script->flags & SWFDEC_SCRIPT_SUPPRESS_SUPER)) {
- SwfdecAsObject *super = swfdec_as_super_new (frame);
- if (super) {
+ frame->super = swfdec_as_super_new (frame);
+ if (frame->super) {
if (script->flags & SWFDEC_SCRIPT_P...
2007 Jul 02
0
Branch 'as' - 24 commits - configure.ac doc/Makefile.am doc/swfdec-sections.txt libswfdec/Makefile.am libswfdec/swfdec_amf.c libswfdec/swfdec_as_array.c libswfdec/swfdec_as_context.c libswfdec/swfdec_as_context.h libswfdec/swfdec_as_frame.c
...a/libswfdec/swfdec_as_function.c b/libswfdec/swfdec_as_function.c
index aee6b90..c74302e 100644
--- a/libswfdec/swfdec_as_function.c
+++ b/libswfdec/swfdec_as_function.c
@@ -94,9 +94,6 @@ swfdec_as_function_call (SwfdecAsFunctio
frame->argv = args;
frame->return_value = return_value;
swfdec_as_frame_preload (frame);
- /* FIXME: make this a seperate function? */
- frame->next = context->frame;
- context->frame = frame;
}
/*** AS CODE ***/
diff --git a/libswfdec/swfdec_as_object.c b/libswfdec/swfdec_as_object.c
index 339bf23..721d74b 100644
--- a/libswfdec/swfdec_as_object.c
+++ b/libswf...
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
...n.c
index 8a27b9f..2f0f0e7 100644
--- a/libswfdec/swfdec_as_function.c
+++ b/libswfdec/swfdec_as_function.c
@@ -93,7 +93,6 @@ swfdec_as_function_call (SwfdecAsFunctio
frame->argc = n_args;
frame->argv = args;
frame->return_value = return_value;
- frame->function = function;
swfdec_as_frame_preload (frame);
/* FIXME: make this a seperate function? */
frame->next = context->frame;
diff --git a/libswfdec/swfdec_as_native_function.c b/libswfdec/swfdec_as_native_function.c
index 626a380..4b8d40e 100644
--- a/libswfdec/swfdec_as_native_function.c
+++ b/libswfdec/swfdec_as_native_functi...
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
...S_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 for this object
- *
- * Sets the required type for the this object to @type. If the this object
- * isn't of the required type, the function will not be called and it...
2007 Aug 20
0
15 commits - libswfdec/swfdec_as_context.c libswfdec/swfdec_as_frame.c libswfdec/swfdec_as_frame_internal.h libswfdec/swfdec_as_interpret.c libswfdec/swfdec_as_object.c libswfdec/swfdec_as_object.h libswfdec/swfdec_as_super.c libswfdec/swfdec_as_with.c
...riable (SWFDEC_AS_OBJECT (frame)->context->global, variable);
}
diff --git a/libswfdec/swfdec_as_frame_internal.h b/libswfdec/swfdec_as_frame_internal.h
index f6d7644..ca435c9 100644
--- a/libswfdec/swfdec_as_frame_internal.h
+++ b/libswfdec/swfdec_as_frame_internal.h
@@ -70,7 +70,8 @@ void swfdec_as_frame_preload (SwfdecAs
SwfdecAsObject *swfdec_as_frame_find_variable (SwfdecAsFrame * frame,
const char * variable);
-gboolean swfdec_as_frame_delete_variable (SwfdecAsFrame * frame,
+SwfdecAsDeleteReturn
+ swfdec_as_frame_delete_variable (SwfdecAsFrame * frame,
const char * variable);...
2007 Oct 17
0
28 commits - configure.ac debian/changelog debian/control debian/copyright debian/.gitignore debian/libswfdec0.dirs debian/libswfdec0.files debian/libswfdec0.shlibs debian/libswfdec-dev.dirs debian/libswfdec-dev.files debian/rules debian/swf-player.dirs
...g_return_if_fail (script != NULL);
+ g_return_if_fail (SWFDEC_IS_SECURITY (sec));
context = object->context;
frame = swfdec_as_frame_new (context, script);
if (frame == NULL)
return;
+ swfdec_as_frame_set_security (frame, sec);
swfdec_as_frame_set_this (frame, object);
swfdec_as_frame_preload (frame);
swfdec_as_context_run (context);
@@ -1040,6 +1037,26 @@ swfdec_as_object_run (SwfdecAsObject *object, SwfdecScript *script)
}
/**
+ * swfdec_as_object_run:
+ * @object: a #SwfdecAsObject
+ * @script: script to execute
+ *
+ * Executes the given @script with @object as this pointer....
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
...fail (SWFDEC_IS_AS_FRAME (frame), NULL);
g_return_val_if_fail (variable != NULL, NULL);
- cur = SWFDEC_AS_SCOPE (frame);
+ cur = frame->scope;
for (i = 0; i < 256; i++) {
ret = swfdec_as_object_find_variable (SWFDEC_AS_OBJECT (cur), variable);
if (ret)
@@ -348,3 +348,31 @@ swfdec_as_frame_preload (SwfdecAsFrame *
}
}
}
+
+/**
+ * swfdec_as_frame_check_scope:
+ * @frame: a #SwfdecAsFrame
+ *
+ * Checks that the current scope of the given @frame is still correct.
+ * If it is not, the current scope is popped and the next one is used.
+ * If the
+ **/
+void
+swfdec_as_frame_check_scop...
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
...->context->global, variable);
+}
+
/**
* swfdec_as_frame_set_target:
* @frame: a #SwfdecAsFrame
diff --git a/libswfdec/swfdec_as_frame.h b/libswfdec/swfdec_as_frame.h
index 7bb41b4..a790e47 100644
--- a/libswfdec/swfdec_as_frame.h
+++ b/libswfdec/swfdec_as_frame.h
@@ -76,6 +76,8 @@ void swfdec_as_frame_preload (SwfdecAs
SwfdecAsObject *swfdec_as_frame_find_variable (SwfdecAsFrame * frame,
const char * variable);
+gboolean swfdec_as_frame_delete_variable (SwfdecAsFrame * frame,
+ const char * variable);
void swfdec_as_frame_set_target (SwfdecAsFrame * frame,
SwfdecAsObject...
2007 Nov 15
2
Changes to 'refs/tags/0.5.4'
Tag '0.5.4' created by Benjamin Otte <otte at gnome.org> at 2007-11-15 10:12 -0800
release 0.5.4 ("Turkish Cycling Federation")
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.6 (GNU/Linux)
iD8DBQBHPBurvMv5VCdLq8QRAj1KAJ40NHRRS3gKyJjSjyyoH7gDaGi/tQCeOha/
R5PF4bZQqmSdJ64t8EbD4cA=
=8qBy
-----END PGP SIGNATURE-----
Changes since the dawn of time:
Benjamin Otte (40):