search for: swfdec_value_to_number_7

Displaying 6 results from an estimated 6 matches for "swfdec_value_to_number_7".

Did you mean: swfdec_value_to_number
2007 Feb 01
0
Branch 'interpreter' - 9 commits - libswfdec/js libswfdec/swfdec_script.c libswfdec/swfdec_script.h player/swfdec_debug_stack.c test/trace
...trying to find the function diff --git a/libswfdec/swfdec_script.c b/libswfdec/swfdec_script.c index ad08eef..39b3b8b 100644 --- a/libswfdec/swfdec_script.c +++ b/libswfdec/swfdec_script.c @@ -161,7 +161,7 @@ swfdec_action_to_number (JSContext *cx, static JSBool swfdec_value_to_number_7 (JSContext *cx, jsval val, double *d) { - if (JSVAL_IS_NULL (val)) { + if (JSVAL_IS_OBJECT (val)) { *d = *cx->runtime->jsNaN; return JS_TRUE; } else { @@ -550,8 +550,10 @@ swfdec_action_call_function (JSContext * JSStackFrame *fp = cx->fp; const char *s; guint32 n_...
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
...ion 6 is completely wrong, but a lot of the testsuite + * depends on it (oops). + * The code calls the valueOf function and returns 0 if no such function exists. + */ + return JSVAL_IS_NULL (val) ? 0 : *cx->runtime->jsNaN; + } else { + return 0; + } +} + +static void +swfdec_value_to_number_7 (SwfdecAsContext *cx, jsval val, double *d) +{ + if (JSVAL_IS_OBJECT (val)) { + *d = *cx->runtime->jsNaN; + return JS_TRUE; + } else if (JSVAL_IS_STRING (val) && + JS_GetStringLength (JSVAL_TO_STRING (val)) == 0) { + *d = *cx->runtime->jsNaN; + return JS_TRUE;...
2007 Mar 05
0
11 commits - configure.ac libswfdec/swfdec_js_movie.c libswfdec/swfdec_root_movie.c libswfdec/swfdec_root_movie.h libswfdec/swfdec_script.c libswfdec/swfdec_sprite.c libswfdec/swfdec_sprite.h libswfdec/swfdec_sprite_movie.c libswfdec/swfdec_swf_decoder.c
...; lval = cx->fp->sp[-2]; if (((SwfdecScript *) cx->fp->swf)->version < 7) { - l = swfdec_action_to_number (cx, lval); - r = swfdec_action_to_number (cx, rval); + l = swfdec_value_to_number (cx, lval); + r = swfdec_value_to_number (cx, rval); } else { if (!swfdec_value_to_number_7 (cx, lval, &l) || !swfdec_value_to_number_7 (cx, rval, &r)) @@ -901,8 +901,8 @@ swfdec_action_add2_5 (JSContext *cx, gui cx->fp->sp[-1] = STRING_TO_JSVAL (str); } else { double d, d2; - d = swfdec_action_to_number (cx, lval); - d2 = swfdec_action_to_number...
2007 Feb 16
0
11 commits - libswfdec/swfdec_font.c libswfdec/swfdec_font.h libswfdec/swfdec_js_movie.c libswfdec/swfdec_script.c libswfdec/swfdec_script.h test/.gitignore test/trace
...t;fp->sp[-1] = DOUBLE_TO_JSVAL (cx->runtime->jsNaN); + return JS_TRUE; + } else { + return JS_NewNumberValue (cx, x, &cx->fp->sp[-1]); + } +} + +static JSBool +swfdec_action_modulo_7 (JSContext *cx, guint action, const guint8 *data, guint len) +{ + double x, y; + + if (!swfdec_value_to_number_7 (cx, cx->fp->sp[-1], &x) || + !swfdec_value_to_number_7 (cx, cx->fp->sp[-2], &y)) + return JS_FALSE; + cx->fp->sp--; + errno = 0; + x = fmod (x, y); + if (errno != 0) { + cx->fp->sp[-1] = DOUBLE_TO_JSVAL (cx->runtime->jsNaN); + return JS_TRUE;...
2007 Mar 22
0
11 commits - libswfdec/swfdec_color.c libswfdec/swfdec_flv_decoder.c libswfdec/swfdec_js_net_stream.c libswfdec/swfdec_movie.c libswfdec/swfdec_net_stream.c libswfdec/swfdec_net_stream.h libswfdec/swfdec_pattern.c libswfdec/swfdec_script.c NEWS test/trace
...<otte@gnome.org> Date: Thu Mar 22 13:27:17 2007 +0100 Fix division code diff --git a/libswfdec/swfdec_script.c b/libswfdec/swfdec_script.c index d96ec0f..a9f16e0 100644 --- a/libswfdec/swfdec_script.c +++ b/libswfdec/swfdec_script.c @@ -283,6 +283,10 @@ swfdec_value_to_number_7 (JSContext *cx, if (JSVAL_IS_OBJECT (val)) { *d = *cx->runtime->jsNaN; return JS_TRUE; + } else if (JSVAL_IS_STRING (val) && + JS_GetStringLength (JSVAL_TO_STRING (val)) == 0) { + *d = *cx->runtime->jsNaN; + return JS_TRUE; } else { return JS_Val...
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
...trying to find the function diff --git a/libswfdec/swfdec_script.c b/libswfdec/swfdec_script.c index ad08eef..39b3b8b 100644 --- a/libswfdec/swfdec_script.c +++ b/libswfdec/swfdec_script.c @@ -161,7 +161,7 @@ swfdec_action_to_number (JSContext *cx, static JSBool swfdec_value_to_number_7 (JSContext *cx, jsval val, double *d) { - if (JSVAL_IS_NULL (val)) { + if (JSVAL_IS_OBJECT (val)) { *d = *cx->runtime->jsNaN; return JS_TRUE; } else { @@ -550,8 +550,10 @@ swfdec_action_call_function (JSContext * JSStackFrame *fp = cx->fp; const char *s; guint32 n_...