search for: jsatom

Displaying 20 results from an estimated 23 matches for "jsatom".

Did you mean: atom
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
libswfdec/Makefile.am | 2 libswfdec/js/jsatom.c | 6 - libswfdec/js/jsatom.h | 1 libswfdec/swfdec_debugger.c | 116 +++++++++++++++++++++++--------------- libswfdec/swfdec_debugger.h | 16 +---- libswfdec/swfdec_edittext_movie.c | 4 - libswfdec/swfdec_event.c | 2 libswfdec/swfdec...
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
configure.ac | 2 libswfdec/js/jsatom.c | 6 libswfdec/js/jsatom.h | 1 libswfdec/swfdec_buffer.c | 7 libswfdec/swfdec_edittext_movie.c | 4 libswfdec/swfdec_js.c | 39 +- libswfdec/swfdec_js.h | 3 libswfdec/swfdec_js_global.c | 5 libswfdec...
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
...e mode 100644 index 9947f19..0000000 --- a/libswfdec/swfdec_compiler.c +++ /dev/null @@ -1,1504 +0,0 @@ -#ifdef HAVE_CONFIG_H -#include "config.h" -#endif - -#include <stdlib.h> -#include <string.h> - -#include <js/jsapi.h> -#include <js/jsarena.h> -#include <js/jsatom.h> -#include <js/jsemit.h> -#include <js/jsscript.h> -#include <js/jsopcode.h> - -#include "swfdec_bits.h" -#include "swfdec_compiler.h" -#include "swfdec_debug.h" -#include "swfdec_debugger.h" -#include "swfdec_player_internal.h&quo...
2007 Mar 07
1
2 commits - libswfdec/swfdec_script.c test/trace
libswfdec/swfdec_script.c | 14 ++++++++++++-- test/trace/Makefile.am | 2 ++ test/trace/gotoframe.swf |binary test/trace/gotoframe.swf.trace | 13 +++++++++++++ 4 files changed, 27 insertions(+), 2 deletions(-) New commits: diff-tree 12348410a3509928a6e8e4c8ca00292a58ff542c (from 46e62d4410c20c19774a45758d8ebf11cd0bdf96) Author: Benjamin Otte <otte@gnome.org>
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
...XME: lots of overlap with swfdec_action_call_method */ +static void +swfdec_action_call_function (SwfdecAsContext *cx, guint action, const guint8 *data, guint len) +{ + JSStackFrame *fp = cx->fp; + const char *s; + guint32 n_args; + JSObject *obj, *pobj; + JSProperty *prop; + jsval fun; + JSAtom *atom; + + if (!swfdec_script_ensure_stack (cx, 2)) + return JS_FALSE; + s = swfdec_js_to_string (cx, fp->sp[-1]); + if (s == NULL) + return JS_FALSE; + if (!JS_ValueToECMAUint32 (cx, fp->sp[-2], &n_args)) + return JS_FALSE; + + if (!(atom = js_Atomize (cx, s, strlen (s)...
2007 Feb 19
0
22 commits - libswfdec/js libswfdec/swfdec_debugger.c libswfdec/swfdec_js.c libswfdec/swfdec_js_global.c libswfdec/swfdec_js_movie.c libswfdec/swfdec_movie.c libswfdec/swfdec_player.c libswfdec/swfdec_player_internal.h libswfdec/swfdec_script.c
...e.org> * * This library is free software; you can redistribute it and/or * modify it under the terms of the GNU Lesser General Public @@ -25,6 +25,159 @@ #include "swfdec_js.h" #include "swfdec_debug.h" #include "swfdec_player_internal.h" +#include "js/jsatom.h" +#include "js/jsfun.h" +#include "js/jsinterp.h" +#include "js/jsobj.h" + +/*** INTERVAL ***/ + +typedef struct _SwfdecJSInterval SwfdecJSInterval; +struct _SwfdecJSInterval { + SwfdecTimeout timeout; + SwfdecPlayer * player; /* needed so it can be readded...
2007 Feb 22
0
3 commits - libswfdec/swfdec_js.c libswfdec/swfdec_js_movie.c libswfdec/swfdec_script.c
...SWFDEC_WARNING ("trying to SetProperty %u, not allowed", id); goto out; + } - if (!(jsobj = swfdec_scriptable_get_object (SWFDEC_SCRIPTABLE (movie)))) + if (bytes == NULL) return JS_FALSE; + if (*bytes == '\0') { + JSObject *pobj; + JSProperty *prop; + JSAtom *atom = js_Atomize (cx, properties[id], strlen (properties[id]), 0); + if (atom == NULL) + return JS_FALSE; + if (!js_FindProperty (cx, (jsid) atom, &jsobj, &pobj, &prop)) + return JS_FALSE; + if (!prop) + return JS_FALSE; + if (!OBJ_GET_PROPERTY (cx, jsobj, (...
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
...if (SWFDEC_AS_VALUE_IS_OBJECT (val)) + swfdec_as_object_delete_variable (SWFDEC_AS_VALUE_GET_OBJECT (val), name); } static void swfdec_action_delete2 (SwfdecAsContext *cx, guint action, const guint8 *data, guint len) { const char *name; - JSObject *obj, *pobj; - JSProperty *prop; - JSAtom *atom; + SwfdecAsObject *object; - cx->fp->sp -= 1; - name = swfdec_js_to_string (cx, cx->fp->sp[1]); - if (name == NULL) - return JS_FALSE; - if (!(atom = js_Atomize (cx, name, strlen (name), 0)) || - !js_FindProperty (cx, (jsid) atom, &obj, &pobj, &prop))...
2007 Mar 20
0
9 commits - configure.ac libswfdec/swfdec_bits.c libswfdec/swfdec_debug.c libswfdec/swfdec_js.c libswfdec/swfdec_script.c libswfdec/swfdec_sound.c
...lete, only remove one item from the stack, not two diff --git a/libswfdec/swfdec_script.c b/libswfdec/swfdec_script.c index c869e7b..5eda3c1 100644 --- a/libswfdec/swfdec_script.c +++ b/libswfdec/swfdec_script.c @@ -1933,7 +1933,7 @@ swfdec_action_delete2 (JSContext *cx, gu JSProperty *prop; JSAtom *atom; - cx->fp->sp -= 2; + cx->fp->sp -= 1; name = swfdec_js_to_string (cx, cx->fp->sp[1]); if (name == NULL) return JS_FALSE;
2007 Apr 27
0
Changes to 'refs/tags/0.4.3'
...swfdec/jpeg/test.c | 19 libswfdec/jpeg/test_rgb.c | 83 libswfdec/js/Makefile.am | 2 libswfdec/js/jsapi.c | 11 libswfdec/js/jsapi.h | 8 libswfdec/js/jsatom.c | 2 libswfdec/js/jsatom.h | 6 libswfdec/js/jsdhash.c | 2 libswfdec/js/jsfun.c | 16 libswfdec/js/jsfun.h | 3 libswfdec/js/jsgc.c...
2007 Mar 09
0
17 commits - libswfdec/js libswfdec/swfdec_js.c libswfdec/swfdec_js_global.c libswfdec/swfdec_js.h libswfdec/swfdec_js_movie.c libswfdec/swfdec_movie.c libswfdec/swfdec_player.c libswfdec/swfdec_player_internal.h libswfdec/swfdec_root_movie.c
...lags & SWFDEC_SCRIPT_PRELOAD_PARENT ? " PRELOAD_PARENT" : ""); + if (script->flags & SWFDEC_SCRIPT_PRELOAD_SUPER) { + SWFDEC_ERROR ("preloading super isn't implemented"); + } + if (script->flags & SWFDEC_SCRIPT_PRELOAD_ROOT) { + JSAtom *atom; + JSObject *obj, *pobj; + JSProperty *prop; + SWFDEC_LOG ("preloading root into register %u", preload_reg); + if (!(atom = js_Atomize (cx, "_root", 5, 0)) || + !js_FindProperty (cx, (jsid) atom, &obj, &pobj, &prop) || + !js_GetPr...
2007 Jun 01
0
Branch 'as' - 2 commits - libswfdec/Makefile.am libswfdec/swfdec_as_strings.c libswfdec/swfdec_as_types.c libswfdec/swfdec_interval.c libswfdec/swfdec_interval.h libswfdec/swfdec_player_as.c libswfdec/swfdec_player.c
...nterval->player->jscx; - SwfdecAsValue fun, rval; - - timeout->timestamp += SWFDEC_MSECS_TO_TICKS (interval->msecs); - swfdec_player_add_timeout (interval->player, timeout); - g_assert (JSVAL_IS_OBJECT (interval->vals[1])); - if (JSVAL_IS_STRING (interval->vals[0])) { - JSAtom *atom = js_AtomizeString (cx, JSVAL_TO_STRING (interval->vals[0]), 0); - if (!atom) - return; - if (!js_GetProperty (cx, JSVAL_TO_OBJECT (interval->vals[1]), - (jsid) atom, &fun)) - return; - } else { - fun = interval->vals[0]; - } - js_InternalCall (cx, JSVAL_T...
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
..._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_args; - JSObject *obj; + JSObject *obj, *pobj; + JSProperty *prop; jsval fun; + JSAtom *atom; s = swfdec_js_to_string (cx, fp->sp[-1]); if (s == NULL) @@ -561,7 +563,9 @@ swfdec_action_call_function (JSContext * if (n_args + 2 > (guint) (fp->sp - fp->spbase)) return JS_FALSE; - obj = OBJ_THIS_OBJECT (cx, cx->fp->scopeChain); + if (!(atom = js...
2007 Mar 11
0
10 commits - libswfdec/js libswfdec/swfdec_js_color.c libswfdec/swfdec_js_connection.c libswfdec/swfdec_js_movie.c libswfdec/swfdec_js_net_stream.c libswfdec/swfdec_js_video.c libswfdec/swfdec_js_xml.c libswfdec/swfdec_script.c player/.gitignore
...script. Want %u arguments, only got %u", n_args, stacksize - 2); + n_args = stacksize - 2; + if (!swfdec_script_ensure_stack (cx, n_args + 2)) + return JS_FALSE; + } j = -1; i = - (n_args + 2); @@ -677,13 +685,13 @@ swfdec_action_call_function (JSContext * jsval fun; JSAtom *atom; + if (!swfdec_script_ensure_stack (cx, 2)) + return JS_FALSE; s = swfdec_js_to_string (cx, fp->sp[-1]); if (s == NULL) return JS_FALSE; if (!JS_ValueToECMAUint32 (cx, fp->sp[-2], &n_args)) return JS_FALSE; - if (!swfdec_script_ensure_stack (cx, n_args +...
2007 Apr 27
0
Changes to 'refs/tags/0.4.4'
...swfdec/jpeg/test.c | 116 libswfdec/jpeg/test_rgb.c | 128 libswfdec/js/Makefile.am | 2 libswfdec/js/jsapi.c | 11 libswfdec/js/jsapi.h | 8 libswfdec/js/jsatom.c | 2 libswfdec/js/jsatom.h | 6 libswfdec/js/jsdhash.c | 2 libswfdec/js/jsfun.c | 16 libswfdec/js/jsfun.h | 3 libswfdec/js/jsgc.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
...or JSVAL_VOID if no value was found. - **/ -jsval -swfdec_js_eval (JSContext *cx, JSObject *obj, const char *str, - gboolean ignore_case) +static JSBool +swfdec_js_eval_set_property (JSContext *cx, JSObject *obj, + const char *name, gboolean initial, gboolean ignore_case, jsval *ret) +{ + JSAtom *atom; + JSObject *pobj; + JSProperty *prop; + + atom = js_Atomize (cx, name, strlen(name), ignore_case ? ATOM_NOCASE : 0); + if (!atom) + return JS_FALSE; + if (initial) { + return OBJ_SET_PROPERTY (cx, obj, (jsid) atom, ret); + } else { + if (!js_FindProperty (cx, (jsid) atom, &amp...
2007 Mar 28
0
Branch 'as' - 3 commits - libswfdec/Makefile.am libswfdec/swfdec_as_context.c libswfdec/swfdec_as_context.h libswfdec/swfdec_as_frame.c libswfdec/swfdec_as_frame.h libswfdec/swfdec_as_object.c libswfdec/swfdec_as_object.h libswfdec/swfdec_as_types.c
...>n_registers = swfdec_bits_get_u8 (&bits) + 1; flags = swfdec_bits_get_u16 (&bits); preloads = g_new0 (guint8, n_args); } else { - fun->nvars = 5; + script->n_registers = 5; } + fun->nvars = script->n_registers; for (i = 0; i < n_args; i++) { JSAtom *atom; const char *arg_name; if (v2) { guint preload = swfdec_bits_get_u8 (&bits); - if (preload && preload >= fun->nvars) { + if (preload && preload >= script->n_registers) { SWFDEC_ERROR ("argument %u is preloaded into register %u...
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
.../libswfdec/swfdec_script.c +++ b/libswfdec/swfdec_script.c @@ -1763,6 +1763,26 @@ swfdec_action_delete (JSContext *cx, gui } static JSBool +swfdec_action_delete2 (JSContext *cx, guint action, const guint8 *data, guint len) +{ + const char *name; + JSObject *obj, *pobj; + JSProperty *prop; + JSAtom *atom; + + cx->fp->sp -= 2; + name = swfdec_js_to_string (cx, cx->fp->sp[1]); + if (name == NULL) + return JS_FALSE; + if (!(atom = js_Atomize (cx, name, strlen (name), 0)) || + !js_FindProperty (cx, (jsid) atom, &obj, &pobj, &prop)) + return JS_FALSE; + if...
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
...if (fun == NULL) return JS_FALSE; + if (v2) { + fun->nvars = swfdec_bits_get_u8 (&bits); + script->flags = swfdec_bits_get_u16 (&bits); + script->preloads = g_new0 (guint8, n_args); + } else { + fun->nvars = 4; + } for (i = 0; i < n_args; i++) { JSAtom *atom; - const char *arg_name = swfdec_bits_get_string (&bits); + const char *arg_name; + if (v2) { + guint preload = swfdec_bits_get_u8 (&bits); + if (preload && preload >= fun->nvars) { + SWFDEC_ERROR ("argument %u is preloaded into register %u out of...
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
...gt; (((SwfdecScript *) cx->fp->swf)->version > 4 ? 21 : 18)) { - SWFDEC_WARNING ("trying to SetProperty %u, not allowed", id); - goto out; - } - - if (bytes == NULL) - return JS_FALSE; - if (*bytes == '\0') { - JSObject *pobj; - JSProperty *prop; - JSAtom *atom = js_Atomize (cx, properties[id], strlen (properties[id]), 0); - if (atom == NULL) - return JS_FALSE; - if (!js_FindProperty (cx, (jsid) atom, &jsobj, &pobj, &prop)) - return JS_FALSE; - if (!prop) - return JS_FALSE; - if (!OBJ_GET_PROPERTY (cx, jsobj, (...