mirror of
https://github.com/dyne/FreeJ.git
synced 2026-06-16 12:59:33 +02:00
Revert "update to javascript 1.7 spidermonkey"
This reverts commit f941e8faa2.
Conflicts:
lib/javascript/config.mk
This commit is contained in:
+11
-50
@@ -48,14 +48,7 @@
|
||||
JS_BEGIN_EXTERN_C
|
||||
|
||||
/*
|
||||
* JS stack frame, may be allocated on the C stack by native callers. Always
|
||||
* allocated on cx->stackPool for calls from the interpreter to an interpreted
|
||||
* function.
|
||||
*
|
||||
* NB: This struct is manually initialized in jsinterp.c and jsiter.c. If you
|
||||
* add new members, update both files. But first, try to remove members. The
|
||||
* sharp* and xml* members should be moved onto the stack as local variables
|
||||
* with well-known slots, if possible.
|
||||
* JS stack frame, allocated on the C stack.
|
||||
*/
|
||||
struct JSStackFrame {
|
||||
JSObject *callobj; /* lazily created Call object */
|
||||
@@ -80,12 +73,10 @@ struct JSStackFrame {
|
||||
uint32 flags; /* frame flags -- see below */
|
||||
JSStackFrame *dormantNext; /* next dormant frame chain */
|
||||
JSObject *xmlNamespace; /* null or default xml namespace in E4X */
|
||||
JSObject *blockChain; /* active compile-time block scopes */
|
||||
};
|
||||
|
||||
typedef struct JSInlineFrame {
|
||||
JSStackFrame frame; /* base struct */
|
||||
jsval *rvp; /* ptr to caller's return value slot */
|
||||
void *mark; /* mark before inline frame */
|
||||
void *hookData; /* debugger call hook data */
|
||||
JSVersion callerVersion; /* dynamic version of calling script */
|
||||
@@ -105,11 +96,6 @@ typedef struct JSInlineFrame {
|
||||
#define JSFRAME_COMPILE_N_GO 0x80 /* compiler-and-go mode, can optimize name
|
||||
references based on scope chain */
|
||||
#define JSFRAME_SCRIPT_OBJECT 0x100 /* compiling source for a Script object */
|
||||
#define JSFRAME_YIELDING 0x200 /* js_Interpret dispatched JSOP_YIELD */
|
||||
#define JSFRAME_FILTERING 0x400 /* XML filtering predicate expression */
|
||||
#define JSFRAME_ITERATOR 0x800 /* trying to get an iterator for for-in */
|
||||
#define JSFRAME_POP_BLOCKS 0x1000 /* scope chain contains blocks to pop */
|
||||
#define JSFRAME_GENERATOR 0x2000 /* frame belongs to generator-iterator */
|
||||
|
||||
#define JSFRAME_OVERRIDE_SHIFT 24 /* override bit-set params; see jsfun.c */
|
||||
#define JSFRAME_OVERRIDE_BITS 8
|
||||
@@ -271,24 +257,18 @@ extern void js_DumpCallTable(JSContext *cx);
|
||||
#endif
|
||||
|
||||
/*
|
||||
* Refresh and return fp->scopeChain. It may be stale if block scopes are
|
||||
* active but not yet reflected by objects in the scope chain. If a block
|
||||
* scope contains a with, eval, XML filtering predicate, or similar such
|
||||
* dynamically scoped construct, then compile-time block scope at fp->blocks
|
||||
* must reflect at runtime.
|
||||
*/
|
||||
extern JSObject *
|
||||
js_GetScopeChain(JSContext *cx, JSStackFrame *fp);
|
||||
|
||||
/*
|
||||
* Compute the 'this' parameter for a call with nominal 'this' given by thisp
|
||||
* and arguments including argv[-1] (nominal 'this') and argv[-2] (callee).
|
||||
* Compute the 'this' parameter and store it in frame as frame.thisp.
|
||||
* Activation objects ("Call" objects not created with "new Call()", i.e.,
|
||||
* "Call" objects that have private data) may not be referred to by 'this',
|
||||
* per ECMA-262, so js_ComputeThis censors them.
|
||||
* as dictated by ECMA.
|
||||
*
|
||||
* N.B.: fp->argv must be set, fp->argv[-1] the nominal 'this' paramter as
|
||||
* a jsval, and fp->argv[-2] must be the callee object reference, usually a
|
||||
* function object. Also, fp->flags must contain JSFRAME_CONSTRUCTING if we
|
||||
* are preparing for a constructor call.
|
||||
*/
|
||||
extern JSObject *
|
||||
js_ComputeThis(JSContext *cx, JSObject *thisp, jsval *argv);
|
||||
extern JSBool
|
||||
js_ComputeThis(JSContext *cx, JSObject *thisp, JSStackFrame *fp);
|
||||
|
||||
/*
|
||||
* NB: js_Invoke requires that cx is currently running JS (i.e., that cx->fp
|
||||
@@ -299,27 +279,11 @@ extern JS_FRIEND_API(JSBool)
|
||||
js_Invoke(JSContext *cx, uintN argc, uintN flags);
|
||||
|
||||
/*
|
||||
* Consolidated js_Invoke flags simply rename certain JSFRAME_* flags, so that
|
||||
* we can share bits stored in JSStackFrame.flags and passed to:
|
||||
*
|
||||
* js_Invoke
|
||||
* js_InternalInvoke
|
||||
* js_ValueToFunction
|
||||
* js_ValueToFunctionObject
|
||||
* js_ValueToCallableObject
|
||||
* js_ReportIsNotFunction
|
||||
*
|
||||
* See jsfun.h for the latter four and flag renaming macros.
|
||||
* Consolidated js_Invoke flags simply rename the low JSFRAME_* flags.
|
||||
*/
|
||||
#define JSINVOKE_CONSTRUCT JSFRAME_CONSTRUCTING
|
||||
#define JSINVOKE_INTERNAL JSFRAME_INTERNAL
|
||||
#define JSINVOKE_SKIP_CALLER JSFRAME_SKIP_CALLER
|
||||
#define JSINVOKE_ITERATOR JSFRAME_ITERATOR
|
||||
|
||||
/*
|
||||
* Mask to isolate construct and iterator flags for use with jsfun.h functions.
|
||||
*/
|
||||
#define JSINVOKE_FUNFLAGS (JSINVOKE_CONSTRUCT | JSINVOKE_ITERATOR)
|
||||
|
||||
/*
|
||||
* "Internal" calls may come from C or C++ code using a JSContext on which no
|
||||
@@ -350,9 +314,6 @@ js_CheckRedeclaration(JSContext *cx, JSObject *obj, jsid id, uintN attrs,
|
||||
extern JSBool
|
||||
js_StrictlyEqual(jsval lval, jsval rval);
|
||||
|
||||
extern JSBool
|
||||
js_InvokeConstructor(JSContext *cx, jsval *vp, uintN argc);
|
||||
|
||||
extern JSBool
|
||||
js_Interpret(JSContext *cx, jsbytecode *pc, jsval *result);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user