search for: swfdec_as_stack_peek

Displaying 20 results from an estimated 39 matches for "swfdec_as_stack_peek".

2007 Jun 17
2
Branch 'as' - libswfdec/swfdec_as_interpret.c
...interpret.c b/libswfdec/swfdec_as_interpret.c index 99ceb2b..9c98b45 100644 --- a/libswfdec/swfdec_as_interpret.c +++ b/libswfdec/swfdec_as_interpret.c @@ -780,7 +780,8 @@ swfdec_action_new_comparison_7 (SwfdecAs swfdec_as_stack_pop (cx->frame->stack); SWFDEC_AS_VALUE_SET_UNDEFINED (swfdec_as_stack_peek (cx->frame->stack, 1)); } else if (SWFDEC_AS_VALUE_IS_STRING (rval) || SWFDEC_AS_VALUE_IS_STRING (lval)) { - int comp = strcmp (SWFDEC_AS_VALUE_GET_STRING (rval), SWFDEC_AS_VALUE_GET_STRING (lval)); + int comp = strcmp (swfdec_as_value_to_string (cx, rval), + swfdec_a...
2007 Oct 14
0
4 commits - libswfdec/swfdec_as_interpret.c libswfdec/swfdec_sound.c test/trace
...sValue *val; - SwfdecAsObject *obj; + SwfdecMovie *movie; guint id; - id = swfdec_as_value_to_integer (cx, swfdec_as_stack_pop (cx)); - if (id > (cx->version > 4 ? 21 : 18)) { - SWFDEC_WARNING ("trying to SetProperty %u, not allowed", id); - goto out; - } - val = swfdec_as_stack_peek (cx, 1); - swfdec_as_interpret_eval (cx, NULL, val); - if (SWFDEC_AS_VALUE_IS_UNDEFINED (val)) { - obj = cx->frame->target; - } else if (SWFDEC_AS_VALUE_IS_OBJECT (val)) { - obj = SWFDEC_AS_VALUE_GET_OBJECT (val); + id = swfdec_as_value_to_integer (cx, swfdec_as_stack_peek (cx, 1));...
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
...a/libswfdec/swfdec_as_interpret.c +++ b/libswfdec/swfdec_as_interpret.c @@ -658,6 +658,8 @@ swfdec_action_call (SwfdecAsContext *cx, SwfdecAsFunction *fun; SwfdecAsObject *thisp; SwfdecAsFrame *frame = cx->frame; + SwfdecAsValue retval; + guint i; if (!SWFDEC_AS_VALUE_IS_OBJECT (swfdec_as_stack_peek (frame->stack, 1)) || !SWFDEC_AS_VALUE_IS_OBJECT (swfdec_as_stack_peek (frame->stack, 2))) @@ -667,7 +669,20 @@ swfdec_action_call (SwfdecAsContext *cx, goto error; thisp = SWFDEC_AS_VALUE_GET_OBJECT (swfdec_as_stack_peek (frame->stack, 2)); swfdec_as_stack_pop_n (frame-&...
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
...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->stack, 1)); + swfdec_as_stack_pop_n (cx->frame->stack, 2); +} + +static const char * +sw...
2007 Apr 11
0
Branch 'as' - 4 commits - libswfdec/swfdec_as_interpret.c libswfdec/swfdec_as_types.c libswfdec/swfdec_as_types.h
...int8 *data, guint len) { - void l, r; + SwfdecAsValue *val; + gboolean l, r; - l = swfdec_value_to_boolean_7 (cx, cx->fp->sp[-1]); - r = swfdec_value_to_boolean_7 (cx, cx->fp->sp[-2]); + l = swfdec_as_value_to_boolean (cx, swfdec_as_stack_pop (cx->frame->stack)); + val = swfdec_as_stack_peek (cx->frame->stack, 1); + r = swfdec_as_value_to_boolean (cx, val); - cx->fp->sp--; - if (action == 0x10) - cx->fp->sp[-1] = l && r ? JSVAL_TRUE : JSVAL_FALSE; - else - cx->fp->sp[-1] = l || r ? JSVAL_TRUE : JSVAL_FALSE; - return JS_TRUE; + SWFDEC_AS_VAL...
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
...dec_as_interpret.c index 7862e57..63b53a6 100644 --- a/libswfdec/swfdec_as_interpret.c +++ b/libswfdec/swfdec_as_interpret.c @@ -659,11 +659,12 @@ swfdec_action_call_method (SwfdecAsConte SWFDEC_AS_VALUE_SET_STRING (val, SWFDEC_AS_STR_EMPTY); } if (obj) { - SWFDEC_AS_VALUE_SET_OBJECT (swfdec_as_stack_peek (frame->stack, 3), obj); if (SWFDEC_AS_VALUE_IS_STRING (val) && SWFDEC_AS_VALUE_GET_STRING (val) == SWFDEC_AS_STR_EMPTY) { + SWFDEC_AS_VALUE_SET_UNDEFINED (swfdec_as_stack_peek (frame->stack, 3)); SWFDEC_AS_VALUE_SET_OBJECT (swfdec_as_stack_peek (frame->stack, 2...
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
...ion <= 4) { @@ -2421,16 +2420,16 @@ swfdec_action_logical (SwfdecAsContext *cx, guint action, const guint8 *data, gu // don't call second parameter if not necessary if ((action == SWFDEC_AS_ACTION_AND && !l) || (action != SWFDEC_AS_ACTION_AND && l)) { - val = swfdec_as_stack_peek (cx, 2); - r = (swfdec_as_value_to_number (cx, val) != 0); + r = (swfdec_as_value_to_number (cx, swfdec_as_stack_peek (cx, 2)) != 0); + } else { + r = FALSE; } } else { l = swfdec_as_value_to_boolean (cx, swfdec_as_stack_peek (cx, 1)); - val = swfdec_as_stack_peek...
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
...SwfdecAsValue *val; SwfdecAsObject *obj; + SwfdecAsObject *pobj = NULL; guint n_args; const char *name; @@ -892,7 +893,7 @@ swfdec_action_call_method (SwfdecAsContext *cx, guint action, const guint8 *data name = ""; } else { SWFDEC_AS_VALUE_SET_OBJECT (swfdec_as_stack_peek (cx, 3), obj); - swfdec_as_object_get_variable (obj, name, swfdec_as_stack_peek (cx, 2)); + swfdec_as_object_get_variable_and_flags (obj, name, swfdec_as_stack_peek (cx, 2), NULL, &pobj); } } else { if (SWFDEC_AS_VALUE_IS_STRING (val)) @@ -908,8 +909,10 @@ swfdec_action_c...
2007 Apr 16
0
Branch 'as' - 3 commits - libswfdec/swfdec_as_interpret.c libswfdec/swfdec_as_object.c libswfdec/swfdec_as_object.h
...action, const guint8 *data, guint len) { - jsval rval, lval; double l, r; - void cond; + gboolean cond; - rval = cx->fp->sp[-1]; - lval = cx->fp->sp[-2]; - l = swfdec_value_to_number (cx, lval); - r = swfdec_value_to_number (cx, rval); + l = swfdec_as_value_to_number (cx, swfdec_as_stack_peek (cx->frame->stack, 2)); + r = swfdec_as_value_to_number (cx, swfdec_as_stack_peek (cx->frame->stack, 1)); switch (action) { case 0x0e: cond = l == r; @@ -1037,17 +1033,15 @@ swfdec_action_old_compare (SwfdecAsConte break; default: g_assert_not_reached...
2007 Oct 15
0
8 commits - libswfdec/swfdec_as_interpret.c libswfdec/swfdec_sound.c libswfdec/swfdec_sound.h test/trace
...629,15 @@ swfdec_action_new_object (SwfdecAsContext *cx, guint action, const guint8 *data, SwfdecAsValue *constructor; SwfdecAsFunction *fun; guint n_args; - const char *name; swfdec_as_stack_ensure_size (cx, 2); + swfdec_action_get_variable (cx, action, data, len); constructor = swfdec_as_stack_peek (cx, 1); - name = swfdec_as_interpret_eval (cx, NULL, constructor); n_args = swfdec_as_value_to_integer (cx, swfdec_as_stack_peek (cx, 2)); n_args = MIN (swfdec_as_stack_get_size (cx) - 2, n_args); if (!SWFDEC_AS_VALUE_IS_OBJECT (constructor) || !SWFDEC_IS_AS_FUNCTION (fun = (Swfde...
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
...nts diff --git a/libswfdec/swfdec_as_interpret.c b/libswfdec/swfdec_as_interpret.c index f762252..bbe8060 100644 --- a/libswfdec/swfdec_as_interpret.c +++ b/libswfdec/swfdec_as_interpret.c @@ -593,10 +593,9 @@ swfdec_action_call (SwfdecAsContext *cx, swfdec_as_function_call (fun, thisp, n_args, swfdec_as_stack_peek (frame->stack, 0), swfdec_as_stack_peek (frame->stack, 1)); if (use_super) { - g_print ("replacing super object\n"); if (cx->frame->super && SWFDEC_AS_SUPER (frame->super)->object) { + SWFDEC_LOG ("replacing super object on frame&quot...
2007 Jun 20
1
Branch 'as' - 2 commits - libswfdec/swfdec_as_interpret.c
.....48b75c9 100644 --- a/libswfdec/swfdec_as_interpret.c +++ b/libswfdec/swfdec_as_interpret.c @@ -1732,8 +1732,8 @@ swfdec_action_modulo (SwfdecAsContext *c { double x, y; - x = swfdec_as_value_to_number (cx, swfdec_as_stack_pop (cx->frame->stack)); - y = swfdec_as_value_to_number (cx, swfdec_as_stack_peek (cx->frame->stack, 1)); + y = swfdec_as_value_to_number (cx, swfdec_as_stack_pop (cx->frame->stack)); + x = swfdec_as_value_to_number (cx, swfdec_as_stack_peek (cx->frame->stack, 1)); /* yay, we're portable! */ if (y == 0.0) { x = NAN; diff-tree 1e19719b58b5cfcb80...
2007 May 29
0
Branch 'as' - 8 commits - libswfdec/Makefile.am libswfdec/swfdec_as_array.c libswfdec/swfdec_as_context.c libswfdec/swfdec_as_interpret.c libswfdec/swfdec_as_math.c libswfdec/swfdec_as_math.h libswfdec/swfdec_as_strings.c libswfdec/swfdec_as_types.c
...hod diff --git a/libswfdec/swfdec_as_interpret.c b/libswfdec/swfdec_as_interpret.c index 59dcf68..bcea772 100644 --- a/libswfdec/swfdec_as_interpret.c +++ b/libswfdec/swfdec_as_interpret.c @@ -669,6 +669,8 @@ swfdec_action_call_method (SwfdecAsConte swfdec_as_object_get_variable (obj, name, swfdec_as_stack_peek (frame->stack, 2)); } } else { + if (SWFDEC_AS_VALUE_IS_STRING (val)) + name = SWFDEC_AS_VALUE_GET_STRING (val); SWFDEC_AS_VALUE_SET_NULL (swfdec_as_stack_peek (frame->stack, 3)); SWFDEC_AS_VALUE_SET_UNDEFINED (swfdec_as_stack_peek (frame->stack, 2)); } diff-tr...
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
...rgs, gboolean use_super) +swfdec_action_call (SwfdecAsContext *cx, guint n_args) { SwfdecAsFunction *fun; SwfdecAsObject *thisp; @@ -592,11 +592,9 @@ swfdec_action_call (SwfdecAsContext *cx, swfdec_as_stack_pop_n (frame->stack, n_args); swfdec_as_function_call (fun, thisp, n_args, swfdec_as_stack_peek (frame->stack, 0), swfdec_as_stack_peek (frame->stack, 1)); - if (use_super) { - if (cx->frame->super && SWFDEC_AS_SUPER (frame->super)->object) { - SWFDEC_LOG ("replacing super object on frame"); - SWFDEC_AS_SUPER (cx->frame->super)-&...
2007 Sep 06
0
3 commits - libswfdec/swfdec_as_date.c libswfdec/swfdec_as_interpret.c libswfdec/swfdec_movie.c libswfdec/swfdec_movie.h libswfdec/swfdec_sprite_movie.c
...else { + *object = movie; + *variable = path; + return TRUE; + } +} + static void swfdec_action_get_variable (SwfdecAsContext *cx, guint action, const guint8 *data, guint len) { + SwfdecAsValue *val; const char *s; + SwfdecAsObject *object; - s = swfdec_as_value_to_string (cx, swfdec_as_stack_peek (cx, 1)); - swfdec_as_context_eval (cx, NULL, s, swfdec_as_stack_peek (cx, 1)); + val = swfdec_as_stack_peek (cx, 1); + s = swfdec_as_value_to_string (cx, val); + if (swfdec_action_get_movie_by_path (cx, s, &object, &s)) { + if (object == NULL) + object = swfdec_as_frame_find_va...
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
..._action_get_variable (SwfdecAsContext *cx, guint action, const guint8 *data, guint len) { const char *s; - s = swfdec_js_to_string (cx, cx->fp->sp[-1]); - if (s == NULL) - return JS_FALSE; - cx->fp->sp[-1] = swfdec_js_eval (cx, NULL, s); + s = swfdec_as_value_to_string (cx, swfdec_as_stack_peek (cx->frame->stack, 1)); + swfdec_as_context_eval (cx, NULL, s, swfdec_as_stack_peek (cx->frame->stack, 1)); #ifdef 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))) {...
2007 Sep 26
1
Youtube broken by 89d295a94
.... diff --git a/libswfdec/swfdec_as_interpret.c b/libswfdec/swfdec_as_interpret.c index 5dc9a24..e94b835 100644 --- a/libswfdec/swfdec_as_interpret.c +++ b/libswfdec/swfdec_as_interpret.c @@ -578,6 +578,7 @@ swfdec_action_get_variable (SwfdecAsContext *cx, guint action, const guint8 *dat val = swfdec_as_stack_peek (cx, 1); s = swfdec_as_value_to_string (cx, val); + swfdec_as_context_eval (cx, NULL, s, val); if (swfdec_action_get_movie_by_path (cx, s, &object, &s)) { if (object) { if (s) { @@ -589,7 +590,7 @@ swfdec_action_get_variable (SwfdecAsContext *cx, guint action, const guint...
2007 Aug 27
0
8 commits - libswfdec/swfdec_as_boolean.c libswfdec/swfdec_as_interpret.c libswfdec/swfdec_as_number.c libswfdec/swfdec_initialize.as libswfdec/swfdec_initialize.h test/trace vivified/core
...ec_action_start_drag (SwfdecAsContext *cx, guint action, const guint8 *data, guint len) { - guint n_args = 1; + SwfdecRect rect, *rectp = NULL; + SwfdecMovie *movie; + gboolean center; + guint stack_size = 3; swfdec_as_stack_ensure_size (cx, 3); if (swfdec_as_interpret_eval (cx, NULL, swfdec_as_stack_peek (cx, 1)) == SWFDEC_AS_STR_EMPTY) { SWFDEC_AS_VALUE_SET_OBJECT (swfdec_as_stack_peek (cx, 1), cx->frame->target); } + center = swfdec_as_value_to_boolean (cx, swfdec_as_stack_peek (cx, 2)); if (swfdec_as_value_to_number (cx, swfdec_as_stack_peek (cx, 3))) { swfdec_as_stack_ens...
2007 May 29
0
Branch 'as' - 6 commits - libswfdec/swfdec_as_interpret.c libswfdec/swfdec_js_xml.c libswfdec/swfdec_tag.c player/swfplay.c
...7:43 2007 +0200 reimplement NewMethod action diff --git a/libswfdec/swfdec_as_interpret.c b/libswfdec/swfdec_as_interpret.c index b9e19ad..42479d2 100644 --- a/libswfdec/swfdec_as_interpret.c +++ b/libswfdec/swfdec_as_interpret.c @@ -1327,54 +1327,44 @@ fail: SWFDEC_AS_VALUE_SET_UNDEFINED (swfdec_as_stack_peek (cx->frame->stack, 1)); } -#if 0 static void swfdec_action_new_method (SwfdecAsContext *cx, guint action, const guint8 *data, guint len) { - JSStackFrame *fp = cx->fp; - const char *s; - guint32 n_args; - JSObject *object; - jsval constructor; - - if (!swfdec_script_ensure_st...
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
...ec_as_interpret.c +++ b/libswfdec/swfdec_as_interpret.c @@ -535,15 +535,14 @@ out: static void swfdec_action_get_member (SwfdecAsContext *cx, guint action, const guint8 *data, guint len) { - /* FIXME: do we need a "convert to object" function here? */ - if (SWFDEC_AS_VALUE_IS_OBJECT (swfdec_as_stack_peek (cx->frame->stack, 2))) { + SwfdecAsObject *object = swfdec_as_value_to_object (cx, swfdec_as_stack_peek (cx->frame->stack, 2)); + if (object) { const char *name; - SwfdecAsObject *o = SWFDEC_AS_VALUE_GET_OBJECT (swfdec_as_stack_peek (cx->frame->stack, 2)); name = s...