Displaying 4 results from an estimated 4 matches for "jsfun_heavyweight".
2007 Mar 16
0
4 commits - libswfdec/swfdec_script.c test/image test/trace
...plementation is hacky (but it works) */
+ while (JS_GetClass (scope) == &js_CallClass && (parent = JS_GetParent (cx, scope)))
+ scope = parent;
+ }
if (*function_name == '\0') {
/* anonymous function */
fun = JS_NewFunction (cx, NULL, n_args, JSFUN_LAMBDA | JSFUN_HEAVYWEIGHT,
- cx->fp->scopeChain, NULL);
+ scope, NULL);
} else {
/* named function */
fun = JS_NewFunction (cx, NULL, n_args, JSFUN_HEAVYWEIGHT,
- cx->fp->scopeChain, function_name);
+ scope, function_name);
}
if (fun == NULL)
return JS_FALSE;
@@ -1716,7 +1726,6 @@ swfdec...
2007 Mar 15
0
11 commits - libswfdec/swfdec_debugger.c libswfdec/swfdec_debugger.h libswfdec/swfdec_event.c libswfdec/swfdec_js_movie.c libswfdec/swfdec_movie.c libswfdec/swfdec_movie.h libswfdec/swfdec_net_stream.c libswfdec/swfdec_player.c
..._script.c
index 210235e..7b520eb 100644
--- a/libswfdec/swfdec_script.c
+++ b/libswfdec/swfdec_script.c
@@ -1662,11 +1662,11 @@ swfdec_action_define_function (JSContext
if (*function_name == '\0') {
/* anonymous function */
fun = JS_NewFunction (cx, NULL, n_args, JSFUN_LAMBDA | JSFUN_HEAVYWEIGHT,
- cx->fp->thisp, NULL);
+ cx->fp->scopeChain, NULL);
} else {
/* named function */
fun = JS_NewFunction (cx, NULL, n_args, JSFUN_HEAVYWEIGHT,
- cx->fp->thisp, function_name);
+ cx->fp->scopeChain, function_name);
}
if (fun == NULL)
return JS_FALSE;...
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
...ec_action_do_define_function (JSCont
n_args = swfdec_bits_get_u16 (&bits);
if (*function_name == '\0') {
/* anonymous function */
- fun = JS_NewFunction (cx, NULL, n_args, JSFUN_LAMBDA, cx->fp->thisp, NULL);
+ fun = JS_NewFunction (cx, NULL, n_args, JSFUN_LAMBDA | JSFUN_HEAVYWEIGHT,
+ cx->fp->thisp, NULL);
} else {
/* named function */
- fun = JS_NewFunction (cx, NULL, n_args, 0, cx->fp->thisp, function_name);
+ fun = JS_NewFunction (cx, NULL, n_args, JSFUN_HEAVYWEIGHT,
+ cx->fp->thisp, function_name);
}
if (fun == NULL)
return JS_F...
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
...plementation is hacky (but it works) */
+ while (JS_GetClass (scope) == &js_CallClass && (parent = JS_GetParent (cx, scope)))
+ scope = parent;
+ }
+ if (*function_name == '\0') {
+ /* anonymous function */
+ fun = JS_NewFunction (cx, NULL, n_args, JSFUN_LAMBDA | JSFUN_HEAVYWEIGHT,
+ scope, NULL);
+ } else {
+ /* named function */
+ fun = JS_NewFunction (cx, NULL, n_args, JSFUN_HEAVYWEIGHT,
+ scope, function_name);
+ }
+ if (fun == NULL)
+ return JS_FALSE;
+ if (v2) {
+ script->n_registers = swfdec_bits_get_u8 (&bits) + 1;
+ flags = swfdec_bits_get...