Displaying 20 results from an estimated 34 matches for "constant_pool".
2007 Mar 13
0
2 commits - libswfdec/swfdec_debugger.c libswfdec/swfdec_script.c libswfdec/swfdec_script.h
...of printing "Pool x"
diff --git a/libswfdec/swfdec_debugger.c b/libswfdec/swfdec_debugger.c
index 7f3546d..c17c315 100644
--- a/libswfdec/swfdec_debugger.c
+++ b/libswfdec/swfdec_debugger.c
@@ -32,32 +32,138 @@
/*** SwfdecDebuggerScript ***/
+typedef struct {
+ SwfdecConstantPool * constant_pool; /* current constant pool */
+ GArray * commands; /* SwfdecDebuggerCommands parsed so far */
+} ScriptParser;
+
+static char *
+swfdec_debugger_print_push (ScriptParser *parser, const guint8 *data, guint len)
+{
+ gboolean first = TRUE;
+ SwfdecBits bits;
+ GString *string = g_string_new (&quo...
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
...O_JSVAL (string);
- return JS_TRUE;
-}
-
-static void
swfdec_value_to_boolean_5 (SwfdecAsContext *cx, jsval val)
{
if (JSVAL_IS_BOOLEAN (val)) {
@@ -407,123 +398,121 @@ swfdec_action_wait_for_frame (SwfdecAsCo
swfdec_script_skip_actions (cx, jump);
}
-#if 0
static void
swfdec_action_constant_pool (SwfdecAsContext *cx, guint action, const guint8 *data, guint len)
{
SwfdecConstantPool *pool;
+ SwfdecAsFrame *frame;
+ frame = cx->frame;
pool = swfdec_constant_pool_new_from_action (data, len);
if (pool == NULL)
- return JS_FALSE;
- if (cx->fp->constant_pool)
- swfd...
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
...gnome.org>
Date: Wed Jan 31 23:33:40 2007 +0100
implement ConstantPool inheritance for DefineFunction
diff --git a/libswfdec/swfdec_script.c b/libswfdec/swfdec_script.c
index 46ba618..85e6f7c 100644
--- a/libswfdec/swfdec_script.c
+++ b/libswfdec/swfdec_script.c
@@ -97,6 +97,26 @@ swfdec_constant_pool_free (SwfdecConstan
g_ptr_array_free (pool, TRUE);
}
+/* FIXME: this is a bit hacky */
+static SwfdecBuffer *
+swfdec_constant_pool_get_area (SwfdecScript *script, SwfdecConstantPool *pool)
+{
+ guint8 *start;
+ SwfdecBuffer *buffer;
+ guint len;
+
+ if (pool->len == 0)
+ return NUL...
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
...ike this and switch the rest of the
functions.
diff --git a/libswfdec/swfdec_as_frame.c b/libswfdec/swfdec_as_frame.c
index e0f6fe2..0c312bf 100644
--- a/libswfdec/swfdec_as_frame.c
+++ b/libswfdec/swfdec_as_frame.c
@@ -130,7 +130,7 @@ swfdec_as_frame_new (SwfdecAsContext *co
if (script->constant_pool) {
frame->constant_pool_buffer = swfdec_buffer_ref (script->constant_pool);
frame->constant_pool = swfdec_constant_pool_new_from_action (
- script->constant_pool->data, script->constant_pool->length);
+ script->constant_pool->data, script->constant_pool->l...
2007 Jan 18
0
Branch 'interpreter' - 4 commits - libswfdec/js libswfdec/swfdec_bits.c libswfdec/swfdec_bits.h libswfdec/swfdec_codec_screen.c libswfdec/swfdec_image.c libswfdec/swfdec_script.c libswfdec/swfdec_swf_decoder.c libswfdec/swfdec_tag.c
...nterp.h"
-/*** SUPPORT FUNCTIONS ***/
-
+#include <string.h>
#include "swfdec_decoder.h"
#include "swfdec_movie.h"
#include "swfdec_root_movie.h"
+/*** CONSTANT POOLS ***/
+
+typedef GPtrArray SwfdecConstantPool;
+
+static SwfdecConstantPool *
+swfdec_constant_pool_new_from_action (const guint8 *data, guint len)
+{
+ guint8 *next;
+ guint i, n;
+ GPtrArray *pool;
+
+ if (len < 2) {
+ SWFDEC_ERROR ("constant pool too small");
+ return NULL;
+ }
+ n = GUINT16_FROM_LE (*((guint16*) data));
+ data += 2;
+ len -= 2;
+ pool = g_ptr_array...
2007 Apr 03
0
11 commits - libswfdec-gtk/swfdec_gtk_loader.c libswfdec-gtk/swfdec_playback_alsa.c libswfdec-gtk/swfdec_source.c libswfdec/swfdec_cached.c libswfdec/swfdec_font.c libswfdec/swfdec_morphshape.c libswfdec/swfdec_net_stream.c libswfdec/swfdec_script.c
...libswfdec/swfdec_script.c
index 21c1fff..d8ce1ad 100644
--- a/libswfdec/swfdec_script.c
+++ b/libswfdec/swfdec_script.c
@@ -3022,6 +3022,10 @@ no_catch:
/* Reset sp before freeing stack slots, because our caller may GC soon. */
fp->sp = fp->spbase;
fp->spbase = NULL;
+ if (fp->constant_pool) {
+ swfdec_constant_pool_free (fp->constant_pool);
+ fp->constant_pool = NULL;
+ }
js_FreeRawStack(cx, mark);
cx->interpLevel--;
swfdec_script_unref (script);
@@ -3123,8 +3127,6 @@ swfdec_script_execute (SwfdecScript *scr
ok = swfdec_script_interpret (script, cx, &f...
2007 May 21
0
Branch 'as' - libswfdec/swfdec_as_frame.c libswfdec/swfdec_as_frame.h libswfdec/swfdec_as_function.c libswfdec/swfdec_as_function.h libswfdec/swfdec_as_native_function.c libswfdec/swfdec_as_object.c libswfdec/swfdec_as_script_function.c
...t;next->var_object : thisp;
+ if (frame->next)
+ frame->var_object = frame->next->var_object;
frame->n_registers = script->n_registers;
frame->registers = g_slice_alloc0 (sizeof (SwfdecAsValue) * frame->n_registers);
- frame->thisp = thisp;
if (script->constant_pool) {
frame->constant_pool_buffer = swfdec_buffer_ref (script->constant_pool);
frame->constant_pool = swfdec_constant_pool_new_from_action (
@@ -148,16 +145,13 @@ swfdec_as_frame_new (SwfdecAsObject *thi
}
SwfdecAsFrame *
-swfdec_as_frame_new_native (SwfdecAsObject *thisp)
+swfd...
2007 Jun 28
0
Branch 'as' - 4 commits - libswfdec/swfdec_debugger.c libswfdec/swfdec_movie.c libswfdec/swfdec_movie.h libswfdec/swfdec_sprite_movie.c test/image
...c_debugger.c
index 52ae539..141935b 100644
--- a/libswfdec/swfdec_debugger.c
+++ b/libswfdec/swfdec_debugger.c
@@ -111,11 +111,11 @@ swfdec_debugger_print_push (ScriptParser
goto error;
}
id = type == 8 ? swfdec_bits_get_u8 (&bits) : swfdec_bits_get_u16 (&bits);
- s = swfdec_constant_pool_get (parser->constant_pool, id);
- if (!s) {
+ if (id >= swfdec_constant_pool_size (parser->constant_pool)) {
SWFDEC_ERROR ("constant pool size too small");
goto error;
}
+ s = swfdec_constant_pool_get (parser->constant_pool, id);
g_string_append_c (s...
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
...JSStackFrame *oldfp, frame;
JSObject *obj;
JSBool ok;
+ void *mark;
g_return_val_if_fail (script != NULL, JSVAL_VOID);
g_return_val_if_fail (SWFDEC_IS_SCRIPTABLE (scriptable), JSVAL_VOID);
@@ -2534,8 +2553,8 @@ swfdec_script_execute (SwfdecScript *scr
frame.swf = script;
frame.constant_pool = NULL;
frame.thisp = obj;
- frame.argc = frame.nvars = 0;
- frame.argv = frame.vars = NULL;
+ frame.argc = 0;
+ frame.argv = NULL;
frame.annotation = NULL;
frame.sharpArray = NULL;
frame.rval = JSVAL_VOID;
@@ -2549,6 +2568,14 @@ swfdec_script_execute (SwfdecScript *scr
frame.dor...
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
...ecoder *dec = SWFDEC_ROOT_MOVIE (movie)->decoder;
+ loaded = dec->frames_loaded;
+ g_assert (loaded <= movie->n_frames);
+ } else {
+ loaded = movie->n_frames;
+ }
+ if (loaded < frame)
+ swfdec_script_skip_actions (cx, jump);
+}
+
+#if 0
+static void
+swfdec_action_constant_pool (SwfdecAsContext *cx, guint action, const guint8 *data, guint len)
+{
+ SwfdecConstantPool *pool;
+
+ pool = swfdec_constant_pool_new_from_action (data, len);
+ if (pool == NULL)
+ return JS_FALSE;
+ if (cx->fp->constant_pool)
+ swfdec_constant_pool_free (cx->fp->constant_pool...
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
...return JSVAL_VOID;
oldfp = cx->fp;
- frame.callobj = frame.argsobj = NULL;
+ frame.callobj = NULL;
frame.script = NULL;
- frame.varobj = NULL;
+ frame.varobj = frame.argsobj = NULL;
frame.fun = swfdec_script_ensure_function (script, scriptable);
frame.swf = script;
frame.constant_pool = NULL;
@@ -2606,7 +2606,6 @@ swfdec_script_execute (SwfdecScript *scr
frame.sharpArray = NULL;
frame.rval = JSVAL_VOID;
frame.down = NULL;
- frame.scopeChain = NULL;
frame.pc = NULL;
frame.sp = oldfp ? oldfp->sp : NULL;
frame.spbase = NULL;
@@ -2614,7 +2613,8 @@ swfdec_script...
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
...iable */
- SwfdecAsObject * original_target;/* original target (used when resetting target) */
- gboolean is_local; /* TRUE if this frame takes local variables */
- SwfdecAsValue * registers; /* the registers */
- guint n_registers; /* number of allocated registers */
- SwfdecConstantPool * constant_pool; /* constant pool currently in use */
- SwfdecBuffer * constant_pool_buffer; /* buffer containing the raw data for constant_pool */
- SwfdecAsValue * stack_begin; /* beginning of stack */
- guint8 * pc; /* program counter on stack */
- /* native function */
-};
-
-struct _SwfdecAsFrameClass {...
2007 Jan 31
0
Branch 'interpreter' - 3 commits - libswfdec/js libswfdec/swfdec_script.c
...pool as empty
diff --git a/libswfdec/js/jsinterp.c b/libswfdec/js/jsinterp.c
index ce8d014..910087a 100644
--- a/libswfdec/js/jsinterp.c
+++ b/libswfdec/js/jsinterp.c
@@ -847,6 +847,7 @@ have_fun:
frame.sharpArray = NULL;
frame.dormantNext = NULL;
frame.objAtomMap = NULL;
+ frame.constant_pool = NULL;
/* Compute the 'this' parameter and store it in frame as frame.thisp. */
ok = ComputeThis(cx, thisp, &frame);
@@ -1140,6 +1141,7 @@ js_Execute(JSContext *cx, JSObject *chai
frame.flags = special;
frame.dormantNext = NULL;
frame.objAtomMap = NULL;
+...
2007 Oct 11
0
12 commits - configure.ac doc/Makefile.am libswfdec/swfdec_as_frame.c libswfdec/swfdec_audio.c libswfdec/swfdec_audio_event.c libswfdec/swfdec_audio_event.h libswfdec/swfdec_shape_parser.c libswfdec/swfdec_sound.c test/sound
...as_frame_dispose (GObject *object
SwfdecAsFrame *frame = SWFDEC_AS_FRAME (object);
g_slice_free1 (sizeof (SwfdecAsValue) * frame->n_registers, frame->registers);
- if (frame->script) {
- swfdec_script_unref (frame->script);
- frame->script = NULL;
- }
if (frame->constant_pool) {
swfdec_constant_pool_free (frame->constant_pool);
frame->constant_pool = NULL;
@@ -285,6 +281,10 @@ swfdec_as_frame_dispose (GObject *object
swfdec_as_frame_pop_block (frame);
g_array_free (frame->blocks, TRUE);
g_slist_free (frame->scope_chain);
+ if (frame->...
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
...tring_free (string, TRUE);
- return NULL;
- }
+ if (!s)
+ goto error;
g_string_append_c (string, '"');
g_string_append (string, s);
g_string_append_c (string, '"');
@@ -108,15 +106,13 @@ swfdec_debugger_print_push (ScriptParser
if (!parser->constant_pool) {
SWFDEC_ERROR ("no constant pool");
- g_string_free (string, TRUE);
- return NULL;
+ goto error;
}
id = type == 8 ? swfdec_bits_get_u8 (&bits) : swfdec_bits_get_u16 (&bits);
s = swfdec_constant_pool_get (parser->constant_pool, id);
if (!s) {...
2007 Apr 17
0
Branch 'as' - 2 commits -
...n_registers; /* number of registers */
- guint version; /* version of the script */
++ guint version; /* version of the script */
++ guint n_registers; /* number of registers */
gpointer debugger; /* debugger owning us or NULL */
/* needed by functions */
SwfdecBuffer * constant_pool; /* constant pool action */
@@@ -78,8 -77,8 +78,8 @@@
SwfdecScript * swfdec_script_new_for_player (SwfdecPlayer * player,
SwfdecBits * bits,
const char * name,
- unsigned int version);
- guint version);
-void swfdec_script_ref (SwfdecScript *...
2019 Dec 04
2
PC relative load/store in LLVM Target?
Hello,
Is there any exist LLVM Target (backend) that support PC relative load and
store? If so, what exactly is the instruction?
Thanks
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/llvm-dev/attachments/20191204/c345ac5c/attachment.html>
2007 Apr 17
0
15 commits - libswfdec/jpeg libswfdec/swfdec_bits.c libswfdec/swfdec_edittext.c libswfdec/swfdec_font.c libswfdec/swfdec_image.c libswfdec/swfdec_root_sprite.c libswfdec/swfdec_script.c libswfdec/swfdec_shape.c libswfdec/swfdec_sprite.c
...s_get_buffer (&org, len);
return script;
}
@@ -2785,7 +2783,8 @@ swfdec_script_unref (SwfdecScript *scrip
if (script->refcount > 0)
return;
- swfdec_buffer_unref (script->buffer);
+ if (script->buffer)
+ swfdec_buffer_unref (script->buffer);
if (script->constant_pool)
swfdec_buffer_unref (script->constant_pool);
g_free (script->name);
diff-tree f8d83577ae0fca8a750b0ff309faaf205cbe87cc (from 0fecc667a7f73138a1e16b12a0c9c7f4081d369c)
Author: Benjamin Otte <otte@gnome.org>
Date: Tue Apr 17 11:35:21 2007 +0200
handle 0 bytes of input grac...
2007 Apr 17
0
Branch 'as' - 17 commits - libswfdec/jpeg libswfdec/swfdec_bits.c libswfdec/swfdec_font.c libswfdec/swfdec_image.c libswfdec/swfdec_root_sprite.c libswfdec/swfdec_script.c libswfdec/swfdec_shape.c libswfdec/swfdec_sound.c libswfdec/swfdec_sprite.c
...s_get_buffer (&org, len);
return script;
}
@@ -2785,7 +2783,8 @@ swfdec_script_unref (SwfdecScript *scrip
if (script->refcount > 0)
return;
- swfdec_buffer_unref (script->buffer);
+ if (script->buffer)
+ swfdec_buffer_unref (script->buffer);
if (script->constant_pool)
swfdec_buffer_unref (script->constant_pool);
g_free (script->name);
diff-tree f8d83577ae0fca8a750b0ff309faaf205cbe87cc (from 0fecc667a7f73138a1e16b12a0c9c7f4081d369c)
Author: Benjamin Otte <otte@gnome.org>
Date: Tue Apr 17 11:35:21 2007 +0200
handle 0 bytes of input grac...
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
...t * script; /* script being executed */
+ SwfdecAsObject * scope; /* scope object coming after this */
+ SwfdecAsObject * var_object; /* new variables go here */
+ SwfdecAsValue * registers; /* the registers */
+ guint n_registers; /* number of allocated registers */
+ SwfdecConstantPool * constant_pool; /* constant pool currently in use */
+ //SwfdecAsStack * stack; /* variables on the stack */
+};
+
+struct _SwfdecAsFrameClass {
+ SwfdecAsObjectClass object_class;
+};
+
+GType swfdec_as_frame_get_type (void);
+
+SwfdecAsFrame * swfdec_as_frame_new (SwfdecAsContext * context,
+ Swf...