Displaying 14 results from an estimated 14 matches for "swfdecasscope".
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
..._registers;
frame->registers = g_slice_alloc0 (sizeof (SwfdecAsValue) * frame->n_registers);
if (script->constant_pool) {
@@ -486,26 +553,16 @@ swfdec_as_frame_set_this (SwfdecAsFrame
SwfdecAsObject *
swfdec_as_frame_find_variable (SwfdecAsFrame *frame, const char *variable)
{
- SwfdecAsScope *cur;
- guint i;
+ GSList *walk;
SwfdecAsValue val;
g_return_val_if_fail (SWFDEC_IS_AS_FRAME (frame), NULL);
g_return_val_if_fail (variable != NULL, NULL);
- cur = frame->scope;
- for (i = 0; i < 256; i++) {
- if (swfdec_as_object_get_variable (SWFDEC_AS_OBJECT (cur), vari...
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
..._create (SwfdecAsCo
SWFDEC_AS_VALUE_SET_OBJECT (&val, context->Function_prototype);
swfdec_as_object_set_variable (fun, SWFDEC_AS_STR___proto__, &val);
}
- swfdec_as_object_unroot (fun);
return SWFDEC_AS_FUNCTION (fun);
}
-SwfdecAsFunction *
-swfdec_as_function_new (SwfdecAsScope *scope)
-{
- SwfdecAsValue val;
- SwfdecAsFunction *fun;
- SwfdecAsObject *proto;
-
- g_return_val_if_fail (SWFDEC_IS_AS_SCOPE (scope), NULL);
-
- fun = swfdec_as_function_do_create (SWFDEC_AS_OBJECT (scope)->context);
- if (fun == NULL)
- return NULL;
- proto = swfdec_as_object_new (S...
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
...}
+
+/**
+ * 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_scope (SwfdecAsFrame *frame)
+{
+ SwfdecAsScope *frame_scope;
+
+ g_return_if_fail (SWFDEC_IS_AS_FRAME (frame));
+
+ frame_scope = SWFDEC_AS_SCOPE (frame);
+ while (frame->scope != frame_scope) {
+ SwfdecAsScope *cur = frame->scope;
+
+ if (frame->pc >= cur->startpc &&
+ frame->pc < cur->endpc)
+ br...
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
...</SECTION>
+
+<SECTION>
+<FILE>SwfdecAsFrame</FILE>
+<TITLE>SwfdecAsFrame</TITLE>
+SwfdecAsFrame
+swfdec_as_frame_get_next
+SwfdecAsStackIterator
+swfdec_as_stack_iterator_init
+swfdec_as_stack_iterator_next
+<SUBSECTION Standard>
+swfdec_as_frame_get_type
+SwfdecAsScope
+SwfdecAsStack
+SwfdecAsFrameClass
+SWFDEC_AS_FRAME
+SWFDEC_AS_FRAME_CLASS
+SWFDEC_AS_FRAME_GET_CLASS
+SWFDEC_IS_AS_FRAME
+SWFDEC_IS_AS_FRAME_CLASS
+SWFDEC_TYPE_AS_FRAME
+</SECTION>
diff-tree cafba89fb84a393328a6610f0f07c332074b572e (from 420ca51e53e5a2a9d23ea36be541b04ab434ca6e)
Author: Benj...
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
...b/libswfdec/swfdec_as_frame.h
@@ -47,11 +47,12 @@ struct _SwfdecAsFrame {
const SwfdecAsValue * argv; /* arguments */
/* debugging */
char * function_name; /* name of function */
- /* normal execution */
+ /* script execution */
SwfdecScript * script; /* script being executed */
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 */
+ SwfdecAsObject * target; /* target to use as last object in scope c...
2007 Aug 17
0
Branch 'vivi' - 9 commits - libswfdec/swfdec_as_array.c libswfdec/swfdec_as_function.c libswfdec/swfdec_as_function.h libswfdec/swfdec_as_internal.h libswfdec/swfdec_as_interpret.c libswfdec/swfdec_as_native_function.c
...context.h"
#include "swfdec_as_frame_internal.h"
+#include "swfdec_as_internal.h"
#include "swfdec_as_stack.h"
#include "swfdec_as_strings.h"
#include "swfdec_debug.h"
@@ -114,20 +115,26 @@ SwfdecAsFunction *
swfdec_as_script_function_new (SwfdecAsScope *scope, SwfdecAsObject *target, SwfdecScript *script)
{
SwfdecAsValue val;
- SwfdecAsFunction *fun;
+ SwfdecAsScriptFunction *fun;
SwfdecAsObject *proto;
+ SwfdecAsContext *context;
g_return_val_if_fail (SWFDEC_IS_AS_SCOPE (scope), NULL);
g_return_val_if_fail (SWFDEC_IS_AS_OBJECT...
2007 May 17
0
Branch 'as' - 8 commits - libswfdec/.gitignore libswfdec/swfdec_as_frame.c libswfdec/swfdec_as_function.c libswfdec/swfdec_as_object.h libswfdec/swfdec_movie.c libswfdec/swfdec_sprite_movie_as.c
...property
diff --git a/libswfdec/swfdec_as_function.c b/libswfdec/swfdec_as_function.c
index 9256b31..c6a7c92 100644
--- a/libswfdec/swfdec_as_function.c
+++ b/libswfdec/swfdec_as_function.c
@@ -100,13 +100,22 @@ swfdec_as_function_do_create (SwfdecAsCo
SwfdecAsFunction *
swfdec_as_function_new (SwfdecAsScope *scope)
{
+ SwfdecAsValue val;
SwfdecAsFunction *fun;
+ SwfdecAsObject *proto;
g_return_val_if_fail (SWFDEC_IS_AS_SCOPE (scope), NULL);
fun = swfdec_as_function_do_create (SWFDEC_AS_OBJECT (scope)->context);
if (fun == NULL)
return NULL;
+ proto = swfdec_as_object_new (S...
2007 Jun 03
1
some patches for swfdec
Here are some patches I made yesterday. They add three actions:
duplicateClip, removeClip and With, one method Math.abs and bug fixes.
All base off 'as' branch. Please have a look if you are going to apply
them because I'm quite new in swfdec development.
BTW, how can I implement createEmptyMovieClip? I have no idea how to
create an SwfdecMovie properly. I also need to add the
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
...100644
--- a/libswfdec/swfdec_as_frame.c
+++ b/libswfdec/swfdec_as_frame.c
@@ -232,6 +232,43 @@ swfdec_as_frame_find_variable (SwfdecAsF
return NULL;
}
+/* FIXME: merge with find_variable somehow */
+gboolean
+swfdec_as_frame_delete_variable (SwfdecAsFrame *frame, const char *variable)
+{
+ SwfdecAsScope *cur;
+ guint i;
+
+ g_return_val_if_fail (SWFDEC_IS_AS_FRAME (frame), FALSE);
+ g_return_val_if_fail (variable != NULL, FALSE);
+
+ cur = frame->scope;
+ for (i = 0; i < 256; i++) {
+ if (swfdec_as_object_delete_variable (SWFDEC_AS_OBJECT (cur), variable))
+ return TRUE;
+ if...
2007 Jul 18
0
12 commits - configure.ac doc/swfdec-sections.txt libswfdec-gtk/swfdec_playback_alsa.c libswfdec/jpeg libswfdec/Makefile.am libswfdec/swfdec_amf.c libswfdec/swfdec_as_array.c libswfdec/swfdec_as_boolean.h libswfdec/swfdec_as_context.c
...SwfdecAsFrame))
-#define SWFDEC_AS_FRAME_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), SWFDEC_TYPE_AS_FRAME, SwfdecAsFrameClass))
-#define SWFDEC_AS_FRAME_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), SWFDEC_TYPE_AS_FRAME, SwfdecAsFrameClass))
-
struct _SwfdecAsFrame {
SwfdecAsScope scope_object;
@@ -45,7 +38,7 @@ struct _SwfdecAsFrame {
guint argc; /* number of arguments */
const SwfdecAsValue * argv; /* arguments or %NULL if taken from stack */
/* debugging */
- char * function_name; /* name of function */
+ const char * function_name; /* name of function...
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
.../swfdec_as_frame.c
+++ b/libswfdec/swfdec_as_frame.c
@@ -503,20 +503,21 @@ swfdec_as_frame_find_variable (SwfdecAsF
return NULL;
}
-/* FIXME: merge with find_variable somehow */
-gboolean
+SwfdecAsDeleteReturn
swfdec_as_frame_delete_variable (SwfdecAsFrame *frame, const char *variable)
{
SwfdecAsScope *cur;
guint i;
+ SwfdecAsDeleteReturn ret;
g_return_val_if_fail (SWFDEC_IS_AS_FRAME (frame), FALSE);
g_return_val_if_fail (variable != NULL, FALSE);
cur = frame->scope;
for (i = 0; i < 256; i++) {
- if (swfdec_as_object_delete_variable (SWFDEC_AS_OBJECT (cur), variable)...
2007 Jun 12
0
Branch 'as' - 3 commits - libswfdec/swfdec_as_array.c libswfdec/swfdec_as_context.c libswfdec/swfdec_as_math.c libswfdec/swfdec_as_native_function.c libswfdec/swfdec_as_number.c libswfdec/swfdec_as_object.c libswfdec/swfdec_as_string.c
...WFDEC_AS_VALUE_SET_STRING (ret, SWFDEC_AS_STR_EMPTY);
diff --git a/libswfdec/swfdec_as_types.h b/libswfdec/swfdec_as_types.h
index 67b87b5..0dc580f 100644
--- a/libswfdec/swfdec_as_types.h
+++ b/libswfdec/swfdec_as_types.h
@@ -45,7 +45,11 @@ typedef struct _SwfdecAsObject SwfdecAsO
typedef struct _SwfdecAsScope SwfdecAsScope;
typedef struct _SwfdecAsStack SwfdecAsStack;
typedef struct _SwfdecAsValue SwfdecAsValue;
-typedef void (* SwfdecAsNative) (SwfdecAsObject *thisp, guint argc, SwfdecAsValue *argv, SwfdecAsValue *retval);
+typedef void (* SwfdecAsNative) (SwfdecAsContext * context,
+ SwfdecAsOb...
2007 Aug 22
0
163 commits - autogen.sh configure.ac doc/swfdec-sections.txt libswfdec-gtk/swfdec_gtk_player.c libswfdec-gtk/swfdec_gtk_player.h libswfdec-gtk/swfdec_gtk_widget.c libswfdec-gtk/swfdec_source.c libswfdec/Makefile.am libswfdec/swfdec_as_array.c
...context.h"
#include "swfdec_as_frame_internal.h"
+#include "swfdec_as_internal.h"
#include "swfdec_as_stack.h"
#include "swfdec_as_strings.h"
#include "swfdec_debug.h"
@@ -114,20 +115,26 @@ SwfdecAsFunction *
swfdec_as_script_function_new (SwfdecAsScope *scope, SwfdecAsObject *target, SwfdecScript *script)
{
SwfdecAsValue val;
- SwfdecAsFunction *fun;
+ SwfdecAsScriptFunction *fun;
SwfdecAsObject *proto;
+ SwfdecAsContext *context;
g_return_val_if_fail (SWFDEC_IS_AS_SCOPE (scope), NULL);
g_return_val_if_fail (SWFDEC_IS_AS_OBJECT...
2007 Aug 20
0
Branch 'vivi' - 60 commits - libswfdec-gtk/swfdec_gtk_loader.c libswfdec/Makefile.am libswfdec/swfdec_as_array.c libswfdec/swfdec_as_context.c libswfdec/swfdec_as_frame.c libswfdec/swfdec_as_frame_internal.h libswfdec/swfdec_as_interpret.c
.../swfdec_as_frame.c
+++ b/libswfdec/swfdec_as_frame.c
@@ -503,20 +503,21 @@ swfdec_as_frame_find_variable (SwfdecAsF
return NULL;
}
-/* FIXME: merge with find_variable somehow */
-gboolean
+SwfdecAsDeleteReturn
swfdec_as_frame_delete_variable (SwfdecAsFrame *frame, const char *variable)
{
SwfdecAsScope *cur;
guint i;
+ SwfdecAsDeleteReturn ret;
g_return_val_if_fail (SWFDEC_IS_AS_FRAME (frame), FALSE);
g_return_val_if_fail (variable != NULL, FALSE);
cur = frame->scope;
for (i = 0; i < 256; i++) {
- if (swfdec_as_object_delete_variable (SWFDEC_AS_OBJECT (cur), variable)...