Displaying 12 results from an estimated 12 matches for "swfdec_action_set_variable".
Did you mean:
swfdec_action_get_variable
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
...ef SWFDEC_WARN_MISSING_PROPERTIES
- if (cx->fp->sp[-1] == JSVAL_VOID) {
+ if (SWFDEC_AS_VALUE_IS_UNDEFINED (swfdec_as_stack_peek (cx->frame->stack, 1))) {
SWFDEC_WARNING ("no variable named %s", s);
}
#endif
- return JS_TRUE;
}
static void
@@ -535,15 +531,12 @@ swfdec_action_set_variable (SwfdecAsCont
{
const char *s;
- s = swfdec_js_to_string (cx, cx->fp->sp[-2]);
- if (s == NULL)
- return JS_FALSE;
-
- swfdec_js_eval_set (cx, NULL, s, cx->fp->sp[-1]);
- cx->fp->sp -= 2;
- return JS_TRUE;
+ s = swfdec_as_value_to_string (cx, swfdec_as_stack_peek (c...
2007 Jan 24
0
Branch 'interpreter' - 8 commits - libswfdec/swfdec_bits.c libswfdec/swfdec_bits.h libswfdec/swfdec_js.c libswfdec/swfdec_js.h libswfdec/swfdec_script.c test/swfdec_out.c test/swfdec_out.h test/swfedit_tag.c test/swfedit_token.c test/swfedit_token.h
...jamin Otte <otte@gnome.org>
Date: Wed Jan 24 21:37:13 2007 +0100
use swfdec_js_eval_set for SetVariable
diff --git a/libswfdec/swfdec_script.c b/libswfdec/swfdec_script.c
index b2c4c81..32af30e 100644
--- a/libswfdec/swfdec_script.c
+++ b/libswfdec/swfdec_script.c
@@ -329,11 +329,8 @@ swfdec_action_set_variable (JSContext *c
if (s == NULL)
return JS_FALSE;
- if (strpbrk (s, "./:")) {
- SWFDEC_WARNING ("FIXME: implement paths");
- }
- if (!JS_SetProperty (cx, cx->fp->scopeChain, s, &cx->fp->sp[-1]))
- return JS_FALSE;
+ swfdec_js_eval_set (cx, cx->...
2007 Jan 29
0
Branch 'interpreter' - 18 commits - libswfdec/swfdec_image.c libswfdec/swfdec_image.h libswfdec/swfdec_js.c libswfdec/swfdec_js_color.c libswfdec/swfdec_js_sound.c libswfdec/swfdec_pattern.c libswfdec/swfdec_scriptable.c libswfdec/swfdec_script.c
...ctionSpec actions[25
[0x18] = { "ToInteger", NULL },
[0x1c] = { "GetVariable", NULL, 1, 1, { NULL, swfdec_action_get_variable, swfdec_action_get_variable, swfdec_action_get_variable, swfdec_action_get_variable } },
[0x1d] = { "SetVariable", NULL, 2, 0, { NULL, swfdec_action_set_variable, swfdec_action_set_variable, swfdec_action_set_variable, swfdec_action_set_variable } },
- [0x20] = { "SetTarget2", NULL },
+ [0x20] = { "SetTarget22", NULL, 1, 0, { swfdec_action_set_target2, swfdec_action_set_target2, swfdec_action_set_target2, swfdec_action_set_target2, swf...
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
...actions
#endif
[SWFDEC_AS_ACTION_GET_VARIABLE] = { "GetVariable", NULL, 1, 1, { NULL, swfdec_action_get_variable, swfdec_action_get_variable, swfdec_action_get_variable, swfdec_action_get_variable } },
[SWFDEC_AS_ACTION_SET_VARIABLE] = { "SetVariable", NULL, 2, 0, { NULL, swfdec_action_set_variable, swfdec_action_set_variable, swfdec_action_set_variable, swfdec_action_set_variable } },
+ [SWFDEC_AS_ACTION_SET_TARGET2] = { "SetTarget2", NULL, 1, 0, { swfdec_action_set_target2, swfdec_action_set_target2, swfdec_action_set_target2, swfdec_action_set_target2, swfdec_action_set_target2...
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
...to_integer } },
- [SWFDEC_AS_ACTION_GET_VARIABLE] = { "GetVariable", NULL, 1, 1, { NULL, swfdec_action_get_variable, swfdec_action_get_variable, swfdec_action_get_variable, swfdec_action_get_variable } },
- [SWFDEC_AS_ACTION_SET_VARIABLE] = { "SetVariable", NULL, 2, 0, { NULL, swfdec_action_set_variable, swfdec_action_set_variable, swfdec_action_set_variable, swfdec_action_set_variable } },
- [SWFDEC_AS_ACTION_SET_TARGET2] = { "SetTarget2", NULL, 1, 0, { swfdec_action_set_target2, swfdec_action_set_target2, swfdec_action_set_target2, swfdec_action_set_target2, swfdec_action_set_target2...
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
...;sp[-1]);
+ if (s == NULL)
+ return JS_FALSE;
+ cx->fp->sp[-1] = swfdec_js_eval (cx, NULL, s);
+#ifdef SWFDEC_WARN_MISSING_PROPERTIES
+ if (cx->fp->sp[-1] == JSVAL_VOID) {
+ SWFDEC_WARNING ("no variable named %s", s);
+ }
+#endif
+ return JS_TRUE;
+}
+
+static void
+swfdec_action_set_variable (SwfdecAsContext *cx, guint action, const guint8 *data, guint len)
+{
+ const char *s;
+
+ s = swfdec_js_to_string (cx, cx->fp->sp[-2]);
+ if (s == NULL)
+ return JS_FALSE;
+
+ swfdec_js_eval_set (cx, NULL, s, cx->fp->sp[-1]);
+ cx->fp->sp -= 2;
+ return JS_TRUE;
+}
+
+st...
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
..._integer, swfdec_action_to_integer, swfdec_action_to_integer } },
[0x1c] = { "GetVariable", NULL, 1, 1, { NULL, swfdec_action_get_variable, swfdec_action_get_variable, swfdec_action_get_variable, swfdec_action_get_variable } },
[0x1d] = { "SetVariable", NULL, 2, 0, { NULL, swfdec_action_set_variable, swfdec_action_set_variable, swfdec_action_set_variable, swfdec_action_set_variable } },
- [0x20] = { "SetTarget22", NULL, 1, 0, { swfdec_action_set_target2, swfdec_action_set_target2, swfdec_action_set_target2, swfdec_action_set_target2, swfdec_action_set_target2 } },
+ [0x20] = { &quo...
2007 Jan 25
0
Branch 'interpreter' - 28 commits - configure.ac libswfdec/js libswfdec/swfdec_buffer.c libswfdec/swfdec_edittext_movie.c libswfdec/swfdec_js.c libswfdec/swfdec_js_global.c libswfdec/swfdec_js.h libswfdec/swfdec_js_movie.c libswfdec/swfdec_player.c
...);
if (s == NULL)
return JS_FALSE;
- cx->fp->sp[-1] = swfdec_js_eval (cx, cx->fp->scopeChain, s);
+ cx->fp->sp[-1] = swfdec_js_eval (cx, cx->fp->scopeChain, s,
+ ((SwfdecScript *) cx->fp->swf)->version < 7);
+ return JS_TRUE;
+}
+
+static JSBool
+swfdec_action_set_variable (JSContext *cx, guint action, const guint8 *data, guint len)
+{
+ const char *s;
+
+ s = swfdec_js_to_string (cx, cx->fp->sp[-2]);
+ if (s == NULL)
+ return JS_FALSE;
+
+ if (strpbrk (s, "./:")) {
+ SWFDEC_WARNING ("FIXME: implement paths");
+ }
+ if (!JS_SetPr...
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
..._integer, swfdec_action_to_integer, swfdec_action_to_integer } },
[0x1c] = { "GetVariable", NULL, 1, 1, { NULL, swfdec_action_get_variable, swfdec_action_get_variable, swfdec_action_get_variable, swfdec_action_get_variable } },
[0x1d] = { "SetVariable", NULL, 2, 0, { NULL, swfdec_action_set_variable, swfdec_action_set_variable, swfdec_action_set_variable, swfdec_action_set_variable } },
- [0x20] = { "SetTarget22", NULL, 1, 0, { swfdec_action_set_target2, swfdec_action_set_target2, swfdec_action_set_target2, swfdec_action_set_target2, swfdec_action_set_target2 } },
+ [0x20] = { &quo...
2007 Jan 26
0
Branch 'interpreter' - 9 commits - libswfdec/js libswfdec/Makefile.am libswfdec/swfdec_debugger.c libswfdec/swfdec_debugger.h libswfdec/swfdec_edittext_movie.c libswfdec/swfdec_event.c libswfdec/swfdec_js.c libswfdec/swfdec_js_global.c
...n_get_variable (JSContext *c
s = swfdec_js_to_string (cx, cx->fp->sp[-1]);
if (s == NULL)
return JS_FALSE;
- cx->fp->sp[-1] = swfdec_js_eval (cx, cx->fp->scopeChain, s);
+ cx->fp->sp[-1] = swfdec_js_eval (cx, NULL, s);
return JS_TRUE;
}
@@ -329,7 +329,7 @@ swfdec_action_set_variable (JSContext *c
if (s == NULL)
return JS_FALSE;
- swfdec_js_eval_set (cx, cx->fp->scopeChain, s, cx->fp->sp[-1]);
+ swfdec_js_eval_set (cx, NULL, s, cx->fp->sp[-1]);
cx->fp->sp -= 2;
return JS_TRUE;
}
diff-tree db8da8e1714ce0839759c2fd0e65fbd6debf51fa (from...
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
...te: Thu Apr 5 15:34:42 2007 +0200
implement [GS]et(Member|Property) and Pop actions
diff --git a/libswfdec/swfdec_as_interpret.c b/libswfdec/swfdec_as_interpret.c
index aab5f44..893adbd 100644
--- a/libswfdec/swfdec_as_interpret.c
+++ b/libswfdec/swfdec_as_interpret.c
@@ -532,10 +532,116 @@ swfdec_action_set_variable (SwfdecAsCont
const char *s;
s = swfdec_as_value_to_string (cx, swfdec_as_stack_peek (cx->frame->stack, 2));
- swfdec_as_context_eval_set (cx, NULL, s, swfdec_as_stack_pop (cx->frame->stack));
+ swfdec_as_context_eval_set (cx, NULL, s, swfdec_as_stack_peek (cx->frame->st...
2007 Oct 15
0
8 commits - libswfdec/swfdec_as_interpret.c libswfdec/swfdec_sound.c libswfdec/swfdec_sound.h test/trace
...make NewObject action call swfdec_action_get_variable() instead of swfdec_as_context_eval()
diff --git a/libswfdec/swfdec_as_interpret.c b/libswfdec/swfdec_as_interpret.c
index a3c0c15..f2022b4 100644
--- a/libswfdec/swfdec_as_interpret.c
+++ b/libswfdec/swfdec_as_interpret.c
@@ -677,24 +677,6 @@ swfdec_action_set_variable (SwfdecAsContext *cx, guint action, const guint8 *dat
swfdec_as_stack_pop_n (cx, 2);
}
-static const char *
-swfdec_as_interpret_eval (SwfdecAsContext *cx, SwfdecAsObject *obj,
- SwfdecAsValue *val)
-{
- if (SWFDEC_AS_VALUE_IS_STRING (val)) {
- const char *s = SWFDEC_AS_VALUE_GET_STRI...