Вы находитесь на странице: 1из 2315

{

name = js_ValueToString(cx, v);


js_GetCallObject(JSContext *cx, JSStackFrame *fp, JSObject *parent);
#define PR_ArenaCountGrowth PL_ArenaCountGrowth

/*

JSInt32 tm_usec; /* microseconds of second (0-999999) */

js_RemoveRoot(cx->runtime, &pd[i].alias);

i++;

typedef struct GlobData {


for (atomIndex = 0; atomIndex < ATOM_INDEX_LIMIT; atomIndex++) {
\
* The Initial Developer of the Original Code is Netscape
frame.nvars = down->nvars;
JS_TRUE);
*objp = obj;

} else if (c == 'x') {
*handlerp = wp->handler;
/*

ctor = JS_GetConstructor(cx, file);


js_NumberToString(JSContext *cx, jsdouble d);
case TYPE_INT32: (void)va_arg( ap, JSInt32 ); break;

* number (which haven't been added in yet) are nonzero, then the
}
JS_LOCK_RUNTIME(rt);

40, 40, 40, 40, 40, 40, 40, 40, /* 111 */

*
"PR_ARENA_ALIGN",

jsval *rval)
JS_PUBLIC_API(JSInt64) JSLL_Zero(void) { return ll_zero; }
pInt = p;

* Generate CPU-specific bit-size and similar #defines.


&leakedroots);
}
return script_compile(cx, obj, argc, argv, rval);

return NULL;

}
return -1;
JS_END_EXTERN_C

* rights and limitations under the License.

VALUE_TO_NUMBER(cx, lval, d);


return (int) HourFromTime(LocalTime(*date));
}
if (sprop) { \

"PR_HashString",

ok = JS_TRUE;
* just before execution begins and just after it finishes. In both cases
if (cp == cpend)
*/
* null char stored there (by js_NewString*) to sep->chars[j] in the while
* NB: This code knows that the first slots are pre-allocated.

JSArena *a, *next;

struct JSObjectMap {

* If you add a "standard" global function or property, remember to update


return JS_FALSE;
#undef IS_OK

i--;
jp = js_NewPrinter(cx, name,

#include "jsinterp.h"
if (isCondSwitch) {
return JS_FALSE; \
b.lo = b.lo << lsh;
**** Start of jslock.h ****
return JS_FALSE;

if (!js_CompareStrings(str, str2))

if (!InitFunctionAndObjectClasses(cx, obj))
#include "jslock.h"
JS_PUBLIC_API(JSString *)

atom = js_Atomize(cx, exceptions[i].name, strlen(exceptions[i].name), 0);


date_msecFromDate(jsdouble year, jsdouble mon, jsdouble mday, jsdouble hour,

JSInt64 _absval; \

sprop->id = ATOM_KEY(atom);
}

if (match) {

typedef struct JSSymbol JSSymbol;


goto out;
xdr->nclasses = nclasses;

#else
* JS versions that supported Script. Such a JS version supported
local = LocalTime(*date);
} \

{
JSObject *obj;

return NULL;
// > [option]one[/option]
}
JSString *str = NULL;

goto init_error;

* Secondary return value from native method called on the left-hand side
ConvertArgs(JSContext *cx, JSObject *obj, uintN argc, jsval *argv, jsval *rval)
/* Macintosh MPW replacements for the ANSI routines. These translate LF's to CR's
because
* This must be kept in synch with the exceptions array below.

tens[] = {

extern char js_const_str[];

* (regexp_compile detects the regexp + flags case and throws a

* quadruplets all use the obj parameter as the initial scope chain header,

that trailing zeros are suppressed.


js_FreeRawStack(cx, mark);
case 'S':

JS_ASSERT(obj);

* Allocate a string to hold the concatenated arguments, including room


pn4 = NewParseNode(cx, &CURRENT_TOKEN(ts), PN_LIST, tc);

fun = (JSFunction *) JS_GetPrivate(cx, funobj);

fl_list_table_len = i;
JSDHashEntryHdr *entry;

if (text[i + j] == pat[j]) {

}
JSREPORT_ERROR,

try_quick = 0;
0x00670001, /* 23 Lu, hasLower (add 1), identifier start */
out:
* rt->contextList, and it should not be reachable via any object private

return JS_FALSE;

jsdouble *date = date_getProlog(cx, obj, NULL);


*
mem_getbytes(JSXDRState *xdr, char **bytesp, uint32 len)

d = *cx->runtime->jsNaN;
if (fp && (uintN)slot < fp->argc)

JS_FRIEND_API(char *)
do {

* and other provisions required by the GPL. If you do not delete

#else
return script;
}

CHECK_REQUEST(cx);
}

46, 46, 46, 46, 46, 46, 46, 46, /* 112 */

fputc('\n', gOutFile);
* We need a UTF-8 buffer because we don't know before this

#if defined(XP_UNIX) || defined(XP_BEOS)


pn = pn2;

random_nextDouble(JSRuntime *rt)

JSREPORT_STRICT,

60, 15, 60, 60, 60, 60, 46, 46, /* 27 */


case 'x':

static JSParseNode *

pn = tc->nodeList;
/* If argv[0] is null or undefined, obj comes back null. */

off = GET_JUMP_OFFSET(pc);
case TOK_PRIMARY:
*/
if (SPROP_HAS_VALID_SLOT(sprop))
#endif
/* july,aug,sep,oct,nov,dec */

/*
if (!ok) {

JSBool rngInitialized;

jsdouble result;
js_ReportIsNotFunction(cx, vp, frame.constructing);

ok = js_Execute(cx, obj, script, NULL, 0, rval);


result = (char*)JS_malloc(cx, aux-index+1);
};
? fp->script->principals
# Convert from PR_MALLOC to malloc, etc.

return tt;

#undef MSG_DEF
for (a = cx->runtime->gcArenaPool.first.next; a; a = a->next) {

void

uint32 format; /* immediate operand format */


#define DebugBreak()
* version of this file under the NPL, indicate your decision by

if (onError)

sp++;
goto error;
return NULL;

size_t _nb = JS_ARENA_ALIGN(pool, nb); \

JSAtomList atomList; /* literals indexed for mapping */

#endif
fl_list_table[i].taken = m;

* and those host objects that do not define a JSNewEnumerateOp-style iterator

jssrcnote *sn;
};

/* Set pn3 to the variable name, to avoid another var note. */

m2 = b2;

(stmt)->continues = (stmt)->catchJump = (stmt)->gosub = (-1))

* N.B. This hasn't been tested with anything that actually _uses_
+ JS7_UNHEX(cp[3])) << 4) + JS7_UNHEX(cp[4]);

*argc = 1;

case JSOP_MUL:
js_MarkAtom(JSContext *cx, JSAtom *atom, void *arg)

goto out;

initialized = JS_TRUE;

#define JS_ArenaCountInplaceGrowth(ap, size, incr) /* nothing */

last = length;

JSScope *scope, *newscope;


#endif /* !JS_BUG_FALLIBLE_EQOPS */

* JSStrings. This portion is implemented in jsxdrapi.c.

goto do_atominc;

#include "jsscript.h"
* If oldscope is single-threaded, there's nothing to do.
variance = 0;
wp != (JSWatchPoint *)&rt->watchPointList;
if ((ps && !JS_DefineProperties(cx, proto, ps)) ||

typedef JSBool

* The stack has the object under the (top) index expression.

JSObject *obj;
JSHashEntry *he, **hep;

JSRegExp *

break;
#define JS_USE_FDLIBM_MATH 1
js_AtomizeValue(JSContext *cx, jsval value, uintN flags)

rt->newScriptHook = hook;
pn->pn_pos.end = PN_LAST(pn)->pn_pos.end;

JS_ASSERT(cx->runtime->gcThread == js_CurrentThreadId());
46, 46, 46, 46, 46, 46, 46, 46, /* 9 */
if ((he = *hep) != NULL) {
* under the terms of the GPL and not to allow others to use your

3, 3, 3, 15, 15, 15, 15, 15, /* 51 */

char numBuf[12];
if (offset == target && SN_IS_GETTABLE(sn))

atom = GetSlotAtom(jp, js_GetLocalVariable, GET_VARNO(pc));

JSConvertOp defaultValue;
**** Start of jsmath.c ****

back++;
uint8 *flagp, flags, lockbits;

js_absolutePath(JSContext *cx, const char * path)


MSG_DEF(JSMSG_UNDECLARED_VAR, 156, 1, JSEXN_TYPEERR, "assignment to
undeclared variable {0}")

** Commonly used macros for operations on compatible types.

*result = UTC(msec_time);

if (sprop->attrs & (JSPROP_GETTER | JSPROP_SETTER)) {


state.context = cx;

JS_XDRUint32(JSXDRState *xdr, uint32 *lp);

** place into the output. "arg" is an opaque pointer used by the stuff

return JS_FALSE;

tc->flags &= ~TCF_IN_FOR_INIT;


ok = JS_FALSE;
goto error;

case JSOP_POPV:

extern JS_PUBLIC_API(void)
*rval = STRING_TO_JSVAL(str);
oplen = js_CodeSpec[JSOP_GOTO].length;
}

/*
return cx->fp ? cx->fp->scopeChain : NULL;

#define PR_HashString PL_HashString

{
* lightweight function activation, or if its scope chain doesn't match
if (caseOff)
*/
}

#define IS_LITTLE_ENDIAN 1

if (cp2 == NULL) {
{

"PR_MD_malloc",

PUSH(JSVAL_VOID);
f->byteBuffer[1] = f->byteBuffer[2];

JSString *str;
return JS_TRUE;
if (PR_Rename(file->path, dest)==PR_SUCCESS){

40, 40, 40, 40, 40, 40, 40, 40, /* 109 */

#define JS_ALIGN_OF_FLOAT 2L
/***************************************************************************/

*app = ap;
if (js_DumpGCHeap)
if (JS_HAS_STRICT_OPTION(cx)) {

return JS_FALSE;
{
uint32 nallocs, nbytes;

return JS_FALSE;
* the provisions above, a recipient may use your version of this
* IS" basis, WITHOUT WARRANTY OF ANY KIND, either express oqr

if(file->isOpen && file->isNative){


JSFILEMSG_CANNOT_READ, file->path); \
}
if (!js_NewNumberValue(cx, d, &v)) {

'{', '*', '+', '?', 0 /* balance} */

* the provisions above, a recipient may use your version of this

js_alloc_atom_space(void *priv, size_t size)


return(numUTF8bytes);
JS_ClearContextThread(JSContext *cx);
}
keyHash *= JS_DHASH_GOLDEN_RATIO;
}

if (i >= ilim)
#if JS_HAS_REGEXPS
JSBool fastmove;

typedef struct JSDHashEntryStub JSDHashEntryStub;

}
*

* Fewer arguments than format specifies may be passed only if there is a /


return NULL;
static JSBool
*rval = OBJECT_TO_JSVAL(obj);

: sprop->id;
return (int) SecFromTime(*date);
JSStackFrame *fp, *down;

/* These two are predefined in a backward-compatible way by the DOM. */

continue;

DefaultAllocEntry, DefaultFreeEntry
JSHashNumber keyHash;

js_DateSetMinutes(JSContext *cx, JSObject *obj, int minutes);


}
JS_FRIEND_API(void)
struct JSCodeSpec {

** TYPES: JSFloat64
* the formatter to convert zero or more jsvals at sp to zero or more C values

char buf[32];
return JS_FALSE;

return JSVAL_TO_OBJECT(cval);
78, 78, 78, 78, 78, 78, 78, 78, /* 51 */
obj->slots[i] = JSVAL_VOID;
* The Original Code is Mozilla JavaScript code.
40, 40, 40, 40, 40, 40, 40, 40, /* 23 */

*se = (char *)s;

fp = cx->fp;
}
jsval v;

} while (probe != entry);

JSObject *obj2;
56, 56, 56, 56, 56, 56, 56, 56, /* 0x9C00 */

JSBool
*/
case JSOP_BINDNAME:
if (vec)

return v2smap[i].string;
return;

* JSBool fromJS, jsval **vpp, va_list *app);

return JS_FALSE;

#endif /* JS_HAS_INITIALIZERS */

PN_INIT_LIST(pn4);

}
mark = JS_ARENA_MARK(&cx->tempPool);
*
(r).lo = (a) << ((b) & 31); \
}

extern JS_PUBLIC_API(JSBool)
/* && is like || except it uses a pop-if-converts-to-true-else-jump. */

*bp = JS_FALSE;
ok = JS_TRUE;
#define SecondsPerMinute 60.0
JSContext *ownercx;

JS_PUBLIC_API(void)

state->tokenStream, NULL,

stmtInfo2.label = disc->pn_atom;

JSBool *bp);

if (!script)

if (!js_Execute(cx, obj, script, NULL, 0, rval)) {

/*

map->sharpgen = 0;

return JS_FALSE;
JS_NOTIFY_ALL_CONDVAR(rt->stateChange);
MEM_COUNT(xdr) = MEM_LIMIT(xdr) + offset;
}

/*

char buf[2 * ALIGNMENT(JSString)];

msFromTime(local));
MatchData mdata;
extern JSBool
str = js_ValueToString(cx, argv[0]);

* We do Find here to share the most code at label do_forinloop.


#include "jscntxt.h"
#include "jstypes.h"

if(file->path[0]==PIPE_SYMBOL){

p51 = p5->next;
*rval = BOOLEAN_TO_JSVAL(JSDOUBLE_IS_NaN(x));

case 's':

JS_PutPropertyDescArray(JSContext *cx, JSPropertyDescArray *pda)

jsuint length, i;
jsval *vp);
if (pn1 && !js_FoldConstants(cx, pn1, tc))

extern void

* The Initial Developer of the Original Code is Netscape


/*
word0(da) += k*Exp_msk1;
#define IS_BIG_ENDIAN 1
{

void *mark;
/* Convert a number to a GC'ed string. */

#include "jsscan.h"
} \

rv *= tens[i];

/* Pop value and discard it. */


JSHashNumber keyHash;
return JS_FALSE;

ltime.tm_mday = 2;
#endif
slot = JSVAL_TO_INT(id);
{
*/

JS_DefineConstDoubles(JSContext *cx, JSObject *obj, JSConstDoubleSpec *cds)


#define JS_PREV_LINK(_e) \

JS_RUNTIME_METER(rt, sharedScopes);

0, 0

return JS_FALSE;

*
return date_makeDate(cx, obj, argc, argv, 1, JS_TRUE, rval);
#endif

ok = js_ValueToInt32(cx, argv[2], &lineno);

return NULL;

/* Will get globalObject as 'this' and no other agurments. */


TOK_ASSIGN = 10, /* assignment ops (= += -= etc.) */
#ifndef MOZILLA_CLIENT
cg->principals);
}

if (i >= sizeof enuf - 4)

/* Make delete f.length fail even though length is in f.__proto__. */


}

if (pn3 == pn2->pn_head) {
extern void
}

JS_free(cx, chars);
* This method only uses JavaScript-modifiable properties name, message. It

return JS_FALSE;
*

#endif
} name;

typedef struct JSAtomMap JSAtomMap;

* Offset fields follow certain notes and are frequency-encoded: an offset in


* Save the current exception state. This takes a snapshot of the current

case JSTRAP_ERROR:
js_filenameHasAPipe(const char *filename)
goto do_fornameinloop;

if (version == oldVersion)

JSJS_EXTERN_API(JSPRIntn)
* catch (v if <boolean_expression>)

JSParseNode **table;
if (js_NewSrcNote2(cx, cg, SRC_SETLINE, off) < 0)

SECURITY_CHECK(cx, NULL, "lastModified", file);


* '\v' Vertical Tab.
* The contents of this file are subject to the Netscape Public
JSFunction *fun;

0x0F970002, /* 69 Ll, hasUpper (subtract 62), identifier start */


case TOK_DO:

switch (slot) {

**** End of jsutil.c ****

static JSBool
if (SPROP_HAS_VALID_SLOT(sprop))

(r).hi = _a.lo << ((b) & 31); \

* item: assertion An item is either an assertion or


* would unwind properly once these locks became "thin" or "fat".
/* Structure representing the file internally */
* When a string is treated as an object (by following it with . or []), the

JS_free(cx, base);

JSMSG_BAD_PROP_ID);
if (js_MatchToken(cx, ts, TOK_FINALLY)) {

pn2->pn_pos.begin = pn->pn_pos.begin;

15, 15, 15, 15, 15, 15, 15, 46, /* 99 */

* called as functions, without operator new. But as we do not give

break;

c->wds = wc;
#ifndef M_SQRT2

FUN_NAME = -6, /* function name, "" if anonymous */

if (file && (!js_exists(cx, file) || !js_isDirectory(cx, file))){


* keep scope->u.count balanced for the JS_UNLOCK_SCOPE, while
JSSymbol *sym = (JSSymbol *) he;

);

static void initConsole(StringPtr consoleName, const char* startupMessage, int


*argc, char** *argv)

#define JSDOUBLE_IS_INT(d, i) (JSDOUBLE_IS_FINITE(d) \


jschar *base;

if (!ok)

Bell Laboratories, Room 2C-463

}
script = JS_CompileUCScriptForPrincipals(cx, scopeobj, principals,

return proto;
JSAtom *typeAtoms[JSTYPE_LIMIT];

c = TOK_OR;

#endif

if (count == 1 && cx->version == JSVERSION_1_2) {


clasp = JS_FindClassById(xdr, classId);
}
if (!js_ValueToNumber(cx, argv[0], &x))

*/

js_hash_scope_slot_invalidator(JSHashEntry *he, intN i, void *arg)

? (JSPropertyOp) obj
jsid oldArgId;
pn1 = NULL;

}
#endif
JSLL_UI2L(local_time,diff);

} else {
JSString *str;

#endif
len = tail + js_CodeSpec[pc[tail]].length;

'n', 'o', 'p', 'q', 'r', 's', 't', 'u', 'v', 'w', 'x', 'y', 'z',
mode = JSACC_PROTO;
else {

js_strncpy(&chars[nchars], idstr->chars, idstr->length);


break;
return 0;

(sprop = (JSScopeProperty *)prop) != NULL) {


JSPR_HashTableRawAdd(JSPRHashTable *ht, JSPRHashEntry **hep, JSPRHashNumber
keyHash,
* XXX anti-modularity alert: we rely on the call to js_RemoveRoot within
/* XXX not quite sure here */
newchars[ni] = 0;
40, 40, 40, 40, 40, 40, 40, 40, /* 102 */
/* Low level access methods */

out:
extern JS_PUBLIC_API(JSObject *)
jp->indent -= 4;
(((jsuint)(num) < (jsuint)(res)->parenCount) \
1e23 whereas mode 1 gives 9.999999999999999e22.

JSProperty *prop;
if (!GrowSrcNotes(cx, cg))
(size_t)(out - reportp->ucmessage));
}
if (xdr->mode == JSXDR_DECODE) {

Bigint *b;

} else {
matchRENodes(grState->state, grState->kid, grState->next, cp);
*/
return fun_proto;

d = 0.0;
sqsum += chainLen * chainLen;

const jschar *cp = (const jschar *) ren->kid;


#else

JS_SetLocaleCallbacks(JSContext *cx, JSLocaleCallbacks *callbacks)


str = js_ValueToString(cx, OBJECT_TO_JSVAL(obj));

JS_GetPositiveInfinityValue(JSContext *cx);
extern JS_PUBLIC_API(JSBool)

uint32 lock; /* valid lock calls */

JS_DefineUCPropertyWithTinyId(JSContext *cx, JSObject *obj,


}
i = JSVAL_TO_INT(*vp);
while (i >= 0) {

}
case TOK_VAR:
* #define IEEE_8087 for IEEE-arithmetic machines where the least
**** End of jsemit.c ****

pn3 = NewParseNode(cx, &CURRENT_TOKEN(ts), PN_NULLARY, tc);

JSStmtInfo *down; /* info for enclosing statement */

* Multiplicative hash uses an unsigned 32 bit integer and the golden ratio,

return cx->localeCallbacks->localeToLowerCase(cx, str, rval);

offset += delta;

}
}
#define JS_HAS_DEBUGGER_KEYWORD 1 /* has hook for debugger keyword */

type = UTF8;

* new value is not a getter or setter -- or if it is, insist that the


/*

break;

ptrdiff_t breaks; /* offset of last break in loop */


default:

break;
if((onechar == LINE_SEPARATOR)||(onechar == PARAGRAPH_SEPARATOR))
struct JSHashTable {
jsdouble *date = date_getProlog(cx, obj, NULL);
if (val != JSVAL_NULL) {

}
}

#include "jsutil.h" /* Added by JSIFY */

if (ca.status) {
if ((bytes > 8192 && bytes > lastBytes + lastBytes / 2) ||
js_printf(jp, "\tcase %s:\n", lval);

}
{

typedef JSBool

}
}

str = JS_NewStringCopyZ(cx, dStr);


#include "jsobj.h"
}

js_FindProperty(JSContext *cx, jsid id, JSObject **objp, JSObject **pobjp,

}
#elif JS_VERSION == 150
*foundp = JS_FALSE;

static JSBool

js_FreeRegExpStatics(JSContext *cx, JSRegExpStatics *res);

#endif
#endif

return JS_FALSE;
default:
JSClass *clasp, JSObject *obj)

goto do_new;
#define CHECK_VOID_TOSTRING(cx, v) ((void)0)
if (e1 > 0) {
* Keep this in sync with jspubtd.h -- an assertion below will insist that
/*

SAVE_SP(fp); \
}

return JS_FALSE;

#include "jsutil.h" /* Added by JSIFY */

return k;
#endif

sprop = NULL;

#ifdef XP_PC
const char *format;
#define JS_LOCK(P,CX) JS_LOCK0(P,(CX)->thread)
: JSVAL_VOID;
JS_PUBLIC_API(void)
JSBool ok;

didReadLocation = JS_TRUE;
ren = NewRENode(state, REOP_NONALNUM, NULL);
};

*bufp = '\0';

#define JS_UNLOCK_GC(rt) JS_RELEASE_LOCK((rt)->gcLock)


}

if ((i = e1 & 15) != 0)

#include <errno.h>
* Get the next token. Stop on end of stream. Otherwise
ren2->flags |= RENODE_NONEMPTY;
}
static JSFunctionSpec number_functions[] = {
break;

extern JSBool JS_DLL_CALLBACK

#if JS_HAS_REGEXPS

return JS_TRUE;
* the License at http://www.mozilla.org/NPL/
* so we need to hide the pop.
JS_BEGIN_MACRO \
*/

JSObject *obj2;

#ifdef JS_DOUBLE_HASHING

flag = JS_TRUE;

uint32 unlock; /* valid unlock calls */

tzoffset = n;
#endif
double mean = 0., var = 0., sigma = 0.;

return JS_FALSE;
*/

repstr = rdata->repstr;

* NPL.

#define fd_log log

#if defined(IEEE_8087) + defined(IEEE_MC68k) != 1


JS_END_MACRO
}
#define JSDOUBLE_HI32(x) (((uint32 *)&(x))[1])
return JS_TRUE;

js_UnlockGCThing(cx, re->source);

id = (jsid)atom;

flag = JS_TRUE;
#define jscompat_h___
ocp = cp;
js_PushStatement(&cg->treeContext, &stmtInfo, STMT_BLOCK, top);
}
#define fd_fabs fabs

else

if(!file_close(cx, obj, 0, NULL, rval)) goto out;

#define JS_HAS_LEXICAL_CLOSURE 0 /* nested functions, lexically closed */


if (fp && fp->fun && fp->fun->object) {
regexp_static_getProperty, regexp_static_setProperty},
* From (n1 >= b.lo)

prototypeAtom = cx->runtime->atomState.classPrototypeAtom;

size_t i;
#endif

*/

/* Alias toUTCString with toGMTString. (ECMA B.2.6) */

if (!vector)
return NULL;

for (slot = 0; slot < alength; slot++) {

extern ptrdiff_t
ren = NewRENode(state, REOP_NONSPACE, NULL);

comma = NULL;
JS_DESTROY_LOCK(arena_freelist_lock);
21, 21, 21, 21, 21, 21, 21, 21, /* 17 */

if (pn2->pn_type != TOK_NAME) {

/*

if (!JS_DefineFunctions(cx, glob, shell_functions))


(obj)->map->ops->getAttributes(cx,obj,id,prop,attrsp)
}
pn2->pn_atom == cx->runtime->atomState.argumentsAtom) {

jsbytecode jsop_eq;
FixNext(CompilerState *state, RENode *ren1, RENode *ren2, RENode *oldnext)
(lval[1] != '\0') ? ", " : "",

JSRegExpStatics *res;

ren2->flags |= RENODE_NONEMPTY;

extern const char js_RangeError_str[];


}
JS_ReportErrorNumber(cx, JSFile_GetErrorMessage, NULL,
extern void
#endif

CHECK_REQUEST(cx);
}

return JS_FALSE;

* Copyright (C) 1998 Netscape Communications Corporation. All


if (!fun)

/*

STORE_NUMBER(cx, -1, i); \


JS_PUBLIC_API(void)

delta = GET_JUMP_OFFSET(pc);

const char *filename, uintN lineno)

if (!JS_XDRUint32(xdr, &null))
*/

} else {
* from the end of table. JSOP_CONDSWITCH always has a default
}
goto out;
CHECK_REQUEST(cx);

if (!JSVAL_IS_PRIMITIVE(val[j]) && vchars[0] != '#') {


(JSProperty **)&sprop)) {
FROB(evalAtom, js_eval_str);
return JS_FALSE;
* Alternatively, the contents of this file may be used under the

for (i = 0; i < len; i++)


pi = (JSGCPageInfo *) pagep;
} range;

#else
JS_PCToLineNumber(JSContext *cx, JSScript *script, jsbytecode *pc);

* ***** BEGIN LICENSE BLOCK *****

rt->data = data;
}
if (!js_LookupProperty(cx, obj, id, &obj, &prop))
{
ok = js_FindProperty(cx, id, &obj, &obj2, &prop);

JS_LOCK_OBJ(cx, obj);
#define JSLL_MOD(r, a, b) { \

case 'v':

(outermost ? 2 : 1) + 1) * sizeof(jschar));
static JSBool

}
static double ratio(Bigint *a, Bigint *b)

off = pn3 ? pn3->pn_offset - top : 0;


for (i = 0; i < parsub->length; i++) {

JSMSG_PERMANENT, JS_GetStringBytes(str));

/*

{
}
* the provisions above, a recipient may use your version of this
* splitting the cost of compilation evenly among the scopes and
* pn_body: TOK_LC node for function body statements

60, 60, 60, 60, 60, 60, 60, 60, /* 12 */


jsid id, id2;
j = bbits - i - 1;
* memory can't be allocated for new entry storage via table->ops->allocTable.
jsval *rval)

he->value = value;

#define JS_HAS_SCRIPT_OBJECT 0 /* has (new Script("x++")).exec() */


return NULL;

JSClass *clasp;

* March 31, 1998.

46, 46, 80, 80, 46, 40, 40, 40, /* 45 */

#ifdef HAVE_WATCOM_BUG_2
date_toLocaleString(JSContext *cx, JSObject *obj, uintN argc,
re->lastIndex = 0;
/*
JS_snprintf(numBuf, sizeof numBuf, "%lu", (unsigned long)i);

js_incop_str[!(cs->format & JOF_INC)], lval);


#define NEW_EQUALITY_OP(OP, IFNAN) \
* the provisions above, a recipient may use your version of this

ts->flags |= TSF_REGEXP;
* deleting the provisions above and replace them with the notice

return ok;

*/

JSFunction *fun;
if (!js_ReportCompileErrorNumber(cx, ts, NULL,

if (_negative) _index = 0 - _index; \

jp->indent += 4;
#ifdef LAZY_STANDARD_CLASSES

return NULL;
pc2 += ATOM_INDEX_LEN;
} JSPropertyDescArray;

return NULL;

return NULL;

jsval rval; /* function return value */

* pretend it's a 1. (So Date.UTC(1972, 5) works) */

#define JS_HAS_NUMBER_FORMATS 0 /* numbers have formatting methods */


return JS_FALSE;
return JS_FALSE;

40, 40, 40, 40, 40, 40, 40, 40, /* 94 */

out:

case 'G':

JS_SetInterrupt(JSRuntime *rt, JSTrapHandler handler, void *closure)

#else
extern JS_FRIEND_DATA(JSScopeOps) js_list_scope_ops;

js_GrowIdArray(JSContext *cx, JSIdArray *ida, jsint length);


break;

JS_UPTRDIFF(_m, _a->base) <= JS_UPTRDIFF(_a->avail, _a->base)) { \

FILE *fh);

if (!js_ReportCompileErrorNumber(cx, ts, NULL,


* implied. See the License for the specific language governing
return js_NewNumberValue(cx, *date, rval);
jsdouble d;
{js_InitStringClass, TAG_CHAR_STRING(js_unescape_str)},
{
he = ht->buckets[i];
ok = js_CloseTokenStream(cx, ts);
struct JSAtomList {

*/
bytes);
js_InitLock(&scope->lock);
js_arguments_str, (int) i);
** - JS_sscanf() has no multibyte character support, while sscanf()
if (rt->requestDone)
}

if (off < 0)

#define Exp_11 0x3ff00000


#endif
@NSPR_symbols = (

JSRegExp *re;

MUST_MATCH_TOKEN(TOK_LC, JSMSG_CURLY_BEFORE_TRY);

else
JS_ASSERT(OBJ_IS_NATIVE(obj));

jssrcnote *sn;
return;
JSScope *scopeSharingTodo;

hookData = NULL;

* version of this file under the NPL, indicate your decision by


case TOK_NUMBER:

? protos[protoIndex]

#define JS_HAS_TRIPLE_EQOPS 0 /* has === and !== identity eqops */


/* PrimaryExpr enforced ATOM_INDEX_LIMIT, so in-line optimize. */
}
static JSBool

#define JS_BITS_PER_FLOAT_LOG2 5L
if (lineno >= target)
/* On a machine with IEEE extended-precision registers, it is

MSG_DEF(JSMSG_DUPLICATE_LABEL, 126, 0, JSEXN_SYNTAXERR, "duplicate label")

#ifdef WIN32

return JS_FALSE;
*/

* 5 bits character type

if (nshares)

static jschar closurechars[] = {

* rights and limitations under the License.

JS_GetStringBytes(str));

15, 15, 15, 15, 15, 15, 15, 46, /* 100 */

(r).lo = 0; \
cstr[i] = (char)start[i];

* If you wish to allow use of your version of this file only


d -= L*ds;
JS_MaybeGC(JSContext *cx);
#endif
#include "jsutil.h" /* Added by JSIFY */
atom = GET_ATOM(cx, jp->script, pc);

56, 56, 56, 56, 56, 56, 56, 56, /* 0x9400 */

JS_BEGIN_MACRO \

#define PROPERTY_OP(n, call) \

if (!JS_IsArrayObject(cx, JSVAL_TO_OBJECT(argv[0]))) {

{ "toString", file_toString, 0},


if (!*bxe) {

#define JS_DISABLE_GC(rt) JS_ATOMIC_INCREMENT(&(rt)->gcDisabled);

JS_ASSERT(sp - fp->spbase >= 3);


}
int n;

extern const JSErrorFormatString *


jsval *rval);

tt = TOK_ERROR;

SrcNotes(cx, script);

hep = JS_HashTableRawLookup(table, keyHash, key);

}
#endif /* js_cpucfg___ */
int64 rngMultiplier;
index = js_BoyerMooreHorspool(text, textlen, pat, patlen, i);
goto out;

sn = script->notes;
}

* Communications Corporation. Portions created by Netscape are

JS_AddExternalStringFinalizer(JSStringFinalizeOp finalizer)
/************************************************************************
#define JSLL_F2L(l, f) { double _d = (double)f; JSLL_D2L(l, _d); }
}

dsign = 2;
xa = xa0 + a->wds;

JS_ARENA_RELEASE(&cx->stackPool, mark);
js_NewIdArray(JSContext *cx, jsint length);

pn3 = NewParseNode(cx, &CURRENT_TOKEN(ts), PN_NULLARY, tc);


SECURITY_CHECK(cx, NULL, "canReplace", file);
jsword owner;
}
void *kid; /* first operand */

/* Emit code for the condition before pushing stmtInfo. */


return ok;
#define LOCKED_OBJ_GET_CLASS(obj) \
js_InternalInvoke(cx, obj, fval, JSINVOKE_CONSTRUCT, argc, argv, rval)
static JSBool

static char buf[8];


} else { \
js_SkipWhiteSpace(const jschar *s)
*bx++ = (ULong)(y & 0xffffffffUL);

fprintf(fp, " via %s\n", path);

TREE_CONTEXT_INIT(&cg->treeContext);
void

#ifdef OLD_GETTER_SETTER
"PR_INTERVAL_NO_TIMEOUT",

*
}
ok = JS_FALSE;

* JSRuntime, when it is imperative that rt->gcPoke gets

JSProperty **propp)
entryAddr += entrySize;

FAST_INCREMENT_OP(GET_VARNO(pc), nvars, vars, rtmp, +=, MAX);


a = a->next; /* move to next arena */

off = len - cs->length;

#include "jsscan.h"

(void) rt->gcCallback(cx, JSGC_MARK_END);


if (!end || !SetNext(&state, ren, end))
JS7_ISHEX(cp[3]) && JS7_ISHEX(cp[4])) {
rt->gcLevel++;
/* Get the callee's decompiled image in argv[0]. */

JSPrincipals *principals)
JS_LOCK_GC(rt);

40, 40, 60, 60, 46, 46, 81, 81, /* 32 */

trap = FindTrap(cx->runtime, script, pc);

report.ucmessage = NULL;
JSLL_MUL(result,result,result1);
* name C string containing name for disassembler

JSPropertyOp setter;
}

JS_ASSERT(lockbits == GCF_LOCK);

}
defsharp->pn_kid = NULL;
static JSBool
JSInt64 gmtOffset;

JSLL_DIV(result,tsecs,result1);
static struct {

REOp op;
return JS_TRUE;
/* Emit catch block. */
undfl:

*skip = cp - dp;

return JS_FALSE;
* If there's no catch block without a catchguard, the last
js_FreeAtomState(NULL, state);

40, 46, 46, 40, 40, 40, 40, 40, /* 31 */

#if JS_HAS_REGEXPS

#define JSLL_CMP(a, op, b) (JS_ASSERT((#op)[1] != '='), JSLL_REAL_CMP(a, op,


b))

JS_HashTableEnumerateEntries(state->table, js_atom_uninterner, &args);

/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 2 -*- */

static JSBool
40, 40, 40, 40, 40, 40, 40, 3, /* 47 */

}
* and case to case, stored in srcnote immediates.

{0,0,0,0,0}

if (s2 > 0)

js_PushStatement(JSTreeContext *tc, JSStmtInfo *stmt, JSStmtType type,

fp->argv[slot] = *vp;
return JS_FALSE;
*
OBJ_DROP_PROPERTY(cx, obj, prop);
#define getenv(var) mac_getenv(var)

JSScopePrivate *priv;
*
*rval = JS_GetEmptyStringValue(cx);

if ((C2 < 0xDC00) || (C2 > 0xDFFF)) {

break;
return JS_FALSE;

# define FILESEPARATOR '\\'


*

}
/* Switch bytecodes run from here till end of final case. */
}
return JS_FALSE;

printf("\n");

#define JS_BYTES_PER_DWORD 8L

break;

jsval *rval);
if (js_MatchToken(cx, ts, TOK_LP)) {

JS_PUBLIC_API(JSInt64) JSLL_MaxInt(void) { return ll_maxint; }


const jschar **args;

JS_PUBLIC_API(void)

{
case '5':

jschar *chars;

#define JS_DLL_CALLBACK _Optlink


*m->prevp = m->next;

*/
goto out;
METER(else table->stats.removeMisses++);

bytes = str ? JS_GetStringBytes(str) : "N/A";


#endif /* JS_HAS_SHARP_VARS */

return result;

lorutime = LocalTime(result);

* called during init time.


/*
*/

* be JSOP_IMPORTALL -- see EmitPropOp above.

* Copyright (C) 1998 Netscape Communications Corporation. All

NULL, date_methods, NULL, date_static_methods);


JS_ReportErrorNumber(cx, js_GetErrorMessage, NULL,

JSString *str;

}
return JS_FALSE;
OPDEF(JSOP_BITNOT, 33, "bitnot", "~", 1, 1, 1, 10, JOF_BYTE)

&& !(word1(d) & 1)


*/
&temp_alloc_ops, cx);

#include <math.h>

#endif

ps->getter, ps->setter, ps->flags,

JS_PUBLIC_API(JSBranchCallback)
dst[0] = length;

if (atom)

fun->nvars = 0;
{

return JS_FALSE;
JSLL_SUB(tsecs,tsecs,result1);

JS_PUBLIC_API(JSString *)
#include "jsregexp.h"
case 2:

*
**** End of jsobj.h ****

11, 11, 46, 46, 46, 46, 46, 46, /* 11 */


goto out;

break;
}

0x0006001A, /* 4 Sc, currency */

*/

JSString *str;
/*

#define JS_BITS_PER_BYTE 8L
{

return 0;
/* XXXbe should magic mismatch be error, or false return value? */

if (!atom)

#endif /* DEBUG */

break;
JSOp op;
OBJ_GET_CLASS(cx, JSVAL_TO_OBJECT(v)) == &js_FunctionClass)

JSObject *exnObject;

chars = (jschar *) JS_malloc(cx, (length + 1) * sizeof(jschar));

JS_ASSERT(divisor > 0 && divisor <= 65536);


*/

JS_ReportOutOfMemory(cx);
*
ren->u.range.max, cp);
JSString *_str = ATOM_TO_STRING(_atom); \
/* Workaround MS fmod bug where 42 % (1/0) => NaN, not 42. */

{"toLocaleDateString", date_toLocaleDateString,0,0,0 },
/* Always call the class's getObjectOps hook if it has one. */
}

#else

va_end(ap);
{

result = (jsint) Day(t) + 4;

* (i.e., not if obj is unmutated and sharing its prototype's scope).

JS_PUBLIC_API(void)
* TOK_IF ternary pn_kid1: cond, pn_kid2: then, pn_kid3: else or null

/************************************************************************

len = ren->u.ucclass.kidlen;
** sscanf() handles the standard C types like short, int, long,

ok = OBJ_LOOKUP_PROPERTY(cx, obj, id, &obj2, &prop);

#ifdef DEBUG

extern JSErrorReport *

JS_free(cx, (char *)lval);


grState->state->complete = NULL;

}
JSFILEMSG_OP_FAILED, "mkdir", fullName);
return NULL;
JSPROP_EXPORTED, NULL);
*/
/*
40, 40, 40, 40, 40, 40, 40, 40, /* 110 */

* may need the last expression statement's value as the script's


JS_SetVersion(cx, originalVersion);

* JS_FALSE and nothing will be altered.


/* Test whether we're in a catch block with exception named by atom. */
*/
const char *fmt0;

#define fd_exp exp

break;
return cx->version;

* any of which can be optionally followed by '?' for ungreedy


/*

atom = js_ValueToStringAtom(cx, (jsval)id); \

intN old = cx->thread;

* Handle old bug that took empty string as zero index. Also convert

} else {

? js_InternalCall(cx, obj, OBJECT_TO_JSVAL(SPROP_SETTER(sprop,obj2)), \

* Contributor(s):
caller = fp->down;

JSScope *scope;
rt = cx->runtime;
* implied. See the License for the specific language governing

struct keyword *kw;

return r;
*/
*

JSStmtInfo *stmt;
MSG_DEF(JSMSG_LABEL_NOT_FOUND, 121, 0, JSEXN_SYNTAXERR, "label not found")

JS_END_MACRO
**** Start of jsinterp.h ****
return JS_FALSE;
case TOK_DOT:

back--;

/*
* JSOP_NEW bytecode with a two-byte immediate telling how many args
precwidth = prec - srclen; /* Need zero filling */

fp = (JSStackFrame *) JS_GetPrivate(cx, obj);

return NULL;
METER(table->stats.misses++);

* Inline JS_ResumeRequest after waiting on rt->scopeSharingDone,

rt->throwHook = hook;

*/
CurrentThreadId() == Thin_RemoveWait(ReadWord(scope->lock.owner)));

/* Return -1, 0, or 1 depending on whether a<b, a==b, or a>b, respectively. */


JS_PUBLIC_API(JSBool)

if (!str)

*/

PRMJTime prtm;
jsid symid;

} else {
JS_free(cx, (void *)lval);

rv = 2.*rv0;

if (filename->length > 0) {
extern JS_PUBLIC_API(JSBool)
hour = HourFromTime(lorutime);
JS_PUBLIC_API(JSBool)

if (xdr->mode == JSXDR_ENCODE)
if (!ok) {
}
if ((jschar)s1[s1off] != s2[s2off]) {
return NULL;
return TRUE;
}

jsval fval;

return JS_FALSE;

JSProperty *prop;

file->nbBytesInBuf++;

i = (jsint) GET_ATOM_INDEX(pc);
return NULL;

JS_free(cx, fullName);

return ren;

*/

JS_LOCK_RUNTIME(rt);

* If the object does not have a property by that name, *foundp will be

{
* Now ren1 points to the last alternative, or to the final node on a
if (!js_EmitTree(cx, cg, pn2))
#include "jsotypes.h"

* provisions of the GPL are applicable instead of those above.


JS_PushArgumentsVA(JSContext *cx, void **markp, const char *format, va_list ap)

JS_PUBLIC_API(JSBool)

tt = CheckGetterOrSetter(cx, ts, TOK_ASSIGN);


pn = NewParseNode(cx, &CURRENT_TOKEN(ts), PN_NULLARY, tc);

** DESCRIPTION:
type = TYPE_INT64;
#define JS_HAS_SOME_PERL_FUN 0 /* has array.join/reverse/sort */

JSNative construct;
*

* is this kosher?
xa0 = a->x;

#define JS_BUG_VOID_TOSTRING 0 /* void 0 + 0 == "undefined0" */


if (!ok)
return NULL;
#include "jsprvtd.h"
#define TIMECLIP(d) ((JSDOUBLE_IS_FINITE(d) \

JSBool (*set32)(JSXDRState *, uint32 *);

if (!(ok = state.ok)) goto out;


bitmap[i] = fill;

JS_ACQUIRE_LOCK(arena_freelist_lock);
static JSBool
{js_typeof_str, TOK_UNARYOP, JSOP_TYPEOF,JSVERSION_DEFAULT},

fprintf(stderr, "%s\t%s\n",

if (scope->object == obj) {
* See also the JSPROP_SHARED attribute and its usage.

#define JS_BUG_NULL_INDEX_PROPS 0 /* o[0] defaults to null, not void */


# Options:
JS_PUBLIC_API(JSBool)
* TOK_BITXOR binary pn_left: left-assoc ^ expr, pn_right: & expr

ss->sprinter.offset += PAREN_SLOP;
rv = (*ss->stuff)(ss, fmt - 1, 1);

char *command = JS_malloc(cx, len);


/* FALL THROUGH */
extern JS_FRIEND_API(JSTokenStream *)
JS_CallFunction(JSContext *cx, JSObject *obj, JSFunction *fun, uintN argc,

jsint slot;
for (j = i - 1; j >= 0; j--)

NULL, NULL, 0, NULL)) {

(lastop == JSOP_SETTER) ? js_setter_str :


JSFile *file = JS_GetInstancePrivate(cx, obj, &file_class, NULL);

* License Version 1.1 (the "License"); you may not use this file

a >>= 5;

return rv;
* If you wish to allow use of your version of this file only

if (strcmp(v2smap[i].string, string) == 0)

#include "jsnum.h"
return JS_FALSE;
* overwrite data. This function returns the number of UTF-8 bytes

* Returning NULL in the 'before' hook will cause the 'after' hook to
its_item(JSContext *cx, JSObject *obj, uintN argc, jsval *argv, jsval *rval)
} GlobData;
break;
grState->state->ok = JS_FALSE;

return 32;

jsint i, j, length, valcnt;

JSPropertyOp getter, JSPropertyOp setter,

#else

EMIT_ATOM_INDEX_OP(JSOP_BINDNAME, atomIndex);

/*
!OBJ_DEFINE_PROPERTY(cx, obj, (jsid)atom, JSVAL_VOID, NULL, NULL,
break;
return NULL;
vp = OBJECT_TO_JSVAL(js_NewFileObjectFromFILE(cx, stdout,

JSRuntime *rt;
}
JSFILE_CHECK_CLOSED("renameTo");

break;

/* Predicates for type testing. */


* creating the script via JS_Compile* and before a JS_ExecuteScript* call.
MUST_MATCH_TOKEN(TOK_LC, JSMSG_CURLY_BEFORE_BODY);

#define JS_DESTROY_LOCK(l) PR_DestroyLock(l)

fprintf(gOutFile, "%s %3u: BACKUP\n", sep, line2);

#define JS_HAS_VALUEOF_HINT 0 /* valueOf(hint) where hint is typeof */

* The return value, op, is treated as a set of flags. If op is JS_DHASH_NEXT,


JSBool ok;

return str;
const char js_arity_str[] = "arity";
*/
if (JSVAL_IS_PRIMITIVE(rval)) {
* the License at http://www.mozilla.org/NPL/
if (!js_ValueToNumber(cx, argv[0], &x))
extern JS_PUBLIC_API(JSHashEntry **)

AssignExpr(JSContext *cx, JSTokenStream *ts, JSTreeContext *tc)

break;
fp->thisp = caller->thisp;

*/
JS_ARENA_RELEASE(&cx->stackPool, mark);
if (result < 0)
uint16 lead, cont1, cont2;

} \
/* We're doing fixed-mode output and d is less than the minimum nonzero
output in this mode.

* Return NULL if out of memory.

hep = JS_HashTableRawLookup(ht, keyHash, key);


JS_snprintf(numBuf, sizeof numBuf, "%u", (unsigned) i);
* version of this file under the NPL, indicate your decision by

pc = CG_CODE(cg, top);
#include "jstypes.h"
extern JSBool

if (diff > 0) {

#endif
goto out;

/* Mark other roots-by-definition in acx. */

}
* Contributor(s):

JS_ADDRESSOF_VA_LIST(ap))) {
m = q1 * d0;
c = *p++;
static JSBool
{"throw", TOK_RESERVED, JSOP_NOP, JSVERSION_DEFAULT},
}
/* Create an array of jsids large enough to hold all the properties */

pn->pn_kid = pn2;

{
if( *rv < 0 ){

js_MutateScope(JSContext *cx, JSObject *obj, jsid id,


do {
return JS_TRUE;

while ((c = *format++) != '\0') {

js_alloc_atom(void *priv, const void *key)


}

/*
return JS_TRUE;

if (last)
* nor the struct typedefs should change much, therefore the nearly-global

break;
return obj;

js_SetStringBytes(JSString *str, char *bytes, size_t length);


JS_NewRuntime(uint32 maxbytes);
return JS_FALSE;

JSPROP_EXPORTED, NULL);
ap = *app;
attrs, NULL);
str = js_ValueToSource(cx, ATOM_KEY(atom));
* returned failure.

FETCH_ELEMENT_ID(n, id); \

JSInt64 result;

str = cx->runtime->emptyString;

JS_GetPendingException(JSContext *cx, jsval *vp)

JS_InternUCStringN(JSContext *cx, const jschar *s, size_t length)

if (state->complete)
#else

JS_END_EXTERN_C

length = (jsuint) argc;


return NULL;

#define JS_BYTES_PER_DOUBLE 8L

JS_PUBLIC_API(JSLocaleCallbacks *)
len - (oplen + js_CodeSpec[JSOP_GOTO].length));
else if (word1(rv) || word0(rv) & Bndry_mask) {
case '3':

// > value is sucked out of the corresponding TTAG_OPTION Run in the Run
tree)

break;
JSPrincipals *principals = fp->script
typedef struct JSAtomListElement JSAtomListElement;
rtmp = JSVAL_TAG(rval); \
JSOP_LIMIT
23, 24, 23, 24, 23, 24, 23, 24, /* 18 */

*/
argc--;
mlo = multadd(mlo, 10, 0);

JSREPORT_ERROR,

{js_InitObjectClass, TAG_CHAR_STRING(js_watch_str)},

JS_XDRNewBase(JSContext *cx, JSXDRState *xdr, JSXDRMode mode);


if (cx->localeCallbacks && cx->localeCallbacks->localeToLowerCase) {

break;

#define JS_BITS_PER_BYTE 8L
if (!GetLine(cx, bufp, fh, startline == lineno ? "js> " : "")) {

if (!pn3->pn_expr)
if (!OBJ_GET_PROPERTY(cx, obj, id, &v))

MSG_DEF(JSMSG_CURLY_IN_COMPOUND, 101, 0, JSEXN_SYNTAXERR, "missing } in


compound statement")

if (thing) {

typedef uint32 jsuint;


{

for (i = 0; i<len; i++) {


* .95% (assuming 16 byte JSArena header size, and 8 byte JSGCThing size).
#endif /* JS_THREADSAFE */
lorutime = result;

#endif

tried_gc = JS_TRUE;
* no filename, but have line number,
#endif

rt->gcLock = JS_NEW_LOCK();
/* rt->rngMultiplier = 0x5DEECE66DL */

}
return JS_FALSE;

OPDEF(JSOP_FORPROP, 105,"forprop", NULL, 3, 1, 1, 0, JOF_CONST|


JOF_PROP|JOF_SET)

CHECK_AND_SET_JUMP_OFFSET_AT(cx, cg, beq);


}

* the error reporter was actually called.

#else
ptrdiff_t length; /* count of try statement bytecodes */
if (!slots) {

case JS_DHASH_LOOKUP:

/*
#define SAVE_SP(fp) \
JSAtom *_atom = (JSAtom *)id; \

static JSBool

TOK_BREAK = 45, /* break keyword */

for (i = 0; i < len; i++)

#define JS_HAS_OBJ_PROTO_PROP 1 /* has o.__proto__ etc. */


OBJ_DROP_PROPERTY(cx, obj2, prop);
* Encode prologLength and version after script->length (_2), but decode

*/

jp->indent += 4;
* Forward declarations for URI encode/decode and helper routines

*foundp = JS_TRUE;
}
* directly -- and assumed always to succeed.

memcpy(newp, p, size);
while (JS_ISSPACE(str->chars[i]))

REOP_UCFLAT1 = 28, /* single Unicode char */


} while (bp != bx);

* terms of the GNU Public License (the "GPL"), in which case the
}

b.lo = 1 / b.lo; /* so go ahead and crash */

case TOK_NAME:

JSObject *obj2;

}
return NULL;

}
* deleting the provisions above and replace them with the notice

* Communications Corporation. Portions created by Netscape are


*/

static JSBool

int32 save = val;

OBJ_DROP_PROPERTY(cx, obj2, prop);


#endif
if (fp && fp->fun) {

if (gsop[j]) {

Storeinc(xc, z, z2);

typedef struct JSErrorReport JSErrorReport;

z = (*bx >> 16) - (zs & 0xffff) - borrow;


void *hookData;

char *base; /* base address of buffer in pool */

JSPropertyOp getter, setter;

46, 59, 3, 3, 3, 3, 3, 3, /* 21 */
case REOP_CCLASS:

return JS_FALSE;
#ifdef METER_PARSENODES
PUSH(cx->exception);

/* Check to see whether obj shares its prototype's scope. */


*/
else {

typedef ptrdiff_t JSPtrdiff;


size_t i, ni, newlength;
char buf[DTOSTR_STANDARD_BUFFER_SIZE];

* getMilliseconds (getUTCMilliseconds)
}
{

JS_SetFrameAnnotation(JSContext *cx, JSStackFrame *fp, void *annotation);


JS_FRIEND_DATA(JSClass) js_ScriptClass = {

uint32 (*tell)(JSXDRState *);

js_FreeStack(cx, *markp);

{
* < catch block contents >
case TYPE_UINTN:
* ideally starting, for tp0 things, at the beginning of the arena's payload
*
else if ((JSDOUBLE_HI32(d) ^ JSDOUBLE_HI32(d2)) >> 31)

break;
break;

#endif

}
}
}
/* Well-known numbers held for use by this runtime's contexts. */
}
d2 = d;

case REOP_RPAREN:
***********************************************************************/

}
*warningp = JSREPORT_IS_WARNING(reportp->flags);

rv *= bigtens[j];

JSSymbol *sym;
JS_ACQUIRE_LOCK(arena_freelist_lock);
extern JSBool

* request to end. We'll let it run below, just before we do the truly

/* The last multiplication could overflow. */

/* -*- Mode: C; tab-width: 8; indent-tabs-mode: nil; c-basic-offset: 4 -*-

return entry;

if (!OBJ_SET_PROPERTY(cx, obj, id2, &v))


* quantatom: atom An unquantified atom.

* ECMA calls that last scoping object the "global object", but note that many

js_GetAtom(JSContext *cx, JSAtomMap *map, jsatomid i);


/* pipe default mode */
if (sub) {

cp = cp2;

* March 31, 1998.


typedef JSInt16 int16;

* Parse the statements in a block, creating a TOK_LC node that lists the
extern JSBool
if (onError) {
* enumerable properties is known. If idp is non-null and the number of
CHECK_REQUEST(cx);
len = cs->length;

return JS_FALSE;

#define JS_HAS_APPLY_FUNCTION 1 /* has apply(fun, arg1, ... argN) */


/*

js_ValueToBoolean(JSContext *cx, jsval v, JSBool *bp)

* the 8K bytes worth of GC-things, there are 1K flag bytes. We mask a thing's
extern JSBool
s = s00;
b = JSVAL_TO_BOOLEAN(v); \

#define JSPRINCIPALS_HOLD(cx, principals) \

rval = FETCH_OPND(-1); \
8, 8, 8, 8, 8, 8, 3, 3, /* 67 */

* returned quotient must be less than 36. */

res->leftContext.chars = str->chars;

return JS_TRUE;
{

extern JSBool

*/
* unambiguous.

}
case TYPE_DOUBLE: (void)va_arg( ap, double ); break;

(void)((scope_)->file[(scope_)->u.count-1] = (file_), \
ren->next = NewRENode(state, REOP_JUMP, NULL);

#endif

jsint length;
JSVersion oldVersion;

intN len, off;


if (map->length == length && !strcmp(map->format, format)) {

* rights and limitations under the License.

/* Perl-ish methods (search is actually Python-esque). */


*/

void

*rval = v;

goto out;

JS_ASSERT((JSInt32)outlen > 0);


};

0,

/*

JSObject *obj;

todo = Sprint(&ss->sprinter, "%s[%s]%s",


tp->t_op = JSOP_MUL;
}

extern JSObject *
* Software distributed under the License is distributed on an "AS
JS_GetEmptyStringValue(JSContext *cx)

#if JS_HAS_OBJ_WATCHPOINT
#ifndef js_cpucfg___

text = str->chars;

j1 = delta->sign ? 1 : cmp(b, delta);


}
extern JS_PUBLIC_API(JSBool)

* Copyright (C) 1998-1999 Netscape Communications Corporation, All Rights


Reserved.

#endif

op = (jsint)trap->op;
JS_ReportError(JSContext *cx, const char *format, ...)

if (cx->version == JSVERSION_1_2) {

return JS_FALSE;
* So, instead of defining a new property in the activation object,

if (!pn3->pn_left)
r--;
JSLL_UI2L(g1970GMTMicroSeconds,G1970GMTMICROHI);

return cp2;

break;
if (!JS_ValueToId(cx, argv[0], &id))
for (sprop = scope->props; sprop; sprop = sprop->next) {

JSBool charArgs, va_list ap)

**** End of jsdhash.c ****


*/

break;

j = bbe;
nbytes += script->length * sizeof script->code[0];
case 'i':
CHECK_REQUEST(cx);

"function",
break;

}
JSMSG_CANT_FIND_CLASS, numBuf);
if (!LookupArgOrVar(cx, &cg->treeContext, pn2))
rval = POP_STR();

script = NULL;

{"width", ITS_WIDTH, JSPROP_ENUMERATE},


with_ThisObject, NATIVE_DROP_PROPERTY,
return JS_FALSE;
/*

switch (slot) {
if(((file->isOpen)?

/*
{

base = fp->argv;

_b = b; \

ok = js_EmitTree(cx, cg, body);


#endif

FROB(ArrayAtom, js_Array_str);
*/

JSLL_OR(rt->rngMultiplier, tmp, tmp2);


return JS_FALSE;

i += 2;

attrs, NULL)) {
sprop = js_FindWatchPoint(rt, obj, id);
JS_ASSERT(pn3->pn_type == TOK_CASE);
JSString *str, *str2;

if (!js_ValueToNumber(cx, argv[0], &x))

# Change LL_* macros to JSLL_*

char **messagep, JSErrorReport *reportp,


#endif

break;
}

/*

priv.context = cx;
off2 = GET_JUMP_OFFSET(pc2);

JS_PUBLIC_API(JSBool)
rval = POP_STR();
JSObject *reobj;
return JS_FALSE;

printf( "numbered argument type unknown\n" );

GC_MARK(cx, fp->varobj, "variables object", NULL);

pn = NewParseNode(cx, &CURRENT_TOKEN(ts), PN_TERNARY, tc);

#endif

#define CG_SWITCH_TO_MAIN(cg) ((cg)->current = &(cg)->main)


}
* rt->gcLock across the mark phase (including the root hashtable mark).

ok = JS_FALSE;

JSContext *cx = (JSContext *)arg;

JS_RELEASE_LOCK(rt->setSlotLock);
/*

return str_resolve1(cx, obj, str, slot);


SET_ATOM_INDEX(pc, ALE_INDEX(ale));

case TOK_OBJECT:
bs = lshift(bs, bs2);
{
{
c = (((((JS7_UNHEX(cp[1]) << 4)
*/
JS_DestroyIdArray(cx, state->ida);
uintN oldflags;
while(sx <= sxe);
static jsdouble
propobj->slots[JSSLOT_ITER_STATE] = iter_state;
(long)JSVAL_TO_INT(nval));
int
pn1->pn_type != TOK_DOT &&

if (mode < 0 || mode > 9)


#endif
ten = JSLL_INIT(0, 10);

JS_free(cx, buffer);
JS_PUBLIC_API(void)
jsval *rval);
int extra = 0;
JS_PUBLIC_API(JSRuntime *)
js_delete_str, lval, xval);

JSRegExp *re;

JSParseNode *pn, JSParseNode *kid,


if (!js_EmitTree(cx, cg, pn2))

*vp = JSVAL_VOID;

rv = (*ss->stuff)(ss, " ", 1);


str = js_ValueToString(cx, OBJECT_TO_JSVAL(obj));

return JS_FALSE;
JSMSG_INCOMPATIBLE_PROTO,

random_setSeed(JSRuntime *rt, int64 seed)


break;

uintN i;
**
jsdouble value;
goto do_setname;
}
file->isPipe = JS_FALSE;

JSWatchPoint *wp;
* terms of the GNU Public License (the "GPL"), in which case the

} else if (JSVAL_IS_STRING(nval)) {

* Handle JSOP_FORPROP first, so the cost of the goto do_forinloop


JS_PUBLIC_API(void)
#define MAX_INTERP_LEVEL 1000
return NULL;

#ifdef METER_PARSENODES
tc->flags |= TCF_FUN_HEAVYWEIGHT;

if (off < 0)

jsval av = *(const jsval *)a, bv = *(const jsval *)b;

JS_END_MACRO

/* Top of stack is the first clause in a conjunction (&&). */


else {
proto = JS_InitClass(cx, obj, NULL, &date_class, Date, MAXARGS,

}
pn->pn_type = TOK_STRING;
if (tb->ptr == tb->limit && !GrowTokenBuf(cx, tb))

static JSParser BitOrExpr;


return;
static JSBool

#define MAX_UCS2 0xFFFF

JSHashEntry *he;
}
obj_watch_handler(JSContext *cx, JSObject *obj, jsval id, jsval old, jsval *nvp,
* for {X} in the format.

* binding behavior, you should call JS_SetOptions(cx, JSOPTION_VAROBJFIX) or


* The Original Code is Mozilla Communicator client code, released
#endif /* jsscope_h___ */

d /= ds;
JS_GetOptions(JSContext *cx)

* If first arg is regexp and no flags are given, just return the arg.
js_strncpy((jschar *)(newReport->messageArgs[i]),
*/

46, 46, 46, 46, 46, 46, 46, 46, /* 103 */


if (rv < 0) {
* We take great care to not call i2b() and Bfree()

JS_PUBLIC_API(JSString *)
JSEXN_SYNTAXERR,
size_t
* the correctly rounded result. For k requested digits and

* The Original Code is Mozilla Communicator client code, released


if (!OBJ_DEFINE_PROPERTY(cx, cx->globalObject,
line = js_PCToLineNumber(caller->script, caller->pc);
for (i = 0; i < argc; i++) {
jp->indent += 4;
}

#include "jsutil.h"

JSObject *funobj = (JSObject *) wp->closure;


catchtail = pn;
* String constants naming the exception classes.
break;

}
JS_PUBLIC_API(JSBool)

oneArgMode = zeroArgMode;
pn = NewBinary(cx, TOK_BITAND, JSOP_BITAND, pn, EqExpr(cx, ts, tc), tc);

3, /* SRC_FOR */

lval = ATOM_BYTES(atom);
}

if (!ok) {

* implied. See the License for the specific language governing

uint32 entryCount; /* number of entries in table */


ok = OBJ_GET_ATTRIBUTES(cx, obj, id, prop, attrsp);
{
{

jsint base;
#include "jsbit.h"

errorNumber, JS_FALSE, ap);

* Software distributed under the License is distributed on an "AS

num = 0;
cx->runtime->gcPoke = JS_TRUE;
case '7':

map = &script->atomMap;
cg->current = &cg->main;

/* Loop control variables: z points at end of string sentinel. */

};

stmtInfo.type = STMT_ELSE;
JS_HashTableDumpMeter(JSHashTable *ht, JSHashEnumerator dump, FILE *fp)

#endif
46, 46, 46, 16, 16, 16, 16, 16, /* 107 */
/*
*date = *cx->runtime->jsNaN;

JSScript *script;
iter_state = propobj->slots[JSSLOT_ITER_STATE];
8, 5, 6, 5, 6, 5, 6, 3, /* 116 */
if (sn && SN_TYPE(sn) == SRC_HIDDEN)

* If you wish to allow use of your version of this file only

if (rt->gcBytes < rt->gcMaxBytes &&

/*
#ifdef XP_BEOS

JS_ReportErrorNumber(cx, js_GetErrorMessage, NULL,


jsbytecode op2);
/* Pop the right-hand side into rval for OBJ_SET_PROPERTY. */
n = 10 * n + JS7_UNDEC(c);
/* Reduce the count of slots the GC will scan in this stack segment. */
case JSOP_TRAP:

return JS_TRUE;

extern JS_PUBLIC_API(JSBool)

#if JS_HAS_SHARP_VARS

#define JS_HAS_INSTANCEOF 1 /* has {p:1} instanceof Object */

startupTimeSeconds = currentLocalTimeSeconds - upTimeSeconds;

if (!js_SetSrcNoteOffset(cx, cg, (uintN)noteIndex, 0, 0))

#define JSDOUBLE_LO32(x) (((uint32 *)&(x))[0])

JS_SetPropertyAttributes(JSContext *cx, JSObject *obj, const char *name,

}
*/

for(i = 0; i < n; i++)


case REGEXP_MULTILINE:
js_RemoveRoot(cx->runtime, &trap->closure);
# print $regexp;

str = JS_ValueToString(cx, argv[i]);

#define JS_HAS_GETTER_SETTER 1 /* has JS2 getter/setter functions */


break;

);

void *closure;
* the round-trip property (analogous to that of printing decimal numbers). In
other words, if one were

JS_STATIC_DLL_CALLBACK(void)
* under the terms of the GPL and not to allow others to use your
filename, strerror(errno));

}
* is valid.

str_enumerate, str_resolve, JS_ConvertStub, JS_FinalizeStub,

#define SEPARATOR_PROPERTY "separator"

i =
* License Version 1.1 (the "License"); you may not use this file
GetChar(JSTokenStream *ts)

{
#endif

JSProperty *prop;

regexp_static_getProperty, regexp_static_getProperty},
if (!prop) {
** JS_EXPORT_API for the implementation of the method.
}
}
{0,0,0,0,0}
funobj = JSVAL_TO_OBJECT(v);

UngetChar(ts, c);

{ 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, /* 0x */
js_DecompileFunctionBody(JSPrinter *jp, JSFunction *fun);

map->nslots = JS_INITIAL_NSLOTS;

case TOK_NAME:
void *annotation; /* used by Java security */
* I've applied the scope change here, and in JS_AliasPropertyToElement

* Software distributed under the License is distributed on an "AS


js_LockGlobal(tl);
printf("#define JS_ALIGN_OF_LONG %dL\n", align_of_long);

privateData = (JSExnPrivate*) JSVAL_TO_PRIVATE(privateValue);

*
void *newmark;
JSFunction *fun;
#define PR_ProcessPendingEvents PL_ProcessPendingEvents
JSPROP_ENUMERATE | JSPROP_PERMANENT,
fprintf(fp, " number of grows: %u\n", ht->ngrows);
if (state->complete)
return JS_FALSE;
if (offset >= 0) {
#if JS_HAS_INITIALIZERS

}
case JSOP_OBJECT:
ok &= CheckSideEffects(cx, tc, pn2, answer);

if (ss.base) {
return str;

#define JS_HAS_APPLY_FUNCTION 1 /* has apply(fun, arg1, ... argN) */


atom = js_ValueToStringAtom(cx, argv[1]);
#if defined(IS_LITTLE_ENDIAN)

slot = (uintN) JSVAL_TO_INT(sprop->id);

d = ltmp ? JSVAL_TO_INT(lval) : *rt->jsNaN; \


ren = NewRENode(state, REOP_BACKREF, NULL);
static JSBool

#define INTEGER_OP(OP, EXTRA_CODE) \

jsdouble d;
JSMSG_BAD_SORT_ARG);

extern JS_FRIEND_DATA(JSObjectOps) js_WithObjectOps;

void

* This suggests computing an approximation k to log10(d) by


if (size <= cg->tryNoteSpace)
goto done;

JSVERSION_1_1 = 110,
if (!str) {
return JS_TRUE;

JSBool
JSProperty *prop;

* and other provisions required by the GPL. If you do not delete


return JS_FALSE;
#include "jstypes.h"
extern JS_FRIEND_API(int)
case TOK_LC:

#include "jsapi.h"

#endif
* the provisions above, a recipient may use your version of this

JS_FRIEND_API(void)

/*
JS_PUBLIC_API(JSBool)
const char js_uneval_str[] = "uneval";

{
y = *--xa;

}
/* Make this constructor make objects of class Exception. */
c = MatchChar(ts, '=') ? TOK_ASSIGN : TOK_DIVOP;

return JS_TRUE;
* Copyright (C) 1998 Netscape Communications Corporation. All

uintN oldflags;
}
nz = 0;

* scripts and event handlers shared among Mozilla chrome


windows,
if (leftright) {

#endif /* !JS_HAS_INSTANCEOF */
JS_BEGIN_MACRO \
* the provisions above, a recipient may use your version of this
*
if ((he = *hep) == NULL)
OPDEF(JSOP_VARINC, 100,"varinc", NULL, 3, 0, 1, 10, JOF_QVAR |
JOF_NAME|JOF_INC|JOF_POST)

46, 46, 80, 80, 46, 40, 40, 40, /* 43 */


if (fun->flags & JSFUN_GETTER)

/*

ok = HasFinalReturn(pn->pn_kid3);
array_splice(JSContext *cx, JSObject *obj, uintN argc, jsval *argv, jsval *rval)

return OBJ_GET_CLASS(cx, obj)->delProperty(cx, obj, js_IdToValue(id),


tmp = OBJ_GET_PARENT(cx, obj);

align_of_int64, align_of_float, align_of_double, align_of_pointer,


*/

#define PCE_OBJECT(entry) ((entry).s.object)

goto out;

FAST_INCREMENT_OP(GET_ARGNO(pc), nargs, argv, rtmp, -=, MIN);


*

static Bigint *pow5mult(Bigint *b, int32 k)

for (; (next = ren1->next) != NULL && next != oldnext; ren1 = next) {


* Communications Corporation. Portions created by Netscape are

JSVAL_TO_INT(sprop->id) < fun->nvars);

for (i = 0; i < len; i++) {

pn1 = Variables(cx, ts, tc);


report.uctokenptr = NULL;

q0--;
* implied. See the License for the specific language governing

** OUTPUTS: JSUint64 *qp: pointer to quotient


JSStackFrame *fp;
#define JS_HAS_EXPORT_IMPORT 1 /* has export fun; import obj.fun */
return NULL;
JS_SetPendingException(JSContext *cx, jsval v)

JSPRINCIPALS_HOLD(cx, principals);
if ((t = a >> 4) != 0)

if (!prop || obj != obj2) {


/* Lock if object locking is required by this implementation. */
*ip = (uint16) d;
pn2->pn_op = JSOP_GETELEM;
typedef struct JSThinLock {

extern JSBool

#else
*s++ = (char)dig;
if (!chars) {

if (!re)

if (JSVAL_TO_INT(id) == STRING_LENGTH)
if (!scope->u.link &&
mdata.base.mode = GLOB_MATCH;

if (i == ilim) {
return (ptrdiff_t)((((uint32)(sn[0] & SN_3BYTE_OFFSET_MASK)) << 16)
0);

if (stmt->type == STMT_CATCH && stmt->label == atom)


while ((c >= '0') && (c <= '9')) {

return NULL;

JSBool

ts = js_NewTokenStream(cx, chars, length, filename, lineno, principals);

if (!JSVAL_IS_NUMBER(pn3->pn_val) &&

return JS_FALSE;
* Software distributed under the License is distributed on an "AS

argv[0] = STRING_TO_JSVAL(str);

#endif

* compile-time context in tc, and a TOK_NAME node pn. It returns false on


#endif
SRC_WHILE = 3, /* JSOP_IFEQ is from a while loop */

SecFromTime(jsdouble t)
}

(JSProperty **)&sprop)) {
leap = (DaysInYear((jsint) year) == 366);

#define Day(t) floor((t) / msPerDay)


JSToken *tp;

}
#define JSFILE_CHECK_ONE_ARG(op) \

step = next;

RecycleTree(pn2, tc);
{"toTimeString", date_toTimeString, 0,0,0 },

#include "jspubtd.h"
JS_LOCK0(tl, me);

todo = Sprint(&ss->sprinter, "%s%s",

#else

}
if (nslots < JS_INITIAL_NSLOTS)
s2 = -(int32)(word0(d) >> Exp_shift1 & Exp_mask>>Exp_shift1);
return JS_FALSE;

*ip = (int32)(d - two32);


break;

* here on HPUX. Force a negative zero instead.


/* Already found, check for a readonly prototype property. */

* startupTimeMicroSeconds.
pool->stats.ninplace++;
target = PTRDIFF(pc, script->main, jsbytecode);
*/
86, 86, 16, 94, 16, 46, 16, 16, /* 65 */
40, 40, 40, 40, 40, 40, 46, 46, /* 106 */
OBJ_SET_SLOT(cx, obj, JSSLOT_PRIVATE, bval);
static void
if (!(ren2->flags & RENODE_ISNEXT))
if (JSVAL_IS_INT(v))
JS_ReportErrorNumber(cx, js_GetErrorMessage, NULL,
123, 123, 123, 123, 123, 123, 123, 123, /* 105 */
return JS_FALSE;
#endif /* WIN16 */

printf("#define IS_LITTLE_ENDIAN 1\n");


OPDEF(JSOP_DEFFUN, 125,"deffun", NULL, 3, 0, 0, 0, JOF_CONST|
JOF_SET)
JS_ASSERT(diff >= 0);
JS_UNLOCK_OBJ(cx, obj); \

} else {
}
0x34670001, /* 36 Lu, hasLower (add 209), identifier start */
#define JS_HAS_SPARSE_ARRAYS 0 /* array methods preserve empty elems */

/*

len = PTRDIFF(done, pc, jsbytecode);


JSPropertyOp getter, JSPropertyOp setter, uintN attrs);

js_Script_str,

*/
/*

return JS_TRUE;

* pointer here to distinguish this value from any valid u.count (small int)
cx->requestDepth = 0;

JS_PUBLIC_API(JSDHashNumber)
*/
* could be moving up or down). We finally order obj with respect to pobj
j = JS_snprintf(buf, sizeof buf, "(new %s(", js_ScriptClass.name);
return JS_FALSE;
void

tc->flags |= TCF_FUN_HEAVYWEIGHT;
* a call object for the outer function's activation.
* deleting the provisions above and replace them with the notice
/* XXXshaver js_NewFileTokenStream should do this, because it drops */

*y = x;

return fp->fun && fp->fun->native;


}
JS_free(cx, cstr);
js_ConstructObject(JSContext *cx, JSClass *clasp, JSObject *proto,
* JS execution context.

#include "jsopcode.h"

}
/* Do we yet have the shortest string that will round to d? */
* Source notes generated along with bytecode for decompiling and debugging.
* Contributor(s):
REOP_EMPTY = 0, /* match rest of input against rest of r.e. */
mode = (format & JOF_MODEMASK);
goto out;
}

cond = js_CompareStrings(str, str2) OP 0; \


#endif

*
*scope->proptail = sprop;

* IS" basis, WITHOUT WARRANTY OF ANY KIND, either express oqr


if (JSREPORT_IS_WARNING(report->flags)) {
* is unlocked. Similarly, when unlocking p, if compare-and-swap(p, A, 0)

low = GET_JUMP_OFFSET(pc2);
static JSBool
}

{
const char *cp;

MSG_DEF(JSMSG_PAREN_AFTER_FORMAL, 71, 0, JSEXN_SYNTAXERR, "missing ) after


formal parameters")

**** Start of jslibmath.h ****


}

JSMSG_TRAILING_SLASH);
js_NewObject(JSContext *cx, JSClass *clasp, JSObject *proto, JSObject *parent);

js_UngetToken(ts);

* If the object does not have a property by that name, *foundp will be
#endif

__NSTerminate();
JSCT_OTHER_SYMBOL = 28

void *data);
uint32 sizeMask; /* JS_BITMASK(log2(table size)) */

return a;

end = length;

JSScopeProperty *

return cx->options;
scopeobj = caller->scopeChain;

printf("#define JS_BITS_PER_FLOAT %dL\n", bpb * sizeof_float);

for (slot = newlen; slot < oldlen; slot++) {

return JS_FALSE;
extern JSBool
if (cp == NULL)
#include "jsclist.h"

0x009F0002, /* 45 Ll, hasUpper (subtract 2), hasTitle, identifier start */

/* Can't trust HUGE_VAL */


if (!bitmap) {

JS_PropertyStub, file_currentDirSetter,

#define JOF_BYTE 0 /* single bytecode, no immediates */


JS_ReportErrorNumber(cx, js_GetErrorMessage, NULL,

/* assumes we don't have leading/trailing spaces */

state->cp = cp + 1;

} else {
return -1;
goto out;

return JS_FALSE;

JSInterpreterHook executeHook;
} else {
outermost = (cx->version != JSVERSION_1_2 && cx->sharpObjectMap.depth == 0);
/* ECMA 15.1.1.2 */
** MACROS: JSLL_<mathematical operators>

* definition and reduce dependence on NSPR. NSPR is used to get the current

sn = script->notes;
JSLL_DIV(local_time, local_time, us2s);
obj = NULL;
if (ds < 0. && ds != k)
js_InitFunctionClass(JSContext *cx, JSObject *obj);

js_strncpy(chars, cx->regExpStatics.leftContext.chars, leftlen);


JSStackFrame *caller;

{
* In the script or scripted function case, the same reasoning
#endif /* !JS_HAS_OBJ_PROTO_PROP */
typedef enum JSGCMode { JS_NO_GC, JS_MAYBE_GC, JS_FORCE_GC } JSGCMode;
/* We have a fraction. */

with_GetAttributes(JSContext *cx, JSObject *obj, jsid id, JSProperty *prop,


/* The argument string may be empty or contain no tokens. */
JS_DropExceptionState(JSContext *cx, JSExceptionState *state)
prtm->tm_year = (JSInt16)year;

tmp = 10 * num + JS7_UNDEC(dc);


tt = js_PeekToken(cx, ts);
#define PR_GetMainEventQueue PL_GetMainEventQueue
Open a file "testArgs.txt" and read each line into argc/argv.
}
"PR_CEILING_LOG2",
}
JSBool ok;
JSFILEMSG_FILE_MUST_BE_OPEN, op); \

return js_TryValueOf(cx, obj, type, vp);

#define JSLL_MUL(r, a, b) { \

SECURITY_CHECK(cx, NULL, "copyTo", file); /* may need a second argument!*/

return atom->number;
} else {
strcpy(result, base);
_a1 = jshi16(a), _a0 = jslo16(a); \

#include <stdlib.h>
}

#ifndef NSPR_LOCK

/*

return NULL;
/* 09:41:40 GMT-0800 (PST) */

* License Version 1.1 (the "License"); you may not use this file
{
num = (uintN)JS7_UNDEC(c);
fprintf(gOutFile, " current value %s\n",
if (file->hasAutoflush) {

op = CURRENT_TOKEN(ts).t_op;

* 10 bits signed offset used for converting case

return NULL;

if (!vector)
* being written into the bytecode stream and fixed-up later (c.f.

for (i = 0; i < argc; i++) {


}

/* NB: JSSLOT_PROTO and JSSLOT_PARENT are already indexes into object_props. */


*/
flags = *flagp;
TableEntry *table;

(JSProperty **)&sprop)) {
case JSOP_INITPROP:

PutFatlock(JSFatLock *m, void *id)

return fun;

year += 1900;

if (!str ||

/***********************************************************************

{
JS_ReportOutOfMemory(cx);
/*
char ch = *pInt;
memset(ht->buckets, 0xDB, n * sizeof ht->buckets[0]);

ATOM_LIST_LOOKUP(_ale, _hep, _al, _atom); \


MSG_DEF(JSMSG_BAD_SORT_ARG, 12, 0, JSEXN_TYPEERR, "invalid
Array.prototype.sort argument")
case 'X': /* unsigned HEX */

if (dig == '9') { /* possible if i == 1 */


my_GetErrorMessage(void *userRef, const char *locale, const uintN errorNumber);
GC_MARK(cx, thing, "atom", NULL);

if (!(p51 = p5->next)) {

sh->nslots = slotdiff;
uint8 octets[6];

static void prop_iterator_finalize(JSContext *cx, JSObject *obj); // Forward


declare

JS_ASSERT(len == 1);

extern double fd_exp __P((double));


/* Convert the second argument from a count into a fencepost index. */
104, 104, 104, 104, 104, 104, 104, 104, /* 0xDC00 */
if (ltmp == JSVAL_OBJECT) { \
JS_DHashTableFinish(JSDHashTable *table)
call_convert(JSContext *cx, JSObject *obj, JSType type, jsval *vp)

jsdouble *date = date_getProlog(cx, obj, NULL);


"PR_sprintf_append",
* t = new Array; t[0] = a; t[1] = b; t[2] = c; t;
dp = js_NewDouble(cx, d);

lval, xval,
*rval = JSVAL_FALSE;
/* -*- Mode: C; tab-width: 8 -*-
return JS_TRUE;
SAVE_SP(fp);

#define JSXDR_MAGIC_SCRIPT_2 0xdead0002


}

return JS_FALSE;
JSObject *lambda; /* replacement function object or null */

#include "jsapi.h"
* Emit code for [a, b, c] of the form:
js_FreeRawStack(cx, newmark);

if (end < 0)

if (fp->script) {

/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 2 -*- */

if (re && slot == REGEXP_LAST_INDEX) {


}
op = pn2->pn_op;

* JS stack frame, allocated on the C stack.

#endif

** DESCRIPTION:

#include "jsprf.h"

return JS_FALSE;
return JS_FALSE;
static JSBool
* Alternatively, the contents of this file may be used under the

JSVersion version;

{
JSFILEMSG_INIT_FAILED);
} else { \
return strlen((char*)tobufp);;

* Push the jsdouble d using sp, depth, and pc from the lexical environment.

goto bad_import;
jschar *chars, *ochars;
onError = NULL;
#define JS_BUG_EVAL_THIS_SCOPE 0 /* Math.eval('sin(x)') vs. local x */
}

}
}
* if there are no properties left to enumerate.
{

JS_ASSERT(!oldfp->dormantNext);
he = JS_HashTableRawAdd(table, hep, keyHash, (void *)key, NULL);

#define fd_asin asin

pipemode[0] = 'r';
JS_PUBLIC_API(void)

}
? js_function_str

* in which case the provisions of the GPL or the LGPL are applicable instead
}

ok = JS_FALSE;
#endif

#ifdef LIVECONNECT
cp++;

JSObject *callobj = js_GetCallObject(cx, fp, NULL);

/* Recur to fix all descendent nested alternatives. */

60, 80, 80, 46, 46, 46, 80, 80, /* 40 */

rdata.index = 0;

script->version = cx->version;

!JS_XDRUint16(xdr, &fun->nargs) ||

const char *s;


return JS_FALSE;

JS_DHashFreeTable(JSDHashTable *table, void *ptr)

JS_PUBLIC_API(JSScript *)

continue;

js_InitObjectMap(&scope->map, nrefs, ops, clasp);


static JSBool

bit = 1 << bit;


#endif

/*
/* NB: the formatter already updated sp, so we continue here. */

case TOK_OR:
* License Version 1.1 (the "License"); you may not use this file
JSREPORT_WARNING | JSREPORT_STRICT,
JSBool ok;

*sp = NULL; /* Set to null in case we return an early error. */


JS_END_MACRO

if (!js_LookupProperty(cx, obj, id, &pobj, (JSProperty **)&sprop))

if (JS_TypeOfValue(cx, argv[1]) == JSTYPE_FUNCTION) {

JSInt32
* Communications Corporation. Portions created by Netscape are
hash1 -= hash2;

script = (JSScript *)
JS_IsArrayObject(JSContext *cx, JSObject *obj);

*/

JSRTS_LANDING

*/

continue;
/* Set hep for insertion of atom's ale, immediately below. */

return js_NewNumberValue(cx, z, rval);

if (prop)

while( c != 0 ){

*/
JS_END_MACRO
#if defined(JS_USE_ONLY_NSPR_LOCKS) || \

JSAtom *calleeAtom;
JSInt64 _a; \

*vp = JSVAL_NULL;

jssrcnote *notes, JSTryNote *trynotes,

pn->pn_type = TOK_PRIMARY;
#include "jstypes.h"
return JS_FALSE;

};
default:

path = getenv("PATH");

usetz = JS_FALSE;
if (!atom) {

/* Force creation of argument object if not yet created */

{
gExitCode = EXITCODE_FILE_NOT_FOUND;

JSArgumentFormatMap *temp = map;

return JS_TRUE;
* arguments object until it is truly needed. JSOP_ARGSUB optimizes away

#if JS_HAS_SPARSE_ARRAYS

tp->t_op = MatchChar(ts, c) ? JSOP_NEW_EQ : (JSOp)cx->jsop_eq;


JS_ArenaCountGrowth(JSArenaPool *pool, JSUint32 size, JSUint32 incr)

if (rt->gcRunning) {

mlo = mhi = multadd(mhi, 10, 0);


}

MUST_MATCH_TOKEN(TOK_RP, JSMSG_PAREN_IN_PAREN);
return state->complete;

static JSParseNode *

/*

static JSHashAllocOps defaultHashAllocOps = {

c = *cp++;
return rv;

} else {
}
JSString *str;

* for a small integer d and the integer n is not too

JS_ClearAllWatchPoints(cx);
goto no_catch;
#define PRIVATE_TO_JSVAL(p) ((jsval)(p) | JSVAL_INT)
"Jan", "Feb", "Mar", "Apr", "May", "Jun", "Jul", "Aug", "Sep", "Oct", "Nov",
"Dec"

fastmove = (cmp == sort_compare);


/* Emit code for the property initializer. */
*va_arg(ap, JSFunction **) = fun;

* the provisions above, a recipient may use your version of this


JSDHashEntryStub *stub = (JSDHashEntryStub *)entry;

}
}
for (thing = (JSGCThing *) split; thing < limit; thing++) {

str = js_fileDirectoryName(cx, file->path);

/*

newReport = (JSErrorReport *)JS_malloc(cx, sizeof (JSErrorReport));


if (!script)

ok = OBJ_GET_PROPERTY(cx, obj, id, &val);

if (attrs & JSPROP_SETTER) {

if ((d > ds) || (d == ds && (L & 1 || biasUp))) {

jsval *rval)

if (ok)

"line2pc([fun] line) Map line number to PC",


* version of this file under the NPL, indicate your decision by
return rv;

static JSBool

#endif /* INFNAN_CHECK */

METER(if (rt->gcLevel > rt->gcStats.maxlevel)


{"getUTCMinutes", date_getUTCMinutes, 0,0,0 },

};

if (JS_HAS_STRICT_OPTION(cx)) {
js_IndexAtom(JSContext *cx, JSAtom *atom, JSAtomList *al)
? (pn1->pn_count > 1 || pn1->pn_op == JSOP_DEFCONST)
if (sp + nslots > limit) {

/* XXX not quite sure here */

#define XP_PC 1
str_toLocaleUpperCase(JSContext *cx, JSObject *obj, uintN argc, jsval *argv,
jsval *rval)
}
break;

return JS_FALSE;
newlen++;

int32 i;
0x007F0003, /* 44 Lt, hasUpper (subtract 1), hasLower (add 1), hasTitle,
identifier start */
}

#define SPROP_SETTER(sprop,obj) SPROP_SETTER_SCOPE(sprop, OBJ_SCOPE(obj))


*rv = -1;

MSG_DEF(JSMSG_CURLY_AFTER_FINALLY, 97, 0, JSEXN_SYNTAXERR, "missing } after


finally block")

JS_STATIC_DLL_CALLBACK(JSHashEntry *)

};

*
uintN i;

ok = js_InitScanner(cx);
* Emit one bytecode.
/* Put digits into bd: true value = bd * 10^e */

#include "jstypes.h"

PR_GetOpenFileInfo(file->handle, &info):

z = fd_atan2(x, y);
40, 40, 40, 40, 40, 40, 40, 40, /* 108 */

#include "jshash.h" /* Added by JSIFY */


return 0; /* b is zero */
ren = ParseRegExp(&state);

? NULL
ALE_SET_JSOP(ale, tc->topStmt ? JSOP_CLOSURE : JSOP_DEFFUN);

#ifndef NSPR_LOCK

VALUE_TO_OBJECT(cx, lval, obj); \


slot = SPROP_INVALID_SLOT;
#if JS_HAS_LVALUE_RETURN

length = strlen(format);

};

JSObjectOp init;
if (!callobj)

cp = state->cp;

JS_ReportErrorNumber(cx, JSFile_GetErrorMessage, NULL,


MSG_DEF(JSMSG_BAD_APPLY_ARGS, 154, 0, JSEXN_TYPEERR, "second argument to
Function.prototype.apply must be an array")

/*

OPDEF(JSOP_SETCONST, 14, "setconst", NULL, 3, 1, 1, 1, JOF_CONST|


JOF_NAME|JOF_SET)

#if JS_HAS_GETTER_SETTER
MUST_MATCH_TOKEN(TOK_RP, JSMSG_PAREN_AFTER_FOR_CTRL);

while(xb < xbe);

JSLL_UI2L(result1,PRMJ_DAY_SECONDS);

JSClass js_ObjectClass = {

}
z = fd_fabs(x);

#if JS_HAS_CALL_OBJECT
case TOK_SHOP:

*rval = BOOLEAN_TO_JSVAL((attrs & JSPROP_ENUMERATE) != 0);


sn = js_GetSrcNote(jp->script, pc);
/***********************************************************************

JSAtom *setterAtom;
return cx->fp != NULL;
{
hexp = hex;
return JS_TRUE;
#endif

if (pn1 && !js_FoldConstants(cx, pn1, tc))


}
#include "jsstddef.h"
isFunction = (oldAttrs & (JSPROP_GETTER | JSPROP_SETTER)) != 0;
#endif /* XP_PC */

extern JSBool

#endif /* JS_HAS_IN_OPERATOR */

}
JSString *str;
* js_ConstructObject seems to require a frame.

pn->pn_pos.end = pn2->pn_pos.end;
size_t args_length;
#include "prmjtime.h"
}
const jschar *text, *pat;
d *= tens[j1 & 0xf];

e = 0;

JS_FRIEND_API(char *)
case JSVAL_STRING: {

{"global", REGEXP_GLOBAL, REGEXP_PROP_ATTRS | JSPROP_READONLY,0,0},


#define METER(x) /* nothing */

return str;

out:
#endif /* JS_HAS_EXPORT_IMPORT */

* otherwise the exception will describe only the last compile error,

exn_destroyPrivate(cx, privateData);
" through them have not been finalized.\n",
goto out;
if (!b)

* License Version 1.1 (the "License"); you may not use this file

math_ceil(JSContext *cx, JSObject *obj, uintN argc, jsval *argv, jsval *rval)

JS_HashTableEnumerateEntries(JSHashTable *ht, JSHashEnumerator f, void *arg);

sprop->attrs |= JSPROP_ENUMERATE;

/* -*- Mode: C; tab-width: 8; indent-tabs-mode: nil; c-basic-offset: 4 -*-


map->format = format;
#endif
* (assignment) operation, even if there are native (no script) stack frames
}
struct BinaryDigitReader bdr;
atomIndex = ALE_INDEX(ale);
{

JSAtomState *state = (JSAtomState *) priv;


jsint i, j, sublen;
if (!count) {

RENode *next, *kid, *ren;


ida = (JSIdArray *)

while(xa < xae) {


#endif

60, 60, 60, 60, 60, 60, 60, 60, /* 70 */


}
} else {

if( l10n_debug )
{
ok = JS_TRUE;
JSBool ok;

catchLength = (ptrdiff_t) tn->length,

* calculation.

case JSOP_ONE:
args->dump((char *) he->value, (void *)he->key, args->data);
JSString *str;
global_locks = (PRLock **) malloc(global_lock_count * sizeof(PRLock*));

** and requires array notation.

else

}
j &= 31;

if (principals)
for (vp = fp->sp; vp < end; vp++)

str = js_DecompileValueGenerator(cx, -1, OBJECT_TO_JSVAL(obj), NULL);


clasp = &js_ObjectClass; /* default class is Object */
struct timeval tv;
iter_state = JSVAL_NULL;

result = fwrite(buffer, 1, n, file);

pn->pn_type = TOK_UNARYOP; /* PLUS and MINUS are binary */


* set ownercx to cx, claiming exclusive (single-threaded) ownership of scope.

* 10**e */

* Rights Reserved.

cp--; /* back up so cp points to last hex char */

if (!lval)
#ifdef JS_ARENAMETER

fprintf(gOutFile,

}
return JS_FALSE;
/* TODO: this is pretty ugly, BTW, we walk thru the string too many times */
}

id = (jsid)atom;

state->ok = JS_FALSE;
SET_ENUMERATE_ATTR(sprop); \
if (!str) {

jsdouble msec;
"for",

}
/************************************************************************/
JS_END_MACRO
{

* identifier ($)
ok = JS_FALSE;

if (currentVersion != originalVersion)

JSRuntime *rt;

obj = js_NewObject(cx, &js_ArrayClass, NULL, NULL);


return i - sep->length;
if (argc > 0 && JSVAL_IS_INT(argv[0]))

memset(newPrivate, 0, sizeof (JSExnPrivate));

*/
{

/*

rp->lo = n0;

break;

case JSOP_ADD:
if (*cp2 == '\n')
caseOff = pc2 - pc;
* file under either the NPL or the GPL.

static void

#include "jstypes.h"

jsval *sp, *oldsp, rval;

const char js_Arguments_str[] = "Arguments";


return JS_FALSE;

fprintf(tracefp, "%s %s",


* Rights Reserved.

} else { \
fs->flags);

ArgumentList(JSContext *cx, JSTokenStream *ts, JSTreeContext *tc,

res->leftContext.chars = str->chars;
news = (jschar *) JS_malloc(cx, m);
#include <math.h>

SET_STATEMENT_TOP(stmt, top);

else

* The Original Code is Mozilla Communicator client code, released

break;

js_GetErrorMessage, NULL,

JS_UNLOCK_RUNTIME(rt);
JS_STATIC_DLL_CALLBACK(intN)
static JSBool

d = u >> j;
JSTokenType tt;
if (fp)

return JS_FALSE;

str = js_NewStringCopyN(cx, cx->runtime->emptyString->chars,

JSCLASS_NO_OPTIONAL_MEMBERS

* creation and destruction


newchars[ni++] = digits[ch & 0xF];

* if you compile the engine JS_THREADSAFE: this function may be called for a

"dotstar_min",

if (!js_FoldConstants(cx, pn2, tc))

return js_Execute(cx, scopeobj, script, fp, 0, rval);

extern JSBool

off = GET_JUMP_OFFSET(pc2);
JSParseNode *pn;
/*
return NULL;
#define JS_HAVE_LONG_LONG
js_InitObjectClass(JSContext *cx, JSObject *obj);

js_strncpy(cp, name->chars, name->length);

script_finalize(JSContext *cx, JSObject *obj)


script->main += prologLength;

goto error;
if (result < 0)
xdr = JS_XDRNewMem(cx, JSXDR_ENCODE);
if (bupline && line1 == line2)
* version of this file under the NPL, indicate your decision by

* and JS_FALSE for the invocation after the code has run.

typedef enum JSStmtType {

* IS" basis, WITHOUT WARRANTY OF ANY KIND, either express oqr

sign = ' ';

jsdouble *date = date_getProlog(cx, obj, argv);


goto out;

pn3 = NewParseNode(cx, &CURRENT_TOKEN(ts), PN_BINARY, tc);

if (cs->format & JOF_POST) {


* Create a new JSString whose chars member refers to external memory, i.e.,
MatchChar(JSTokenStream *ts, int32 expect)

SetPropertyAttributes(JSContext *cx, JSObject *obj, JSAtom *atom,

#define GLOBAL_LOCK_INDEX(id) (((uint32)(id) >> 2) & global_locks_mask)


JS_PUBLIC_API(JSBool)
return JS_TRUE;

* under argc arguments on cx's stack, and call the function. Push missing
}
ss.maxlen = lastlen;

40, 40, 40, 40, 40, 40, 40, 40, /* 31 */

_c <= (JSVAL_INT_MAX % 10)))) { \

return rv;
uintN flags; /* flags -- see below */
if (OBJ_GET_PROPERTY(cx, obj, (jsid)atom, &fval) &&
NULL,

return JS_FALSE;
return JS_FALSE;

/* get the difference between this time zone and GMT */


/*

ok = js_ValueToECMAInt32(cx, v_, &i); \

if (!ok)
*vp = js_IdToValue(id);
ren = ParseAltern(state);
d = JS_strtod(cstr, &estr);
if (result < 0)

jsval *rval)
if (qp) {

struct { /* two kids if binary */


pn4->pn_kid2 = pn2;
result = TIMECLIP(result);
if (file->isOpen && !js_canRead(cx, file)) {
FETCH_NUMBER(cx, -1, d2); \
return JS_FALSE;

#define JS_ENABLE_GC(rt) JS_ATOMIC_DECREMENT(&(rt)->gcDisabled);

ok = JS_EvaluateUCScriptForPrincipals(cx, obj, principals, chars, length,


/* Set the value of the Date.prototype date to NaN */
JSLL_MinInt(void);

#define MEM_DATA(xdr) ((void *)((char *)(xdr)->data + MEM_COUNT(xdr)))

; /* leave cp */
vector = NULL;

case TOK_OBJECT:
#define fun_hasInstance NULL
/* skip to end of line */;
flags = 0;

* loop created by the JS_BEGIN/END_MACRO brackets.


all_clear = JS_FALSE;

break;

* terms of the GNU Public License (the "GPL"), in which case the

cont1 = (uint16) *(utf8p+1);


*
GetTrapArgs(JSContext *cx, uintN argc, jsval *argv, JSScript **scriptp,
*/
#define JS_HAS_EVAL_THIS_SCOPE 0 /* Math.eval is same as with (Math) */

if (array[2] < 1)

uintN attrs);
static JSBool

if (sn && SN_TYPE(sn) == SRC_LABEL)

if (!chars) {

script->notes = notes;

typedef JSBool
extern JS_PUBLIC_API(JSBool)
static JSBool

JSMSG_BAD_LABEL);

15, 15, 15, 15, 15, 15, 15, 15, /* 101 */

k = -1 - ndigits;
#if JS_HAS_TRIPLE_EQOPS

stmtInfo.label = pn3->pn_atom;
return JS_FALSE;
/* JS_FRIEND_DATA so that JSVAL_IS_FUNCTION is callable from outside */
}
JSScope *

return &res->leftContext;
pn2->pn_pos.end = pn->pn_pos.end;

pn2->pn_pos.begin = pn->pn_pos.begin;

jschar *cp;

if ((ch = chars[i]) < 128 && IS_OK(ch, mask))

do {
if (TEST_BIT(CALL_ARGUMENTS, fp->overrides)) {

#endif
JS_PUBLIC_API(JSBool)

rt->scopeSharingDone = JS_NEW_CONDVAR(rt->gcLock);

int rv;

ok = call; \

* The Original Code is Mozilla Communicator client code, released

#define OBJ_CHECK_SLOT(obj,slot) \

* March 31, 1998.


* Octal and hex escapes can't be > 255. Skip this

recyclednodes++;
JSBool

default:
fp->rval = OBJECT_TO_JSVAL(thisp);

OPDEF(JSOP_NEW, 35, js_new_str, NULL, 3, -1, 1, 10, JOF_UINT16)

* pointers into internal tokenstream structs, and may go away.


static JSBool
}
rt = cx->runtime;
*/

goto bad_inline_call;

JSPrincipals *principals,

strncpy(result, &pathname[index+1], aux-index);

* unreachable, it will finalize the iterator, and may also finalize obj,

}
continue;

return NULL;

}
out:

return JS_FALSE;

js_CompileFunctionBody(JSContext *cx, JSTokenStream *ts, JSFunction *fun);

JS_DumpNamedRoots(JSRuntime *rt,
str = js_DecompileValueGenerator(cx, JSDVG_SEARCH_STACK, v, str);
uintN nargs, uintN flags);
* terms of the GNU Public License (the "GPL"), in which case the
* Add the try note last, to let post-order give us the right ordering
tagbuf[j++] = '>';

#include "jslock.h"
#define gc_lock_increment(he) gc_lock_set_count(he, gc_lock_get_count(he)+1)
if (!JSVAL_IS_STRING(id))
#define JS_HAS_UNDEFINED 0 /* has global "undefined" property */
#ifdef DEBUG

return m0;

*/

const char *filename, uintN lineno,

}
JSBool
}

case JSOP_IMPORTELEM:

nchars = js_strlen(chars);

off2 = table[i + 1].offset;


return 0;

* V

ULong result;

40, 40, 40, 40, 40, 46, 46, 46, /* 92 */


* Rights Reserved.
js_DateGetMinutes(JSContext *cx, JSObject* obj);

if (ilim >= 0 && ilim <= Quick_max && try_quick) {


return js_IsAboutToBeFinalized(cx, thing);

TOK_USESHARP = 54, /* #n# for object/array initializers */


*scriptp = cx->fp->down->script;

JS_realloc(cx, ida, sizeof(JSIdArray) + (length - 1) * sizeof(jsval));


break;
urlChars = js_InflateString(cx, url, strlen(url));
#endif /* !JS_HAS_GETTER_SETTER */
* Modes for converting floating-point numbers to strings.

void **listenerTSData, void *closure);


* If we collected flags that indicate nested heavyweight functions, or

typedef struct JSPropertyDesc {

str = js_ValueToString(cx, *sp);

if (!obj)
}

#endif
}

* file under either the NPL or the GPL.


// warning.

a = (char *)vec + i * elsize;

* NB: we count on the newborn string root to hold any string

return NULL;

*/

char space = ' ';


JSBool

{
JSBool ok;

JS_LOCK_OBJ(cx, pobj);

}
#if JS_HAS_MORE_PERL_FUN

return JSDOUBLE_IS_NaN(d2);
#ifdef JSDEBUGGER_C_UI
{js_valueOf_str, str_valueOf, 0,0,0},
}

full = JS_smprintf("%s/%s", comp, name);

TOK_THROW = 58, /* throw keyword */


if (!proto) {

js_Emit1(cx, cg, JSOP_THROW) < 0) {

}
Bcopy(mhi, mlo);

* multiple times. Although - I took a quick stab at this, and I lost


jsval *rval)
jsval v;

STORE_OPND(-1, OBJECT_TO_JSVAL(withobj));

script = cx->fp->down->script;
JS_PUBLIC_API(JSBool)

if (!sprop) {

mdata.base.optarg = 1;
if (!JS_XDRUint32(xdr, &type))

case TOK_LP:

#else
/*
borrow = (y & 0x10000) >> 16;
*
(JS_ASSERT((fp)->script || !(fp)->spbase || (sp) == (fp)->spbase), \

JS_END_MACRO

if(PR_Close(handle)!=PR_SUCCESS){
#define PR_InitEvent PL_InitEvent
extern JSAtom *

}
JS_PUBLIC_API(JSObject*)

if (down) {

GrowTokenBuf(JSContext *cx, JSTokenBuf *tb)

{
&convert_long_long_macros($line);
* Copyright (C) 1998 Netscape Communications Corporation. All
pn2->pn_expr = AssignExpr(cx, ts, tc);

jsdouble d;

* a 32-bit type.

46, 46, 60, 46, 46, 40, 40, 40, /* 33 */


tp->t_op = JSOP_BITAND;

* Make scope multi-threaded, i.e. share its ownership among contexts in rt


= js_InflateString(cx, *messagep, strlen(*messagep));

JS_GetFunctionTotalSize(JSContext *cx, JSFunction *fun);

pn->pn_left = pn2;

: "cc", "memory");
{

JS_ReportOutOfMemory(state->context);
JSString *str;
case TOK_LB:

#endif
void *userRef, const uintN errorNumber, ...)
js_LiveContext(JSRuntime *rt, JSContext *cx)
pn2 = Statement(cx, ts, tc);
*flagp = (uint8)(flags & ~GCF_LOCKMASK);

uintN len, off;


if (!JS_XDRDouble(xdr, &dp))
/*

/*

nchars += vlength;

do { \
#define JSLL_UI2L(l, ui) ((l).lo = (ui), (l).hi = 0)
off = noteIndex = -1;
* the License at http://www.mozilla.org/NPL/
OPDEF(JSOP_ARGDEC, 101,"argdec", NULL, 3, 0, 1, 10, JOF_QARG |
JOF_NAME|JOF_DEC|JOF_POST)

*statsp = stats->next;
((_map)[(_bit)>>JS_BITS_PER_LONG_LOG2] & (1L << ((_bit) & (JS_BITS_PER_LONG-
1))))

/* Lookup id in order to check for redeclaration problems. */

#if defined(_WIN32) && !defined(__MWERKS__)

*vp = STRING_TO_JSVAL(JS_NewStringCopyZ(cx, str));

break;

if (!JSDOUBLE_IS_FINITE(result))
ok = JS_FALSE;

* that c is either even when c has upper and lowercase

MSG_DEF(JSMSG_BAD_INSTANCEOF_RHS, 31, 1, JSEXN_TYPEERR, "invalid 'instanceof'


operand {0}")
}

#ifndef _PTRDIFF_T_DEFINED

yearday = floor(TimeFromYear(year) / msPerDay);


ok = DumpRegExp(cx, (RENode*) ren->kid);

* except in compliance with the License. You may obtain a copy of

if ((errorNumber > 0) && (errorNumber < JSShellErr_Limit))


*messagep =
* or detecting an already-reported error.

sharpid >> 1, (sharpid & SHARP_BIT) ? '#' : '=');


JSFILEMSG_FIRST_ARGUMENT_OPEN_NOT_STRING_ERROR, argv[0]);

}
{
if (!JS_SetPrivate(cx, obj, script))
/*

return (int)res;
if (OBJ_GET_PARENT(cx, obj) != parent) {
script_exec(JSContext *cx, JSObject *obj, uintN argc, jsval *argv, jsval *rval)

while (!JSLL_IS_ZERO(num)) {
JSTokenType
*flagp = (uint8)flags;

JSPropertySpec *static_ps, JSFunctionSpec *static_fs);

* / N/A End of required arguments

break;
if (c -= '0') {

ts->linepos += ts->linelen;
uintN i;

return JS_TRUE;

JSObject *proto = OBJ_GET_PROTO(cx, obj);


if (!obj)
return (int) DateFromTime(LocalTime(*date));

*rv = -1;
static JSBool
28, 28, 28, 28, 28, 28, 28, 28, /* 0x1400 */

JS_DISABLE_GC(cx->runtime);
if (jp->pretty && Sprint(&jp->sprinter, "%*s", jp->indent, "") < 0)
ca.status = JS_TRUE;

if (!JS_ConvertValue(cx, argv[1], JSTYPE_STRING, &argv[1]))


begin = 0;

return EOF;
*dp = *cx->runtime->jsNaN;

return JS_FALSE;

jssrcnote *sn;
JSBool
return JS_FALSE;

* rounds to 0x1000000000000000 instead of 0x1000000000000100.

jsuint i, m;
JSScopeProperty *sprop, *snext;

}
* is removed by obj_unwatch or a native JS_ClearWatchPoint.

if (!JS_AliasProperty(cx, proto, "toUTCString", "toGMTString"))


if ((strlen(pathname)>=2)&&(pathname[1]==':')) {

#define JS_HAS_CALL_OBJECT 1 /* fun.caller is stack frame obj */

"PR_BIT",

* protos.)
JSTrapHandler handler = rt->debuggerHandler;
return NULL;

return js_NewNumberValue(cx, result, rval);


JS_AliasPropertyToElement(JSContext *cx, JSObject *obj, jsint index, const char
*alias);
/* We allow a larger range of precision than ECMA requires; this is permitted
by ECMA. */

#include "dump_xpc.h"
/*
* Copyright (C) 1998 Netscape Communications Corporation. All

#include "jsstr.h"

case REOP_STAR:
static JSBool
/*

js_GetMutableScope(JSContext *cx, JSObject *obj)

/* Do the loop body. */


return NULL;
/* Check for readonly now that we have sprop. */

*(--ss.cur) = '\0';
map = map->next;
if (count==-1) {
uint32 i, n;
EMIT_CHAINED_JUMP(cx, cg, stmt->gosub, JSOP_GOSUB, jmp);

* implied. See the License for the specific language governing

uintN i, n;
static JSBool

JS_ReportErrorNumber(cx, JSFile_GetErrorMessage, NULL,


};
str = JS_ValueToString(cx, argv[argc]);
87, 87, 87, 87, 87, 87, 87, 87, /* 63 */

(_oldIndex < (JSVAL_INT_MAX / 10) || \

ok = JS_SetPrivate(cx, obj, re);


return JS_TRUE;
(gsop[j] ? 1 + gsop[j]->length : 0) +

#define JS_STACK_SEGMENT(sh) ((jsval *)(sh) + 2)


JS_END_MACRO

#define Exp_msk1 0x100000


ATOM_BYTES(argAtom))) {
str = js_NewString(cx, t, n, 0);

* rights and limitations under the License.

#define jsprvtd_h___

80, 46, 80, 80, 80, 60, 46, 46, /* 46 */


* Software distributed under the License is distributed on an "AS
* NB: The Script object exposes compile and exec in the language,
if ((file->isOpen)?
if (n >> 1)
if (!js_DoubleToECMAInt32(cx, d2, &j))
prevop == JSOP_CLOSURE)

for (i = 0; i < n; i++)

(obj)->map->ops->setAttributes(cx,obj,id,prop,attrsp)

goto retry;

if (d > eps)

(list)->pn_head = (pn); \
if (acx->rval2set && JSVAL_IS_GCTHING(acx->rval2))

* Reject it if it contains any non-ASCII, non-alphanumeric characters.


* l A signed long (64-bit) value.

15, 15, 15, 15, 15, 15, 15, 46, /* 101 */

CHECK_REQUEST(cx);
**** Start of jsscope.h ****
}
if (!rval)
}

*/
/* We are compiling code inside a function */
* held by ownercx's thread with reentrancy count of 1, then we return

*rval = STRING_TO_JSVAL(cx->runtime->emptyString);

JSBool
while(!*--xc)

jsdouble d;
JSPrinter *printer; /* permanent output goes here */
JSBool *resolved)
morepar = (JSSubString*) JS_realloc(cx, morepar,
* initializer part, a labeled statement, a function
a.tm_sec = prtm->tm_sec;

*sp = NULL;
if (!ok)
if (scale && y <= P*Exp_msk1)
/* XXXbe give the GC or another request calling it a chance to run here?

prop = _pce_prop; \
JSClass **registry;

int32 bbits, b2, b5, be, dig, i, ieps, ilim, ilim0, ilim1,
#endif
static JSBool

JS_PUBLIC_API(void)
** the memory returned.

if (js_strchr(reservedSet, C)) {
!JS_XDRUint32(xdr, (uint32 *)&d))
JSArgumentFormatMap **mpp, *map;
if (cx->interpLevel == MAX_INTERP_LEVEL) {

#define JS_ISPRINT(c) ((c) < 128 && isprint(c))

continue;

jsdouble *dp;
};
strncpy(tmp, &path[i], j-i+1);

**** End of jsdate.h ****


}
JS_GetClass(JSContext *cx, JSObject *obj);
if (argv) {
}
/* the fmt contains the Numbered Arguments feature */

return JS_FALSE;

JS_DHashGetStubOps(void)

if (j<i) {
* JSOP_ARGSUB gets arguments[i] from fp->argv, iff i is in [0, fp->argc-1].
}

15, 15, 15, 15, 15, 15, 15, 15, /* 78 */

static FILE *logfp;


if (!sprop && scope->object == obj) {
*
sz += sizeof *a + pool->mask; /* header and alignment slop */
#endif
static JSBool
}
uintN nvars; /* local variable count */

JSObject *parent;

{
: JSREPORT_ERROR,

cp = dp;

OPDEF(JSOP_NEG, 34, "neg", "-", 1, 1, 1, 10, JOF_BYTE)


}
str_toString(JSContext *cx, JSObject *obj, uintN argc, jsval *argv, jsval *rval)
/* No hash table yet, so hep had better be null! */

* years. Might still make sense to use this, but find the range of years
*/

* Atom must occur between n and m times.

#endif /* JS_HAS_INITIALIZERS */

js_MarkAtomState(&rt->atomState, gcflags, gc_mark_atom_key_thing, cx);

#ifdef JSDEBUGGER
size_t nchars, vlength, vsharplength;

#define MAX_INLINE_CALL_COUNT 1000


#define d0 word0(d)

/* MSVC1.5 coredumps */

if (w == 2) {

#define _jsfile_h__
if (!did_something) {
}

* immediately after them, in note bytes or byte-triples.

"PR_LogFlush",
while ((j = find_split(cx, str, re, &i, sep)) >= 0) {

#endif

todo = Sprint(&ss->sprinter, "%s%s",


}
JS_free(cx, fun);
#define JS_HAS_DEBUGGER_KEYWORD 1 /* has hook for debugger keyword */

if (!tn)
* Rights Reserved.

typedef void
for (i = 0; i < n; i++) {
* chars or quotes (' or " as specified by the quote argument) escaped, and
#if JS_HAS_TOSOURCE
40, 40, 40, 46, 46, 46, 46, 46, /* 24 */

* js_NewObject will fall back to using Object.prototype.


JS engine source.

return match_or_replace(cx, obj, argc, argv, match_glob, &mdata.base, rval,


void (*finalize)(JSXDRState *);
if (JS_TypeOfValue(cx, argv[0]) == JSTYPE_FUNCTION) {
while ((size_t)(k = i + j) < str->length) {
} else {
* The Initial Developer of the Original Code is Netscape
if (!EmitAtomOp(cx, pn2, op, cg))

}
expandedTime.tm_mday,

#define JS_BITS_PER_BYTE_LOG2 3L
*
ShowHelpHeader(void)
nchars = 2;

*vp = STRING_TO_JSVAL(JS_NewStringCopyZ(cx, utfstring));

{
/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 2 -*- */

#ifndef No_leftright
JS_PUBLIC_API(JSObject *)
lval = JS_strdup(cx, lval);
dir = js_fileDirectoryName(cx, current);
#ifndef jsnum_h___
return JS_FALSE;
js_ReportCompileErrorNumber(cx, ts, NULL, JSREPORT_ERROR,

JSBool _negative = (*_cp == '-'); \


* Resolve id, which must contain either a string or an int, to a standard

JS_PropertyStub, JS_PropertyStub, JS_PropertyStub, JS_PropertyStub,

if (!js_ValueToECMAUint32(cx, *sp, va_arg(ap, uint32 *)))


JS_ReportOutOfMemory(JSContext *cx)

JSFunction *fun;

JS_FRIEND_API(JSParseNode *)
#endif
uint32 len;
if (!ok)

JSBool ok;
!JS_AliasProperty(cx, ctor, "multiline", "$*") ||
{
) {

FROB(classPrototypeAtom, js_class_prototype_str);

if (!nobj)
uintN offset, delta, caseOff;

ss.stuff = GrowStuff;
if ( ++length >= 255 )
}

return NULL;

/*

return JS_FALSE;
**** Start of jsprvtd.h ****

15, 15, 15, 15, 15, 15, 15, 15, /* 96 */


#include "jsdtoa.h"
* to the current scope via parent. This clause exists to
enable
#define JS_HAS_SOME_PERL_FUN 1 /* has array.join/reverse/sort */

* (Which turns out to be platform-dependent.)


rv *= tinytens[j];

#endif

#undef MSG_DEF

40, 40, 40, 40, 40, 46, 40, 40, /* 43 */


return JS_FALSE;

bval = JSVAL_FALSE;
#else

return JS_FALSE;

#endif
#endif
* Some of the modes take an integer parameter <precision>.
static char js_NaN_date_str[] = "Invalid Date";
/* Need a new symbol as well as a new property. */
* of an "if" statement, binds a closure only if control reaches that

begin = length;

JS_GetFramePrincipalArray(JSContext *cx, JSStackFrame *fp);

* what we're getting, and can parse it if we produce it.


return k;

#else
#ifdef DREAMWEAVER_INCLUDE_EXTENDED_CHARS_IN_CLASSES

JS_ReportOutOfMemory(cx);
}

return tagify(cx, obj, argv, "BIG", NULL, NULL, rval);

if (!xdr)
OPDEF(JSOP_CONDSWITCH,118,"condswitch", NULL, 1, 0, 0, 0, JOF_BYTE)

/* ilim1 is the maximum number of significant digits we want, based on k and


ndigits,
do_initprop:

return JS_FALSE;

js_AtomizeObject(JSContext *cx, JSObject *obj, uintN flags)


JS_SetRuntimePrivate(JSRuntime *rt, void *data);

* Software distributed under the License is distributed on an "AS

goto do_flat;
/* function prototypes */

goto out; \

JSMarkOp mark;
} else if (c == 'l') {

case FILE_MODE:

sn = cg->notes + index;

return ok;
if (jsdsrc) {

pc2 += ATOM_INDEX_LEN;

JS_ReportErrorNumber(cx, js_GetErrorMessage, NULL, JSMSG_CANT_OPEN,


/* -*- Mode: C; tab-width: 8; indent-tabs-mode: nil; c-basic-offset: 4 -*-

for (i = 0; i < tableLength; i++) {


81, 81, 81, 81, 81, 81, 81, 81, /* 42 */
tc->flags |= TCF_FUN_HEAVYWEIGHT;
* The Initial Developer of the Original Code is Netscape
chain = acx->fp;
argv = (char **)
break;
if (state->context->regExpStatics.multiline

JS_ASSERT(op == JSOP_SETCALL);

u.l = va_arg(ap, int);

case JSOP_SETNAME:

extern void

} else {

uint32 flags; /* statement state flags, see below */

fprintf(gOutFile, "getting its property %s,",

if (he && gc_lock_decrement(he) == 0) {

"PR_ALIGN_OF_FLOAT",

js_printf(jp, native_code_str);
(tried_gc || rt->gcMallocBytes < rt->gcMaxBytes))
* ordered property names, called the map; and a dense vector of property

JS_GetTrapOpcode(JSContext *cx, JSScript *script, jsbytecode *pc)

* Software distributed under the License is distributed on an "AS

/* Insert a decimal point if more than one significand digit */

JS_BEGIN_MACRO \
/* Reset malloc counter */
};

result = *date;

#ifdef JS_HAVE_LONG_LONG

} else {

end = &cache->table[PROPERTY_CACHE_SIZE];
ok = js_ReportErrorNumberVA(cx, flags, errorCallback, userRef,

*/
switch (pn2->pn_op) {

*/
typedef JSTrapStatus

he = JS_HashTableRawAdd(table, hep, keyHash, (void *)key, NULL);

goto out;
if (map->depth == 0) {
while ((isleap == 0) ? !JSLL_CMP(tsecs,<,result) : !JSLL_CMP(tsecs,<,result2))
{

*/

? js_const_str

/*

(fp)->sp = sp)
mem_raw(JSXDRState *xdr, uint32 len)
#endif
* the various sprintf() implementations are inconsistent

}
{js_InitObjectClass, TAG_CHAR_STRING(js_defineGetter_str)},
JSCodeGenerator funcg;
fun = (JSFunction *) JS_GetPrivate(cx, obj);

pool->stats.nreleases++;

}
* at load time and function calls are made by indirection - that is by
JS_APPEND_LINK(&cx->links, &rt->contextList);
{js_new_str, TOK_NEW, JSOP_NEW, JSVERSION_DEFAULT},

/* Higher level access methods */

word0(rv) += P*Exp_msk1;

* between the script and the caller to JS_IsAssigning.


/*

JSErrorReporter older;
{

y *= 10;
*

todo = Sprint(&ss->sprinter, "%s.%s",

if (j1 > 0) {

JS_PUBLIC_API(JSBool)

rtmp = rval;
/* Argument formatter support for JS_{Convert,Push}Arguments{,VA}. */

15, 121, 121, 121, 121, 121, 121, 121, /* 90 */


return NULL;
if (min > max) {

return JS_FALSE;
could use */
case JOF_QVAR:

newchars[ni++] = digits[ch & 0xF];


return JS_FALSE;
} while (ss.top);

#define prmjtime_h___

PN_INIT_LIST(pn);

result -= 1900;
break;

return JS_FALSE;
js_FreeRawStack(JSContext *cx, void *mark);

* March 31, 1998.

/*
#elif defined(XP_UNIX) || defined(XP_BEOS) || defined(XP_OS2) ||
defined(CROSS_COMPILE)

* the provisions above, a recipient may use your version of this

#define JOF_LOOKUPSWITCH 5 /* lookup switch */

/*
js_DateSetMonth(JSContext *cx, JSObject *obj, int year);

struct timeb b;

"PR_SetLogBuffering",

/* Set the second note offset so we can find the update part. */

js_SkipWhiteSpace(ep) != str->chars + str->length)) {

JSAtom *countAtom;
JSFILEMSG_OP_FAILED, "close", dest);

return JS_TRUE;

if (!((atom)->flags & ATOM_MARK)) \

js_DumpGCStats(JSRuntime *rt, FILE *fp);


"PR_snprintf",
while (*args != NULL)
* current frame. See js_GC, just before marking the "operand" jsvals,
sprop = (JSScopeProperty *)prop; \
js_ExecuteRegExp(JSContext *cx, JSRegExp *re, JSString *str, size_t *indexp,

do_replace(cx, rdata, chars);


#endif /* jsopcode_h___ */
JS_CompileFileHandleForPrincipals(JSContext *cx, JSObject *obj,

return JS_FALSE;
return (JSHashNumber)key >> JSVAL_TAGBITS;

fprintf(gOutFile, "enumerate its properties\n");

"prcpucfg",
js_DestroyRegExp(cx, re);

* (nextDouble(d) - d)/2 = mhi/2^s2. */

js_ReportIsNotFunction(JSContext *cx, jsval *vp, JSBool constructing);

return JS_TRUE;

}
* JS API entry points provide freedom to execute code against a "sub-global",

extern JS_PUBLIC_API(void *)
jsdouble tmp = begin;
tracefp = (FILE *) cx->tracefp;
if (getter == js_GetArgument || getter == js_GetLocalVariable) {

} s;
SEARCH_PAIRS(
#include "jsxdrapi.h"

if (*sn & SN_3BYTE_OFFSET_FLAG)

/*
{
* Alternatively, the contents of this file may be used under the

FunctionStmt(JSContext *cx, JSTokenStream *ts, JSTreeContext *tc)

tbincr = (length + TBINCR) * sizeof(jschar);


JS_ASSERT(JSVAL_IS_FUNCTION(cx, rval));
#define PRIVATE_MEM 2000
}
#define JS_HAS_VALUEOF_HINT 0 /* valueOf(hint) where hint is typeof */
if (fp && fp->down && fp->down->fun)

60, 60, 60, 60, 60, 60, 46, 46, /* 50 */

if (!ok)

JS_PUBLIC_API(void *)
JS_InitStandardClasses(JSContext *cx, JSObject *obj);
break;

#if JS_HAS_SEQUENCE_OPS
+ JS7_UNHEX(cp[2])) << 4)

return JS_FALSE;
jsval *rval)
*/
/* Annotate JSOP_INITELEM so we decompile 2:c and not just c. */
{

if (!logfp)
46, 46, 46, 46, 46, 46, 46, 46, /* 69 */

Storeinc(bx, z, y);
if (!strcmp(bytes, shell_functions[j].name)) {

scope = OBJ_SCOPE(obj);
struct JSDHashEntryHdr {

volatile uint32 tablegen;


}

extern JSBool

#if JS_HAS_LVALUE_RETURN

names = NULL;

proto = JS_InitClass(cx, obj, NULL, &js_ArrayClass, Array, 1,


* ECMA 3, 15.1.3 URI Handling Function Properties
extern JSScopeProperty *

JSContext *cx = ca->context;

*rval = STRING_TO_JSVAL(str);
#define fd_sin sin
argv[-1] = STRING_TO_JSVAL(str);

pn2 = AssignExpr(cx, ts, tc);


JS_SetElement(cx, array, len, &v);
if (d == 0 || !JSDOUBLE_IS_FINITE(d)) {

return JS_FALSE;

* implied. See the License for the specific language governing


* Alternatively, the contents of this file may be used under the

if (JSDOUBLE_IS_NaN(d2))
const char *msg = fmtData ? fmtData->format : "Out Of Memory";

((principals)->refcount++)

goto out;
tt = CheckGetterOrSetter(cx, ts, TOK_FUNCTION);

if (pn2->pn_expr) {
/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
MonthFromTime(local),
h = (h >> 28) ^ (h << 4) ^ *s;

static JSParseNode *

*/

}
for (i = 0; i < len; i++)
str2 = js_ValueToString(cx, argv[i]);

if (!re)

#undef POP_STR

}
default:
/*

zs = (si >> 16) * q + (ys >> 16);


static void InitDtoa(void)

PR_Unlock(global_locks[i]);
pc2 = pc;

* under the terms of either the GPL or the LGPL, and not to allow others to
uint8 flags; /* flags, see jsapi.h */

40, 40, 40, 40, 40, 40, 40, 40, /* 106 */

* getDay (getUTCDay)

#define JSPROP_INDEX 0x80 /* name is actually (jsint) index */


static JSBool

* terms of the GNU Public License (the "GPL"), in which case the

JSTryNote *tn = script->trynotes;


/* Count the trynotes. */
? JS_GetStringBytes(linestr)
vp = &fp->argv[slot];

/*

46, 46, 46, 46, 46, 46, 46, 46, /* 79 */

extern JS_PUBLIC_API(JSBool)

JS_FRIEND_API(void)

JS_ReportErrorNumber(cx, js_GetErrorMessage, NULL,


static JSBool

jsuword limit; /* one beyond last byte in arena */


JSObjectMap *map;
* someone who cleared scope).

JS_ReportErrorNumber(cx, js_GetErrorMessage, NULL,


patlen = (jsint)str2->length;

/*
JSString *name;

val = 8 * val + JS7_UNDEC(c);


* We are about to nest scope locks. Help jslock.c:ShareScope

JS_GetFrameAnnotation(JSContext *cx, JSStackFrame *fp)

"PR_CompareValues",

JSObject *obj;

* itself points into the GC heap (more recently, we support this extension:
fprintf(fp, "%05u:", loc);
textlen = (jsint)str->length;

* the License at http://www.mozilla.org/NPL/


ale = js_IndexAtom(cx, pn2->pn_atom, &cg->atomList);

86, 86, 16, 16, 46, 46, 16, 16, /* 66 */

if (lambda || !funAtom) {
#endif
JSDHashEntryHdr *entry;
JSProperty *prop;

struct JSObject {

JSObject *proto;

str = js_ValueToString(cx, OBJECT_TO_JSVAL(obj));

* guess for the smallest table size at which the table will usually be less
#else

JSObjectOp thisObject;

{
if (tt == TOK_RB) {

* of the API to serialize JS runtime state (script bytecodes, atom maps,

#define DTOBASESTR_BUFFER_SIZE 1078

#include "jsfun.h"

(_log2) += 4, (j_) >>= 4; \

jsdouble x, z = *cx->runtime->jsNegativeInfinity;
* *objp and *propp null. Therefore all callers who receive a non-null *propp

#define IS_SHARP(he) ((jsatomid)(he)->value & SHARP_BIT)

JSObject *obj;

* Atom garbage collection hooks.

}
break;
return JS_FALSE;

if (ok) {
*p = '.';
s = s00;

word1(rv) = 0;

message = ctmp;
aadj = aadj1 = 1.;
1e-256
n = JS_MIN(m, 9);

done:;
if (ida)

return JS_FALSE;
return JS_FALSE;
static void

return JS_FALSE;

0x09A70001, /* 61 Lu, hasLower (add 38), identifier start */

return ok;

ok = DumpRegExp(cx, (RENode*) ren->kid);

if (!JS_DefineProperty(cx, protos[0], js_filename_str,


/*

JS_ReportWarning(cx, "File %s doesn't support random access, can't "

case ARGS_LENGTH:
JS_HashTableRemove(JSHashTable *ht, const void *key);
XDRAtom1(JSXDRState *xdr, JSAtomListElement *ale)
val[valcnt] = (jsval)

/*
CACHED_SET(OBJ_SET_PROPERTY(cx, obj, id, &rval));

goto out;

int8 tinyid, jsval value,

case TOK_NAME:

cp = MatchRegExp(&state, re->ren, cp);

#endif
** INPUTS: _struct: a data type

frame.scopeChain = funobj;

}
break;
JSAtomListElement *ale;

uint32 nreleases; /* number of JS_ARENA_RELEASE() calls */


* Clear the entry and drop any strong references it holds. This callback is
* then possibly \0 padding to multiple of 4.

JSObject *parent, const char *name);


{
int64 us, ms, us2ms;
*/
return pn;

* - fB are the "before split" flags, fA are the "after split" flags

case 'u':

80, 46, 46, 80, 80, 60, 46, 46, /* 38 */


if (!obj)

JS_AliasPropertyToElement(JSContext *cx, JSObject *obj, jsint index, const char


*alias)

JS_LockGCThing(JSContext *cx, void *thing)

JSPRHashNumber keyHash; /* key hash function result */

for (; n; s++, n--)


}

return JS_TRUE;
JS_ASSERT(c < TOK_LIMIT);

{js_instanceof_str, TOK_INSTANCEOF, JSOP_INSTANCEOF,JSVERSION_1_4},


extern JS_PUBLIC_API(JSBool)

#define MALLOC malloc

* If you wish to allow use of your version of this file only

OPDEF(JSOP_VARDEC, 102,"vardec", NULL, 3, 0, 1, 10, JOF_QVAR |


JOF_NAME|JOF_DEC|JOF_POST)

else {

*va_arg(ap, jschar **) = str->chars;


while (tn->start && tn->catchStart) {
uintN lineno; /* current line number */

** of calling code and fix it!

xdr->mode == JSXDR_ENCODE ||
}

add_history(linep);

JSEXN_NONE for none. The given exception index will be raised by the

else {

JSUint32 sz;
if (js_DecompileFunction(jp, fun))
#define OBJ_SET_PROPERTY(cx,obj,id,vp) \
end = 0;

funobj = JSVAL_TO_OBJECT(value);
op = fun->atom ? JSOP_NAMEDFUNOBJ : JSOP_ANONFUNOBJ;

}
}

int main(int argc, char **argv)

if ((cp + length) > cpend)

FETCH_ELEMENT_ID(-1, id);
* Communications Corporation. Portions created by Netscape are

bit = c & 7;

/* Don't set keyHash until we know we need it, above. */

#endif

OPDEF(JSOP_PROPDEC, 51, "propdec", NULL, 3, 1, 1, 10, JOF_CONST|


JOF_PROP|JOF_DEC|JOF_POST)

if (!logtbl.entryStore &&
fprintf(fp, " %u", GET_ARGNO(pc));
"PRHashComparator",
HourFromTime(local),
#ifndef NAN_WORD0
#ifndef SET_OBJ_INFO
denorm = 0;

* Communications Corporation. Portions created by Netscape are


return (int) MinFromTime(LocalTime(*date));
default:

* returns null unconditionally; you should ignore its return value.

* Alternatively, the contents of this file may be used under the

CHECK_REQUEST(cx);

*--numBegin = '-';

wp->closure = closure;

JSArgumentFormatter formatter);

out:
}

js_ExpandErrorArguments(JSContext *cx, JSErrorCallback callback,


pn->pn_arity = PN_NULLARY;
/*
result += (intN)SecondsPerMinute;
static JSBool

js_FoldConstants(JSContext *cx, JSParseNode *pn, JSTreeContext *tc);


#define Big0 (Frac_mask1 | Exp_msk1*(DBL_MAX_EXP+Bias-1))

}else

} \

uint32 removeMisses; /* useless removes that miss */


JS_GetFrameObject(JSContext *cx, JSStackFrame *fp)
const char js_defineGetter_str[] = "__defineGetter__";
JSBool allowCallSyntax);

* decimal point, followed by nd-nd0 digits. The number we're


size_t length;

JSContext *context; /* context executing the decompiler */

};
obj = js_NewObject(cx, &js_ScriptClass, NULL, NULL);
{

if (cp == NULL)

js_HoldScopeProperty(cx, scope, sprop);

return 1;
tp->t_op = JSOP_ADD;

const jschar *name, size_t namelen, jsval value,


!JS_AliasProperty(cx, ctor, "leftContext", "$`") ||

return JS_TRUE;
}

JS_ArenaCountRetract(JSArenaPool *pool, char *mark);


}

sp--;

#ifdef Avoid_Underflow
*
#include "jsopcode.h"

len - (oplen + js_CodeSpec[JSOP_GOTO].length));


}

word1(rv) &= ~1;

* If you wish to allow use of your version of this file only

out:
}

*/

return JS_FALSE;
#include "jsatom.h"

/* XXX don't count sprop->id, assume it's shared */

}
* Software distributed under the License is distributed on an "AS
JSBool negative;

"PR_LOG_BEGIN",

goto out;

JSMSG_BAD_ATOMIC_NUMBER, numBuf);

for(; c == '0'; c = *++s)

file->charBufferUsed = JS_FALSE;

}
return JS_FALSE;
JS_ArenaFinish()

JS_EvaluateScript(JSContext *cx, JSObject *obj,


}
_cache->recycles++; \

JSBool b;
#include <stdlib.h>

typedef JSIntn intN;


if (pn2->pn_op == JSOP_ARGUMENTS &&

if (!iter->pn_kid2) /* leave iter at last catch */


op = JSOP_GETELEM;

*/

if (!cg->notes) {
JSHashTable *table = (JSHashTable *) scope->data;
cx->requestDepth--;

/* Free chars (but not bytes, which caller frees on error) if we fail. */
* * N/A Skip this argument (no vararg)

JS_UNLOCK_RUNTIME(rt); \
SECURITY_CHECK(cx, NULL, "writeAll", file);
JS_DHashTableEnumerate(JSDHashTable *table, JSDHashEnumerator etor, void *arg)
/************************************************************************/
jsval *rval)

}
* list above, but it cannot deadlock with any other thread. For there

return compare_and_swap(w, ov, nv);


}
} \

/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 2 -*- */

* this routine.
*

ca.status = InitArrayObject(cx, obj, newlen, vec);

/* Use the second argument as the split limit, if given. */

CHECK_AND_SET_JUMP_OFFSET(cx, cg, CG_CODE(cg,off), CG_OFFSET(cg) - (off))


"PR_NOT_REACHED",
case JSOP_DECNAME:
case FILE_SIZE:
return JS_FALSE;

*/

return (JSBool) cx->throwing;

&cval)) {

#define PRHashAllocOps PLHashAllocOps

return ok;
file->nbBytesInBuf = 0;
u.s.hi = 0;

JSPROP_PERMANENT, NULL)) {
js_RemoveRoot(cx->runtime, &obj-
>slots[JSSLOT_PARENT]);

for (i = 0; i < n; i++) {

JSObjectOps *ops;
JS_SetVersion(cx, currentVersion);
extern JS_PUBLIC_API(JSBool)
case JSOP_GOTO:

* and other provisions required by the GPL. If you do not delete

JS_PUBLIC_API(const char *)
JSString *str;

js = js_InflateString(cx, s, n);

return JS_FALSE;
fprintf(gOutFile, " new value %s\n",

15, 46, 46, 46, 46, 46, 46, 46, /* 98 */


#define JS_HAS_REPLACE_LAMBDA 0 /* has string.replace(re, lambda) */

JSSubString js_EmptySubString = {0, js_empty_ucstr};

mov 1,%0\n\
goto out;

*rval = DOUBLE_TO_JSVAL(cx->runtime->jsNaN);
* and other provisions required by the GPL. If you do not delete

todo = Sprint(&ss->sprinter, "%s%s.%s",

JS_ASSERT(!rt->gcRunning || rt->gcLevel > 0);

46, 46, 46, 46, 46, 46, 46, 46, /* 109 */

} JSHashAllocOps;

#endif

tt = CURRENT_TOKEN(ts).type;
}
variance /= nallocs * (nallocs - 1);

rt = cx->runtime;
for(j = 0; e1 > 0; j++, e1 >>= 1)
hookData = NULL;
reportp->messageArgs[i] = NULL;

if (JSVAL_IS_PRIMITIVE(argv[0])) {
JSAtom *atom;

{
/* -*- Mode: C; tab-width: 8; indent-tabs-mode: nil; c-basic-offset: 4 -*-
return JS_FALSE;

todo = Sprint(&ss->sprinter, "%s%s = %s",

} else {
JSPropertyOp getter, JSPropertyOp setter, uintN attrs,
jsval *argv, jsval *rval)

** Now that we have the number converted without its sign, deal with

# types and the JS types

ok = JS_ConvertArguments(cx, argc, argv, "b/ciujdIsSWofvZZ*",

js_ExecuteRegExp(JSContext *cx, JSRegExp *re, JSString *str, size_t *indexp,

* IS" basis, WITHOUT WARRANTY OF ANY KIND, either express oqr


}

if (!chars)

JSString *str;
JSObject *proto = OBJ_GET_PROTO(cx, obj);

FETCH_ELEMENT_ID(-2, id);
enum string_tinyid {

if(count==-1){
tagbuf[j++] = (jschar)begin[i];

js_UnlockScope(JSContext *cx, JSScope *scope)

if (back>0)
uint32 leakedroots = 0;
* not from the start of the target string. But Perl4 does start

lo = i + 1;
if (jmp < 0)
atom = js_GetAtom(cx, &jp->script->atomMap,
static JSTrapStatus

if (oldscript)
_node.thing = _thing; \
result += (intN)MinutesPerHour;
switch (pn1->pn_type) {

/* test local in case debugErrorHook changed on another thread */

* License Version 1.1 (the "License"); you may not use this file

} else {
JSStackFrame *fp;
pn2->pn_op = JSOP_DELNAME;
extern jsval js_GetSlotThreadSafe(JSContext *, JSObject *, uint32);

* instance length properties. It calls back through the class get function
} else {

cx->throwing = JS_FALSE;

**** End of jsaddr.c ****

return result;
CheckSideEffects(JSContext *cx, JSTreeContext *tc, JSParseNode *pn,
JSString *str = JSVAL_TO_STRING(*vp);

* The Original Code is Mozilla Communicator client code, released


{

return JS_FALSE;

}
pd = pda->array;
rt->state = JSRTS_UP;

extern JSClass js_ArrayClass;


if (!fun)

js_DestroyRegExp(cx, re);
#define JSCLASS_FW_ENUM 0x40
#endif

getter = SPROP_GETTER(sprop, obj2);

* #define Inaccurate_Divide for IEEE-format with correctly rounded


*
#define JS_ALIGN_OF_WORD 4L

if (!ren)

ys = (si & 0xffff) + carry;

} else {
COUNT(pool, nmallocs);
/* Avoid common chr- and flags-setting code after switch. */
*/

break;

if (!file->isOpen){ \
*/
*/
* Nesting locks on another thread that's using scope->ownercx: give

JS_PUBLIC_API(void)

if(!strncmp(path, URL_PREFIX, strlen(URL_PREFIX)))

#if JS_HAS_SHARP_VARS

OBJECT_TO_JSVAL(proto), NULL, NULL,


JS_DHashTableRawRemove(table, entry);

return JS_TRUE;

#define JS_AWAIT_GC_DONE(rt) JS_WAIT_CONDVAR((rt)->gcDone, JS_NO_TIMEOUT)

/* Binary operators that evaluate both operands unconditionally. */


CHECK_REQUEST(cx);
}

b2 += i;

d = -d;
/* String instrumentation. */

JS_snprintf(buf, sizeof buf, "(new %s(%s))",

JSParseNode *pn2, *pn3;


JS_free(cx, (void *)className);

js_InitArgumentsClass(cx, obj) &&


SAVE_SP(fp);
* '\' literalatomchar Any character except one of the above

return JS_TRUE;

JSXDRObjectOp xdrObject;

* terms of the GNU Public License (the "GPL"), in which case the

moveEntry(table, oldEntry, newEntry);

break;

static jsdouble firstDayOfMonth[2][12] = {


}
{
char *
return JSTRAP_ERROR;
}

while (next) {
goto out;
JS_free(cx, (void *)report.messageArgs[i++]);
JS_ReportErrorNumber(cx, JSFile_GetErrorMessage, NULL,
if (!js_SetSrcNoteOffset(cx, cg, (uintN)noteIndex, 0, tmp-off))
{

static JSParseNode *
return NULL;

return d;
return JS_FALSE;
* the provisions above, a recipient may use your version of this

return NULL;
SrcNotes(cx, script);
* License Version 1.1 (the "License"); you may not use this file

jsdsrc = JSD_AppendUCSourceText(jsdc,jsdsrc, str, length,


JSErrorReport *report);
return argsobj;

fprintf(fp, " max hash chain: [%u]\n", maxChain);


*

/*
JSCT_CURRENCY_SYMBOL = 26,
static JSBool
#endif

*date = UTC(local);

js_CompareAndSwap(jsword *w, jsword ov, jsword nv)

(js_MatchToken(cx, ts, TOK_PLUS) ||


"PR_CompareStrings",
* 'instanceof' operators.

* JS script operations.
low = JSVAL_INT_MAX;

ptrdiff_t

cp = str->chars;
js_ValueToFunction(JSContext *cx, jsval *vp, JSBool constructing)

*rval = JSVAL_VOID;

rv0 = rv;
{

return NULL;
} else if (JSVAL_IS_VOID(val)) {
"rparen",

atomIndex = ALE_INDEX(ale);

* or proto chain (pobj may already be on obj's parent or proto chain; it


JS_ASSERT(!JSVAL_IS_PRIMITIVE(lval));

if (JSVAL_IS_OBJECT(v))
re = (JSRegExp*) JS_GetInstancePrivate(cx, obj, &js_RegExpClass, NULL);
JSTryNote *tryNext; /* next available note */

sprop->nrefs++; \
fun = (JSFunction *) JS_GetPrivate(cx, *objp);

* Check that it's a name. This also implicitly guards against

lval = POP_STR();
extern JS_PUBLIC_API(void)
if (*cp == '*') {
{
script = JS_CompileScript(cx, obj, buffer, strlen(buffer),

return JS_FALSE;
#define JSSLOT_PROTO 0

val = 8 * val + JS7_UNDEC(c);

done:
JSFILEMSG_FILE_CURRENTDIR_UNDEFINED_ERROR);

ptrdiff_t
* of property if executing with the strict option. We
check
return escstr;
return JS_TRUE;

c = TOK_ASSIGN;
thisp = cx->globalObject;
*/

if (!sprop) {
return NULL;

JSScopeProperty *sprop;

}
if (js_Emit1(cx, cg, JSOP_ENDINIT) < 0)

JSObject *obj;
olen = len;
i = 0;

JS_XDRUint8(JSXDRState *xdr, uint8 *b);

*eofp = eof;
}

n = JS_CeilingLog2(n);
loop:

diff = table[0].offset - defaultOffset;


#include "jsutil.h" /* Added by JSIFY */
/* return error if we don't have space for the whole character */
}
* That condition implies deadlock in ClaimScope if cx's thread were to wait
* Software distributed under the License is distributed on an "AS
extern JSScript *

atom = js_AtomizeChars(cx, name, AUTO_NAMELEN(name,namelen), 0);

return JS_FALSE;

pascal OSErr __JSInitialize(const CFragInitBlock* initBlock);


JSBool ok;

RESTORE_SP(fp);
break;
* and if the returned value is used on the left-hand side of an assignment
}
#endif /* CROSS_COMPILE */
js_DateGetDate(JSContext *cx, JSObject* obj);

jsval v1, v2;

#ifdef JS_DHASHMETER

ok &= HasFinalReturn(pn2->pn_kid3);
str = js_ValueToString(cx, OBJECT_TO_JSVAL(obj));

return JS_FALSE;

js_UnlockScope(cx, OBJ_SCOPE(obj));

radix = 10;

* terms of the GNU Public License (the "GPL"), in which case the
if (i == ida->length) {
JSPRUint32 ngrows; /* number of table expansions */

case UTF8:
}

/*

for(s = s00;;s++) switch(*s) {

local = LocalTime(*date);

return rv;
* Alternatively, the contents of this file may be used under the

const jschar *cp;

he->next = *hep0;
if (c == '(') { /* comments) */
if (hint == JSTYPE_STRING) {

"prlog_h___",

!= NULL);

}
#define JS_HAS_UNEVAL 1 /* has uneval() top-level function */
return JS_FALSE;

if (mlo == mhi)

else {

break;

JS_LOCK_SCOPE(cx, scope);

bad:

'A', 'B', 'C', 'D', 'E', 'F', 'G', 'H', 'I', 'J', 'K', 'L', 'M',

* HTML composition aids.


JSObject *nobj;

#ifdef DEBUG
*hep = he->next;
hi = mid - 1;
if (!obj2) {
#define JUMP_OFFSET_MAX ((int16)0x7fff)
cond = COMPARE_DOUBLES(d, OP, d2, JS_FALSE); \

return JS_FALSE;
}

align_of_float = ALIGN_OF(float);
uint32 slot;

#ifdef Avoid_Underflow

memset(ht->buckets, 0, nb);

}
JS_ShutDown();
JS_UNLOCK_OBJ(cx, obj);

* Convert a value to a number, then to an int32 if it fits by rounding to

/* Pop the property's value into rval. */

5, 6, 3, 7, 3, 8, 3, 3, /* 118 */

js_Emit1(cx, cg, JSOP_NOP) < 0) {

JS_GetFrameAnnotation(JSContext *cx, JSStackFrame *fp);

break;
/* Check for falling off the end of a function that returns a value. */

static void *

else
while(--bxe > bx && !*bxe)
JS_TypeOfValue(JSContext *cx, jsval v);

{
/*
SprintPut(Sprinter *sp, const char *s, size_t len)

JSScopeProperty *sprop;

* IS" basis, WITHOUT WARRANTY OF ANY KIND, either express oqr

while ((size_t)j < str->length && JS_ISSPACE(str->chars[j]))

return JS_TRUE;
* The Original Code is Mozilla Communicator client code, released
JS_free(cx, nargv);

};

"PR_LOG_MIN",
extern JS_FRIEND_API(int)
JSThinLock lock; /* binary semaphore protecting scope */

JS_END_EXTERN_C
JS_BeginRequest(JSContext *cx)
#define MAX_LINE_LENGTH 256

jsint npairs;
if (!pc) {
{
*

typedef enum JSGCStatus {

JS_GetPropertyAttributes(JSContext *cx, JSObject *obj, const char *name,


};
else
} u;
out:
JSWatchPointHandler handler;
extern double rnd_prod(double, double), rnd_quot(double, double);
rval = (slot != SPROP_INVALID_SLOT) \
return NULL;

JS_FRIEND_API(JSAtom *)

return JS_FALSE;

DestroyTrap(JSContext *cx, JSTrap *trap)

RENode *altStop = (RENode *)(ren->next);


JSCLASS_HAS_PRIVATE | JSCLASS_NEW_RESOLVE,

return JS_TRUE;
#define JS_BUG_EVAL_THIS_FUN 0 /* eval('this') in function f is f */
v = STRING_TO_JSVAL(matchstr);

JS_ASSERT(digit < (uint32)base);


: (obj))
if (JSDOUBLE_IS_NaN(local))

46, 46, 46, 46, 46, 46, 46, 46, /* 102 */

* while holding the lock.

};
{
mhi = multadd(mhi, 10, 0);
js_arguments_str, js_length_str);
/* Either dig or dig+1 would work here as the least significant
decimal digit.

* within the array pointed at by cg->notes. Return -1 if out of memory.


typedef void

extern JS_PUBLIC_API(void)

goto out;

if (rt->gcLocksHash) {
pn3 = pn3->pn_head;

if (JS_DHASH_ENTRY_IS_FREE(entry)) {
k < textlen;
return NULL;
}
if (!js_LookupProperty(cx, obj, id, &obj, &prop))

JSScope *scope, *save;

#include "jslock.h"
#define NAN_WORD1 0

}
if (bb2 > 0)
#include "jsdtoa.h"

jssrcnote *notes, *sn;

numBegin[0] = numBegin[1];

JSObject *callerScopeChain = NULL, *callerVarObj = NULL;

* Allow redeclaration of variables and functions, but insist that the

#define JS_BUG_EVAL_THIS_SCOPE 0 /* Math.eval('sin(x)') vs. local x */


return JS_FALSE;
/*

#define fd_exp exp


#include "jsobj.h"
comment. */

rt->interruptHandler = 0;
if (!JSVAL_IS_INT(id))

gettimeofday(&tv);

if (caller->script) {
JSBool required;

bytes = rt->gcBytes;
frame.pc = NULL;

* Undefine local macros.

/*
static JSBool
jsval vp;

extern JS_PUBLIC_API(JSBool)

switchsize = 0;

JS_SetParent(JSContext *cx, JSObject *obj, JSObject *parent)


ok = js_CheckRedeclaration(cx, obj, id, attrs, &defined);
***********************************************************************/
{
size_t progLength;
struct { /* name, labeled statement, etc. */

86, 86, 86, 86, 86, 86, 86, 86, /* 63 */

*/

46, 46, 46, 46, 46, 46, 46, 46, /* 70 */


JSObject *obj2;

JS_GetStringBytes(JS_ValueToString(cx, fval)));
{

ap = &a->next;

z = (*x & 0xffff) * y + (*xc & 0xffff) + carry;

int i;
/* NB: the formatter already updated sp, so we continue here. */
uintN maxc = 0;
*vp = FETCH_OPND(-1);

CHECK_AND_SET_JUMP_OFFSET_AT(cx, cg, jmp);

"if-else",

} else {
return JS_TRUE;

static JSBool

js_CompareStrings(const JSString *str1, const JSString *str2);


if (str) {

str = js_ValueToString(cx, v);


}
extern JSBool
break;
JS_PropertyStub, JS_PropertyStub,

if (max >> 16) {


* top level, e.g., in a compound statement such as the "then" part
if(file->path[0] == PIPE_SYMBOL){

/* Grow the table if it is overloaded */


probe = ADDRESS_ENTRY(table, hash1);

if (rt->gcRunning && rt->gcThread != js_CurrentThreadId()) {

* Copyright (C) 1999,2000 Netscape Communications Corporation.


cx->newborn[GCX_OBJECT] = NULL;

*/
* formatter functions. Elements are sorted in non-increasing format string

JSAtom *

/* XXX must do at least once per new thread, so do it per JSContext... */

TOK_DEBUGGER = 60, /* debugger keyword */


/* -2 means "don't push", -1 means reported error. */

double d2 = *JSVAL_TO_DOUBLE(v2);
#if JS_BUG_EAGER_TOSTRING
JS_PUBLIC_API(void *)
return JS_TRUE;

if (!JS_InstanceOf(cx, obj, &number_class, argv))


js_root_printer(JSHashEntry *he, intN i, void *arg)

JSRegExpStatics *res;
/*

RecycleTree(pn->pn_right, tc);
if (!ok)
*/
file->charBufferUsed = JS_FALSE;

JS_PUBLIC_API(JSBool)

static const char native_code_str[] = "\t[native code]\n";


if (sprop) {
script = js_NewScriptFromParams(cx, CG_BASE(cg), CG_OFFSET(cg),

FILE_TYPE = -12,

*hep = he;
for (i = 0; i < global_lock_count; i++)

JS_ReportErrorNumber(xdr->cx, js_GetErrorMessage, NULL,


#endif
#define fd_sqrt sqrt
#include "jsstddef.h"
js_GetSrcNote(JSScript *script, jsbytecode *pc);
}

* Keep the symbol around with null value in case of re-set.

#define fd_ceil ceil

jsbytecode *base; /* base of JS bytecode vector */


/* Compute the number of stack slots needed for fun. */
}
} else {

/* (balance: */
rv = (*ss->stuff)(ss, &space, 1);
continue;

pn->pn_slot = JSVAL_TO_INT(sprop->id);
if (ren->next->op != REOP_ALT) {

ida = NULL;
* arguments. We think this is best because it eliminates the need

if (JSVAL_IS_PRIMITIVE(rval)) {
(uintN) js_GetSrcNoteOffset(sn, 1),
OPDEF(JSOP_FORELEM, 106,"forelem", NULL, 1, 2, 4, 0, JOF_BYTE |
JOF_ELEM)
{
#include "jsapi.h"
thing++;

#define JOF_JUMP 1 /* signed 16-bit jump offset immediate */


jsval value;
}
return js_NewNumberValue(cx, result, rval);

jsid num_properties;

if (!rv)

* except in compliance with the License. You may obtain a copy of


* Script.prototype.compile/exec and Object.prototype.eval all take an

PR_Lock(fl->slock);
{
if (js_Emit1(cx, &cg2, JSOP_POPV) < 0)
JS_ASSERT(JSVAL_IS_NUMBER(v));
}
const char js_setter_str[] = "setter";
#define fd_atan atan

RecycleTree(pn1, tc);

ok = OBJ_GET_PROPERTY(cx, obj, id, &rval);

bp = JS_vsmprintf(format, ap); /* XXX vsaprintf */

requestDebit++;
#define JS_BUG_SET_ENUMERATE 0 /* o.p=q flags o.p JSPROP_ENUMERATE */

#if JS_HAS_SPARSE_ARRAYS

{
*

/*

if (!pn2)
maxChainLen = 0;
40, 40, 46, 46, 60, 40, 80, 60, /* 37 */
JS_PUBLIC_API(int)

xval,

if (ret && *propp == NULL) {

map->nslots = 0;
#include <sys/time.h>

nslots = JS_INITIAL_NSLOTS;
| ((getter == js_GetArgument) ? JSPD_ARGUMENT : 0)
} elsif ($line =~ /jsopcode\.def/) {

SECURITY_CHECK(cx, NULL, "set_position", file);

obj->map = NULL;

void *mark;

* The scanner and parser associate JSOP_NAME with TOK_NAME, although

OPDEF(JSOP_NAMEDEC, 50, "namedec", NULL, 3, 0, 1, 10, JOF_CONST|


JOF_NAME|JOF_DEC|JOF_POST)

if (xdr->mode != JSXDR_ENCODE) {
}

struct JSHashEntry {
if (xdr->mode == JSXDR_ENCODE) {

scope = OBJ_SCOPE(obj);

case '!' :

JS_DefineProperty(JSContext *cx, JSObject *obj, const char *name, jsval value,

if (ilim == 0) {
if (ida)
for (i = 0; exceptions[i].name != 0; i++) {

(tc->flags & TCF_RETURN_EXPR)) {


}
JSPRHashAllocOps *allocOps; /* allocation operations */
ok = JS_FALSE;

if (argc >= 2) {

jsdsrc = NULL;

#endif
j = P + 1 - bbbits;
/* A FOR node is binary, left is loop control and right is the body. */

YearFromTime(local));
* the License at http://www.mozilla.org/NPL/

REOP_EOL = 3, /* end of input (or line if multiline) */


* && (the quotient digit q0 = 0 or 1).
if (OBJ_IS_NATIVE(obj)) {
JS_ArenaAllocate(JSArenaPool *pool, JSUint32 nb)

rt->gcLevel++;
keyHash = (*ht->keyHash)(key);
wb = b->wds;

* The decompiler may need to access the args of the function in

}
break;

if ((z = word0(rv) & Exp_mask) > Exp_msk1*(DBL_MAX_EXP+Bias-P))


JS_SetRegExpInput(JSContext *cx, JSString *input, JSBool multiline)
}
{

};
#include "jsutil.h" /* Added by JSIFY */

seplen = sep->length;

28, 28, 28, 28, 28, 28, 28, 28, /* 0x4400 */


JS_ARENA_ALLOCATE_TYPE(ale, JSAtomListElement, &cx->tempPool);
}
LOCKED_OBJ_SET_SLOT(obj, slot, *vp);

if (!wp)

JSProperty *prop;

}
match = greedyRecurse(&grState, cp, previousKid);
OBJ_DROP_PROPERTY(cx, pobj, prop);
JSAtom *

(_e)->next->prev = (_e)->prev; \
{

** the malloc'd buffer. sprintf will append data to the end of last,

static const jschar *greedyRecurse(GreedyState *grState, const jschar *cp, const


jschar *previousKid)

js_GetArgument, js_SetArgument,
#endif

if (!proto)
#include <stdlib.h>
};

JS_ConvertStub, JS_FinalizeStub,
MUST_MATCH_TOKEN(TOK_LC, JSMSG_CURLY_BEFORE_FINALLY);

JS_ASSERT(obj->slots && slot < obj->map->freeslot);

js_FreeStack(JSContext *cx, void *mark);

*
jsdouble d;

stmtInfo.type = STMT_ELSE;
JSTokenType tt;

**** End of jsinterp.c ****

JS_DHashMoveEntryStub(JSDHashTable *table,
/*
if ((C >= 0xDC00) && (C <= 0xDFFF)) {

else
JSUint32 lo, hi;
{
46, 46, 46, 46, 46, 46, 46, 46, /* 36 */
return offset;

jsdouble d = 0, I = 0, re = 0, im = 0;
return JS_TRUE;

uint32 i, n;
classDef = 0;
#define ATOM_INDEX_LO(index) ((jsbytecode)(index))
goto bad_inline_call;
{

return JS_FALSE;
#include "jsutil.h" /* Added by JSIFY */
js_AllocGCThing(JSContext *cx, uintN flags)

*rval = JSVAL_NULL;

*rval = fp->sp[-1];
40, 40, 40, 40, 40, 40, 40, 40, /* 58 */
break;

if (!JS_dtoa(d, dtoaModes[mode], mode >= DTOSTR_FIXED, precision, &decPt,


&sign, &numEnd, numBegin, bufferSize-2))

case JSOP_NAME:

*
JS_BEGIN_MACRO \

/* Function flags, set in JSFunctionSpec and passed to JS_NewFunction etc. */

ok = OBJ_ENUMERATE(cx, obj, JSENUMERATE_INIT, &iter_state, 0);


{

BitOrExpr(JSContext *cx, JSTokenStream *ts, JSTreeContext *tc)

15, 15, 15, 15, 15, 15, 15, 15, /* 96 */

if (!newReport->uclinebuf)
goto out;
!js_ReportCompileErrorNumber(cx, ts, NULL,

#define PR_ArenaCountRelease PL_ArenaCountRelease

JSAtom *parentAtom;

/* Miss: return space for a new entry. */


if (d2 == 0) {

beq = js_Emit3(cx, cg, JSOP_IFEQ, 0, 0);

if (!pn2)

#endif

#endif /* jsparse_h___ */
case '-':

* or at the start of the arena if there is no previous page in this arena.


15, 15, 15, 15, 15, 15, 46, 46, /* 101 */

pc = script->code;

ptrdiff_t catchStart; /* start of catch block (0 if end) */

#ifndef jsregexp_h___

* one such function may implement several formats, in order to share code.

* Alternatively, the contents of this file may be used under the

sym = scope->ops->add(cx, scope, id, sprop);

static JSBool

} else {

/* don't do security here -- we passed the check in file_write */

} \

return JS_FALSE;

*/

// it's because this causes us to invoke the compiler reentrantly and it


LOGIT(scope, '+');
JS_DestroyIdArray(cx, ida);
delta = PTRDIFF((char *)cg->tryNext, (char *)cg->tryBase, char);

{"setUTCMilliseconds", date_setUTCMilliseconds,1,0,0 },

JSBool ok;
case TOK_NAME:

*
if (fp) {
if (match || !stop) {

} else if (ATOM_IS_DOUBLE(atom)) {

#define MAX_PRECISION 100


* perl5 "hi", "hi there" "hihitherehi therebye"
else if ('A' <= c && c <= 'Z')

LOCAL_ASSERT(pc[oplen] == JSOP_FALSE);
typedef int32 jsrefcount; /* PRInt32 if JS_THREADSAFE, see jslock.h */

return JS_TRUE;
case '\\':

entry->keyHash = keyHash;
report.lineno = cg->currentLine;
}

JS_free(cx, script->notes);

} else {

if (!message)
break;
JSStackHeader *sh;

if (!ale)
if (argc>1) {

* Rights Reserved.

* The contents of this file are subject to the Netscape Public


21, 21, 21, 21, 21, 21, 21, 21, /* 3 */

next[1] = op1;

{
cx->stackHeaders = sh;
}
* as we've excluded 'in' from being parsed in RelExpr by setting

return JS_TRUE;
ts->filename = filename;

CHECK_REQUEST(cx);

JSObject *

leftspaces = width - cvtwidth;

uintN count;

* If JSREPORT_EXCEPTION is set, then a JavaScript-catchable exception


#include "jslock.h"

*
40, 40, 40, 40, 40, 40, 40, 40, /* 114 */

JS_UNLOCK_OBJ(cx, obj);

state->cp = cp + 1;

slot = (uint32) JSVAL_TO_INT(id);

goto out;
sp -= 2;

case REOP_UCCLASS:

}
#define JS_HAS_EXCEPTIONS 0 /* has exception handling */

uintN line;

rt->requestCount--;

JS_free(cx, t);

case SRC_HIDDEN:

JS_DELETE(mem);
if (hook && hookData)

46, 46, 46, 46, 46, 46, 46, 46, /* 68 */


* up 'arguments' in the function's call object.

char *bp;

return 0;

**** Start of jsarena.c ****


* Avoid selflock if ownercx is dead, or is not running a request, or
#define JS_BYTES_PER_DWORD_LOG2 3L
}

if(!strcmp(entry->name, prop_name)){
/*
* If you wish to allow use of your version of this file only

JSDHashGetKey getKey;

*vp = JSVAL_VOID;
static JSBool
ULong a = *--bp;

JSParseNode *pn, *pn2;


}
}
* The contents of this file are subject to the Netscape Public
int maxArgs = 32; /* arbitrary max !!! */

11, 13, 13, 13, 13, 13, 13, 13, /* 1 */


return JS_FALSE;
atom = fun->atom;

**** End of jsaddr.h ****

case TOK_EXPORT:
return JS_FALSE;
* For implementors of JSObjectOps.mark, to mark a GC-thing reachable via a

#elif defined IRIX


{
LookupUCProperty(JSContext *cx, JSObject *obj,
n2 = n1 >> rsh;

if (ATOM_IS_STRING(atom))

goto bad;

JS_free(cx, state);
#define JS_CLEAR_ARENA(a) memset((void*)(a), JS_FREE_PATTERN, \
"%#x"

/* Indicate that a request is running. */

break;

{"strict", JSOPTION_STRICT},
JSBool status;

hep = JS_HashTableRawLookup(cache, hash, str);

/* -*- Mode: C; tab-width: 8; indent-tabs-mode: nil; c-basic-offset: 4 -*-

*rval = OBJ_GET_SLOT(cx, obj, JSSLOT_PRIVATE);


return CompileTokenStream(cx, obj, ts, mark, NULL);
case TOK_NAME:

rval = POP_STR();
STMT_ELSE = 3, /* else clause of if statement */

JSObject *proto = OBJ_GET_PROTO(cx, obj);

* If the including .c file uses only one power-of-2 alignment, it may define
* Guy L. Steele, Jr. and Jon L. White [Proc. ACM SIGPLAN '90, pp. 92-101].
{

return;
d2 = *JSVAL_TO_DOUBLE(rval); \

return JS_FALSE;

n0 = n0 << lsh;
jsval key;

#endif
static JSBool

lval = POP_STR();
{ JSEXN_NONE, js_Error_str, Error },
}

c = TOK_DEC;

#endif
* split substring that was delimited.

"PR_BYTES_PER_FLOAT",
i, (uintN)he->keyHash, (unsigned long)atom->number);

* of the outer object), ShareScope will find the outer object's scope

return ok;
JS_ASSERT(!(ucs4Char & 0x80));

jsval *rval);

vector = argv;
case JSOP_GETELEM:

op = val,
else

/*

len = GET_JUMP_OFFSET(pc);

(_log2) = 0; \
}

*/

{
fp = JS_strdup(jp->sprinter.context, format);
JSBool

scope = (JSScope *) js_DropObjectMap(cx, &scope->map, obj);

case 't':

* file under either the NPL or the GPL.


_cache->misses++; \

jsval fval;
number++;
SAVE_SP(fp);

}
deflated_string_cache_lock = NULL;
if (!JSVAL_IS_INT(v))
goto retfree;
GlobData base;
js_LockGCThing(JSContext *cx, void *thing);

JSInt64 _a; \
word1(a) = L >= 31 ? 1 : 1 << (31 - L);
cg->filename ? cg->filename : "stdin", numBuf);

* If id is JSVAL_VOID, import all exported properties from obj.


+ JS7_UNHEX(chars[i + 4]);

#ifdef DEBUG
{

const jschar *cp2, *cp3;


JS_PUBLIC_API(JSGCCallback)

* Fast locking and unlocking is implemented by delaying the allocation of a


}

for (count = 0;count<len;count++) {

** JSInt64

for(; i < nd; i++)


return 5;
}

/*

* the provisions above, a recipient may use your version of this

cx->lastMessage = JS_strdup(cx, message);

if (obj2 != obj || !OBJ_IS_NATIVE(obj2)) {

#if JS_HAS_TOSOURCE
CHECK_REQUEST(cx);

* Check pn2 for lack of a final return statement if it is the


* except that by using signed 32-bit integers we miss the top half of the
cx = (JSContext *)&rt->contextList;
OPDEF(JSOP_NE, 19, "ne", "!=", 1, 2, 1, 5, JOF_BYTE)
#ifndef Long

JSSharpObjectMap *map;

}
*vp = OBJECT_TO_JSVAL(obj);
return pn;

sp = newsp + depth;
/* So exn_finalize knows whether to destroy private data. */
0xE0970002, /* 93 Ll, hasUpper (subtract -126), identifier start */

slot = GET_VARNO(pc);
0, /* SRC_IF */
}

* terms of the GNU Public License (the "GPL"), in which case the
#define JS_INSERT_BEFORE(_e,_l) \
chars = js_InflateString(cx, bytes, length);
js_DumpGCStats(rt, stdout);

JSOp op, JSParseNode *left, JSParseNode *right,


* Top-level JS_Execute/EvaluateScript, debugger, and eval frames

* script underlying the function object found in the 'constructor'


* JSENUMERATE_DESTROY
}

#endif /* JS_HAS_EXCEPTIONS */
return JS_TRUE;

return JS_FALSE;
scope->file[0] = scope->file[1] = scope->file[2] = scope->file[3] = NULL;
3, 3, 7, 8, 7, 7, 7, 46, /* 116 */
* Rights Reserved.

if (digits == 0) {
JS_PUBLIC_API(void)

JS_InitClass(JSContext *cx, JSObject *obj, JSObject *parent_proto,

size_t nb;

*bxe &= mask;

#define OFFSET_TO_ATOM(rt,off) (*(JSAtom **)((char*)&(rt)->atomState + (off)))

#define DayFromMonth(m, leap) firstDayOfMonth[leap][(intN)m];


#define JS_UNLOCK_SCOPE(cx,scope) ((scope)->ownercx == (cx) ? (void)0 : \
if (caseNoteIndex >= 0) {
with_DeleteProperty, with_DefaultValue,

*/
case JSOP_CONDSWITCH:

}
23, 24, 23, 24, 23, 24, 23, 24, /* 60 */

{
"if",

if(!file->isPipe){
{
OBJ_SET_SLOT(cx, obj, JSSLOT_PRIVATE, v);

jschar *base;

if( i > 0 ){
for (i = 0; i < JSTYPE_LIMIT; i++)

static void
return JS_FALSE;

* The Original Code is Mozilla Communicator client code, released


* sharing of compiled functions among multiple equivalent
scopes,
JS_DefinePropertyWithTinyId(JSContext *cx, JSObject *obj, const char *name,

ss.cur = 0;

JSScope *scope; /* pointer to owning scope */

*/
} else {

JS_BEGIN_MACRO \

maxc = c2;

char *entryAddr;
static JSObject *

if (s - s1 > 8 || L > 19999)

? JS_GetFunctionName(cx->fp->fun)

js_ResumeThread(JSThinLock *tl)

t[i++] = ')';
cx->fp = &frame;

#define SRCNOTE_SIZE(n) ((n) * sizeof(jssrcnote))


#define JS_ARENA_MARK(pool) ((void *) (pool)->current->avail)

{
JSDHashMatchEntry matchEntry;

#define TCF_FUN_USES_NONLOCALS 0x40 /* function refers to non-local names */

if (!pn)
funAtom = NULL;
pn2 = NewParseNode(cx, &CURRENT_TOKEN(ts), PN_NAME, tc);
fclose(file);
if (ok) {
TOK_COMMA = 9, /* comma operator */

break;
}

case JSOP_CALL:

JSScopeProperty *sprop;
*/
jsdouble *date = date_getProlog(cx, obj, argv);
{"isNative", FILE_ISNATIVE, JSPROP_ENUMERATE | JSPROP_READONLY },

"const",

}
continue;
*
/*
}

break;

js_FinishRuntimeNumberState(JSContext *cx)
* Each member is expressed with TOK_DOT or TOK_LB.

* operand of the comma operator.

const char js_watch_str[] = "watch";

#define SET_BIT(tinyid, bitset) ((bitset) |= JS_BIT(-(tinyid) - 1))

const char *opt;

/* Get or set the property, set ok false if error, true if success. */\

static RENode *
0x0000000C, /* 14 Zs */
#else
/* Our kid may be null (e.g. return; vs. return e;). */

/* Copy the error report */

#define CONTINUING_OCTET_MASK 0x3F /* 00111111 */


case JSOP_GROUP:

* License Version 1.1 (the "License"); you may not use this file

radix = 16;
}

#define JSREPORT_ERROR 0x0 /* pseudo-flag for default case */

* implied. See the License for the specific language governing


vsharp = NULL;

opt = NULL;

uint32 i, nbuckets;
if (comma) *comma = '\0';
PUSH_OPND(BOOLEAN_TO_JSVAL(!cond));

i = 9;
return SetPropertyAttributes(cx, obj,

MSG_DEF(JSMSG_PAREN_BEFORE_FORMAL, 69, 0, JSEXN_SYNTAXERR, "missing ( before


formal parameters")

{0,0,0,0,0}

CHECK_REQUEST(cx);

n = str->length;
{
return JS_FALSE;
JS_free(cx, dir);

#include "jsscope.h"
/* XXXbe ECMA violation: inherit attrs, etc. */
}

case JOF_UINT16:
}

JSCT_START_PUNCTUATION = 21,

* JS_{Convert,Push}Arguments{,VA}. The actual format trailing substring used

if (!js_LookupProperty(cx, fun->object, (jsid)argAtom, &pobj,

return JS_FALSE;

MUST_MATCH_TOKEN(TOK_RP, JSMSG_PAREN_AFTER_CATCH);
** The int64 types are known to be 64 bits each. Care must be used when
case TOK_RB:
typedef struct JSAtomState JSAtomState;
JSString *str;
continue;
"PRArena",

if (pn1->pn_op == JSOP_TRUE)
}

}
* 4. Because of 3., we don't need a large table of powers of 10

asm volatile ("\

* terms of the GNU Public License (the "GPL"), in which case the

28, 28, 28, 28, 28, 28, 28, 28, /* 0xA600 */


JSParseNode *defsharp;

rt = cx->runtime;
return JS_FALSE;
jsval vp;

#define JS_HAS_XDR 0 /* has XDR API and object methods */

ok = js_InitAtomState(cx, &rt->atomState);
{"size", FILE_SIZE, JSPROP_ENUMERATE | JSPROP_READONLY },

static JSBool
* Modifications:
* old entryStore vector, which is due to be freed once all entries have been

JSString *str;
}

if (!he)
* implied. See the License for the specific language governing
JS_SetErrorReporter(JSContext *cx, JSErrorReporter er);
* PR assertion checker.

/* NSPR 2.0 docs say 'We do not support PRMJ_NowMS and PRMJ_NowS',
extern JS_FRIEND_API(ptrdiff_t)
* in scalar contexts, and unintentionally for the string.match "list"
/* Forward declaration for use by js_hash_scope_clear(). */

return CompileTokenStream(cx, obj, ts, mark, NULL);

* for the likely case that scopes become shared rarely, and among a very
high = GET_JUMP_OFFSET(pc2);

callobj = fp->callobj;
}

15, 15, 15, 15, 15, 15, 15, 15, /* 78 */

#endif
if (cond == JS_FALSE) {
if (!str)

* '#' flag of sprintf(). The ANSI C spec. of the '#' flag is

JSObject *obj;
if (markp)
JSParseNode *pn;

(rt->lengthSum += (double)length,
case JSOP_SETPROP:
* exception state without making any change to that state.

return JS_TRUE;

pn->pn_op = JSOP_NOP;
{
}

*/
rt->debuggerHandler = handler;

global_locks_mask = JS_BITMASK(global_locks_log2);
sizeof_dword = 8;
int minNDigits = 0; /* Minimum number of significand digits
required by mode and precision */

*
goto advance_pc;

/*

date_getDate(JSContext *cx, JSObject *obj, uintN argc, jsval *argv, jsval *rval)
#define msPerDay (SecondsPerDay * msPerSecond)
case JSOP_RETSUB:

scope->ownercx = NULL; /* NB: set last, after lock init */

return JS_TRUE;
} else {
js_DropScopeProperty(cx, scope, sprop));

if (c == '=')

trap->closure = closure;
break;

if (start > str->length)


j, j1, k, k0, k_check, leftright, m2, m5, s2, s5,
};

int32 count, i;
* this by looking up the variable id in the current variable scope.

JSContext *cx;

JSObject *elem;
}

goto error;
* the License at http://www.mozilla.org/NPL/
} else {
if(file->isNative) return JSVAL_VOID;

#elif JS_VERSION == 130


break;
js_list_scope_remove(JSContext *cx, JSScope *scope, jsid id)
/* Random number generator state, used by jsmath.c. */
#endif

{
atom = (JSAtom *)he;

return NULL;
case JSOP_EXPORTNAME:

JSObjectMap *map;
* Version: MPL 1.1/GPL 2.0/LGPL 2.1
JS_END_MACRO

ch = chars[i++];

cg.tempMark = tempMark;
jsval *slots;
* version of this file under the NPL, indicate your decision by
/* State for object and array toSource conversion. */

js_printf(jp, "\timport %s.%s\n", lval, ATOM_BYTES(atom));


} \

/*
adjustedYear = (int16)year;
if (array[0] >= 0 && array[0] <= 99)

#define JS_HAS_FUN_EXPR_STMT 0 /* has function expression statement */


}

if (!ren)

/*

#ifdef JS_THREADSAFE
case JSTYPE_BOOLEAN:

40, 40, 40, 3, 3, 46, 46, 46, /* 23 */

} else {

pn->pn_pos.begin.lineno,
void

return js_Emit1(cx, cg, op) >= 0;


}

"label",

* Pass the constructor's (obj's) parent as the prototype parent,

{"link", str_link, 1,0,0},

"for loop", /* FOR_LOOP */

RecycleTree(pn1, tc);
#define JS_INT32(x) x ## L
return rv;

* The offset tells distance to the end of the right-hand

cp++;

va_start(ap, format);

extern JS_FRIEND_API(JSScript *)

* Set the attributes of a property on a given object.

JS_GetScopeChain(JSContext *cx)
#endif
JSLL_UI2L(ms2us, PRMJ_USEC_PER_MSEC);
extern JS_PUBLIC_API(JSBool)

#define JS_LOCK_RUNTIME_VOID(rt,e) \

JS_ASSERT(!newscope->ownercx);

}
** DESCRIPTION:

}
nz++;

atom = GET_ATOM(cx, jp->script, pc2);

* Emit code for {p:a, '%q':b, 2:c} of the form:

*/

static jsdouble *

tt = TOK_ERROR;
k = str->length;
rt = cx->runtime;

if (!js_GetLengthProperty(cx, obj, &length))


JSContext *cx;

};
JS_HashTableEnumerateEntries(rt->gcLocksHash, gc_lock_marker, cx);
#define DBG(x) x

static JSBool
(JSProperty **)&sprop)) {

JS_free(cx, js);
case 5:

#define JS_HAS_CALL_FUNCTION 0 /* has fun.call(obj, arg1, ... argN) */

JS_GetConstructor(JSContext *cx, JSObject *proto)

if (PR_Sync(file->handle)==PR_SUCCESS){
#define JS_HAS_IN_OPERATOR 1 /* has in operator ('p' in {p:1}) */

return ok;
js_ReportErrorAgain(JSContext *cx, const char *message, JSErrorReport *report);
new_priv->scope = scope;

static JSBool

#include <stdarg.h>
if((*FwEnumDestroyer)(iter_state))

0x00036009, /* 9 Nd, identifier part, decimal 16 */

JSObject *
}
/ msPerMinute);

*
rv = (*ss->stuff)(ss, &u.ch, 1);
static void
#define JS_HAS_GETTER_SETTER 0 /* has JS2 getter/setter functions */
}

chars = inflated;
/* Append a jump node to all but the last alternative. */
if (argc == 0) {
JSObject *
}
RETURN(TOK_ERROR);

static JSBool

return JS_FALSE;
str = js_DecompileValueGenerator(cx, JS_FALSE, js_IdToValue(id),

* return the new array length.


FROB(RegExpAtom, js_RegExp_str);
if (!newslots)

return pn2;
JSFileErr_Limit
else
{

JS_ReportOutOfMemory(cx);
#else
break;

case JSOP_IMPORTALL:

if (sn && SN_TYPE(sn) == SRC_HIDDEN)

/*
* JS math functions.
* Alternatively, the contents of this file may be used under the

} else if (xdr->mode == JSXDR_DECODE) {


js_DateGetYear(JSContext *cx, JSObject* obj)
15, 15, 15, 15, 15, 15, 15, 15, /* 98 */

#if JS_HAS_TOSOURCE

* harness. Just execute foo.js for now.


#define JS_BUG_NULL_INDEX_PROPS 0 /* o[0] defaults to null, not void */

pat = str2->chars;
return NULL;
JS_InternUCString(JSContext *cx, const jschar *s)
/* Parse the object expression as the right operand of 'in'. */

char numBuf[12];

#undef IS_LITTLE_ENDIAN
JSObject *proto, uintN attrs)

* deleting the provisions above and replace them with the notice

}
* The Initial Developer of the Original Code is Netscape

} else {
switch (pn->pn_type) {

} else if (clasp == &js_CallClass) {

if (!ok)

d = DayWithinYear(t, year);

n--;
if (!OBJ_CHECK_ACCESS(cx, obj, id, mode, vp, &attrs))

case REOP_LPAREN:

ren->u.ucclass.wordclass = fill ? JS_FALSE : JS_TRUE ;

if (lambda) {
return NULL;

debugging; often they run slower but sometimes


n = NBUCKETS(ht);
/* Assume RPAREN ops immediately succeed LPAREN ops */
}
state->throwing = JS_GetPendingException(cx, &state->exception);

/* Conditionally ignore reported warnings. */


* version of this file under the NPL, indicate your decision by
str = js_NewStringCopyN(cx, chars, length, 0);
// > [/select]
{
return d - step;

static JSSubString *

* Copyright (C) 1998 Netscape Communications Corporation. All


* constant except for daylight savings time.

va_list ap;

*/

{
date = date_constructor(cx, obj);

goto out;

goto bad;

* are serialized using a global lock. For scalability, a hashtable of global

cx->scopeToShare = scope;
mday = /*byte*/ n;
SAVE_SP(fp); \

/* create new XDR */


js_DateGetSeconds(JSContext *cx, JSObject* obj);
SET_ATOM_INDEX(pc, ncases);

if (!a)
JS_free(cx, file->path);

printf(" %c ('\\%o')\n", (char)ren->u.chr, ren->u.chr);


} else {
MEMMOVE(pivot, a, elsize);
* The "rval" property id is underneath those two on the stack.

return NULL;

#elif defined(__GNUC__) && defined(__i386__)


struct JSStmtInfo {
/* "Friend" types used by jscntxt.h and jsdbgapi.h. */
if (!news)

int32 count = 0;

JS_LOCK_OBJ(cx, obj);
/* An old version used the object in which eval was found for scope. */
if (JSVAL_IS_VOID(v)) { \
{

}
81, 81, 81, 81, 81, 81, 81, 81, /* 30 */
#ifndef RND_PRODQUOT
return JS_FALSE;
#define JS_HAS_NEW_OBJ_METHODS 0 /* has Object.prototype query methods */
pn2 = (pn1->pn_type == TOK_VAR) ? pn1->pn_head : pn1;
JS_PUBLIC_API(JSContext *)
return JS_TRUE;
static intN
if (!js_DoubleToECMAUint32(cx, d, (uint32 *)lengthp))

(clasp->flags & JSCLASS_HAS_PRIVATE)) {

* js1.3 "hi", "hi there" "hihitherehi therebye"

* The 'before' param is JS_TRUE for the hook invocation before the execution
if (!JSVAL_IS_STRING(argv[0])) {

cp += message->length;

} else {

extern JSObject *
if (cp == state->cpend) {
return EmitPropOp(cx, pn, pn->pn_op, cg);
#undef TOKEN_LENGTH
result = JS_malloc(cx, strlen(base)+1+strlen(tmp)+1);
a.lo = n1, a.hi = n2;

break;
ACQUIRE_DTOA_LOCK(0);

buf = JS_malloc(cx, (offset+MAX_LINE_LENGTH)*sizeof data);

if (map->nrefs == 0) {

#include "jsapi.h"

if (argc == 0) {
*date = TIMECLIP(result);
if (!obj_setSlot(cx, obj, INT_TO_JSVAL(JSSLOT_PROTO), &v))

JSBool usetz;
}
JSRegExp *re;

nargv = JS_malloc(cx, (nargc + 1) * sizeof(char *));

#define JS_HAS_PROP_DELETE 1 /* delete o.p removes p from o */


return JS_TRUE;

*/

JS_LOCK_GC(rt);

#endif

tc->flags |= TCF_FUN_HEAVYWEIGHT;

MSG_DEF(JSMSG_SEMI_BEFORE_STMNT, 109, 0, JSEXN_SYNTAXERR, "missing ; before


statement")

JS_ClearWatchPointsForObject(JSContext *cx, JSObject *obj)


* object graphs, etc.) for later restoration. These portions
#endif
#endif
{

* the provisions above, a recipient may use your version of this

static JSFunctionSpec boolean_methods[] = {

{"sin", math_sin, 1, 0, 0},

#endif

return JS_FALSE;
JS_ReportErrorNumber(JSMSG_NOT_A_SUBSPECIES, "Rhino", "Monkey");
and rounded to nearest.

JS_ASSERT(l>0);

}
return OBJ_LOOKUP_PROPERTY(cx, proto, id, objp, propp);
case REGEXP_IGNORE_CASE:
#define JS_BUG_FALLIBLE_EQOPS 1 /* fallible/intransitive equality ops */
return JS_FALSE;

pn3->pn_offset = off;
argv[(intn)(argc-1)] = STRING_TO_JSVAL(str);
sn = js_GetSrcNote(jp->script, pc);

}
31,31,30,31,30,31
#define JS_END_EXTERN_C }

60, 60, 15, 15, 15, 15, 15, 15, /* 51 */


77, 77, 77, 77, 77, 77, 77, 77, /* 21 */

SymbolEnumArgs args;
for (sn = notes; !SN_IS_TERMINATOR(sn); sn = SN_NEXT(sn)) {

p5 = p5s = i2b(625);

!scope->ops->add(cx, scope, id, sprop)) {

uintN i, b, bit, num, length;

if (its_noisy)

if (ltmp == JSVAL_STRING && rtmp == JSVAL_STRING) { \

* split

87, 87, 87, 87, 87, 87, 87, 87, /* 63 */

return HT_ENUMERATE_NEXT;

wp = next) {

*
return JS_FALSE;

if (pn->pn_type == TOK_DOT && pn2->pn_type == TOK_NAME) {


JS_GetFrameReturnValue(JSContext *cx, JSStackFrame *fp);
} list;

#include "jsfun.h"

static intN

return NULL;
*/
pool->stats.variance += size * size;

return JS_FALSE;
static JSBool
/* mccabe gets his wish */
}
60, 60, 60, 60, 60, 60, 60, 60, /* 22 */
return JS_FALSE;
JS_DESTROY_LOCK(rt->gcLock);
base = PRMJ_ToExtendedTime(0);

done = pc + GET_JUMP_OFFSET(pc);

/*
pn3->pn_expr = Expr(cx, ts, tc);
/*
* rights and limitations under the License.
js_InitScanner(JSContext *cx)
return 0;

chop $regexp;
}
fp->sharpArray = obj;
* License Version 1.1 (the "License"); you may not use this file

JSXDRState *xdr;
break;

case TOK_RC:

goto out;
(void) js_GetToken(cx, ts); /* eat `catch' */

break;
typedef void *
goto ret;
*/

(jsid)cx->runtime->atomState.inputAtom);
}

extern JSAtomListElement *

break;
*

void (*clear)(JSContext *cx, JSScope *scope);

case 'i':
return NULL;
cx->jsop_eq = JSOP_EQ;
{"fromCharCode", str_fromCharCode, 1,0,0},

extern JS_PUBLIC_API(void)

}
"b %u, c %x (%c), i %ld, u %lu, j %ld\n",
* implied. See the License for the specific language governing

if (JSVAL_IS_DOUBLE(value))
js_AtomizeString(JSContext *cx, JSString *str, uintN flags);
/* Don't hurt everyone in leaky ol' Mozilla with a fatal JS_ASSERT! */

#define JS_HAS_CONST 0 /* has JS2 const as alternative var */

va_start(ap, errorNumber);
if (!atom)

JS_END_MACRO
JSString *nameString;

JS_BEGIN_EXTERN_C
#define fd_cos cos

ss.maxlen = 0;

case TOK_LC:
}
len++;

cn++;

* TOK_RC list pn_head: list of pn_count TOK_COLON nodes where


JSTokenPtr begin; /* first character and line of token */

static char js_thaw_str[] = "thaw";

JS_ReportErrorNumber(xdr->cx, js_GetErrorMessage, NULL,

if (!JS_XDRString(xdr, &str))
* we're compiling one.

return JS_FALSE;

case JSOP_GETPROP:

#define FETCH_ELEMENT_ID(n, id) \


/*
entry = ADDRESS_ENTRY(table, hash1);

if (!JS_InstanceOf(cx, obj, &js_RegExpClass, argv))


break;
#include "jsgc.h"
fputs("Maximum hash chain:\n", fp);
JS_ASSERT(!obj->map);

tn->start = start;
* stores, given the variables object and scope chain in cx's top frame, the
}
printf("#define JS_ALIGN_OF_POINTER %dL\n", align_of_pointer);

* that d is a normalized power of 2.

lineno = JS_PCToLineNumber(cx, script, script->code + i);

* The author of this software is David M. Gay.


#include "jscntxt.h"

**** End of jsopcode.tbl ****


while (pn && js_MatchToken(cx, ts, TOK_BITXOR)) {

#endif

/* no break */
size_t maxalloc; /* maximum allocation size in bytes */

*
size_t size;
*numBegin = '.';
if (OBJ_IS_NATIVE(obj2)) {

* clean the runtime up under js_DestroyContext, because cx will be "last"

JSStackHeader *sh;
js_GetRegExpStatics(JSContext *cx);

* index, input), i.e., all the properties of a regexp match array.


#endif

JSString *str;
#if !JS_BUG_FALLIBLE_EQOPS
js_DropScopeProperty(cx, OBJ_SCOPE(wp->object),

break;

#endif
goto ret_d;

*idp = (jsid)atom;

JSPROP_READONLY,
*/

if (js_Emit1(cx, cg, JSOP_DUP) < 0)

FROB(valueOfAtom, js_valueOf_str);

const char *filename, uintN lineno,


MSG_DEF(JSMSG_PAREN_AFTER_FOR, 85, 0, JSEXN_SYNTAXERR, "missing ( after
for")

#define js_cpucfg___
#endif

#include "jsdbgapi.h"

regexp_exec(JSContext *cx, JSObject *obj, uintN argc, jsval *argv, jsval *rval)

b = lshift(b, e);
}

{
* JSBool MyArgumentFormatter(JSContext *cx, const char *format,
head->next = NULL;

js_HoldScopeProperty(JSContext *cx, JSScope *scope, JSScopeProperty *sprop);


return JS_FALSE;
** JSLL_ADD Summation (two's compliment)

**** Start of jscntxt.h ****

JSVAL_TO_BOOLEAN(val) ? "true" : "false");

OPDEF(JSOP_SETARG, 85, "setarg", NULL, 3, 1, 1, 1, JOF_QARG |


JOF_NAME|JOF_SET)

return JS_FALSE;

cond = JS_FALSE;

*xc++ = (ULong)(z & 0xffffffffUL);


uint32 a = ucs4Char >> 11;
}

JSMSG_BAD_CONTINUE);

* from the original RegExp also).

*/
q1 = a.hi / d1;

out:
*/
usetz ? tzbuf : "");
#if defined(SHELL_HACK) && defined(DEBUG) && defined(XP_UNIX)
JSTrapHandler handler;
case '7':
if ($reverse_conversion) {

PCE_STORE(cache, pce, entry);

case TOK_DELETE:
wa = a->wds;
#ifdef DEBUG

************************************************************************/

if (report->filename != NULL) {

#ifdef DEBUG
JS_FreeArenaPool(JSArenaPool *pool);
c = PeekChar(ts);
#endif
/* Pop the element's value into rval. */

46, 46, 46, 46, 46, 46, 46, 46, /* 68 */


46, 46, 46, 46, 46, 46, 46, 46, /* 48 */

PUSH_OPND(OBJECT_TO_JSVAL(obj));
*
JSSetObjectSlotOp setParent;
/* pn2 is the then- or else-statement subtree to compile. */

static void
OBJ_ENUMERATE(cx, obj, JSENUMERATE_NEXT, &iter_state, &rval);

* rights and limitations under the License.

/*

const jschar *chars, uintN length,

if (!scopeobj)
/*

return js_SetLengthProperty(cx, obj, length);

/************************************************************************/
typedef struct JSRegExpStatics JSRegExpStatics;

{
JS_EXPORT_API(JSPropertyOp)
extern JS_PUBLIC_API(JSString *)
/* Buffered version of PR_Read. Used by js_FileRead */
if (sh && JS_STACK_SEGMENT(sh) + sh->nslots == sp) {

* deleting the provisions above and replace them with the notice
JS_GetInstancePrivate(JSContext *cx, JSObject *obj, JSClass *clasp,
}

if (SPROP_HAS_VALID_SLOT(sprop)) {

JSScopeProperty *sprop;

JSPRHashEntry * (JSJS_DLL_CALLBACK *allocEntry)(void *pool, const void


*key);

entry = SearchTable(table, key, keyHash);


}

JS_GetPropertyDesc(cx, obj, sprop, &pd[i]);

: NULL,
if (!js_InitScanner(cx))
next = next->next;
sprop = js_DropScopeProperty(cx, scope, sprop);
jsval userid, value;
op = CURRENT_TOKEN(ts).t_op;
? (clasp = OBJ_GET_CLASS(cx, obj),
JSDestroyScriptHook destroyScriptHook;

if (!xdr)
static JSBool

* Alternatively, the contents of this file may be used under the


* an expression statement or similar subtree to decide whether the tree could
/*
#define _APS_NEXT_SYMED_VALUE 101

ts->userbuf.base = (jschar *)base;


js_printf(jp, "\tdefault:\n");
JS_LOCK_OBJ(cx, obj);
if ((b) < 32) { \
} \
*rval = OBJECT_TO_JSVAL(obj);
/* Little hack to provide a default CLASSPATH on the Mac. */

rt->gcMallocBytes > rt->gcMaxBytes) {

/* -*- Mode: C; tab-width: 8; indent-tabs-mode: nil; c-basic-offset: 4 -*-

int count, int ignoreCase)


23, 24, 23, 24, 23, 24, 23, 24, /* 61 */

23, 24, 23, 24, 23, 24, 23, 24, /* 19 */


$regexp = 's/(^|\\W)(' . $regexp . ')/$1 . &subst($2)/eg';

extern JS_PUBLIC_API(uint32)

static JSBool

JSFILE_CHECK_NATIVE("creationTime");
if (!js_SetSrcNoteOffset(cx, cg, (uintN)caseNoteIndex, 0,
**** End of jsexn.h ****

jschar *chars;
JSObject *funobj;

// DREAMWEAVER: changed this from 1 to 0

return JS_FALSE;
if (funobj)

#define MAX_INTERP_LEVEL 30
}

rt = cx->runtime;
uint8 special; /* special frame type flags, see below */

if (!JS_SetPrivate(cx, funobj, fun))


return d - step;
} else if (getter == js_GetLocalVariable) {

break;

JS_SetPrototype(JSContext *cx, JSObject *obj, JSObject *proto)


"PR_LogPrint",

#else

int32 c;

do {
&value);
} else { \

if (obj->map->ops->setProto)

return JS_FALSE;

** - JS_sscanf() handles the NSPR integer and floating point types,


str->length = length;

"PRHashTable",
op = (atom == rt->atomState.getAtom)
nbytes += pbytes;

case SRC_FUNCDEF:
delta = diff(S, mhi);
#endif

char c[4];

* If key's entry is found, it is cleared (via table->ops->clearEntry) and


va_start(ap, fmt);

goto out;

num_parseFloat(JSContext *cx, JSObject *obj, uintN argc, jsval *argv, jsval *rval)
if (!fun)
return JS_FALSE;
#include "jsatom.h"

PUSH(JSVAL_VOID);

JSPropertyOp getter, JSPropertyOp setter, uintN attrs);

break;

for(;;) {
}
if (*sn & SN_3BYTE_OFFSET_FLAG) {

#else

#include "jsconfig.h"

/* Set version only after there is a global object. */


uintN

* Rights Reserved.
goto out;
METER(table->stats.steps++);
#endif
{"toLocaleTimeString", date_toLocaleTimeString,0,0,0 },
str = js_NewString(cx, chars, nchars, 0);
fprintf(fp, " removes while enumerating: %u\n", table->stats.removeEnums);
ht->buckets = oldbuckets;
js_FinalizeStringRT(args->rt, ATOM_TO_STRING(atom));

* the License at http://www.mozilla.org/NPL/

long l;
}

JS_BEGIN_EXTERN_C
}

{
#else
#if JS_HAS_IN_OPERATOR
{

if (d < (step += 31))

"PR_vsnprintf",

JS_ASSERT(requestDebit <= rt->requestCount);

if (!JSVAL_IS_INT(id))

static JSBool

oldArgId = (jsid) sprop->id;


ts->flags |= TSF_REGEXP;

str = (flags & ATOM_NOCOPY)

!JS_XDRUint16(xdr, &fun->extra) ||

#define JOF_UINT16 3 /* unsigned 16-bit immediate operand */


ren2->flags |= RENODE_ISNEXT;
** MACROS: JS_BEGIN_MACRO

* We assert, but check anyway, in case someone is misusing the API.


#else
!= NULL);

uintN attrs)

begin = end;

* bump past end of string -- our caller must do that by adding

js_list_scope_add,
JSBool
* the License at http://www.mozilla.org/NPL/

beq = js_Emit3(cx, cg, JSOP_IFEQ, 0, 0);


extern const char js_URIError_str[];

JSType type;

obj = NULL;
/*

case '\n':
CHECK_REQUEST(cx);
break;
jsuword q = p + nb;
pn->pn_op = JSOP_NEW;

************************************************************************/
if (pn->pn_kid3 && HasFinalReturn(pn->pn_kid3))

* result in the hard case, we use floating-point

* property, or element get (or set) bytecode.

end = length;
}

JS_END_MACRO

static void

ptrdiff_t nb, offset;


#include "jsutil.h" /* Added by JSIFY */

}
ds = tens[k];

js_NewDouble(JSContext *cx, jsdouble d)

#if defined(XP_MAC)

#define JS_HAS_SEQUENCE_OPS 1 /* has array.slice, string.concat */

hep = &todo;

static JSBool
*/

if (!js_ValueToNumber(cx, argv[0], &x))


#define JS_EXPORT_DATA(__type) __type _export

ht->nentries++;

_alep = (JSAtomListElement **)&_ale->entry.next; \

low = 0;
23, 24, 23, 24, 23, 24, 23, 24, /* 60 */
LOCAL_ASSERT(tail + GET_JUMP_OFFSET(pc + tail) == 0);
} else {

#if JS_HAS_EXCEPTIONS
return NULL;
#else

return JS_TRUE;
* JS_RemoveRoot(cx, &scrobj);
* original source code. ECMA requires that it be an error

}
#ifdef ULLong

} else {
return OBJ_ENUMERATE(cx, proto, enum_op, statep, idp);

#define fd_acos acos

hep = JS_HashTableRawLookup(rt->gcLocksHash,
#define JS_BUG_SHORT_CIRCUIT 0 /* 1 && 1 => true, 1 && 0 => 0 bug */

if (JSVAL_IS_OBJECT(val))
case JSOP_DEFAULT:
js_DeleteProperty, js_DefaultValue,

* finding it via cx->newborn[].

return JS_FALSE;

* If you wish to allow use of your version of this file only

{js_InitStringClass, TAG_CHAR_STRING(js_escape_str)},
* except in compliance with the License. You may obtain a copy of

#define JSLL_INIT(hi, lo) ((hi ## L << 32) + lo ## L)

str = js_ValueToString(cx, OBJECT_TO_JSVAL(obj));


JS_FRIEND_DATA(JSObjectOps) js_ObjectOps = {

while (kid->pn_type == TOK_RP)

40, 40, 40, 40, 40, 40, 40, 40, /* 57 */

ren = NewRENode(state, REOP_FLAT1, NULL);

* Construct a new copy of the error report, and store it in the


40, 40, 40, 40, 46, 40, 40, 40, /* 43 */

REOP_FLAT1 = 22, /* match a single char */


* Check for (a = b) and "correct" it to (a == b).

return NULL;
atom = js_AtomizeValue(cx, pn3->pn_val, 0);
(* CRT_CALL JSLookupPropOp)(JSContext *cx, JSObject *obj, jsid id,

bytes = JS_GetStringBytes(str);

str_match(JSContext *cx, JSObject *obj, uintN argc, jsval *argv, jsval *rval)

if (!ok)

(ts->linebuf.ptr - ts->linebuf.base) - \
return OBJ_SET_PROPERTY(cx, obj, id, &v);
3, 3, 3, 3, 3, 3, 3, 3, /* 67 */
* is reference counted and the slot vector is malloc'ed.
}

if (j1 == 0 && !mode && !(word1(d) & 1)) {

JSInt8 tm_mday; /* day of month (1-31) */

**** End of jsscript.c ****

lineno = (uintN) js_GetSrcNoteOffset(sn, 0);

if (currentGetter == js_GetLocalVariable &&


}

}
uintN i;

((JSScope *)map)->object = NULL;


#if JS_HAS_DO_WHILE_LOOP

goto bad;
p = getenv( "NETSCAPE_LOCALIZATION_DEBUG" );

t = +0.0;
oldfp->dormantNext = NULL;

{JSVERSION_1_1, "1.1"},

*/

#define JS_HAS_SCRIPT_OBJECT 1 /* has (new Script("x++")).exec() */


goto outofmem;

* The caller can inspect pn->pn_slot for a non-negative slot number to tell

FETCH_NUMBER(cx, -1, d2);

}
* March 31, 1998.

* and if "unsigned Llong" does not work as an unsigned version of

/* Shrink if alpha is <= .25 and table isn't too small already. */
return *((JSUint64 *)&localTime);
}
{0,0,0,0,0}

: (js_LockObj(cx, obj), \

jsdouble result;
}
* Copyright (C) 1998 Netscape Communications Corporation. All

PRCondVar *scopeSharingDone;
int depth = 1;
*
/*
argv++;
case JSOP_EVAL:

jp->scope = oldscope;
extern JS_PUBLIC_API(void)
fp->sp = sp;

if (xdr->mode == JSXDR_ENCODE) {

* If you wish to allow use of your version of this file only

jsint i_; \

if (notsharp) {

case JSOP_ENUMELEM:

/*

jsint lo = (jsint) floor((t / msPerDay) / 366) + 1970;


pn->pn_op = JSOP_NUMBER;

sizeof_word = PR_BYTES_PER_WORD;

*/

if (sprop && SPROP_HAS_VALID_SLOT(sprop)) \

js_printf(jp, "\tbreak;\n");
"PR_RevokeEvents",

case REOP_BOL:

* RegExp.multiline $*
i = 0;

}
cg->noteMark = JS_ARENA_MARK(&cx->notePool);

JSFunction *fun;

return JS_FALSE;
}

lineno = js_PCToLineNumber(fp->script, fp->pc);

}
CHECK_REQUEST(cx);

#define PRHashEntry PLHashEntry

MSG_DEF(JSMSG_CATCH_IDENTIFIER, 92, 0, JSEXN_SYNTAXERR, "missing identifier


in catch")
static void
}

* March 31, 1998.

JS_PUBLIC_API(void)

}else{

static RENode *

if (!newReport->messageArgs[i])
v = *vp;

* class's delProperty hook with rval as the result parameter.


*/
if (pn->pn_pos.end.lineno == ts->lineno &&
jsdouble *date = date_getProlog(cx, obj, argv);

return NULL;

errortoexnname[errorNumber].name,

argv[0] = STRING_TO_JSVAL(str2);
0x00000013, /* 122 Cs */
* deleting the provisions above and replace them with the notice

#define JS_HAS_EXPORT_IMPORT 0 /* has export fun; import obj.fun */


#if JS_BYTES_PER_INT == 4
break;

#if JS_HAS_SWITCH_STATEMENT
getter = NULL;

switch (sn ? SN_TYPE(sn) : SRC_NULL) {

* We know that some other thread's context owns scope, which is now

'N', 'O', 'P', 'Q', 'R', 'S', 'T', 'U', 'V', 'W', 'X', 'Y', 'Z',

obj = js_NewDateObjectMsec(cx, UTC(msec_time));

const char js_anonymous_str[] = "anonymous";


label = NULL;
JSStackFrame *fp;
*/

js_DestroyScope(JSContext *cx, JSScope *scope)

if (!(ren->flags & RENODE_GOODNEXT))


#else
if (!cx->requestDepth) {

{
#include "math.h"
static int16

/* Function and Object require cooperative bootstrapping magic. */

if (!ren2 || !SetNext(state, ren, ren2))

report.lineno = js_PCToLineNumber(fp->script, fp->pc);

printf("#endif /* js_cpucfg___ */\n");


static char enuf[80];
}

rv0 = rv;

JS_ArenaRealloc(JSArenaPool *pool, void *p, JSUint32 size, JSUint32 incr)

#define JS_ISUPPER(c) (JS_CTYPE(c) == JSCT_UPPERCASE_LETTER)

if ((pd[i].flags & JSPD_ALIAS) && !js_AddRoot(cx, &pd[i].alias, NULL))


goto do_long;
startline = lineno;
memset(ht, 0, sizeof *ht);

static JSFunctionSpec exception_methods[] = {


return JS_FALSE;
}
cp = matchRENodes(state, (RENode *)ren->kid, ren->next, cp);

if (!cx->globalObject)

JSAtom *atom;

#endif
break;
*/
if (pn->pn_op == JSOP_NAME &&

if (JSVAL_IS_PRIMITIVE(exn))
* rights and limitations under the License.

JS_CompileUCScriptForPrincipals(JSContext *cx, JSObject *obj,

while (--rightspaces >= 0) {


JS_PUBLIC_API(JSBool)
js_FreeAtomState(cx, state);

40, 40, 40, 40, 40, 40, 40, 40, /* 117 */

}
if (JS7_ISHEX(cp[0]) && JS7_ISHEX(cp[1]) &&
if (!(d *= 10.))

reportp->flags |= JSREPORT_EXCEPTION;
extern JS_PUBLIC_API(JSIntn) JS_CeilingLog2(JSUint32 i);

}
if (!pn2)
JS_GetFrameCallObject(JSContext *cx, JSStackFrame *fp)

}
}

return JS_FALSE;
str_resolve(JSContext *cx, JSObject *obj, jsval id)

#define PR_FinishArenaPool PL_FinishArenaPool


#include "jsprf.h"
}
* '.' Matches any char except '\n'.

out:
#include <SupportDefs.h>
}

#ifndef jsbool_h___
* At this point, cx must be inaccessible to other threads. It's off the

if (js_Emit1(cx, cg, JSOP_SWAP) < 0 ||

JSArenaStats *stats, **statsp;


return JS_TRUE;

break; \

MSG_DEF(JSMSG_SEMI_AFTER_FOR_INIT, 86, 0, JSEXN_SYNTAXERR, "missing ; after


for-loop initializer")

* deleting the provisions above and replace them with the notice
}

*/
* Modifications made by IBM described herein are

result = *date;

while (p != numBegin)

jschar *newchars;
extern JS_PUBLIC_API(void)

if (!report) {

JS_GetScriptFilename(JSContext *cx, JSScript *script);

if ((b) < 32) { \


static JSBool

* quantatom '{' n ',' m '}'

#else /* !JS_HAS_INSTANCEOF */
js_InitArrayClass(JSContext *cx, JSObject *obj);

/* Concatenate jschars onto an unshared/newborn JSString. */


b->wds = n;

* in match_or_replace.
if (!pn2->pn_next)

pn3 = pn2->pn_left;
JS_DestroyRuntime(JSRuntime *rt);
object that delegates to a prototype

1, vp, vp) \
*

* under the terms of the GPL and not to allow others to use your

pn = NewBinary(cx, TOK_BITXOR, JSOP_BITXOR, pn, BitAndExpr(cx, ts, tc),

#ifndef Inaccurate_Divide
prev = prev->prev;

*rval = argv[0];
} else {

15, 15, 15, 15, 15, 15, 15, 15, /* 96 */

else if ( src != NULL )

y = (*xa & 0xffff) - (*xb & 0xffff) - borrow;

} else {
JS_ASSERT(-depth <= spindex && spindex < 0);
usetz ? " " : "",

chars[nchars++] = ' ';

path = JS_strdup(cx, path);

* and other provisions required by the GPL. If you do not delete


js_InitFileClass(cx, obj, JS_TRUE) &&
#if defined(AIXV3) || defined(AIX)

size_t expandedLength

sizeof(JSDHashEntryStub),

pn2->pn_pos.begin = pn->pn_pos.begin;
FETCH_INT(cx, -1, i);

* Apart from the js_SetProtoOrParent exception, the engine promotes

js_Atomize(JSContext *cx, const char *bytes, size_t length, uintN flags)


* '\W' A non-word character.
*rval = OBJECT_TO_JSVAL(obj);
extern JSClass js_ArgumentsClass;
* Security protocol.

atom = js_AtomizeDouble(cx, d, 0);

goto bad;
JSAtom *ErrorAtom;

return JS_FALSE;

23, 24, 23, 24, 23, 24, 23, 24, /* 7 */


if (!pn2)
return NULL;
* so that any attempt to allocate a GC-thing from a finalizer will fail,

#define JS_HAS_EVAL_THIS_SCOPE 1 /* Math.eval is same as with (Math) */


if (requestDebit)
if (!pn3)
{"blink", str_blink, 0,0,0},

JSProperty *prop;

js_ContextIterator(JSRuntime *rt, JSContext **iterp)

OPDEF(JSOP_NUMBER, 60, "number", NULL, 3, 0, 1, 12, JOF_CONST)


#define GET_JUMP_OFFSET(pc) ((int16)(((pc)[1] << 8) | (pc)[2]))
}
if (!lval)
* leaves one more slot for rval2 before we might overflow.
extern JSBool

} CompareArgs;
"PR_smprintf",

bupline = 0;

JSMSG_CATCH_AFTER_GENERAL);
flp = oflp;

return JS_FALSE;

* && (the most significant bit of b.hi is set),

#ifdef METER_PARSENODES

* Rights Reserved.

else if (min < 0)

L = -L >> Exp_shift;
goto out;

#ifdef XP_MAC
if (!filename)
case TOK_IMPORT:

JSProperty **propp, const char *file, uintN line);

else

* substrings. Let our caller worry about whether to split once at end of
cmp = (av == JSVAL_VOID) ? 1 : -1;

};
JS_CLEAR_ARENA(a);
* 1 bit if 1, subtracting the signed offset converts the character to
todo = -2;

* Alternatively, the contents of this file may be used under the

if (n >> 8)
/* Global properties and functions defined by the Number class. */
*/
* file under either the NPL or the GPL.
* separator occurrence if found, or str->length if no separator is found.

if (!date)

#include "jstypes.h"

return -2;

**** Start of jsdhash.h ****

scope = OBJ_SCOPE(obj);

tagbuf[j++] = '<';
#include <stddef.h>
*/
}

#define JS_HAS_REGEXPS 1 /* has perl r.e.s via RegExp, /pat/ */

#ifndef Sudden_Underflow

JSAtom *inputAtom;
JS_ValueToFunction(JSContext *cx, jsval v);
if (min == 0) {
jsval *argv, jsval *rval)

case FILE_AUTOFLUSH :

/* So CURRENT_TOKEN gets TOK_COMMA and not TOK_LB. */

return JS_FALSE;
char drive = '\0';

if (clasp->flags & JSCLASS_SHARE_ALL_PROPERTIES)


"PR_DestroyEventQueue",

ok = SPROP_SET(cx, sprop, obj, obj, vp);


} else { \
(* CRT_CALL JSNative)(JSContext *cx, JSObject *obj, uintN argc, jsval *argv,

(* CRT_CALL JSDHashEnumerator)(JSDHashTable *table, JSDHashEntryHdr *hdr,

JSObject *obj2;
jsint num; /* could be a number */

return JS_FALSE;

JS_ReportOutOfMemory (grState->state->context);

pn->pn_type = TOK_RB;

path = js_absolutePath(cx, path);


#define JS_HAS_CALL_OBJECT 0 /* fun.caller is stack frame obj */

if (fp->constructing)

* lightweight function activation, or if its scope chain doesn't match


goto out;

JS_ATOMIC_DECREMENT(&fun->nrefs);
VALUE_TO_OBJECT(cx, lval, obj);
newReport->errorNumber = report->errorNumber;
return JS_TRUE;

if (js_NewSrcNote(cx, cg, SRC_ASSIGNOP) < 0 ||


* they're not needed for the current use of preserving the top-of-stack return
return HT_ENUMERATE_REMOVE;
}

case SRC_ENDBRACE:

type = (JSSrcNoteType) SN_TYPE(sn);

JSGCThing *thing;

return;

jsval *rval)

break;
void
return script;

return;
* previously succesful kid in order to restablish it's paren
case REOP_PLUS:
* provisions of the GPL are applicable instead of those above.

* provisions of the GPL are applicable instead of those above.

n = PTRDIFF(report->tokenptr, report->linebuf, char);


**

case JSOP_INCELEM:

#define fd_floor floor


#undef UNTAG_CHAR_STRING
extern const char js_decodeURIComponent_str[];

ok = JS_FALSE;
jsval val[2];

#ifdef JS_DOUBLE_HASHING
#elif JS_VERSION == 140

JS_free(cx, chars);

#define COMPARE_DOUBLES(LVAL, OP, RVAL, IFNAN) ((LVAL) OP (RVAL))


*/

break;
}
case 'x':
if (!ok)
JS_ASSERT(*hep == NULL);

uint32 shrinks; /* table contractions */


/*

JSAtom *atom;

REOP_PLUS = 8, /* one or more occurrences of kid */

#undef JS_HAVE_LONG_LONG
JS_HasArrayLength(JSContext *cx, JSObject *obj, jsuint *lengthp);

goto out;
JS_ReportOutOfMemory(cx);

}
JS_ArenaShutDown(void);
** Compute the log of the greatest power of 2 less than or equal to n.

if (!JS_InstanceOf(cx, obj, &js_ScriptClass, argv))

JS_GetStringBytes(str), JS_GetStringLength(str),
* The Initial Developer of the Original Code is Netscape

JSObject *obj);
PrimaryExpr(JSContext *cx, JSTokenStream *ts, JSTreeContext *tc)

if (!proto || !InitArrayObject(cx, proto, 0, NULL))


printf("#define JS_ALIGN_OF_INT %dL\n", align_of_int);
if (JS7_ISDEC(dc)) {

my_GetErrorMessage(void *userRef, const char *locale, const uintN errorNumber)

*/

id = (jsid)atom;

break;
case JSTRAP_THROW:
}

strmode = JS_ValueToString(cx, argv[0]);

void *value; /* ptr to opaque value */


* file under either the NPL or the GPL.
static JSBool
* The Initial Developer of the Original Code is Netscape
firstSecondOfUnixTime.second = 0;

js_strncpy(&chars[1], re->source->chars, length - 2);

#ifdef va_start

extern const char js_toSource_str[];

*/

** Description: Portable access to 64 bit numerics


104, 104, 104, 104, 104, 104, 104, 104, /* 0xDA00 */

return NULL;

"PR_LOG_MAX",

p = fmt;
RETURN(TOK_NUMBER);
#include "jsstr.h"
js_LockRuntime(JSRuntime *rt)
bad:

OBJ_DROP_PROPERTY(cx, obj2, prop);


* PR date stuff for mocha and java. Placed here temporarily not to break

if (i == ilim)

return rv;
offset = CG_OFFSET(cg);
*vp = frame.rval;

obj = js_NewObject(cx, &number_class, NULL, NULL);


return NULL;

JSRuntime *rt;

jsword me = cx->thread;
} else {
j = 0;

extern jschar js_empty_ucstr[];


}
return JS_FALSE;
}

* version of this file under the NPL, indicate your decision by


void
JS_ReportErrorNumber(cx, my_GetErrorMessage, NULL,
#if defined(_WIN32) || defined(WIN32)

CHECK_REQUEST(cx);
* file under either the NPL or the GPL.

JSMSG_REDECLARED_PARAM,

chars += rdata->index;
if (found) {

atom = GET_ATOM(cx, script, pc);

} else {

{ format, count } ,

memset(cg, 0, sizeof *cg);


56, 56, 56, 56, 56, 56, 56, 56, /* 0x5400 */
if (!re)
}
*
*/

JS_HashTableDestroy(map->table);

/* Hide this pop, it's from a goto in a with or for/in. */

js_printf(jp, "\t}");
if (prefix)

* 4. Add "return ret".

"PRUword",

const jschar *cp;

JS_RemoveRootRT(JSRuntime *rt, void *rp);

15, 15, 15, 15, 15, 15, 15, 15, /* 83 */


return JS_FALSE;

void (*dump)(const char *name, void *rp, void *data),


#ifdef DEBUG
ss.base = 0;

return JS_FALSE;

/*
#endif /* JSD_LOWLEVEL_SOURCE */
}

#ifdef JS_THREADSAFE

if (length == 0) {
{

jsval *argv, jsval *rval)

jp = ss->printer;
SECURITY_CHECK(cx, NULL, "readln", file);

#endif
if (--wp->nrefs != 0)

#define JS_HAS_IN_OPERATOR 0 /* has in operator ('p' in {p:1}) */

e; \

MAKE_EXCEPTION_CTOR(TypeError)
offset = SprintPut(sp, bp, strlen(bp));
{

if (!WellTerminated(cx, ts, TOK_ERROR))

align_of_int = ALIGN_OF(int);

}
out:

* To remove an entry identified by key from table, call:

{
jsval *rval)

* digits.

#define VARNO_LEN JUMP_OFFSET_LEN


* variable or formal parameter of a function activation. Those

tc->flags &= ~TCF_IN_FOR_INIT;


* Software distributed under the License is distributed on an "AS

typedef void
46, 46, 46, 46, 46, 46, 46, 46, /* 46 */

static JSBool

PN_APPEND(pn, pn2);

strcpy(name, "**FINALIZED ATOM KEY**");


if (maxargs >= 3 && argp < stop)

case TOK_EXPORT:

JS_ASSERT(JSVAL_IS_INT(rval));
JSHashNumber keyHash;

if (argc == 0)
CHECK_REQUEST(cx);
// template engine generates. For some reason, the last srcnote
break;

* Push the virtual machine's "obj" register, which was set by a name,

if (cmp(b,S) < 0) {
scope = OBJ_SCOPE(proto);
return js_NewNumberValue(cx, z, rval);
/*
js_XDRRegExp(JSXDRState *xdr, JSObject **objp);
*
#endif

/* Non-null if init'ing standard classes lazily, to stop recursion. */


*/

/*
if (!obj)

7, 7, 7, 7, 7, 7, 7, 7, /* 75 */

pn3->pn_expr = NULL;
#include "jsopcode.h"
? (JSPropertyOp) obj

return fp->fun;
}

while (remainder>0) {
JS_ReportErrorNumber(cx, JSFile_GetErrorMessage, NULL,
20, 20, 20, 20, 20, 20, 20, 20, /* 3 */
}

break;

if (oldfp != fp)
return JS_FALSE;

#define fd_fabs fabs

if (argc > 1) {
return NULL;
tp->t_op = MatchChar(ts, '=') ? JSOP_LE : JSOP_LT;
/* Allocate an object from the GC heap and zero it. */
n = 'x';
case ':':

if (!OBJ_GET_PROPERTY(cx, obj, id, rval))

#define RENODE_GOODNEXT 0x10 /* ren->next is a tree-like edge in the graph */

!JS_ConvertValue(cx, *vp, JSTYPE_STRING, vp)) {

if (JSVAL_IS_NULL(val)) {
ok = JS_FALSE;
40, 40, 40, 40, 40, 40, 40, 40, /* 58 */

if (pn2->pn_op != JSOP_ARGUMENTS) {

JSAtom *atom;

JS_free(cx, file);

{
PRMJ_FormatTime(char *buf, int buflen, char *fmt, PRMJTime *tm);
}
JSParseNode *pn;

JSString *str;
* pn_kid2: catch blocks or null
js_PeekToken(JSContext *cx, JSTokenStream *ts);
js_UnlockScope(cx, scope);

JSCT_OTHER_PUNCTUATION = 24,

{"quit", Quit, 0},

if (!obj)
if (pn2 && pn2->pn_type == TOK_DEFSHARP) {

int32 i;
*(char*)curdst++ = temp;

return JS_FALSE;
0xFE270001, /* 87 Lu, hasLower (add -8), identifier start */

#define JS_BITS_PER_SHORT 16L


JS_ReportErrorNumber(xdr->cx, js_GetErrorMessage, NULL,
if (notes) {
JS_ReportWarning(cx, "File %s cannot be retrieved", filePath);

* left-hand side of assignment op. Only native methods can

typedef JSUint32 uint32;


*
int32 n;
array_toSource(JSContext *cx, JSObject *obj, uintN argc, jsval *argv,

void

#if defined JS_THREADSAFE && defined DEBUG

else

JS_BEGIN_MACRO \

if (!str)

/* ECMA 15.1.1.1 */
rdata->chars = chars;
* f JSFunction * Function private

static size_t

lval, ATOM_BYTES(atom));
} else {
cp2 = parsub->chars;
ren = NewRENode(state, REOP_NONDIGIT, NULL);

intN sticky = 0; /* sticky is 1 if any bit beyond the 54th is 1 */

case TOK_NAME:

return JS_FALSE;

return NULL;
js_IsRuntimeLocked(JSRuntime *rt)

if (JSVAL_IS_INT(rval) &&
/* put our t in an LL, and map it to usec for prtime */

return JS_TRUE;

if (!proto || !(ctor = JS_GetConstructor(cx, proto)))


jsval v, junk;

MSG_DEF(JSMSG_NO_EXPORT_NAME, 79, 0, JSEXN_SYNTAXERR, "missing name in


export statement")
*/
{

case PN_BINARY:
memcpy(script->main, code, length * sizeof(jsbytecode));
if (!cstr) {

* If you wish to allow use of your version of this file only

return JS_FALSE;

case SRC_PCBASE:
}
if (JS_InstanceOf(cx, rhsObject, &file_class, NULL)){
/* Swap bytes in Unichars to keep frozen strings machine-independent. */
if (!str)

file_remove(JSContext *cx, JSObject *obj, uintN argc, jsval *argv, jsval *rval)

} a;

return h;

return JS_FALSE;
if (!PatchGotos(cx, cg, &stmtInfo, stmtInfo.catchJump, CG_NEXT(cg),

}
}
ss->sprinter.offset = ss->offsets[top];
: (void)0)

{0, "POSITIVE_INFINITY", 0,{0,0,0}},

str_blink(JSContext *cx, JSObject *obj, uintN argc, jsval *argv, jsval *rval)
if (!js_ValueToNumber(cx, argv[0], &x))
jsval *rval)

JS_ASSERT(slot < fp->fun->nargs);


JS_ASSERT(JS_IS_SCOPE_LOCKED(scope));
CACHED_SET(OBJ_SET_PROPERTY(cx, obj, id, &rval));
(d) = -(d); \
JSStackFrame *fp, frame;

JS_LOCK_OBJ(cx, obj);
JS_free(xdr->cx, chars);

extern JSBool

"PR_END_MACRO",

return JS_FALSE;

}
char buf[16];
#define JS_HAS_SHARP_VARS 0 /* has #n=, #n# for object literals */

PR_Lock(p5s_lock);
static JSBool

;
}

/* ZZZbe should do this only if interpreted often enough. */


extern double fd_floor __P((double));

*/
* as well as multiple HTML script tags.
* A JS string is a counted array of unicode characters. To support handoff

JSTokenType tt;

clasp = OBJ_GET_CLASS(cx, proto);


break;

JS_HashTableDestroy(JSHashTable *ht);

pn3 = table[i];
* under the terms of the GPL and not to allow others to use your

tc->flags |= TCF_FUN_HEAVYWEIGHT;

js_ReportCompileErrorNumber(cx, ts, NULL, JSREPORT_ERROR,

break;

case PN_NULLARY:
#define JS_HAS_LEXICAL_CLOSURE 1 /* nested functions, lexically closed */
#define JSLL_L2D(d, l) ((d) = (JSFloat64)(l))
#ifdef Sudden_Underflow

return js_ValueToFunction(cx, &v, JS_FALSE);


* This is a recursive-descent parser for the JavaScript language specified by

} else {

* except in compliance with the License. You may obtain a copy of


}
jsbytecode *next = CG_NEXT(cg);
* same class as the clone-parent's prototype.

#include "jsconfig.h"
}
#ifndef XP_MAC_MPW

46, 46, 46, 46, 46, 46, 46, 46, /* 20 */

#define JS_BUG_EMPTY_INDEX_ZERO 0 /* o[""] is equivalent to o[0] */


/* open(SPOOLER, "| cat -v | lpr -h 2>/dev/null") -- pipe for
writing */
atom = js_Atomize(cx, name, strlen(name), 0);

JSString *str;
}

if (pn1 && js_MatchToken(cx, ts, TOK_IN)) {

tmp = js_Emit1(cx, cg, JSOP_TRUE);


ts->ungetpos; \
ren = NewRENode(state, op, ren2);

obj = OBJ_GET_PARENT(cx, pn->pn_fun->object);


JS_AWAIT_GC_DONE(rt);

if (bufsize < 2) {

goto out;

return oldcb;
JSBool ok;
jschar c;

js_hash_scope_lookup(JSContext *cx, JSScope *scope, jsid id, JSHashNumber hash)

pn = NewParseNode(cx, &CURRENT_TOKEN(ts), PN_LIST, tc);


jsval v;
JSLL_I2L(ms2us, PRMJ_USEC_PER_MSEC);

frame.sp = oldfp ? oldfp->sp : NULL;

#define JS_ARENA_GROW_CAST(p, type, pool, size, incr) \

"PR_UINT32",
significant digit instead of one half of it when the output
string's value is less than d. */

fun_getProperty, JS_PropertyStub,
xe = x + b->wds;

!js_ReportCompileErrorNumber(cx, ts, NULL,

* DREAMWEAVER [dgeorge 23-feb-02] I'm replacing the macro with a function because

* rights and limitations under the License.


js_ReportIsNotDefined(cx, name);
if (equal) *equal = '\0';

** JSLL_NE Test for inequality


break;
struct JSScript {
0,
#ifdef ULLong
/*
#endif /* jshash_h___ */
script->depth = (uintN)depth;

JS_BEGIN_EXTERN_C
/* Result of typeof operator enumeration. */

#endif /* JS_HAS_XDR */

const char *alias);


if (!fgets(linebuf, LINE_BUF_LEN, file)) {
k += 2;
resize = sizeof *re + state.progLength - 1;

* the JSOP_NEWINIT and JSOP_INITELEM bytecodes.

void

24, 16, 23, 24, 23, 24, 23, 24, /* 5 */

cx->fp = fp;
fprintf(gOutFile, " atom %u (%s)", (uintN)atomIndex, bytes);

if (!prop) {

* - the callback APIs through which the runtime requests an opaque

0x0D970002, /* 72 Ll, hasUpper (subtract 54), identifier start */

else

{0,0,0,0,0}
nchars = js_strlen(chars);
for (sym = scope->data; sym; sym = (JSSymbol *) sym->entry.next)

JS_UNLOCK_RUNTIME(rt);
if (!buf) goto out;
if (ok) {
JS_ReportErrorNumber(cx, js_GetErrorMessage, NULL, JSMSG_BAD_RADIX,
JSConvertOp convert;
return NULL;
int32 sign; /* Zero if positive, 1 if negative. Ignored by most
Bigint routines! */

}
JSFile *file = JS_GetInstancePrivate(cx, obj, &file_class, NULL);
/*

}
if (!numStr)
const char js_callee_str[] = "callee";
#ifdef GC_MARK_DEBUG

* The handler function has this signature (see jspubtd.h):

* The Initial Developer of the Original Code is Netscape

extern JS_PUBLIC_API(JSFunction *)

** Author: Kipp E.B. Hickman

for (c = '0'; c <= '9'; c++)


ULong carry, z;

uintN argc, i, j, m, n, p;
vp = fp->argv - 2;
#if JS_HAS_IN_OPERATOR

if (!jp)

JSAtom *atom;

extern const char js_get_str[];

* Complain when out of memory.


js_GetArgsProperty(JSContext *cx, JSStackFrame *fp, jsid id,
* version of this file under the NPL, indicate your decision by

fp->varobj = callobj;

if (cp == NULL)

JS_PUBLIC_API(void *)

* If we're here as part of processing a return, emit JSOP_SWAP to preserve

void (*dump)(const char *name, void *rp, void *data);

return OBJ_SET_PROPERTY(cx, obj, (jsid)atom, vp);

#if JS_HAS_EXCEPTIONS

if (!AddToTokenBuf(cx, &ts->tokenbuf, (jschar)c))

* Check for a one octet sequence


#define BYTECODE_GRAIN 256 /* code allocation increment */

if (c == '\\') {
return rv;
uintN oldAttrs, report;

CHECK_REQUEST(cx);

JSObject *aobj;
state.tokenStream = ts;

#define JS_RELEASE_LOCK(l) PR_Unlock(l)

/* (0 q0) = (n1 n0) / (d1 d0) */


}

/*no_digits:

size_t length;
js_GetAttributes(JSContext *cx, JSObject *obj, jsid id, JSProperty *prop,

* Alternatively, the contents of this file may be used under the


#define JSVAL_IS_FUNCTION(cx, v) \

return JS_FALSE;
* Strange but true, apparently modeled after awk.

if (SPROP_HAS_VALID_SLOT(sprop))

#endif
#endif
d = 0.0;

* IS" basis, WITHOUT WARRANTY OF ANY KIND, either express oqr


JSMSG_DEPRECATED_USAGE,
tp->t_op = JSOP_NOP;
JS_PropertyStub(JSContext *cx, JSObject *obj, jsval id, jsval *vp)
JS_ASSERT(ov != nv);

obj = js_NewObject(cx, &js_WithClass, NULL, NULL);

33, 34, 35, 36, 37, 38, 39, 40, /* 0x0A00 */

JSBool ok;

EqExpr(JSContext *cx, JSTokenStream *ts, JSTreeContext *tc)

JS_ArenaCountGrowth(pool, size, incr); \


}

if (cx->interpLevel != 0)

ok &= js_GetProperty(cx, argsobj, (jsid)rt->atomState.calleeAtom, &rval);


{
JSThinLock lock;
static JSDHashEntryHdr *
#endif

"PRUint16",

}
}
pc += VARNO_LEN;
* IS" basis, WITHOUT WARRANTY OF ANY KIND, either express oqr
return JS_FALSE;
goto error;

static JSBool

* rights and limitations under the License.


* RegExp.leftContext $`
JS_SetPrivate(JSContext *cx, JSObject *obj, void *data);

if ((negative = (*s1 == '-')) != 0 || *s1 == '+')


return JS_TRUE;
#if JS_HAS_SCRIPT_OBJECT
static int32

JSObject *parentProto, *proto;

break;

ale = js_IndexAtom(cx, cx->runtime->atomState.ObjectAtom,


JS_DISABLE_GC(cx->runtime);

uintN attrs, JSBool *foundp)


JSTokenType pn_type;
}
typedef short JSInt16;
JSBool lines, FILE *fp)

"PREvent",
C = (jschar)((V & 0x3FF) + 0xDC00);

/* Format a time value into a buffer. Same semantics as strftime() */

CHECK_REQUEST(cx);

* March 31, 1998.

return NULL;
fprintf(fp, " maximum allocation size: %u\n", stats->maxalloc);

if (!parent) {

shift;
JSRuntime *rt;

if (!(x & 0x40000000))

RETURN(TOK_ERROR);
* Contributor(s):

{js_InitNumberClass, TAG_CHAR_STRING(js_NaN_str)},

typedef JSPRHashNumber (JSJS_DLL_CALLBACK *JSPRHashFunction)(const void *key);


#include "jsdbgapi.h"
JSString *emptyString;

* (to restore that saved state) or JS_DropExceptionState (to cleanup the state
int32 lineno;
}

aadj -= L;
40, 40, 40, 40, 40, 40, 40, 40, /* 30 */
JS_BeginRequest(JSContext *cx);

return ca.status;
{js_InitStringClass, TAG_CHAR_STRING(js_decodeURI_str)},

jsid id;
if (!OBJ_CHECK_ACCESS(cx, obj, id, JSACC_WATCH, &rtmp, &attrs))
break;

for (i = 0; v2smap[i].string; i++)

argsObj = JS_NewArrayObject(cx, length, vector);

#else

JSPropertyOp getter, JSPropertyOp setter, uintN attrs);


sym = sprop->symbols;

* Contributor(s):
#define JS_UINT32(x) x ## UL
* JS bytecode generation.

*statep = JSVAL_NULL;

{"getUTCDay", date_getUTCDay, 0,0,0 },


}

#ifdef _WINDOWS
if (JSVAL_IS_OBJECT(v) && v != JSVAL_NULL) { \
/* Character classifying and mapping macros, based on java.lang.Character. */

}else

js_hash_atom_ptr(const void *key)

if (he->value)
z = d0 & Frac_mask;
}

cx->stackHeaders = sh->down;
PROPERTY_OP(-1, ok = OBJ_DELETE_PROPERTY(cx, obj, id, &rval));

pool->stats.nbytes += incr;
{
* (return true, no error report) in case one does due to API pilot

}
}

}
while (cx->requestDepth)

JSTreeContext *tc)
static JSBool
trap = (JSTrap *) JS_malloc(cx, sizeof *trap);

* the entry is marked so that JS_DHASH_ENTRY_IS_FREE(entry). This operation

* Contributor(s):

JSContext *cx;
js_FlushPropertyCache(JSContext *cx);
else

MSG_DEF(JSMSG_SEEK_BEYOND_END, 65, 0, JSEXN_NONE, "illegal seek beyond


end")

void
}
if (n == 0 || !JS_ISIDENT_START(c) || !JS_ISPRINT(c))
return JS_FALSE;

**** Start of jsinterp.c ****

jsrefcount js_atom_map_hash_table_count;

script = ValueToScript(cx, argv[i]);


* the character memory passed to them -- they copy it.

if (!(chars = (jschar *) JS_malloc(xdr->cx, nbytes + sizeof(jschar))))


js_printf(jp, ") {\n"); /* balance} */

} else if (JSVAL_IS_STRING(v)) {

sym = scope->ops->lookup(cx, scope, id, hash);

dp = JSVAL_TO_DOUBLE(*vp);
JSResolveOp resolve;
#define pn_extra pn_u.list.extra
*
iter = NULL;

length = (jsuint) argc;


PopOff(SprintStack *ss, JSOp op)
s2 = j;

}
ilim = ilim1 = 0;

#include "jsstddef.h"
*

js_NewScriptFromCG(JSContext *cx, JSCodeGenerator *cg, JSFunction *fun)

if (tt == TOK_ERROR)

* cleared early in js_GC, if it is set.

* Contributor(s):

**/

#define JSLL_INIT(hi, lo) ((hi ## LL << 32) + lo ## LL)


}
#define JS_ALIGN_OF_DOUBLE 4L

nbytes += JS_GetObjectTotalSize(cx, (JSObject *) sprop->setter);


: js_var_str,
ieps++;
#define js_LookupProperty(cx,obj,id,objp,propp) \

if (!js_ValueToNumber(cx, *vp, &argc))


JSBool ok;

* kid2 is the catch node


}
for(;;) {
return JS_FALSE;

JSVERSION_1_4 = 140,

slen = s ? strlen(s) : 6;
* Rights Reserved.

15, 15, 15, 15, 15, 15, 116, 116, /* 81 */

return JS_FALSE;
{

if (prec < slen) {

#elif __powerc

/* Bootstrap the ur-object, and make it the default prototype object. */

extern JS_PUBLIC_API(void)
#define JSLL_OR(r, a, b) ((r).lo = (a).lo | (b).lo, \

void **listenerTSData, JSDContext* jsdc)


*p++ = BASEDIGIT(digit);

/*
JSD_GetSourceStatus(jsdc, jsdsrc)) {

{"getUTCSeconds", date_getUTCSeconds, 0,0,0 },


40, 40, 40, 40, 40, 40, 40, 40, /* 117 */
while ((chars[nchars] = (jschar)*prefix) != 0)
#include "jsscript.h"

/**

JSLL_ADD(s, s, us);
JSLL_L2D(rt->rngDscale, tmp2);

JS_PUBLIC_API(JSBool)

!WellTerminated(cx, ts, TOK_ERROR)) {


attrs |= JSPROP_READONLY;
) {

/* We don't worry about inaccurate numbers for any other base. */

typedef void
static JSBool

JSString *str;
i = textlen;
#include <sys/wait.h>

// gets mixed up about tempPool.


goto bad;
if (!rt->gcLocksHash)
js_SetLocalVariableAddress();
* March 31, 1998.

/*

}
size = SRCNOTE_SIZE(cg->noteMask + 1);

return OBJ_GET_PROPERTY(cx, proto, id, vp);

bs = i2b(1);

* Rights Reserved.

#ifdef HAVE_MEMORY_H
js_AtomizeObject(JSContext *cx, JSObject *obj, uintN flags);

for (fp = cx->fp; fp; fp = fp->down) {

#ifdef XP_PC
{
argv[argc] = STRING_TO_JSVAL(str);
/*

} else {

PROPERTY_CACHE_FILL(cx, &cx->runtime->propertyCache, obj, id,

JS_ReportErrorNumber(cx, js_GetErrorMessage, NULL,

} else {

radix = 8;

JS_free(cx, xdr);

}
JS_ArenaCountRetract(JSArenaPool *pool, char *mark)

return NULL;
if (xdr->mode == JSXDR_DECODE)

REOP_DIGIT = 14, /* match a digit char: [0-9] */

if (report->ucmessage)
if (!result) return NULL;

return c;

* deleting the provisions above and replace them with the notice

return JS_FALSE;

* The Initial Developer of the Original Code is Netscape

#if JS_HAS_SHARP_VARS
* If you wish to allow use of your version of this file only
h = (h >> 28) ^ (h << 4) ^ *s;

*/

JSMSG_BAD_QUANTIFIER, state->cp);
{js_toSource_str, regexp_toString, 0,0,0},
40, 40, 40, 40, 43, 44, 45, 43, /* 7 */

#define JS_HAS_UNEVAL 0 /* has uneval() top-level function */

56, 56, 56, 56, 56, 56, 56, 56, /* 0x8C00 */

MonthFromTime(local),
{

char charBuf[2] = " ";


* requires a PRMJTime... which only has 16-bit years. Sub-ECMA.

break;

JSInt16 tm_yday; /* day of year (0 to 365) */


align_of_int64 = ALIGN_OF(fakelonglong);
#define JS_HAS_SHARP_VARS 1 /* has #n=, #n# for object literals */

if (!js_EmitTree(cx, cg, pn2->pn_right))

JS_ReportErrorNumber(cx, JSFile_GetErrorMessage, NULL,

ptrdiff_t catchJump; /* offset of last end-of-catch jump */


jsdouble result;
* A variable introduced through another eval:

(* CRT_CALL JSSourceHandler)(const char *filename, uintN lineno,

* upTime to figure out the current local time as well as GMT.

if (id == ATOM_KEY(cx->runtime->atomState.arityAtom) ||
lval = JS_strdup(cx, POP_STR());

#define OBJ_SCOPE(obj) ((JSScope *)(obj)->map)


s = str->chars;
break;
#define JS_LOCK_RUNTIME(rt) ((void)0)

js_DateGetMinutes(JSContext *cx, JSObject* obj)

return JS_TRUE;

jsval v;

CHECK_REQUEST(cx);
}
case JSOP_EXPORTNAME:
for (j = 0; js_options[j].name; j++) {

JSStackFrame *dormantFrameChain; /* dormant stack frame to scan */

* Alternatively, the contents of this file may be used under the

* kid3 is the finally Statement

if (pn1->pn_dval == 0)

JSBool
ss->cur = ss->base + off;

static char *
return JS_FALSE;
}
}

} else {

#define CG_LIMIT(cg) ((cg)->current->limit)

*
js_ReportIsNotDefined(JSContext *cx, const char *name);

*/

}
* and other provisions required by the GPL. If you do not delete
* top-level reachable from scopeChain (in HTML frames, e.g.).

memcpy(*bytesp, MEM_DATA(xdr), len);

return JS_FALSE;

#define JSVAL_TO_OBJECT(v) ((JSObject *)JSVAL_TO_GCTHING(v))


/*

jsdouble result;

if ((file->isOpen)?

*rval = OBJECT_TO_JSVAL(obj);
sn = &cg->notes[index];

* nulls stored in the default-initialized remainder of the struct. We'll

PUSH_OPND(cx->rval2);
|| (inForInitFlag == 0 && js_MatchToken(cx, ts, TOK_IN))
prefix = "[object ";
JSTYPE_NUMBER, /* number */
fval, 2, argv, &rval);

JSThinLock *tl;
};

*/
}
#define JS_BUG_EMPTY_INDEX_ZERO 0 /* o[""] is equivalent to o[0] */
p = (type) JS_ArenaRealloc(pool, p, size, incr); \

* XXX this function call to wait for any racing GC to complete, in the
#else
out:

}
sp--;

*/
* the License at http://www.mozilla.org/NPL/
if (re) {
}

math_cos(JSContext *cx, JSObject *obj, uintN argc, jsval *argv, jsval *rval)
goto advance_pc;
CHECK_REQUEST(cx);
borrow = y >> 32 & 1UL;

* file under either the NPL or the GPL.


return;

/*
JS_STATIC_DLL_CALLBACK(JSHashNumber)
) {
* atom is the receptacle
/*

}
((_e)->prev)
aadj1 = (double)(int32)(aadj + 0.5);
}

* Immediate operand getters, setters, and bounds.

jschar **sp);

* Communications Corporation. Portions created by Netscape are

JSObject *proto, *ctor;

* terms of the GNU Public License (the "GPL"), in which case the
* the License at http://www.mozilla.org/NPL/
"PR_BITS_PER_WORD_LOG2",

for (; pn2; pn2 = pn2->pn_next) {


thing++;

if (deflated_string_cache_lock) {

"PRStatus",

JS_free(cx, chars);

if (!str)

JS_ASSERT(map->vector && i < map->length);

match_glob(JSContext *cx, jsint count, GlobData *data)


JSLL_ADD(l, l, _lo_d); \

/* Look at the rhs and extract a file object from it */


#define PR_HashTableRemove PL_HashTableRemove
return JS_FALSE;

JSPackedBool throwing; /* is there a pending exception? */

int ch = fgetc(fh);
)
fun_mark, 0
if (!date_parseString(str->chars, &result)) {

#endif

** Return a count of the number of elements scanned.

JS_END_MACRO

JS_ASSERT(OBJ_GET_CLASS(cx, obj)->flags & JSCLASS_HAS_PRIVATE);

sym = sprop->symbols;
case GCX_OBJECT:

table->entryCount--;

|| (word0(rv) & Exp_mask) <= Exp_msk1 + P*Exp_msk1


len = cs->length;

JS_DefineFunction(JSContext *cx, JSObject *obj, const char *name, JSNative call,

*/

static JSBool

cg->tryNoteSpace = size;
void

if (_tn) { \

case TYPE_UINT16:
free(buffer);
"prclist",

* and return null on error, otherwise return the jschar or byte vector that

* provisions of the GPL are applicable instead of those above.


OBJECT_TO_JSVAL(ctor), NULL, NULL,
#endif

}
if( nas[cn].type != TYPE_UNKNOWN )
if (!js_SetStringBytes(str, bytes, length))

#define fd_floor floor


break;
* Software distributed under the License is distributed on an "AS

1, /* SRC_PCBASE */
# between NSPR types and JS types
crflag = (ts->flags & TSF_CRFLAG) != 0;
end = CG_OFFSET(cg);
* The result is held somewhere in buffer, but not necessarily at the beginning.
The size of
* |
do {

if (y == z) {

JSRuntime *runtime;

#if JS_HAS_REPLACE_LAMBDA

"gmt", "ut", "utc",


JS_ValueToNumber(JSContext *cx, jsval v, jsdouble *dp);
};

*vp = JSVAL_VOID;

fprintf(stderr, "slot %3d ", i);

jschar *s, *news;

pn2 = Condition(cx, ts, tc);

nuses = cs->nuses;

return 0;

{"setUTCDate", date_setUTCDate, 1,0,0 },

JS_ToggleOptions(JSContext *cx, uint32 options);

char sign;
* and other provisions required by the GPL. If you do not delete

b = JSVAL_TO_BOOLEAN(v);
23, 24, 23, 24, 23, 24, 23, 24, /* 5 */

{
#endif

/* /usr/include/model.h on HP-UX defines int8, int16, and int32 */

rt->requestCount++;

* lines in a buffer until JS_BufferIsCompilableUnit is true, then pass it to


static JSFunctionSpec string_functions[] = {

extern JS_PUBLIC_API(JSBool)

* Dynamically allocate a new JSDHashTable using malloc, initialize it using


if (JSVAL_IS_REGEXP(cx, argv[0])) {

adj = aadj1 * ulp(rv);


result[c] = FILESEPARATOR;

if (jp && js_DecompileCode(jp, script, begin, len))


jp->script = script;

/* rounded down... */
if (!js_ValueToNumber(cx, argv[0], &x))
int32 scale;
JS_ClearScriptTraps(JSContext *cx, JSScript *script)

}
JS_ASSERT(sizeof(JSGCThing) >= sizeof(jsdouble));

file_finalize(JSContext *cx, JSObject *obj)

#define JSFUN_FLAGS_MASK 0xf0 /* overlay JSFUN_* attributes */


return strftime(buf, buflen, fmt, &a);

* deleting the provisions above and replace them with the notice
/* True if pn is a parsenode representing a literal constant. */
}

return i;

return obj->map->ops->setParent(cx, obj, JSSLOT_PARENT, parent);

* The 'closure' param is as passed to JS_SetExecuteHook or JS_SetCallHook


#endif /* JS_HAS_DEBUGGER_KEYWORD */
d = -d;

JSObject *proto, uintN attrs);


* Parser forward declarations.

fprintf(fp, " number of shrinks: %u\n", ht->nshrinks);

"PRPackedBool",
JSAtom *nameAtom;

fprintf(gOutFile, "finalizing it\n");

* type message, and then hope the process ends swiftly.


#include "jsdhash.h"
*/
return pn;

*
typedef size_t JSSize;
/* Emit a prolog bytecode to predefine the var w/ void value. */

* We attempt the conversion under all circumstances for 1.2, but

JSWatchPointHandler *handlerp, void **closurep)


15, 46, 46, 46, 46, 46, 46, 46, /* 38 */
if (!p)

* matching JS_UNLOCK_SCOPE or JS_UNLOCK_OBJ macro call will take the


JSHashNumber hash;
typedef PRLock JSLock;

/*
extern JSBool

if (exn == JSEXN_NONE)
if (r1 >= b /* i.e., we didn't get a carry when adding to r1 */

b = lshift(b, e + s2);

JS_END_EXTERN_C
* the same compilation unit (ECMA Program).

#define JS_BUG_FALLIBLE_TONUM 1 /* fallible ValueToNumber primitive */


*

FILE_CREATED = -14,

/* Grow by doubling note array size; update noteMask on success. */

40, 40, 40, 40, 40, 40, 40, 40, /* 29 */

* NB: The Script object exposes compile and exec in the


language,

const jschar *name, size_t namelen,


a->limit = a->avail;

tp->t_op = MatchChar(ts, c) ? JSOP_URSH : JSOP_RSH;

extern JS_FRIEND_API(void)

ok = JS_FALSE;
RETURN(TOK_ERROR);
if (av == bv) {
* on this feature.
kidMatch = matchRENodes(state, (RENode *)ren->kid, ren->next, cp);
if (nl + 1 < ts->userbuf.limit && nl[1] == '\n')

#define IS_UTF8_1ST_OF_4(x) (( (x)&~FOUR_OCTET_MASK ) == FOUR_OCTET_BASE)

ok = js_NewNumberValue(cx, d, &rval); \

int64 tmp, tmp2;


* the character terminating the scan is returned in the location pointed

return JS_FALSE;
JS_ASSERT(sprop->nrefs >= 0);

#include "jsscan.h"

goto syntax;
{

# This script modifies C code to use the hijacked NSPR routines that are

sprop->id = INT_TO_JSVAL(ps->tinyid);

typedef JSBool

{
const jschar *ep;

return JS_FALSE;

} else {

* lower frame's sp if cx->fp is native.


pn2->pn_atom = NULL;

*/

} \
JSAtomListElement *ale;

script = JS_CompileUCScriptForPrincipals(cx, obj, principals,

jmp = js_Emit3(cx, cg, JSOP_AND, 0, 0);


if (argc!=1){ \
caller->varobj = fp->varobj = obj;
}

60, 60, 60, 46, 46, 46, 46, 4, /* 47 */

? "primitive type"
pivot = qa->pivot;

{
for(;;) {
jsbytecode *next; /* pointer to next free bytecode */
MSG_DEF(JSMSG_COLON_AFTER_CASE, 83, 0, JSEXN_SYNTAXERR, "missing : after
case label")

PCE_STORE(_cache, _pce, _entry); \

** Return non-zero if the given circular list "_l" is empty, zero if the

tp->ptr = ts->linebuf.ptr - 1;
}

};

* tzoff + dst. (And mktime seems to return -1 for the exact dst

js_FinalizeDouble(JSContext *cx, jsdouble *dp)


prdword align;

};
script = (JSScript *) JS_GetPrivate(cx, JSVAL_TO_OBJECT(v));
void
if (REOP(ren1) == REOP_ALT) {

(* CRT_CALL JSFinalizeOp)(JSContext *cx, JSObject *obj);


out:

{
#include "jsatom.h"
#include "jsutil.h" /* Added by JSIFY */

}
continue;

if (beq < 0 || tmp < 0 || jmp < 0)

static Bigint *i2b(int32 i)

JS_EnumerateStub(JSContext *cx, JSObject *obj);

/*

**** Start of jsstddef.h ****

#define JS_IS_OBJ_LOCKED(obj) js_IsObjLocked(obj)


#ifdef JS_THREADSAFE

/* If the left part is var x = i, bind x, evaluate i, and pop. */


(((a).hi == (b).hi) && ((a).lo op (b).lo)))

* while returning from catch blocks.


for (i = 0; i < (jsint)str->length; i++) {

if (c == '*') {

return state->complete;
EMIT_ATOM_INDEX_OP(JSOP_DEFSHARP, (jsatomid) pn->pn_num);
*

ATOM_BYTES(atom))) {

} else if (JSVAL_IS_STRING(val)) {
log2 = JS_CeilingLog2(capacity);
/* Check for a readonly or permanent property of the same name. */

typedef uint32 JSDHashNumber;


_ale = *_hep ? (JSAtomListElement *) *_hep : NULL; \
CHECK_FOR_FUNNY_INDEX(id);

* specifying the tabulated type conversions:

**** Start of jsdbgapi.c ****

return JS_TRUE;

default:;
entryAddr += entrySize;
uintN nargs, const char **argnames,
#endif /* JS_HAS_CALL_OBJECT */

0, NULL, &v)) {
/* Allocate the source string and copy into it. */

if (!ok)
* TOK_CONTINUE name pn_atom: label or null

b->next = NULL;

*
JSFunction *fun;

* If you wish to allow use of your version of this file only

*/
JS_PUBLIC_API(JSBool)

if (!str)
from = (jschar *)buf;
while (len) {
/***********************************************************************

JSRegExp *re;
growth = (1 + 3 + 1) * sizeof(jschar);
if (c != d)

}
* NB: JS_ExecuteScript, JS_ExecuteScriptPart, and the JS_Evaluate*Script*

#define PRMJ_YEAR_SECONDS (PRMJ_DAY_SECONDS * 365L)


atom = GetSlotAtom(jp, js_GetLocalVariable, GET_VARNO(pc));
}

rt = cx->runtime;

rdata.chars = NULL;
* is initialized so as to avoid problems with properties being

enuf[i++] = hex[b & 15];

*p++ = BASEDIGIT(digit);
*
return JS_TRUE;

static jsdouble msPerMinute = SecondsPerMinute * 1000.0;


JS_GetUCProperty(JSContext *cx, JSObject *obj,
return;
day = DateFromTime(lorutime);
122, 122, 122, 122, 122, 122, 122, 122, /* 104 */
return atom;
z = (x < z) ? x : z;
* except in compliance with the License. You may obtain a copy of

JSDJ_SetJSDContext(_jsdjc, _jsdc);

word0(rv) &= 0xffffffff << (j-32);

if (JS_HAS_STRICT_OPTION(cx)) {
}

JSString *str;
JS_UNLOCK_OBJ(cx, obj);
return proto;
}

js_DropObjectMap(JSContext *cx, JSObjectMap *map, JSObject *obj)


#define fd_sin sin

#endif /* JS_BUG_SHORT_CIRCUIT */

}
}
JSDHashEntryHdr *to);
/*
return BMH_BAD_PATTERN;
sprop = js_FindWatchPoint(rt, obj, js_IdToValue(id));
JSParseNode *pn1 = NULL, *pn2 = NULL, *pn3 = NULL;

JSMSG_BAD_URI, NULL);
MSG_DEF(JSMSG_NEED_DIET, 17, 1, JSEXN_INTERNALERR, "{0} too large")
* provisions of the GPL are applicable instead of those above.

op = CURRENT_TOKEN(ts).t_op;
if (xdr->mode == JSXDR_ENCODE) {

* Communications Corporation. Portions created by Netscape are

JS_RemoveArgumentFormatter(JSContext *cx, const char *format)

if (n <= 0)
goto out;

fprintf(stderr, "object 0x%p\n", jsobj);


CHECK_REQUEST(cx);

/* eps bounds the cumulative error. */

ReplaceData rdata;
y->wds*sizeof(Long) + 2*sizeof(int32))

if (JSVAL_IS_OBJECT(v)) {

(obj)->map->ops->getProperty(cx,obj,id,vp)
46, 15, 15, 15, 15, 15, 15, 15, /* 88 */
if (!argv[i]) {
* Purge cache only if prop is not about to be destroyed (since
(r).lo = (a); \

if (!str)

/*
* more than nb + arenasize.

p51 = p5->next = mult(p5,p5);


for(xc0 = c->x, xc = xc0 + wc; wc > 0 && !*--xc; --wc) ;
#define PR_HashTableRawLookup PL_HashTableRawLookup

* If the GC is running and we're called on another thread, wait for this
for (sn++; which; sn++, which--) {

JSUint32 r1, r0, m;


return JS_FALSE;
/*

int32 x;
if (!flagp)
return JS_TRUE;

* Contributor(s):
end = begin;

scope = js_GetMutableScope(cx, obj);

str_resolve1(JSContext *cx, JSObject *obj, JSString *str, jsint slot)


** Macro body brackets so that macros with compound statement definitions

JSStackHeader *sh;
"PR_GetError",
jsdouble local;
? 366 : 365)

if (locked)
js_LinkFunctionObject(JSContext *cx, JSFunction *fun, JSObject *funobj)
JSPropertyOp gsTable[1]; /* actually, gsTableLength ops */
js_DestroyScript(cx, script);

#include "jsdate.h"
}

}
#include <math.h>

return xdr->registry[id-1];
*
#define ARGC_LIMIT ((uint32)1 << 16)

return JS_TRUE;

grState.kidCount = kidCount;
}

#include <stdio.h>
date_toString(JSContext *cx, JSObject *obj, uintN argc, jsval *argv,
if (hook) {
c = n;

return JS_FALSE;

*/

goto error;

return obj;
s5 = 0;
array_addProperty, JS_PropertyStub, JS_PropertyStub, JS_PropertyStub,
return NULL;
return JS_FALSE;

case 'c':
case REGEXP_SOURCE:

JSObject *obj2, *oldproto;

#define JS_HAS_LABEL_STATEMENT 1 /* has break/continue to label: */


}

sprop->id = propid;

goto out;
#define STR2OFF(sp,str) ((str) - (sp)->base)

map->sharpgen = 0;

#ifdef ULLong
** JSLL_NEG Negation (two's compliment)

fp = cx->fp;
}
* Free and clear atom state (except for any interned string atoms).

}
JSMSG_IN_NOT_OBJECT,
cvtwidth += zerowidth;
++*s++;
* shift left if necessary so divisor has 4 leading 0 bits.
#include "jsutil.h" /* Added by JSIFY */

if (nclasses == 0) {

ts->lineno++;
}

chars = js_InflateString(cx, bytes, length);

return JS_TRUE;

*rval = STRING_TO_JSVAL(result);
}

int result;
{

#define SN_MAKE_XDELTA(sn,d) (*(sn) = (jssrcnote) \


* The Original Code is Mozilla Communicator client code, released
if (table) {
#define SN_3BYTE_OFFSET_FLAG 0x80
/*

#include "jsgc.h"

return NULL;

j = 0;

*
* Push a compiler frame if we have no frames, or if the top frame is a

40, 40, 40,


40, 40, 40, 40, 40, /* 59 */
argv[i] = JS_strdup(cx, POP_STR());
js_FileWrite(JSContext *cx, JSFile *file, jschar *buf, int32 len, int32 mode)

date_setYear(JSContext *cx, JSObject *obj, uintN argc,

(ops = obj->map->ops,
} else if (JSVAL_IS_INT(v)) {
return JS_TRUE;

rval = FETCH_OPND(i);
46, 46, 46, 46, 3, 3, 46, 46, /* 13 */
#ifndef jspubtd_h___

* TOK_DEFAULT node

#ifndef FALSE /* Mac standard is lower case false */


#include "jsatom.h"

#define JSVAL_TO_INT(v) ((jsint)(v) >> 1)

JSLL_L2I(upTimeSeconds, upTimeSecondsLong);

}
digit++;
} while (tmp);
* currently in the init expr of a for loop.

** need to stop when we hit 10 digits. In the signed case, we can

hadUnicodeEscape = JS_FALSE;
js_IdToValue(id), NULL);

* JS debugging API.
case 3:
* under the terms of the GPL and not to allow others to use your
jschar *dp;
const char *file[4]; /* file where lock was (re-)taken */
va_start(ap, format);

* For now, forcibly ignore the first (or any) argument and return toString().

* collect more source.


}
if (variance < 0 || nchains == 1)
#endif

}
int susp;
tp->t_op = JSOP_NOP;

fprintf(gOutFile, "%s %3u: RESTORE\n", sep, line2);

lval = POP_OPND();

* except in compliance with the License. You may obtain a copy of

#define JS_ALIGN_OF_INT64 2L
file->nbBytesInBuf++;

#define pn_count pn_u.list.count


const char *begin, const jschar *param, const char *end,
prevop == JSOP_DEFCONST) &&
#if !JS_HAS_EXCEPTIONS

if (op == JSOP_GETTER || op == JSOP_SETTER) {


* But we do need to copy uclinebuf, uctokenptr, because they're

if (!str)

tmp = prefix;

return js_AtomizeString(cx, JSVAL_TO_STRING(value), flags);


return JS_FALSE;
typedef struct JSStmtInfo JSStmtInfo;

** JS_END_MACRO
JS_NewRegExpObject(JSContext *cx, char *bytes, size_t length, uintN flags)

46, 46, 46, 46, 46, 46, 46, 46, /* 97 */

char *options = JS_strdup(cx, oldoptions);

regexp_static_props, NULL);
JS_PUBLIC_API(JSDHashEntryHdr *)

#if JS_HAS_GETTER_SETTER

if (sym->entry.value == sprop) \
todo = Sprint(&ss->sprinter, "%s%s%s",

JS_EvaluateUCScript(JSContext *cx, JSObject *obj,


/*
h = 0;

#if !defined XP_PC || !defined _MSC_VER || _MSC_VER > 800

static JSBool

JS_ASSERT(JS_IS_SCOPE_LOCKED(newscope));
* file under either the NPL or the GPL.

return JS_TRUE;
bd2 += j;

JSObject *file, *ctor, *afile;


}
JS_ASSERT(rt->requestCount > 0);

free(global_locks);

break;
JSString *str;

#define BYTECODE_SIZE(n) ((n) * sizeof(jsbytecode))

extern JS_PUBLIC_API(jsval)

#define JS_BITS_PER_INT_LOG2 5L

break;

jsval v;

*idp = nclasses;

#endif

JSScopeProperty *sprop;
rt->emptyString = NULL;
JSObject *obj2;
JS_ASSERT(sn && SN_TYPE(sn) == SRC_SWITCH);
(* CRT_CALL JSErrorReporter)(JSContext *cx, const char *message,
#ifdef DREAMWEAVER_JAVASCRIPT_PROFILING

if (delta)

}
{
map = obj->map;
*/
ULLong carry, y;
fprintf(fp, " number of deallocations: %u\n", stats->ndeallocs);

#define jsdate_h___
if (CURRENT_TOKEN(ts).t_op != JSOP_NOP) {
if (!rt->gcCallback(cx, JSGC_BEGIN) && !(gcflags & GC_LAST_CONTEXT))

#if !defined(XP_MAC) && !defined(_WIN32) && !defined(XP_OS2)

#include "jscompat.h"

/*
* If the object does not have a property by that name, *foundp will be
}
for (he = ht->buckets[i]; he; he = next) {

atom = js_GetAtom(cx, &jp->script->atomMap,


#endif

arg = JSVAL_TO_STRING(argv[i]);
switch (pn2->pn_type) {

*/
p = numBegin + minNDigits;

MUST_MATCH_TOKEN(TOK_LC, JSMSG_CURLY_BEFORE_SWITCH);
/* Find the end of this alternative's operand list. */

js_AddRoot(cx, &linestr, "error line buffer");

return 1;
} stats;

ALE_SET_NEXT(ale, al->list);

#define FAR
JS_SetRegExpInput(JSContext *cx, JSString *input, JSBool multiline);
start = *indexp;
/* Windows says sqrt(0.0) is "-1.#J" (?!) so we must test. */
if (!JS_AddArgumentFormatter(cx, "ZZ", ZZ_formatter))

* address from the actual address of these functions in the JS module.

*/

idstr = ATOM_TO_STRING(rt->atomState.ObjectAtom);

js_printf(JSPrinter *jp, const char *format, ...)

typedef uint8 jssrcnote;


/* Take the slow path if prop was not found in a native object. */

/* Gather the 53 significant bits (including the leading 1) */


/* Re: prhash.h->plhash.h */
pn3 = pn3->pn_head;

const jschar *cpbegin;

if (!JS_GetProperty(cx, obj, js_filename_str, &v) ||


if (defaultOffset == switchLength) {
* Alternatively, the contents of this file may be used under the

if (sprop) {

*rval = JSVAL_VOID;

return ATOM_TO_STRING(cx->runtime->atomState.booleanAtoms[b ? 1 : 0]);


typedef struct JSDHashEntryHdr JSDHashEntryHdr;

static JSBool

cp++;

JS_PUBLIC_API(void)
if (!JSDOUBLE_IS_FINITE(d) || d == 0) {
aadj1 += 0.5;
JS_PUBLIC_API(JSBool)

/* Get the cond, next, and loop-closing tail offsets. */

js_NewScriptFromCG(JSContext *cx, JSCodeGenerator *cg, JSFunction *fun);


default:
*/
} JSNativeIteratorState;
return "";

mapfun(kw->name);
{

/* if any arg is NaN, make a NaN date object

if (off2) {

EMIT_CATCH_GOTO(cx, cg, jmp);

#define JSPD_VARIABLE 0x20 /* local variable in function */


/*

* deleting the provisions above and replace them with the notice

XDRAtomMap(JSXDRState *xdr, JSAtomMap *map)

46, 46, 46, 46, 46, 80, 80, 46, /* 44 */

UngetChar(ts, '-');

#define JS_ALIGN_OF_FLOAT 4L

split->tm_sec = (int8) SecFromTime(timeval);


return remainder;

return JS_TRUE;

return JSVAL_VOID;
* March 31, 1998.
if (attrs & (JSPROP_GETTER | JSPROP_SETTER)) {

if (!js_ValueToBoolean(cx, *sp, va_arg(ap, JSBool *)))

return regexp_compile(cx, obj, argc, argv, rval);

pn3 = NULL;

*/

typedef struct JSFatLockTable {


#define JS_BUG_SET_ENUMERATE 0 /* o.p=q flags o.p JSPROP_ENUMERATE */

105, 106, 104, 104, 104, 104, 104, 46, /* 67 */


va_start(ap, errorNumber);
jsint

}
}
if (!clasp->addProperty(cx, obj, sprop->id, vp)) {
js_HashValue(jsval v)
} else {
}

if (n >= ATOM_INDEX_LIMIT) {

* WITHOUT WARRANTY OF ANY KIND, either express or implied. See the NPL

* Associate the current thread with the given context. This is done
if (bd0)
js_printf(jp, "\tswitch (%s) {\n", lval);
JSBool ok;
#include "jsstr.h"
} else {

JSString *str;

if (!gc_finalizers[GCX_OBJECT]) {
};

// - JavaScript 1.2 did this autmoatically, but the JavaScript 1.5 only
defines the

/*

JS_DumpArenaStats(FILE *fp);

return JS_FALSE;
cmp = cmp > 0 ? 1 : -1;

return JS_FALSE;
SkipChars(JSTokenStream *ts, intN n)

fprintf(gOutFile, "%-9s %-22s %s\n", "=======", "=====", "===========");


* Alternatively, the contents of this file may be used under the

jsid id;

JS_UNLOCK_SCOPE(cx, scope_); \

};

JS_ASSERT(!hep);
}

}
*
#include <sys/timeb.h>

EMIT_CHAINED_JUMP(cx, cg, stmtInfo.gosub, JSOP_GOSUB, jmp);

# endif
rt = cx->runtime;
}
ts->flags &= ~TSF_REGEXP;
** Stubs for default hash allocator ops.
40, 40, 40, 40, 40, 40, 40, 40, /* 45 */

#ifdef Sudden_Underflow
JS_FRIEND_API(JSBool)

JSCheckAccessOp checkAccess;
js_isDirectory(JSContext *cx, JSFile *file)

remainder--;
JSContext *iter, *acx;
/* if we got a 0 for 'date' (which is out of range)

return ok;

} else { \
char js_delete_str[] = "delete";

c = *++cp;

* JS boolean implementation.

* terms of the GNU Public License (the "GPL"), in which case the
state->parenCount = num;

line = 0;

ren2->flags = (kid->flags & (RENODE_ANCHORED | RENODE_NONEMPTY))

if (array[0] >= 0 && array[0] <= 99)


ULong *bx, *bxe, q, *sx, *sxe;
if (!EmitElemOp(cx, pn3, JSOP_ENUMELEM, cg))
* if appropriate.
if (!initialized) InitDtoa();

die "Can't open $outfile for writing" if !open(OUTFILE, ">$outfile");


if (--fp->sharpDepth == 0)

switchop = JSOP_TABLESWITCH;
nchars += vsharplength;

nslots = (intN)frame.nvars;

* entry. If JS_DHASH_ENTRY_IS_FREE(entry) is true, key was not found.

/* If there was a fatal error, keep returning TOK_ERROR. */

}
MSG_DEF(JSMSG_STACK_OVERFLOW, 24, 1, JSEXN_INTERNALERR, "stack overflow in
{0}")

signwidth = 1;

b = multadd(b, 10, 0);


JS_ArenaCountAllocation(pool, nb);

}
goto bad;
return count;
* This Original Code has been modified by IBM Corporation.
return js_HashString(JSVAL_TO_STRING(v));

len = dp - cp;

if (!str)
slot = GET_ARGNO(pc);
off = sp->offset;

*/
}

goto out;
return fp->argv && fp->fun ? JSVAL_TO_OBJECT(fp->argv[-2]) : NULL;

* except in compliance with the License. You may obtain a copy of

if (d <= (next += 31))


jmp = js_Emit3(cx, cg, JSOP_GOTO, 0, 0);

*/
{

#define Thin_GetWait(W) ((jsword)(W) & 0x1)


align_of_word;
extern JS_PUBLIC_API(void *)

ok = js_DefineProperty(cx, obj, id, val, \


typedef struct QSortArgs {

/* Fold b5 into b and m5 into mhi. */

* rights and limitations under the License.

ptrdiff_t update; /* loop update offset (top if none) */

{0}

else {

limit = (JSGCThing *) a->avail;


#include "jsstddef.h"

* rights and limitations under the License.

#define JS_BYTES_PER_WORD 4L

* Communications Corporation. Portions created by Netscape are

cp--;
fprintf(fp, "%08lx ", (long)thing);

static JSBool gSleepQEntryInstalled = JS_FALSE;

if ( (void*)src == (void*)dst )

}
if (!chars) {
#ifndef NSPR_LOCK

*/

if (!cx->fp->constructing) {
* with the old scheme.

* Alternatively, the contents of this file may be used under the

JS_free(cx, utfbuf);
static jsdouble msPerHour = SecondsPerHour * 1000.0;

*vp = INT_TO_JSVAL(pos);

uint32 len, limit;


JSLL_UI2L(us2ms, PRMJ_USEC_PER_MSEC);
if (report->filename)
$line =~ s/PR_REALLOC/realloc/g;

js_DoubleToECMAInt32(JSContext *cx, jsdouble d, int32 *ip);

const char* p;

*/

JS_free(cx, (void *)report->filename);

_negative ^= 1; \

if (type != SRC_FUNCDEF) {

if (!sp->base) {
printf("#define JS_BYTES_PER_DWORD %dL\n", sizeof_dword);

* Try to get an appropriate prototype by looking up the corresponding

#ifdef GC_MARK_DEBUG
if (MatchChar(ts, '!')) {

*/

* IS" basis, WITHOUT WARRANTY OF ANY KIND, either express oqr

js_printf(jp, "\tfor (%s%s", VarPrefix(sn), lval);

* (ii) fl->susp > 0

nbytes = sizeof *atom;

struct NumArgState* nas = NULL;


tn->catchStart = catchStart;
extern jsint

: (SPROP_GETTER(sprop,obj2) != JS_PropertyStub) \
JSFILEMSG_FIRST_ARGUMENT_MUST_BE_A_NUMBER, "read", argv[0]);

int flags, width, prec, radix, type;


* recognized as an operator, leaving it available to be parsed as

delta = offset - cg->lastNoteOffset;

* '\' octal An octal escape sequence (octal must be

JS_BEGIN_EXTERN_C
"PR_FinishArenaPool",
typedef enum JSSrcNoteType {

*
uintN i;

extern JSObjectMap *

extern JSBool

* so that we can walk back up the chain fixing up the final destination.

case 'f':

return JS_TRUE;
#if JS_HAS_INITIALIZERS || JS_HAS_TOSOURCE

* Copyright (C) 1998 Netscape Communications Corporation. All


*

JS_NOTIFY_REQUEST_DONE(rt);

#ifdef APSTUDIO_INVOKED

*/

return 0;
extern JSBool

if (!js_EmitTree(cx, cg, pn->pn_left))


CHECK_REQUEST(cx);
if (Sprint(&ss->sprinter, rval) < 0)

if (!fnamestr)

* License Version 1.1 (the "License"); you may not use this file

(_log2) += 16, (j_) >>= 16; \


x <<= 4;

* identified per MPL Section 3.3

#else
v = OBJ_GET_SLOT(cx, obj, JSSLOT_PRIVATE);
* IS" basis, WITHOUT WARRANTY OF ANY KIND, either express oqr
z = fd_exp(x);
*

fun = (JSFunction *) JS_GetPrivate(cx, obj);

#if JS_HAS_EXCEPTIONS

JS_PUBLIC_API(intN)
#define JS_BUG_AUTO_INDEX_PROPS 0 /* new object o: o.p = v sets o[0] */
JSContext *cx;
/*

* IS" basis, WITHOUT WARRANTY OF ANY KIND, either express oqr

goto bad_formal;
int (*stuff)(SprintfState *ss, const char *sp, JSUint32 len);
23, 24, 23, 24, 23, 24, 23, 24, /* 18 */
jsval line;

JS_TRUE, stdout);
JS_GetScriptTotalSize(JSContext *cx, JSScript *script);

#define CACHED_GET(call) \
FILE_REPLACE = -20,
static JSDContext *_jsdc;

caseExprOff = isCondSwitch

const char js_caller_str[] = "caller";

map->freeslot = slot;
"=",

case 'u':

} else

date_setMilliseconds(JSContext *cx, JSObject *obj, uintN argc,

if (ok) {
return EmitGoto(cx, cg, stmt, &stmt->breaks, label, SRC_BREAK2LABEL);

* general going-over.

JS_DropExceptionState(JSContext *cx, JSExceptionState *state);


/*

size = JS_BIT(table->sizeLog2);
MSG_DEF(JSMSG_BAD_LEFTSIDE_OF_ASS, 129, 0, JSEXN_SYNTAXERR, "invalid assignment
left-hand side")

if (!JSJ_SimpleInit(cx, glob, java_vm, getenv("CLASSPATH")))


static JSBool

ok = JS_FALSE;
* op = etor(table, entry, number, arg);
} else { \
while (last--) {
return JS_FALSE;

*--cvt = '0';
}
40, 40, 40, 40, 40, 40, 40, 40, /* 47 */
* Disassemblers, for debugging only.

if (cg->notes)

ReportError(cx, last, reportp);


case TOK_RELOP:
/* remainder in (n1 n0) */

#include "jslock.h"
}
ts->ungetbuf[ts->ungetpos++] = (jschar)c;
static int FuncStuff(SprintfState *ss, const char *sp, JSUint32 len)

* If scope->u.link is non-null, scope has already been inserted on


}
JSStmtInfo stmtInfo, *stmt, *stmt2;

break;
16, 20, 20, 20, 20, 20, 20, 20, /* 14 */
"PR_sxprintf",
/* Win9x gets confused at midnight
#define JS_CCODE(c) (js_A[js_Y[(js_X[(uint16)(c)>>6]<<6)|((c)&0x3F)]])

#include "jsxdrapi.h"
if (!date)

#define JS_GET_CLASS(cx,obj) JS_GetClass(cx, obj)


todo = Sprint(&ss->sprinter, "%s, %s", lval, rval);
wasted_effort = p51;

* TOK_EQOP binary pn_left: left-assoc EQ expr, pn_right: REL expr

/* Wrap a string value in a String object. */


goto bad;
void *userRef, const uintN errorNumber, ...)
}
intN depth;

#define PR_ArenaGrow PL_ArenaGrow


* This GC allocates only fixed-sized things big enough to contain two words

JSHashNumber hash;
number_constants[NC_POSITIVE_INFINITY].dval = u.d;
for (comp = strtok(path, ":"); comp; comp = strtok(NULL, ":")) {
extern JSFunction *
SET_BIT(slot, fp->overrides);
return &jsShell_ErrorFormatString[errorNumber];
guardstart)) {
sqsum += n * n;
if (cx->requestDepth)
switch (slot) {
math_pow(JSContext *cx, JSObject *obj, uintN argc, jsval *argv, jsval *rval)

{
JS_PUBLIC_API(void)
#include "jsstr.h"

JS_PUBLIC_API(void)
return JS_TRUE;

depth = (jsint) script->depth;

if (k > 0) {

break;

*/
{"gc", GC, 0},

do {

js_compare_atom_keys, js_compare_stub,

* file under either the NPL or the GPL.


/************************************************************************/
#else /* !JS_HAS_PROP_DELETE */

if (e >= 0) {

borrow = 0;

* Software distributed under the License is distributed on an "AS


atom = NULL;
b->x[wds++] = (ULong)carry;

* Same drill as above, in js_GetSlotThreadSafe. Note that we cannot

#endif /* jsdtoa_h___ */

*rval = OBJECT_TO_JSVAL(nobj);

}
uintN argc, jsval *argv, jsval *rval)

void *userRef, const uintN errorNumber, ...);

* provisions of the GPL are applicable instead of those above.


56, 56, 56, 56, 56, 56, 56, 56, /* 0x6E00 */

/*
* rights and limitations under the License.
if (scope->ownercx && ClaimScope(scope, cx)) {
return JS_FALSE;
#include "jsinterp.h"

js_AtomizeBoolean(JSContext *cx, JSBool b, uintN flags)


*/
return NULL;

double mean, variance, sigma;

pn2->pn_op = JSOP_GETPROP;

CG_LIMIT(cg) = base + length;

}
JSBool matched;
if (off <= defaultOffset && defaultOffset < off2) {
# define JS_IMPORT_DATA(__x) __x
ok = JS_FALSE;
* coincides with the end of a line.
vsharplength = 0;

/*
ok = (j != -2);

/*
}

extern JS_PUBLIC_API(void)

do {
}

ok = JS_FALSE;
jsuword mask; /* alignment mask (power-of-2 - 1) */
}
"PR_DequeueEvent",

#define Avoid_Underflow

/* Either obj needs a new empty scope, or it should share pobj's. */

noteIndex = js_NewSrcNote2(cx, cg, SRC_PCDELTA, 0);

40, 40, 40, 40, 40, 40, 40, 40, /* 106 */

}
#endif

JS_free(cx, (void *)report.ucmessage);


date = date_constructor(cx, obj);
METER(rt->gcStats.afree++);
** Bit masking macros. XXX n must be <= 31 to be portable
break;

* b JSBool Boolean
expandedTime.tm_sec));
#include "jsgc.h"
{
#include "jsatom.h"
tn->start, tn->start + tn->length, tn->catchStart);
op = JSOP_GETPROP;
* IS" basis, WITHOUT WARRANTY OF ANY KIND, either express oqr
(uintN)indent);

version = JSVERSION_DEFAULT;

* etc., entry points.

}
ok = call; \
*/
fl_list_table[i].free = ListOfFatlocks(l);

key = ATOM_KEY(atom);
}

}
return JSOP_LIMIT;

ok &= JS_SetPrivate(cx, callobj, NULL);


char *buffer; /* The output string */
jssrcnote *sn;

goto badstr;
PN_MOVE_NODE(pn, pn2);
return JS_FALSE;

static void
0, /* SRC_NEWLINE */

JSStackFrame *fp;
* Alternatively, the contents of this file may be used under the
* getMonth (getUTCMonth)

!JSVAL_IS_STRING(pn3->pn_val) &&

date = date_constructor(cx, obj);


* Contributor(s):
if (!argv[i] ||

/*

static uint32
if (prop)
fputc('\n', gErrFile);
goto error;

/*

* JS symbol tables.
*date = UTC(local);

prtm->tm_usec = 0L;
*

static char js_lineno_str[] = "lineNumber";

cx->newborn[GCX_OBJECT] = NULL;

11, 11, 11, 11, 11, 11, 11, 46, /* 11 */


uint32 digit;
*tryp = NULL;
{js_InitMathClass, ATOM_OFFSET(Math)},
ok = call; \
* wins when jsemit.c's LookupArgOrVar can optimize a JSOP_NAME into a

args_enumerate(JSContext *cx, JSObject *obj)


name = number,

if (!OBJ_GET_PROPERTY(cx, obj, id, rval))

return NULL;

void *closure)

JS_DHashTableOperate(JSDHashTable *table, const void *key, JSDHashOperator op)

jsuint length, begin, end, slot;


return NULL;
case JSOP_INITCATCHVAR:

*
jsid id;
attrs ? JSVAL_VOID : OBJECT_TO_JSVAL(obj),
goto bad;
do b = multadd(b, 10, *s++ - '0');

*closurep = rt->interruptHandlerData;
* The Original Code is Mozilla Communicator client code, released
case JSOP_INCNAME:
{
#ifdef JS_GCMETER
* rights and limitations under the License.

void *data; /* private data specific to ops */

return JS_FALSE;

js_CodeSpec[lastop].token, rval);
cp2 = matchRENodes(state, ren->next,

uint32 alloc; /* number of allocation attempts */


if (!JSVERSION_IS_ECMA(cx->version))

qa.elsize = elsize;

if (scope->object == obj) {
fprintf(fp, " [%ld]\n", (long)JSVAL_TO_INT(sym_id(sym)));

*
return JS_FALSE;
break;

uint32 searches; /* total number of table searches */

ida = js_NewIdArray(cx, 0);


40, 40, 40, 40, 40, 40, 40, 40, /* 95 */
/*
}
}

SprintfState ss;

*/
}
JS_GetStringBytes(JS_ValueToString(cx, id)));

if (rt->setSlotLock)
keyHash = HASH_BOOLEAN(b);
#include "jsnum.h"
}
c = (jschar)num;
}

JS_GetFrameObject(JSContext *cx, JSStackFrame *fp);

case TYPE_STRING: (void)va_arg( ap, char* ); break;

estr = istr + 8;

inrange = JS_FALSE;
#endif

return 1;

if( (ss.cur != ss.base) && (*(ss.cur - 1) != '\0') )


PRDir *dir;

obj2 = JSVAL_TO_OBJECT(argv[0]);

if (js_Emit1(cx, cg, JSOP_GROUP) < 0)


else if (SN_TYPE(sn) == SRC_CONST)
js_PopStatement(tc);
#include "jsapi.h"

JSStackFrame *fp;

* From java.lang.Character.java:
case JSOP_SETNAME:
scope = OBJ_SCOPE(obj);

*x1++ = *x++;
break;

/*

return id;

*/
return 1;
JS_ReportWarning(cx, "Unsupported file type %d, proceeding",
* define useless code as code with no side effects, because the main effect,
/*

#define TYPE_UINT64 7

23, 24, 23, 24, 23, 24, 23, 24, /* 5 */

const char *filename, uintN lineno);

const jschar *substr;

*
return JS_FALSE;

* The flags field of the JSErrorReport will have the JSREPORT_EXCEPTION flag

* generating pcs, as they're not needed for the current use of

JS_SetExecuteHook(JSRuntime *rt, JSInterpreterHook hook, void *closure);

/* Thread-safe functions and wrapper macros for accessing obj->slots. */


js_LookupProperty(JSContext *cx, JSObject *obj, jsid id, JSObject **objp,
argc++;

keyHash = HASH_INT(i);
}

static JSBool

obj = js_NewObject(cx, &js_ScriptClass, NULL, NULL);


capacity = size << 1;

if (signwidth) {

jschar *str, size_t length,


str = js_NewString(cx, js, n, 0);
{
**** Start of jsregexp.c ****

{
capacity = JS_BIT(log2);
* The Original Code is Mozilla Communicator client code, released
*

its_addProperty(JSContext *cx, JSObject *obj, jsval id, jsval *vp)

*lp = JSXDR_SWAB32(*lp);

JSAtom *atom;
MSG_DEF(JSMSG_CURLY_BEFORE_SWITCH, 82, 0, JSEXN_SYNTAXERR, "missing { before
switch body")
#define MSG_DEF(name, number, count, exception, format) \

*/
jsbytecode *
JS_UNLOCK_OBJ(cx, obj);

return d - step;
#define JS_BUG_NULL_INDEX_PROPS 1 /* o[0] defaults to null, not void */
* The error in the first-order Taylor series approximation
JS_BEGIN_EXTERN_C

void

break;

DTOSTR_FIXED, /* Round to <precision> digits after the decimal


point; exponential if number is large */

break;
fprintf(gOutFile, " initial value %s\n",
case 'p':

/*

ok = OBJ_GET_PROPERTY(cx, obj, id, &val);

rt->state = JSRTS_LANDING;

};
#endif

JS_WAIT_CONDVAR(rt->stateChange, JS_NO_TIMEOUT);
ShowHelpForCommand(i);

23, 24, 23, 24, 23, 24, 23, 24, /* 5 */


} else if (ltmp == JSVAL_DOUBLE) { \

JS_ARENA_ALLOCATE_CAST(base, jschar *, &cx->tempPool,


{"parent", FILE_PARENT, JSPROP_ENUMERATE | JSPROP_READONLY },

if (match) { \

#define FIVE_OCTET_MASK 0x03 /* 00000011 */

{
#endif

static JS_INLINE int

/* Get an immediate atom naming the property. */

js_RemoveRoot(JSRuntime *rt, void *rp);


0, /* SRC_RESERVED0 */

static int32
goto out;

(hasDefault = (pn2->pn_head->pn_type == TOK_DEFAULT)))) {

* pn_kid3: update expr after second ';'


JS_ASSERT(file->path != NULL);
JSFunction *fun = NULL;

case JSOP_SETARG:

ren = ren->next;
JS_PUBLIC_API(void)

CompareArgs ca;
} else {
extern JS_FRIEND_API(jsval *)

} while (JS7_ISDEC(c));

}
if (rt->newScriptHook) {
#define fd_atan atan
#define BYTE_MASK 0xBF

* in that base, regardless of how large it is, because there is no exponential


notation for non-base-ten

* Rights Reserved.

* The Original Code is Mozilla Communicator client code, released


{"__callee__", CALL_CALLEE, 0,0,0},
JS_SetGlobalObject(JSContext *cx, JSObject *obj);

#include "jsarena.h" /* Added by JSIFY */


#include "jstypes.h"
goto out;
* All *Error constructors share the same JSClass, ExceptionClass. But each
#endif
* the appropriately numbered parameter, which we can then print.

ptrdiff_t offset, length;

int32 count;
case 'b':

CHECK_AND_SET_JUMP_OFFSET_AT(cx, cg, beq);

40, 40, 40, 40, 40, 40, 40, 40, /* 56 */

} u;
c->wds = 1;
*/
extern const char js_NaN_str[];

JS_END_MACRO
carry = z >> 32;

}
break;

* and made ECMA-compliant. (Incomplete escapes are interpreted as literal

#include "jsstr.h"

ok = JS_TRUE;

skip[i] = (uint8)patlen;
jsdouble factor = 2.0;
#define PR_COUNT_ARENA PL_COUNT_ARENA

off = -1;

high = JSVAL_INT_MIN;

}
JS_SetSourceHandler(JSRuntime *rt, JSSourceHandler handler, void *closure)

* except in compliance with the License. You may obtain a copy of

if (!JS_InitClass(cx, obj, NULL, &js_WithClass, With, 0,


switch(mode) {

* requires that the GC ran (e.g., from a branch callback) during

*/
56, 56, 56, 56, 56, 56, 56, 56, /* 0x8400 */

a.tm_yday = prtm->tm_yday;
fp = cx->fp;
if (!scopeobj)
for (i = 0; i < argc; i++) {

}else{
} else {

* License Version 1.1 (the "License"); you may not use this file

JS_ASSERT((uint32)i < tablen);

* getHours (getUTCHours)

char *entryStore, *newEntryStore, *entryAddr;


* under the terms of the GPL and not to allow others to use your
parseMinimalFlag :
while (--precwidth >= 0) {

memset(&report, 0, sizeof (struct JSErrorReport));

#define STDOUTPUT_NAME "Standard output stream"


iter = iter->pn_kid2;

attrs = fun->flags & (JSFUN_GETTER | JSFUN_SETTER);


/* These are used for debugging -- see jsprvtd.h and jsdbgapi.h. */

extern ptrdiff_t
* under the terms of the GPL and not to allow others to use your

foldc = JS_TOLOWER(foldc);
length = (length <= BYTECODE_GRAIN)
JSREPORT_WARNING |

if (!path)

return;
JS_UNLOCK_RUNTIME(rt);
pc2 += ATOM_INDEX_LEN;
{
#define JS_EXPORT_DATA(__type) __type

return JS_FALSE;
FwEnumDestroyer = destroyer;
JSPRINCIPALS_DROP(cx, ts->principals);
* shrunk, or at least freeslot may have shrunk due to the delete

return JS_FALSE;

ok = JS_TRUE;
if (len == 0) {

JSObject *obj2;

METER(table->stats.misses++);
/* The Y table has 7808 entries for a total of 7808 bytes. */
}
* follow the rules when doing so. See dw_js_notes.txt for details.
* Special case: if sep is the empty string, split str into one character

* with statement bodies are handled at runtime, by script prolog

static JSFunctionSpec array_methods[] = {


} else if (c == 'u') {
#define PCE_STORE(cache, pce, entry) (*(pce) = (entry))

#if JS_HAS_SHARP_VARS

fprintf(gOutFile, "%s\n", JS_GetStringBytes(str));

return IndexToValue(cx, length, rval);

return NULL;
"PR_NewSegment",

JSBool ok;
*
JSHashEntry *he, **hep, **hep0;
JS_ReportErrorNumber(cx, js_GetErrorMessage, NULL,
jsval *argv, jsval *rval);
MinFromTime(local),

(n > 0 && report->linebuf[n-1] == '\n') ? "" : "\n",

JSBool neg;
? JS_GetStringBytes(ATOM_TO_STRING(fun->atom))
#endif

#define JS_IS_RUNTIME_LOCKED(rt) js_IsRuntimeLocked(rt)

* the error number. If there is, then create an appropriate exception object,
#include "jsstddef.h"
if (!JSVAL_IS_INT(id)) { \
/*
if ((t = a >> 2) != 0)
* If you wish to allow use of your version of this file only
leftlen = cx->regExpStatics.leftContext.length;
source = (jschar*) ren->kid;

}
atom = (JSAtom *)he;

JSBool
memset(newEntryStore, 0, nbytes);

"v %s, re %g, im %g\n",


*/
JS_ReportErrorNumber(cx, JSFile_GetErrorMessage, NULL,

#ifdef JS_THREADSAFE
# include <sys/types.h>

#include "jsatom.h"

#define PRArena PLArena

if (width > cvtwidth) {

"PR_DELETE",
return script->principals;

MinFromTime(local),

{"length", FILE_LENGTH, JSPROP_ENUMERATE | JSPROP_READONLY },


s5 = k;
* "tops-of-stack" space above their codeMark, noteMark, and tempMark points.

#define JS_BYTES_PER_INT 2L

reportp->messageArgs[i] = va_arg(ap, jschar *);

if (JSVAL_IS_FUNCTION(cx, v)) {

#undef LOCAL_ASSERT
return JS_TRUE;
}
/* subtract a year from tsecs */
return;
/* If Infinity, -Infinity, or NaN, return the string regardless of the mode. */
JSMSG_CANT_CONVERT_TO,
return newp;
* "uniformly" distributed input, the probability is
} else if (n >= 70 ||

jsbytecode *pc, *end;


JS_ASSERT(sizeof(jsatomid) * JS_BITS_PER_BYTE >= ATOM_INDEX_LIMIT_LOG2 + 1);
return NULL;

JSObject *obj;
JSMSG_MORE_ARGS_NEEDED,

callerScopeChain = caller->scopeChain;

static uint32

SN_TYPE(sn) == SRC_ASSIGNOP) {

uintN i;
uint8 op; /* packed r.e. op bytecode */
for (todop = &rt->scopeSharingTodo; *todop != scope;
}
i = JSVAL_TO_INT(id);

n2 = n1 >> rsh;

if (lastKid) {

const char *file;


*/

(*lval == 'O') ? '{' : '[');

METER(table->stats.searches++);

cond = COMPARE_DOUBLES(d, OP, d2, IFNAN); \


}
str = js_ValueToSource(cx, ATOM_KEY(atom));

JSDebugErrorHook hook = cx->runtime->debugErrorHook;

return scope->ownercx ||
* function.

#define JS_BUG_WITH_CLOSURE 1 /* with(o)function f(){} sets o.f */

if (top >= ss->printer->script->depth) {

* NB: the js_SrcNoteName and js_SrcNoteArity arrays in jsemit.c are indexed


}

/* Sample a la java.lang.String.hash(). */

JSUint32 r = 32;

"PR_BITS_PER_DOUBLE",
js_MarkGCThing(JSContext *cx, void *thing, void *arg);

#define JSSLOT_START 3

JSProperty *prop;
{
MSG_DEF(JSMSG_TOUGH_BREAK, 122, 0, JSEXN_SYNTAXERR, "invalid break")

}
lval, ATOM_BYTES(atom),
id == ATOM_KEY(cx->runtime->atomState.callerAtom) ||

* Copyright 1996 Netscape Communications Corporation, All Rights Reserved.


*rval = JSVAL_VOID;
break;
}
break;
* Copyright 1996 Netscape Communications Corporation, All Rights Reserved.

*/
next = prev;

23, 24, 23, 24, 23, 24, 23, 24, /* 8 */


va_list ap;

#define InLeapYear(t) (JSBool) (DaysInYear(YearFromTime(t)) == 366)

fp->scopeChain = withobj;

* and other provisions required by the GPL. If you do not delete

k = a->k;

"prclist_h___",

jsint remainder;

#define JSLL_D2L(l, d) { \
result[1] = ':';
math_log(JSContext *cx, JSObject *obj, uintN argc, jsval *argv, jsval *rval)
else
JSBool

"PR_NewHashTable",

* deleting the provisions above and replace them with the notice

pn2 = pn->pn_head;

*/

46, 46, 46, 46, 46, 46, 46, 46, /* 68 */


{JSVERSION_UNKNOWN, NULL}, /* must be last, NULL is sentinel */

#include "jsscope.h"
59, 40, 40, 40, 40, 40, 40, 40, /* 119 */
if (year >= 0)
40, 40, 40, 40, 40, 40, 40, 40, /* 117 */

if (sprop->slot == slot) {
*/

len = 0;
JSREPORT_WARNING | JSREPORT_STRICT,

*markp = NULL;

*
JSString *str = JS_NewStringCopyZ(cx, argv[i++]);

* This code is complicated by the need to handle duplicate parameter

pn->pn_op = JSOP_NOP;
#endif

MEM_NEED(xdr, offset - MEM_COUNT(xdr));


ovfl:

if (rt->rtLock)

#include "jsnum.h"

* The caller must prevent the GC from running while this function is active,

* Also shift y to the right past these 0 through 32 zeros so that y's
};

JS_UNLOCK_OBJ(cx, obj);
* the License at http://www.mozilla.org/NPL/
jsval *rval)
}

RETURN((JSTokenType)c);
ok = js_InitAtomMap(cx, map, &al);

jsval exception; /* most-recently-thrown exceptin */

*
56, 56, 56, 56, 56, 56, 56, 56, /* 0xB400 */

#include "jsobj.h"
}

** MACROS: JSLL_<relational operators>

* The Original Code is Mozilla Communicator client code, released


ok = OBJ_DEFINE_PROPERTY(cx, fp->varobj, (jsid)fun->atom,
} else {
if (!str)
} else {
CALL_ARGUMENTS = -1, /* predefined arguments local variable */
/*
static uint32 deflated_string_cache_bytes;

"PR_CeilingLog2",

46, 46, 46, 46, 46, 46, 46, 46, /* 28 */


prtm->tm_mon = (JSInt8)month;

for (tn = tnotes; tn->catchStart; tn++)

* Contributor(s):

JSParseNode *pn;

#include "jsopcode.h"
*
* global) scope, not inside a with or other compound statement in
if (JSDOUBLE_IS_INT(d, i) && INT_FITS_IN_JSVAL(i)) {
* the License at http://www.mozilla.org/NPL/
* provisions of the GPL are applicable instead of those above.
OPDEF(JSOP_FORVAR, 11, "forvar", NULL, 3, 0, 1, 0, JOF_QVAR|
JOF_NAME|JOF_SET)

static JSBool

chars[nchars++] = ':';

#ifdef DEBUG

#include "jsscript.h"

b2 = 0;

* before calling js_Interpret and cleanup afterwards. The GC walks

return JS_FALSE;

NULL, NULL,

{
}

JSMSG_DEPRECATED_USAGE,
hash = js_HashValue(id);
cp += REOP_FLATLEN_MAX;
realloc((ochars = chars), (nchars + 2 + 1) * sizeof(jschar));
#endif
return JS_TRUE;

he = js_EnterSharpObject(cx, obj, NULL, &chars);


break;
JSStackFrame *fp;
0x33970002, /* 48 Ll, hasUpper (subtract 206), identifier start */

PN_APPEND(pn, pn2);

JSStackFrame *fp;
}
typedef struct Sprinter {

JS_ReportErrorNumber(cx, js_GetErrorMessage, NULL, JSMSG_BAD_TYPE,

#define JS_NEW_CONDVAR(l) PR_NewCondVar(l)


* The JSErrorReport * that the error reporter is called with is currently

js_HasLengthProperty(JSContext *cx, JSObject *obj, jsuint *lengthp);


if (argc == 0) {
/*
JSObjectOp init;

jsbytecode *next = CG_NEXT(cg);

* The caller should initialize *answer to false and invoke this function on
}

#include "jsemit.h"
{

ptrdiff_t end, ptrdiff_t catchStart)


case JSTRAP_THROW:

#error JSOP_LIMIT must be <= JSOP_GETPROP2


*/
*decpt = 9999;
break;

call_enumerate, (JSResolveOp)call_resolve,
return js_NewNumberValue(cx, result, rval);

JSLL_I2L(rt->rngAddend, 0xBL);
p = numEnd;

if(file->isPipe){

{ "readAll", file_readAll, 0},


switch(c) {
{ JSEXN_ERR, js_RangeError_str, RangeError },

* rights and limitations under the License.


JS_XDRMemSetData(JSXDRState *xdr, void *data, uint32 len)

* Copyright (C) 1998 Netscape Communications Corporation. All

87, 87, 87, 87, 87, 87, 87, 87, /* 63 */


JS_EndRequest(JSContext *cx);

jsval *rval);

#endif

char *numStr = JS_dtostr(buf, sizeof buf, DTOSTR_STANDARD,


ELEMENT_OP(-1, ok = OBJ_DELETE_PROPERTY(cx, obj, id, &rval));

78, 78, 85, 85, 85, 85, 85, 85, /* 51 */


rval = ATOM_KEY(atom); \

#include "jsprf.h"
return JS_TRUE;
if (its_noisy)
if (!js_CompareAndSwap(&tl->owner, o, 0)) /* release it */
} while (n);
}

* the one passed to us.

fprintf(fp, " adds that found an entry: %u\n", table->stats.addHits);


JS_PUBLIC_API(void)

return JS_TRUE;
case 0:
#define fd_acos acos
{

todo = -2;
return NULL;

const jschar *chars, uintN length,


}
/* -*- Mode: C; tab-width: 8; indent-tabs-mode: nil; c-basic-offset: 4 -*-
UpdateDepth(cx, cg, offset);
n = str->length;

if (js_Emit1(cx, cg, JSOP_PUSHOBJ) < 0 ||

} else {

}
* that will round to d?
#define JS_IS_SCOPE_LOCKED(scope) js_IsScopeLocked(scope)
j = cmp(b, S);
/* Push void to initialize local variables. */
JS_ASSERT(oldscope->ownercx == cx);

if (argc == 0) {
cp++;

*/

/*
repstr = js_ValueToString(cx, rval);

* XXX ill-defined: null return here means error was reported, unlike a
default: {

* regexp: altern A regular expression is one or more

bx = b->x;

JSTreeContext *tc)

return;

JS_END_MACRO

if ((jsuint)i < (jsuint)(high - low + 1)) {


ok = JS_FALSE;
break;

if (acx->throwing && JSVAL_IS_GCTHING(acx->exception))


JS_DHashTableDestroy(JSDHashTable *table);
struct SprintfStateStr {
JSObject **objp, JSProperty **propp
return tagify_value(cx, obj, argv, "FONT COLOR", "FONT", rval);

!re && *sep->chars == ' ' && sep->chars[1] == 0) {

vp = STRING_TO_JSVAL(JS_NewStringCopyZ(cx, separator));

JSIdArray *ida;

z = x;

/*

return JS_FALSE;

return (PR_Access(file->path, PR_ACCESS_READ_OK)==PR_SUCCESS);

minNDigits = decPt + precision;

if (MatchChar(ts, 'g'))

bd2 = bd5 = e;
intN nuses;

static JSParseNode *

* Sprintf, but with unlimited and automatically allocated buffering.


#define JS_BUG_FALLIBLE_TONUM 0 /* fallible ValueToNumber primitive */
} JSGCStats;
#ifdef XP_PC

borrow = y >> 32 & 1UL;


OPDEF(JSOP_GETELEM, 55, "getelem", NULL, 1, 2, 1, 11, JOF_BYTE |
JOF_ELEM)

break;
PRDirEntry *entry;
if (!js_ValueToNumber(cx, argv[0], &year))

#define JSPRINCIPALS_DROP(cx, principals) \


return NULL;
JS_PUBLIC_API(JSFunction *)
js_qsort(table, (size_t)j, sizeof *table, CompareOffsets,

/*
#endif /* DEBUG */
if (JSVAL_IS_STRING(key)) {

/*
* Check that obj is an object of class Date, and get the date value.

SAVE_SP(fp);

** 64 bit values. The only guaranteed portability requires the use of


#include "jsutil.h" /* Added by JSIFY */
* Compute the 'this' parameter and store it in frame as frame.thisp.
if (fun) {

int32 k;
JSObject *obj2;

* try nodes are ternary.


* With 'for(x[i]...)', there's only the object on the stack,

cx->regExpStatics.sub.chars, \

/* Store the current sp in frame before calling fun. */


* terms of the GNU Public License (the "GPL"), in which case the
#define MSG_DEF(name, number, count, exception, format) \

message = NULL;

#include "jsobj.h"
if (slot < fp->argc)
#define JS_COUNT_ARENA(pool,op) ((pool)->stats.narenas op)
* Try even less frequently used names delegated from the global
"prbit_h___",

return hep0;
wp->sprop));
#define JS_HAS_SEQUENCE_OPS 1 /* has array.slice, string.concat */

(JSProperty *)sprop);
JSString *str1;
if (d < 0)

{
*

JS_ArenaFinish(void);
JS_DHashClearEntryStub(JSDHashTable *table, JSDHashEntryHdr *entry)

* stored in *propp. If successful but id was not found, return true with both
if (!JS_DefineProperty(cx, protos[0], js_lineno_str,

js_NewSrcNote3(JSContext *cx, JSCodeGenerator *cg, JSSrcNoteType type,


return 0;

default:
}
if (ncases == 0 ||
for (i = 0; i < len; i++)

result = JS_TRUE;

{
case '5':

pc2 = pc;

tagbuf = (jschar *) JS_malloc(cx, (taglen + 1) * sizeof(jschar));

JS_snprintf(buf, sizeof buf, "%s ", kw);

* the lock is notified. If other threads still are waiting, the wait bit is
}

v->next = freelist[v->k];

sh = cx->stackHeaders;

15, 15, 15, 15, 46, 46, 46, 46, /* 99 */

/*

* Use system provided math routines.


id = (jsid)atom;

* Save the rightContext from the current regexp, since it


JSSubString saveRightContext = cx->regExpStatics.rightContext;

#define _LIBMATH_H

if (!isFunction) {

15, 15, 15, 46, 46, 46, 15, 46, /* 88 */

* might have been left to the operator."

MSG_DEF(JSMSG_CURLY_BEFORE_TRY, 89, 0, JSEXN_SYNTAXERR, "missing { before


try block")
/* Fixup the jump around the else part. */

rt = cx->runtime;

}
#include "jsparse.h"
if (lockbits == 0) {
const char js_Number_str[] = "Number";
js_SetProtoOrParent(JSContext *cx, JSObject *obj, uint32 slot, JSObject *pobj)
{

*bp = JS_TRUE;
frame.argv = sp - argc;

case JSOP_IN:

cn = 0;

if (!word1(d) && !(word0(d) & Bndry_mask)


if (!dStr) {

(static_fs && !JS_DefineFunctions(cx, ctor, static_fs))) {

16, 16, 16, 16, 16, 16, 16, 16, /* 9 */

round_9_up:

rval = OBJ_GET_SLOT(cx, withobj, JSSLOT_PARENT);

extern JS_PUBLIC_API(JSXDRState *)
#if defined JS_THREADSAFE && defined DEBUG

/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 2 -*- */

#ifdef DEBUG
/*
#include "jslong.h"
JSOp op;
word0(eps) -= (P-1)*Exp_msk1;
* Compute delta from the last annotated bytecode's offset. If it's too
saveop = JSOP_GETELEM;
JS_PUBLIC_API(JSUint32) JS_sxprintf(JSStuffFunc func, void *arg,

if (len > REOP_FLATLEN_MAX) {

/* Fill out the report, but don't do anything that requires an allocation. */
str = JSVAL_TO_STRING(v);
if (!fun)
#include "jsscope.h"
static JSBool

startupTimeSeconds;
if (!obj)
#else

int c = -1;

return JS_TRUE;
** Fill into the buffer using the data in src
JSMSG_CYCLIC_VALUE, object_props[slot].name);
#endif

JSBool seenDefault = JS_FALSE;

date_getDay(JSContext *cx, JSObject *obj, uintN argc, jsval *argv, jsval *rval)

break;

if (!ok)

if (!p5s) {
static void

#ifdef Avoid_Underflow

if (JSVAL_IS_OBJECT(*vp)){

#ifdef XP_OS2_VACPP
JS_GetPrivate(JSContext *cx, JSObject *obj);

js_InitObjectClass(JSContext *cx, JSObject *obj)


extern JS_PUBLIC_API(uintN)
JSLL_SUB(s, s, win2un);

}
#define JSRESOLVE_QUALIFIED 0x01 /* resolve a qualified property id */

* 1, 2, 3, 5, 6, 7 may continue a JS identifier


goto out;
he = JS_HashTableRawAdd(table, hep, hash, obj, NULL);
* From (n1 >= b.hi)
nb = (sp->offset + len + 1) - sp->size;
if (Sprint(sp, "%c", (char)quote) < 0)

JSBool

switch(c = *++s) {

JS_ASSERT(0);
/* -*- Mode: C; tab-width: 8; indent-tabs-mode: nil; c-basic-offset: 4 -*-
/*

return cache;

expandedTime.tm_min,

* 1.2 days based on JS_AliasProperty -- I haven't checked with Jeff, but


if (c == '.') {

OPDEF(JSOP_RETURN, 5, "return", NULL, 1, 1, 0, 0, JOF_BYTE)


*sp = NULL;

if (scope == rt->setSlotScope) {
MUST_MATCH_TOKEN(TOK_LP, JSMSG_PAREN_BEFORE_COND);

{
return NULL;

/*

40, 40, 46, 46, 46, 46, 60, 60, /* 41 */

JSAtom *
*bp = b;

* image C string containing "image" for pretty-printer, null if ugly


pagep += GC_PAGE_SIZE;
0x00070002, /* 16 Ll, identifier start */

{"protected", TOK_RESERVED, JSOP_NOP, JSVERSION_DEFAULT},

jsval *rp = (jsval *)he->key;


regexp_finalize(JSContext *cx, JSObject *obj)
jsval *argv;
40, 40, 40, 40, 40, 40, 40, 40, /* 56 */

JSAtom *atom;

* Contributor(s):
JSTYPE_STRING, /* string */

ts->flags &= ~TSF_CRFLAG;

out:

if (!ok)

* Release cx->codePool, cx->notePool, and cx->tempPool to marks set by

}
(OBJ_CHECK_SLOT(obj, slot), (obj)->slots[slot] = (value))

if (chainLen > maxChainLen) {

SET_OBJ_INFO(obj, file, line);

}
if (!js_LookupProperty(cx, obj, symid, &pobj, (JSProperty **)&sprop))
int sign; /* Nonzero if the sign bit was set in d */
JS_PUBLIC_API(JSBool)
#include "jsarena.h" /* Added by JSIFY */

if (fmtData != NULL) {
#define JS_HAS_REPLACE_LAMBDA 1 /* has string.replace(re, lambda) */

js_hash_scope_lookup,

#define DOUBLE_TO_JSVAL(dp) JSVAL_SETTAG((jsval)(dp), JSVAL_DOUBLE)

// > I found that I needed to change the base implementation of Array, so


that I
&rval)) {
}
}

if (js_CheckRedeclaration(cx, parent, (jsid)funAtom, attrs,


&cond))

JSENUMERATE_DESTROY /* Destroy iterator state */

JS_GetStringBytes(str))) {
*/

ULong *bp;

return js_AtomizeHashedKey(cx, key, keyHash, flags);


JSBool ok;
#ifdef Avoid_Underflow
}
a.tm_year = prtm->tm_year - 1900;
**** End of jsparse.h ****

else

JSBool

argv[0] = STRING_TO_JSVAL(str);
}

**** Start of jsgc.h ****


}
0, };

}
extern JS_PUBLIC_API(void)

#else /* !JS_THREADSAFE */

if (!str) {

static JSBool

extern const char js_propertyIsEnumerable_str[];


va_end(ap);
* The contents of this file are subject to the Netscape Public

*/
return JS_FALSE;
/* No locking required, cx is thread-private and input must be live. */

JS_LOCK_GC(rt);
* lucky, and the arena payload starts on a 0 mod 1024 byte boundary, no need

uint32 freeslot; /* index of next free obj->slots element */


if (b2 > 0)

if (c == c2)
* differently: the 32 bit words are in little endian byte order, the two words
}
if (!matched) {

Security mechanism, should define a callback for this.

sym->next = NULL; \
case JSOP_NOP:

if (!JS_InstanceOf(cx, obj, &boolean_class, argv))


/* Suppress newlines (must be once per format, at the end) if not pretty. */

}
** INPUTS: pointer to previously allocated object

return date_makeDate(cx, obj, argc, argv, 2, JS_TRUE, rval);

break;

break;
}

ok = OBJ_GET_ATTRIBUTES(cx, obj, id, prop, &attrs);

*va_arg(ap, JSString **) = str;


if (file->charBufferUsed) {

{
* March 31, 1998.

* are not local args or vars (TCF_FUN_USES_NONLOCALS), then our

if (op == JSOP_LIMIT)
printf(" [%s]\n", cstr);
m2 += i;
JSArenaPool *pool;

return JS_FALSE;

#define JS_STATIC_DLL_CALLBACK(__x) __x JS_DLL_CALLBACK

jsint count;
uint32 flags;
lines = JS_FALSE;
uint32 slot;

#define HT_FREE_ENTRY 1 /* free value and entire entry */

#define JS_DONT_PRETTY_PRINT ((uintN)0x8000)


return JS_FALSE;
return found;

atom = NULL;

JS_ReportErrorNumber(cx, js_GetErrorMessage, NULL, JSMSG_BAD_URI);

#define gc_lock_get_count(he) ((jsrefcount)(he)->value)

flagp = gc_find_flags(thing);

#endif

*/

#else /* !JS_HAVE_LONG_LONG */
int r = 0;

#define Exp_1 0x3ff00000

/* We can actually put the following two in a union since they should never be
used at the same time */

/* Initialize the prototypes first. */

}
#endif
JSAtom *atom;
attrs = sprop->attrs;
SymbolEnumerator(JSHashEntry *he, intN i, void *arg)

return date_makeTime(cx, obj, argc, argv, 1, JS_FALSE, rval);


return 2;

{"$7", 6, JSPROP_ENUMERATE|JSPROP_READONLY|JSPROP_SHARED,

todo = Sprint(&ss->sprinter, "%s[%s] = %s",

uintN *attrsp, JSBool *foundp)

}
* The Initial Developer of the Original Code is Netscape
* IS" basis, WITHOUT WARRANTY OF ANY KIND, either express oqr

* lock release followed by fat lock acquisition.


pc++;

atomIndex = (jsatomid)ival;
str_concat(JSContext *cx, JSObject *obj, uintN argc, jsval *argv, jsval *rval)

name = number,
todo = -2;

if (!js_EmitTree(cx, cg, pn2->pn_expr))


#define CHECK_EAGER_TOSTRING(hint) ((void)0)
return NULL;

#define JUMP_OFFSET_LO(off) ((jsbytecode)(off))


OPDEF(JSOP_GETARG, 84, "getarg", NULL, 3, 0, 1, 12, JOF_QARG |
JOF_NAME)

char tzbuf[100];
JS_PUBLIC_API(JSBool)

**/

ts->flags &= ~TSF_REGEXP;


return date_makeTime(cx, obj, argc, argv, 4, JS_FALSE, rval);

#endif
return NULL;

while (pn && js_MatchToken(cx, ts, TOK_EQOP)) {


*
date_toGMTString(JSContext *cx, JSObject *obj, uintN argc,
{"setUTCSeconds", date_setUTCSeconds, 2,0,0 },
STORE_OPND(-1, rval);
void *newp;

u.l = (long)va_arg(ap, JSUint32);

if (!js_GetLengthProperty(cx, obj, &length))

FETCH_UINT(cx, -2, u);


};
}
if (!js_ValueToNumber(cx, argv[1], &d))
a = pool->current;
}

} else {
*/

for (i = 0; i < map->length; i++) {

js_DoubleToInteger(jsdouble d);

JS_ASSERT(principals->refcount);

nvars = fun->nvars;
stmt = stmt->down;
return NULL;

goto out;
} else {

#define PUSH_NUMBER(cx, d) \

UpdateDepth(cx, cg, offset);

atom = NULL;
#ifdef GC_MARK_DEBUG
extern JS_PUBLIC_API(JSHashTable *)
#define JS_HAS_CALL_OBJECT 1 /* fun.caller is stack frame obj */

strncpy(command, file->path, len-1);


* terms of the GNU Public License (the "GPL"), in which case the

/* Clean up the sharpObjectMap table on outermost error. */

JS_free(cx, buf);
} else
flags = *flagp;
{"getDay", date_getDay, 0,0,0 },

js_strncpy(out, arg, argLengths[d]);

case JSTYPE_BOOLEAN:

#ifndef M_LN2

#define JSLL_AND(r, a, b) ((r).lo = (a).lo & (b).lo, \


#define SN_DELTA_BITS 3
(size_t)(end - begin), 0);
char *names;

break;

memset(&scope->lock, 0, sizeof scope->lock);


fprintf(gOutFile, " cond %u update %u tail %u",

SECURITY_CHECK(cx, NULL, "file_access", file);

extern JS_PUBLIC_API(JSBool)

*/
return JS_FALSE;

pn3->pn_left = Expr(cx, ts, tc);

if ((ch = chars[i]) < 128 && IS_OK(ch, mask)) {


* implementations.

case JSOP_IFNE:

if (*nl == '\r') {
jsval *vars; /* base of variable stack slots */
cx = (JSContext *)cx->links.next;
js_DestroyScope(cx, (JSScope *)map);
/* Kludge to allow (typeof foo == "undefined") tests. */
JSREPORT_STRICT,

MSG_DEF(JSSMSG_CANT_OPEN, 1, 2, JSEXN_NONE, "can't open {0}: {1}")


* conclude that
goto ret;

if (!JSVAL_IS_FUNCTION(cx, fval)) {
* Each sub-tree's root node has a pn_op in the set

#define DayFromYear(y) (365 * ((y)-1970) + floor(((y)-1969)/4.0) \


* This section typedefs the old 'native' types to the new PR<type>s.
* kid3 is the catch block (on kid3 so that we can always append a

argv = malloc(sizeof(char *) * maxArgs);


line = 0;

js_GC(cx, GC_KEEP_ATOMS);
its_convert(JSContext *cx, JSObject *obj, JSType type, jsval *vp)

x1 = b1->x;
if(!strcmp(ctype, utfstring))

goto out;
// then define the property now - this is because we need to compile
scripts
/* -*- Mode: C; tab-width: 8; indent-tabs-mode: nil; c-basic-offset: 4 -*-

#include "jsutil.h" /* Added by JSIFY */


const char js_unescape_str[] = "unescape";

*/
/* Bump gcLevel to restart the current GC, so it finds new garbage. */

38, 15, 38, 38, 38, 38, 16, 16, /* 71 */


JS_SetGCCallbackRT(JSRuntime *rt, JSGCCallback cb)
carry = z >> 16;
*/

js_strncpy(&chars[nchars], gsop[j]->chars, gsop[j]->length);


i = bb2 < bd2 ? bb2 : bd2;
if (!js_EmitTree(cx, cg, pn2))

clasp = OBJ_GET_CLASS(cx, JSVAL_TO_OBJECT(argv[-2]));

atom = GET_ATOM(cx, script, pc);


return JS_FALSE;
int8 kwindex; /* keyword index, -1 if not keyword */

return JS_TRUE;

matchsub = &cx->regExpStatics.lastMatch;

static JSFunctionSpec its_methods[] = {

#if !JS_HAS_MORE_PERL_FUN
* the provisions above, a recipient may use your version of this
mark = JS_ARENA_MARK(&cx->tempPool);
((JSAtomState *)priv)->tablegen++;
JSDHashOperator op;

** for storing a pointer or pointer sutraction.


105, 105, 105, 105, 56, 56, 56, 56, /* 0xF800 */
*

i = (jsint)d;

*/

JS_FinishArenaPool(&cx->codePool);
extern JSBool

#include "jsbool.h"
if (leftright) {

n = strlen(s);

* Getter and setter prefix bytecodes. These modify the next bytecode, either

* compute with fewer bits and propagate the carry if necessary


#include "jsfun.h"
JS_PUBLIC_API(jsbytecode *)

} \

#define JS_BYTES_PER_DWORD 8L
* Alternatively, the contents of this file may be used under the

(_log2) += 8, (j_) >>= 8; \


rt->newScriptHook(cx, tmp.filename, tmp.lineno, &tmp, NULL,

spindex -= depth;
if (JS_TOLOWER((jschar)s1[s1off]) != JS_TOLOWER(s2[s2off])) {

*/

{
* Software distributed under the License is distributed on an "AS
#define JS_BUG_VOID_TOSTRING 0 /* void 0 + 0 == "undefined0" */

rval = POP_STR();

lineno = script->lineno;

JSLocaleToUpperCase localeToUpperCase;

#define FETCH_NUMBER(cx, n, d) \
/* XXX emulate old JDK1.0 java.lang.String.substring. */

{
}

static JSBool

local = 0;
xdr->ops->finalize(xdr);

* provisions of the GPL are applicable instead of those above.


{
* i int32 ECMA int32

x <<= 8;

if (bit == 1) {

* March 31, 1998.

prevc = 0;

return;
jsdouble min, jsdouble sec, jsdouble msec)
return rv;
FROB(CallAtom, js_Call_str);

static void
have_dig:
* JSOP_NOT, JSOP_BITNOT, JSOP_TYPEOF, JSOP_VOID
ok = JS_FALSE;
return &sym->entry;
* Copyright (C) 1998 Netscape Communications Corporation. All

if (!js_ValueToNumber(cx, argv[0], &result))

* accessed via pointers-to-values at ap, updating both sp (via *vpp) and ap

static JSBool

#undef MSG_DEF
if (!numStr) {
*/
#define ATOM_BYTES(atom) JS_GetStringBytes(ATOM_TO_STRING(atom))
z = (*x & 0xffff) * y + (*xc >> 16) + carry;
if (clasp == &js_FunctionClass) {

JS_PUBLIC_API(JSType)

xc = xc0;

JS_GetStringBytes(JSString *str)

typedef JSBool
digit = quorem2(b, s2);

* 4 is JS whitespace
goto do_function;

*/

*/

* (or line if the class static property

}
JSAtom *NumberAtom;
* class objects have scripts as/in their private data -- the GC knows about
js_eval_str)) {

/* add terminating separator */


break;
jsdouble *dp;

*
fp->scopeChain != funobj) {
{"atan2", math_atan2, 2, 0, 0},

JS_DHashTableDumpMeter(JSDHashTable *table, JSDHashEnumerator dump, FILE *fp)

if (result < 0)
/*

typedef JSBool
break;

return __NSInitialize(initBlock);
**** End of jsxdrapi.c ****
/* No else part, fixup the branch-if-false to come here. */
for (i = 0; report->messageArgs[i] != NULL; i++) {

JS_ASSERT(tl->owner == 0);
uintN intarg;
40, 40, 4, 4, 82, 82, 82, 82, /* 32 */

*/

exnObject = JSVAL_TO_OBJECT(exn);

* The Original Code is Mozilla Communicator client code, released


* outer function contains with statements, e.g., but the stack slot
RecycleTree(pn3, tc);

/* If mark is in the current segment, reduce sh->nslots, else pop sh. */

extern JS_PUBLIC_API(JSPrincipals *)

**** End of jsnum.h ****


JS_BEGIN_EXTERN_C
/*
/*

if (trap)
JSStmtInfo *stmt;
if (iter_state != JSVAL_NULL)

**** End of jsdhash.h ****

* Return a string that may eval to something similar to the original object.
* Software distributed under the License is distributed on an "AS
*cp++ = '(';
return JS_FALSE;

/*
jsint slot;
/* return true if matches, otherwise, false */
if (!date || JSDOUBLE_IS_NaN(*date))
if (!obj) {
if (report->uclinebuf)

JSPROP_READONLY,

/************************************************************************/
MAKE_EXCEPTION_CTOR(URIError)
sprintf(url, "file://%s", file->path);

JS_ReportErrorNumber(cx, js_GetErrorMessage, NULL,


#endif
* Claim a note slot in cg->notes by growing it if necessary and then

SN_TYPE(sn) == SRC_ASSIGNOP) {

}
jsuint i;

p = (void *)a->avail;
** set the l10n_debug flag

return -1;

#define JS_LOCK_OBJ(cx,obj) ((OBJ_SCOPE(obj)->ownercx == (cx)) \

56, 56, 56, 56, 56, 56, 56, 56, /* 0xBC00 */

static JSBool

if (!morepar) {

#define msPerHour (SecondsPerHour * msPerSecond)


script = (JSScript *) JS_GetPrivate(cx, obj);

break;
JSLL_MUL(gmtOffset,gmtOffset,s2us);
ELEMENT_OP(-1,

extern const char js_Script_str[];


if (argc >= maxArgs) break;

}
#define HASH_BOOLEAN(b) ((JSHashNumber)(b))

40, 40,40, 40, 40, 40, 40, 40, /* 41 */


if (!ale)
#define FLT_ROUNDS 1

JSInt64 _a, _b; \


#include <errno.h>
type |= 1;

map->ops->destroyObjectMap(cx, map);
if (b->wds < n)

OPDEF(JSOP_INCPROP, 42, "incprop", NULL, 3, 1, 1, 10, JOF_CONST|


JOF_PROP|JOF_INC)
*xc = 0;
return JS_FALSE;

if (message->length > 0) {
str = js_NewString(cx, js, n, 0);
size_t elsize;
extern JS_FRIEND_DATA(uint8) js_SrcNoteArity[];

#define JS_ALIGN_OF_LONG 2L

#endif /* JS_HAS_SWITCH_STATEMENT */

jsval *rval)
else

*/
JS_PUBLIC_API(JSBool)

* and other provisions required by the GPL. If you do not delete


/* At this point 1 <= d/10^k = b/S < 10. */

clasp = OBJ_GET_CLASS(cx, obj);

if (len >= JS_LINE_LIMIT)

}
ReportStrictSlot(JSContext *cx, uint32 slot)

obj = js_CloneFunctionObject(cx, obj, parent);

pn2 = NewParseNode(cx, &CURRENT_TOKEN(ts), PN_NAME, tc);

}
* has a non-object as its .prototype value.
}
"PR_LOG_TEST",

return OBJ_DELETE_PROPERTY(cx, proto, id, rval);


return JS_FALSE;
todo = -2;
{

return JS_FALSE;

#define PR_ArenaCountRetract PL_ArenaCountRetract


extern JS_PUBLIC_API(char *)
*vp = OBJECT_TO_JSVAL(js_NewFileObject(cx, str));

JSLL_UDIVMOD(0, &(r), _a, _b); \


case DTOSTR_PRECISION:
}
if ((word0(d) & Exp_mask) == Exp_mask) {

"PR_GrowSegment",
if ((jsuint)ival < (jsuint)ATOM_INDEX_LIMIT) {

ok = JS_TRUE;

#endif

JSFunction *fun;

return JS_TRUE;

js_PutCallObject(JSContext *cx, JSStackFrame *fp);


JS_ReportErrorNumber(cx, js_GetErrorMessage, NULL, JSMSG_BAD_CHAR, format);
return file->path[0]==PIPE_SYMBOL;
js_Enumerate(JSContext *cx, JSObject *obj, JSIterateOp enum_op,
if (pn3->pn_type == TOK_DEFAULT) {

** Standard C Library (stdio.h), with the following exceptions:

JSLL_L2D(d, tmp);
JS_realloc(JSContext *cx, void *p, size_t nbytes);
cp++;
uintN i, depth, nslots;

if (off < JUMP_OFFSET_MIN || JUMP_OFFSET_MAX < off) {

#if IS_BIG_ENDIAN
if (!pn3)

}
* We don't handle unicode escape sequences here
{

if (v2smap[i].version == version)
JSPR_HashTableDestroy(JSPRHashTable *ht);
static JSBool

#if JS_HAS_FILE_OBJECT
const char *bytes, size_t length,

if (saveDepth) {

/***************************************************************************/

printf("#define JS_BYTES_PER_INT64 %dL\n", sizeof_int64);


if (!js_EmitTree(cx, cg, pn2->pn_kid2))

#define SN_IS_XDELTA(sn) ((*(sn) >> SN_DELTA_BITS) >= SRC_XDELTA)

notsharp = JS_TRUE;
S = pow5mult(S, s5);

stop, cp);
* should not.
if (xdr->mode == JSXDR_ENCODE) {
tmp[0] = JSOP_NAME;
* Normalize.

const jschar *chars, size_t length,

NULL, NULL, script_mark, 0

break;

* License Version 1.1 (the "License"); you may not use this file
cg->stackDepth += 2;
Sprinter sprinter; /* base class state */

return js_NewNumberValue(cx, result, rval);

void (JSJS_DLL_CALLBACK *freeEntry)(void *pool, JSPRHashEntry


*he, JSPRUintn flag);

#else

#define object_props NULL

*/

if (((jsuword)thing & GC_PAGE_MASK) == 0) {

JS_DESTROY_CONDVAR(rt->scopeSharingDone);

/*

str = js_DecompileValueGenerator(cx, n, sp[n], NULL);


char url[MAX_PATH_LENGTH];

if (!js_ValueToObject(cx, argv[1], &parent))


/* Decide whether to use the resulting timezone string.

if (JSVAL_IS_STRING(lval) && JSVAL_IS_STRING(rval)) { \


}
}

JSProperty *prop;

#if JS_HAS_CALL_FUNCTION

jsuword aoff;

/*
{"break", TOK_BREAK, JSOP_NOP, JSVERSION_DEFAULT},

(lastop == JSOP_GETTER)
JS_DHashGetKeyStub,

0xFE570002, /* 99 Ll, hasUpper (subtract -7), identifier start */

do {

/* (mhi * 2^m2 * 5^m5) / (2^s2 * 5^s5) = one-half of last printed (when


mode >= 2) or

} else {

sp--;
borrow = y >> 32 & 1UL;

{"catch", TOK_CATCH, JSOP_NOP, JSVERSION_DEFAULT},

{
#endif

clasp = OBJ_GET_CLASS(cx, jsobj);

return JS_FALSE;
#else
break;
JSSymbol *sym, *protosym;

goto do_op;

date_getUTCDay(JSContext *cx, JSObject *obj, uintN argc, jsval *argv,

JSBool

40, 40, 40, 40, 40, 40, 40, 40, /* 24 */


"PR_Free",

if ((uintN)cg->stackDepth > cg->maxStackDepth)

}
do {

if (!js_ValueToECMAInt32(cx, argv[1], &radix))

#ifdef DEBUG
return NULL;

/*
#include <stdio.h>

* N.B. JSOP_SWAP doesn't swap the corresponding pc stack


}
JS_ReportWarning(cx, "Cannot call or access \"%s\" on native file %s", \

#endif

argv[-1] = STRING_TO_JSVAL(str);

* Free the arenas in pool and finish using it altogether.

js_PushStatement(tc, &stmtInfo, STMT_LABEL, -1);

*/
}
* Linked list mapping format strings for JS_{Convert,Push}Arguments{,VA} to
else

return JS_TRUE;

pn = NewParseNode(cx, &CURRENT_TOKEN(ts), PN_NAME, tc);

0x0000720B, /* 115 No, decimal 25 */

if (!fp)

uintN i;

JS_DHashTableFinish(table);
} else {
fputc('"', stderr);
str_getProperty(JSContext *cx, JSObject *obj, jsval id, jsval *vp)

"PR_ARENA_",

* identifies a property in the returned object, to form an ECMA reference

}
*/

setter = (JSPropertyOp) JSVAL_TO_OBJECT(rval);

array[3], array[4], array[5], array[6]);


if (prop)

extern JS_PUBLIC_API(JSBool)
JS_free(cx, current);
23, 24, 23, 24, 23, 24, 23, 24, /* 19 */

jsval *rval, void *closure);

/* j is b/S compared with mlo/S. */


UngetChar(ts, c);

if (!ok)
*

#define ATOM_TO_DOUBLE(atom) JSVAL_TO_DOUBLE(ATOM_KEY(atom))


NC_NaN,
#define MEM_INCR(xdr,bytes) (MEM_COUNT(xdr) += (bytes))
goto out;
JSStackFrame *fp, frame;

#include <stdlib.h>

extern JS_PUBLIC_API(void)
}

return NULL;
frame.argc = down->argc;
"PR_ALIGN_OF_INT64",
case JSOP_ARGDEC:
28, 28, 28, 28, 28, 28, 28, 28, /* 0x4800 */
extern JS_FRIEND_API(jsdouble)

* Alternatively, the contents of this file may be used under the


if (!js_InitGC(rt, maxbytes))

#include "jsscan.h"
if (!js_strtod(cx, str->chars, &ep, &d))
jsint start);

sort_compare(const void *a, const void *b, void *arg)

JS_BEGIN_EXTERN_C

#define ELSE else

*/

const jschar *name, size_t namelen, jsval value,

POP_BOOLEAN(cx, rval, cond);


* The Original Code is Mozilla Communicator client code, released

while (i < str->length) {

*
* which occurs when printing -5e-324 in binary. We could compute a better
estimate of the size of

* IS" basis, WITHOUT WARRANTY OF ANY KIND, either express oqr

if (count > 0 && rt->lengthSum >= 0) {

case TOK_LB:
int expandedArgs = 0;
js_alloc_atom, js_free_atom

BOOL WINAPI DllMain (HINSTANCE hDLL, DWORD dwReason, LPVOID lpReserved)

OPDEF(JSOP_GETPROP, 53, "getprop", NULL, 3, 1, 1, 11, JOF_CONST|


JOF_PROP)

JSPrincipals *principals;

* Software distributed under the License is distributed on an "AS


} else if ((base & (base - 1)) == 0) {

extern JS_PUBLIC_API(JSBool)

#ifdef SOLARIS
return NULL;

23, 24, 23, 24, 23, 24, 23, 24, /* 17 */


if (!JS_XDRUint32(xdr, &length))

JSBool
trap = FindTrap(rt, script, pc);
nb = (sp->offset + len + 1) - sp->size;
#define fd_sqrt sqrt

ok = SPROP_SET(cx, sprop, obj, obj, &rval); \

gc_object_class_name(void* thing)

uintN indent;
if (pn->pn_extra) {

extern JS_PUBLIC_API(JSBool)

pn = NewParseNode(cx, &CURRENT_TOKEN(ts), PN_LIST, tc);

#define JS_HAS_DO_WHILE_LOOP 1 /* has do {...} while (b) */

if (pn3->pn_type == TOK_DEFAULT)
* '\f' Form Feed.
(1 << JSCT_MODIFIER_LETTER) | \

{ "renameTo", file_renameTo, 0},


JS_PUBLIC_API(JSPrincipals *)

if (kidMatch == NULL) {

} \
* fp->vars, respectively).

JS_PUBLIC_API(JSScript *)
OBJ_DROP_PROPERTY(cx, pobj, prop);

* string into an empty substring.

break;
/* If this try has a catch block, emit it. */
#define INT_FITS_IN_JSVAL(i) ((jsuint)((i)+JSVAL_INT_MAX) <= 2*JSVAL_INT_MAX)

**** Start of jsshell.msg ****

static Bigint *s2b(CONST char *s, int32 nd0, int32 nd, ULong y9)

"PRFloat64",

* JS options are orthogonal to version, and may be freely composed with one

: (preorder ? JSOP_DECELEM : JSOP_ELEMDEC);

break;
int32 i;

pn3 = pn2->pn_right;

* as a legal js program (using sharp variables) might start with '#'.

}
MUST_MATCH_TOKEN(TOK_RC, JSMSG_CURLY_AFTER_FINALLY);
if (!OBJ_IS_NATIVE(obj)) { \
if (oldscope->ownercx) {
JSString *repstr;
goto no_digits;

if (!defined) {
{

/*
/* Record both Function and Object in cx->resolving, if we are resolving. */

* 1. Rather than iterating, we use a simple numeric overestimate


#define JS_HAS_MORE_PERL_FUN 1 /* has array.push, str.substr, etc */

#include "jsprf.h"
#define _APS_NEXT_CONTROL_VALUE 1000

uint32 i;

if (magic == JSXDR_MAGIC_SCRIPT_2) {
}
JSDOUBLE_LO32(d) = 0;
#define JS_LOCK_SCOPE(cx,scope) ((scope)->ownercx == (cx) ? (void)0 : \
break;
*/

frame.varobj = frame.scopeChain = chain;

static JSBool

#else

* quantatom a quantified atom.

double sqsum, mean, variance, sigma;

* implied. See the License for the specific language governing


if (!js_SetClassPrototype(cx, fun->object, protos[i],
STORE_NUMBER(cx, -1, d); \
* The Initial Developer of the Original Code is Netscape

if (b.lo > n1) {

return js_NewDoubleValue(cx, d, rval);


* file under either the NPL or the GPL.

d2 = *JSVAL_TO_DOUBLE(rval); \
#if JS_BYTES_PER_BYTE == 1

60, 80, 80, 80, 80, 60, 46, 46, /* 30 */


}else{

break;
return JS_FALSE;

#else
**
}
#define JS_BITS_PER_INT64_LOG2 6L
if (IS_SHARP(he)) {

/* uses of seenplusminus allow : in TZA, so Java

chars[nchars++] = ']';
attrs = flags | JSPROP_ENUMERATE;
js_GetLocalVariable(JSContext *cx, JSObject *obj, jsval id, jsval *vp)
} else {

js_ReportIsNotDefined(cx, name);
"PR_ALIGN_OF_DOUBLE",
extern void

} else {

/*
JS_snprintf(numBuf2, sizeof numBuf2, "%d", JSOP_LIMIT);

case JSOP_INCARG:
{

break;
}

* the License at http://www.mozilla.org/NPL/

* multiple threads. In this case, you must provide (or suitably

id = ida->vector[i];
return JS_TRUE;
MSG_DEF(JSMSG_NOT_DEFINED, 1, 1, JSEXN_REFERENCEERR, "{0} is not
defined")

TOK_VAR = 48, /* var keyword */

* file under either the NPL or the GPL.

(_log2) += 4, (j_) >>= 4; \

** but minimum and consistant overhead matters.


static JSBool

/* Assert that scope locks never revert to flyweight. */


fprintf(gOutFile, " length %u", (uintN) js_GetSrcNoteOffset(sn, 0));

static void
// in that function had a line number of zero.
if (s == buf) {
} else {

if(!file) return NULL;


*/

#define JS_CLEAR_ARENA(a) /* nothing */


len = cs->length;

JSString *str;

+ JS7_UNHEX(cp[3]);

pn = ArgumentList(cx, ts, tc, pn);

return $line;

return JS_FALSE;
keyHash = (*ht->keyHash)(key);
my_BranchCallback(JSContext *cx, JSScript *script)

*idp = (jsid)atom;

** %s - string
case JSOP_SETNAME: op = JSOP_SETARG; break;

if (xdr->mode == JSXDR_DECODE) {

NULL)) {

JSHasInstanceOp hasInstance;
/* TODO: compile, exec, get/set other statics... */
q1--, r1 += b;
if (!OBJ_GET_PROPERTY(cx, proto, (jsid)cx->runtime->atomState.evalAtom,
case JSOP_GETVAR:

JS_PutPropertyDescArray(JSContext *cx, JSPropertyDescArray *pda);


atom = cx->runtime->atomState.booleanAtoms[JSVAL_TO_BOOLEAN(v) ? 1 : 0];

#define GET_ATOM_INDEX(pc) ((jsatomid)(((pc)[1] << 8) | (pc)[2]))

** form.

radix = 10;

JS_BEGIN_MACRO \
JS_SetContextPrivate(JSContext *cx, void *data)

}
/************************************************************************
{
if (type == SRC_SETLINE) {

js_FinishCodeGenerator(JSContext *cx, JSCodeGenerator *cg);

typedef struct JSSharpObjectMap JSSharpObjectMap;


}

EMIT_ATOM_INDEX_OP(op, atomIndex);

#define JSVAL_FALSE BOOLEAN_TO_JSVAL(JS_FALSE)

/* Remember start of callable-object bytecode for decompilation hint. */

rval = POP_STR();
#include <string.h>

**** End of jsbit.h ****


}

depth = (jsint) script->depth;

* Check for a const property of the same name -- or any kind

mean = variance = sigma = 0;


* before fp goes away.
disc = iter->pn_kid1;

JSSubString *
}

JSString *str;

* Software distributed under the License is distributed on an "AS


}

* Software distributed under the License is distributed on an "AS


c += 'a' - 'A';

// DREAMWEAVER: inserted this declaration (see usage below).


return JS_TRUE;

{"pow", math_pow, 2, 0, 0},

#include <string.h>

num_toLocaleString(JSContext *cx, JSObject *obj, uintN argc,

* for/in loop: a binary TOK_IN node with


jsdouble x, z;
#endif

}
return JS_FALSE;

* the License at http://www.mozilla.org/NPL/

obj = NULL;
#define OBJ_DEFAULT_VALUE(cx,obj,hint,vp) \

scope = OBJ_SCOPE(obj2);
cn++;

OBJ_DROP_PROPERTY(cx, obj2, prop);

if ((k + 2) >= length)

if (strlen(tmp)>0) {
* file under either the NPL or the GPL.

switch (*cp) {
}

* TOK_ERROR, which was already reported.

JS_free(cx, (char *)lval);


(char *)sbrk(0) - (char *)before, CG_OFFSET(cg), cg->noteCount);

* which are named the same as their typedef names (legal in C/C++, and less
sym = (JSSymbol *) JS_HashTableRawAdd(table, hep, keyHash, key, NULL);

if (!(*sp = (char *) JS_malloc(xdr->cx, len + 1)))

ts->flags |= TSF_REGEXP;

extern JS_PUBLIC_API(void)
#ifdef JSDEBUGGER_JAVA_UI
/* Now we have an object with a constructor method; call it. */
#define HT_ENUMERATE_NEXT 0 /* continue enumerating entries */
pn2->pn_right = pn3;
extern JS_PUBLIC_API(JSString *)

_jsdc = JSD_DebuggerOnForUser(rt, NULL, NULL);


return JS_TRUE;
}

/* Call fun with its parent as the 'this' parameter if no args. */


* TOK_NUMBER dval pn_dval: double value of numeric literal
jp->indent -= 4;
121, 121, 60, 60, 60, 60, 60, 60, /* 90 */
return JS_TRUE;

(void) PopOff(ss, op);

JS_free(cx, aux);
#include <stdio.h>
static void

else if (begin > length)


*/
ok = OBJ_GET_ATTRIBUTES(cx, obj, (jsid)atom, prop, &attrs);
}

exn_newPrivate(JSContext *cx, JSErrorReport *report)


#elif JS_VERSION == 110

if( l10n_debug )

JS_UNLOCK_OBJ(cx, obj);

setter = SPROP_SETTER_SCOPE(sprop, scope);

* March 31, 1998.

"object",

stbar\n\

static JSBool

#endif

#define NATIVE_DROP_PROPERTY js_DropProperty

JS_PUBLIC_API(JSBool)

const void *key)


(int32)MEM_LIMIT(xdr) + offset < 0) {
* terms of the GNU Public License (the "GPL"), in which case the
*
free(table);

ocp = cp;

fprintf(gOutFile, "%s%s", i ? " " : "", JS_GetStringBytes(str));

js_NewDateObjectMsec(JSContext* cx, jsdouble msec_time);


JS_ASSERT(fp->fun);
cp = cp2;

#if JS_HAS_IN_OPERATOR

struct align_double {

lsh = CountLeadingZeros(b.lo);
JSAtom *atom;

case REOP_EOLONLY:

#include "jsconfig.h"
chars[length] = 0;

!JS_XDRUint32(xdr, &notelen) ||
** %o - unsigned octal

break;

* Communications Corporation. Portions created by Netscape are


JS_ReportErrorNumber(cx, js_GetErrorMessage, NULL,
/* for Call Object 'real' getter isn't passed in to us */

#define fd_exp exp

* given finalizer pointer on only one thread; different threads may call to
JSTokenType tt;
JSArena *a;

*/
60, 60, 60, 60, 60, 79, 79, 79, /* 70 */
}

* No valid function object should lack private data, but fail soft

/*
JSContext *
# define FILESEPARATOR '/'
}
/* hacked replica of nspr _PR_InitDtoa */

* We should find the scripted caller's function frame just below it, but

_node.next = NULL; \

* March 31, 1998.

break;
#undef JS_UNLOCK0
JSInt8 tm_sec; /* seconds of minute (0-59) */

case TOK_LC:
*
40, 40, 46, 46, 46, 46, 46, 40, /* 57 */

if( !nas ){

const char *filename, uintN lineno,


BuildDate(JSContext *cx, JSObject *obj, uintN argc, jsval *argv, jsval *rval)

};
jsval key;
JSLL_I2L(tmp1,diff);
* Communications Corporation. Portions created by Netscape are

*/
JS_XDRUint8(JSXDRState *xdr, uint8 *b)

goto out;
if (tt != TOK_NAME)
if (inlineCallCount == MAX_INLINE_CALL_COUNT) {
if (2 * n > 16000)

!(filename = js_ValueToString(cx, v))) {

JSParseNode *pn, *pn2;


JS_HashTableRawAdd(JSHashTable *ht, JSHashEntry **hep,

JS_ReportErrorNumber(cx, JSFile_GetErrorMessage, NULL,


{

todo = Sprint(&ss->sprinter, "");

/* abort if NaN */
pn2->pn_type = TOK_COLON;

JSParseNode *pn, *pn2;

} else {
*
return ok;

*/
}
#ifdef JS_THREADSAFE
GetDeflatedStringCache(void)

#define SET_OBJ_INFO(obj,f,l) ((void)0)

opt = js_ValueToString(cx, argv[data->optarg]);


if (!ok) {

/* first time */
alias, (long)index, OBJ_GET_CLASS(cx, obj2)->name);

/* Perl-ish methods. */
}
gc_finalizers[GCX_OBJECT] = (GCFinalizeOp)js_FinalizeObject;

CHECK_REQUEST(cx);

report.tokenptr = linestr

b = lshift(b, 1);
case JSOP_DECNAME: op = JSOP_DECVAR; break;
JSErrorReport *
cx->newborn[GCX_OBJECT] = NULL;

* March 31, 1998.

/*
** Since we do not wrap <stdlib.h> and all the other standard headers, authors
chars[nchars++] = ':';
jsdouble dval;
};

struct JSTokenPos {

#define JS_HAS_EVAL_THIS_SCOPE 1 /* Math.eval is same as with (Math) */

carry = ys >> 32;


(_l)->next = (_e); \

case PN_FUNC:
* has side effects.

* JavaScript operation bytecodes. If you need to allocate a bytecode, look

***********************************************************************/
* If you wish to allow use of your version of this file only

} u;

/*
return js_ValueToString(cx, v);

const char *format;


JSType type;

* The contents of this file are subject to the Netscape Public


aadj1 = -aadj;

faster than modes 2-3.

s0 = s;
}

break;

114, 114, 114, 114, 82, 82, 82, 82, /* 80 */


* Contributor(s):
JS_PUBLIC_API(const char *)

if (!JS_InstanceOf(cx, obj, &js_ScriptClass, argv))

ts->flags &= ~TSF_REGEXP;

for(;;) {
if (!ok) \
{

*/
#endif /* XP_MAC */
cp++;
*rval = OBJECT_TO_JSVAL(array);
/*

atom->flags |= ATOM_MARK;
}

* file under either the NPL or the GPL.


static JSBool

int32 c;
* The contents of this file are subject to the Netscape Public

if (!IndexToId(cx, index, &id))

/* Re: prevent.h->plevent.h */
a->avail = JS_ARENA_ALIGN(pool, a->base + aoff);
return JS_TRUE;

}
** %u - unsigned decimal

* except in compliance with the License. You may obtain a copy of

}
// An explanation from DaveG:

extern JS_PUBLIC_API(JSString *)

goto out;
CHECK_REQUEST(cx);
* file under either the NPL or the GPL.
* ECMA has reserved that argument, presumbaly for defining the locale.

JSFILEMSG_CANNOT_OPEN_DIR, file->path);
goto done;

*/
c = *p++;

while(*--s == '0') ;

return kidMatch; /* no point pursuing an empty match forever */


ok = JS_SetElement(cx, arrayobj, len, &v);

while (hi > lo) {

if (sn && SN_TYPE(sn) == SRC_ASSIGNOP) {

DECOMPILE_CODE(pc, len);

15, 15, 15, 15, 15, 15, 15, 15, /* 79 */


JSString *atomstr;

#endif
js_DestroyObjectMap(JSContext *cx, JSObjectMap *map)

while(j>=0 && path[j]==' ') j--;

struct { /* TOK_FUNCTION node */


return JS_TRUE;

if (cx->fp && !cx->fp->constructing) {


extern uintN js_NumCodeSpecs;
}
JSBool hasAutoflush; /* should we force a flush for each line break? */
* IS" basis, WITHOUT WARRANTY OF ANY KIND, either express oqr

*/
JS_SetExecuteHook(JSRuntime *rt, JSInterpreterHook hook, void *closure)

case 'n':
parsenodes++;

obj_getSlot(JSContext *cx, JSObject *obj, jsval id, jsval *vp);

* after
/*
10, 10, 10, 10, 10, 10, 10, 10, /* 118 */

op2 = (JSOp)*pc2;

c = strlen(result);

for (kw = keywords; kw->name; kw++) {

goto do_fallback;
return JS_FALSE;
atom = NULL;

if (pn4->pn_op == JSOP_FALSE) {

JSObject *parent)

if (ok)

V = C;

/* Can we stop now? */

ren->flags |= RENODE_SINGLE;

pn = NewParseNode(cx, &CURRENT_TOKEN(ts), PN_UNARY, tc);


} else if (tt == TOK_LB) {
* Software distributed under the License is distributed on an "AS

sp = js_AllocStack(cx, 2 + argc, &mark);

#define PROPERTY_CACHE_TEST(cache, obj, id, prop) \

static const jschar *matchRENodes(MatchState *state, RENode *ren, RENode *stop,

/* Typedef for native functions called by the JS VM. */


}
script = js_NewScript(xdr->cx, length);

JS_PUBLIC_API(JSObject *)
break;

/* Stuff trailing NUL */

* reacquire obj's scope-lock in this case (where

len = 0;
taglen = 1 + beglen + 1; /* '<begin' + '>' */

return argsobj;
if (!str)
jsbytecode *pc, ptrdiff_t switchLength,

return count;
}

JSPropertyOp getter, setter;


if (report) {

goto bad_formal;
* If you wish to allow use of your version of this file only

tc->flags |= TCF_RETURN_EXPR;

if (!scope)
46, 46, 46, 46, 46, 46, 40, 46, /* 44 */
}

return JS_FALSE;

}
if (len > limit) {

jsid id, id2;


if (op >= JSOP_LIMIT) {

if (!OBJ_DEFINE_PROPERTY(cx, obj, id, v,


*/

if (JSVAL_IS_VOID(v)) {
type = (JSSrcNoteType) SN_TYPE(sn);

pn3->pn_pos.end = pn4->pn_pos.end;
// >

result = MonthFromTime(LocalTime(result));

len = cs->length;
nchars = js_strlen(chars);

* for ToUint32.
extern double fd_pow __P((double, double));

} else if (j1 > 0) {

JS_PUBLIC_API(JSBool)

else if (argc > maxargs)

pn = pn2;

#if JS_BUG_SET_ENUMERATE

ok = (str2 = js_ValueToString(cx, rtmp)) != NULL;


while( c && c != '$' ){ /* should imporve error check later */
/*
* property of its 'this' parameter, and walks the prototype chain of v (only

JSProperty **propp)

const char *bytes, size_t length,


for (i = 0;i<len;i++) {

* under the terms of the GPL and not to allow others to use your

}
#endif
#if JS_HAS_EXPORT_IMPORT
* production; if it is set, then the 'in' keyword will not be

#define JSDVG_SEARCH_STACK 1

* file under either the NPL or the GPL.

} else {

}
utf8Length++;

default:
}

};

j = P + 1 - bbbits;

OBJECT_TO_JSVAL(fun->object),

{"interface", TOK_RESERVED, JSOP_NOP, JSVERSION_DEFAULT},

js_GetLocalVariable(JSContext *cx, JSObject *obj, jsval id, jsval *vp);

jsbytecode *pc, *endpc;


result_len = PRMJ_FormatTime(buf, sizeof buf, format, &split);
#error No suitable type for JSInt16/JSUint16
return JSTRAP_ERROR;

JS_SetBranchCallback(cx, my_BranchCallback);

extern double fd_atan2 __P((double, double));


#else

*/

case '+':
/*

extern JS_PUBLIC_API(intN)

return JS_FALSE;
if (x == *cx->runtime->jsNegativeInfinity) {

*
todo = SprintPut(&ss->sprinter, cs->token, strlen(cs->token));

#ifdef DREAMWEAVER_INCLUDE_EXTENDED_CHARS_IN_CLASSES

char *rv;

#include "jsatom.h"
40, 40, 40, 40, 40, 40, 40, 40, /* 120 */

js_InitRuntimeNumberState(JSContext *cx);
}

JSParseNode *nodeList; /* list of recyclable parse-node structs */


JS_PUBLIC_API(JSFunction *)
} else {
extern void add_history(char *line);
js_ForceGC(cx);

return JS_FALSE;

jsrefcount nrefs;

* In contrast, all the JS_New*StringCopy* functions do not take ownership of


}
return nbytes;

js_Disassemble1(JSContext *cx, JSScript *script, jsbytecode *pc, uintN loc,


* deleting the provisions above and replace them with the notice

*/

enuf[i++] = hex[c >> 4];


return JS_FALSE;
#define JS_BUG_AUTO_INDEX_PROPS 0 /* new object o: o.p = v sets o[0] */
if (_negative) { \

/* Check for a do-while loop's upward branch. */


down = fp->down;

JS_AWAIT_REQUEST_DONE(rt);

}
(unsigned long)preBytes, (unsigned long)rt->gcBytes,
JS_InitStandardClasses(JSContext *cx, JSObject *obj)

entrySize = table->entrySize;

ok = (str = js_ValueToString(cx, ltmp)) != NULL;

adj = aadj1 * ulp(rv);

return JS_TRUE;
str = JSVAL_TO_STRING(v);

tzoffset -= n;
40, 40, 40, 40, 40, 40, 40, 40, /* 120 */

if (*nl == '\r') {

s++;
return NULL;
tmp = CG_OFFSET(cg);
"PR_CLEAR_UNUSED",
#endif

break;
* JS_ReportErrorNumber(cx, js_GetErrorMessage, NULL, JSMSG_CANT_ALIAS,
#endif /* JS_DHASHMETER */
flagp = pi->flags + ((jsuword)thing & GC_PAGE_MASK) / sizeof(JSGCThing);
case REOP_NONALNUM:

**** Start of jsstr.h ****

else {

jsval *argv, jsval *rval)


return js_NewNumberValue(cx, d, rval);
rt->executeHook = hook;
pn->pn_kid = NULL;

js_Call_str,
atom = js_GetAtom(cx, &jp->script->atomMap,

#if !JS_HAS_EXPORT_IMPORT
break;
return JS_FALSE;

JS_ClearAllTraps(JSContext *cx);
}
ren->kid = kid;

if (atom->flags & ATOM_MARK) {


{

{
#include <string.h>

pipemode[1] = file->type==UTF8?'b':'t';

* beyond the first argument; this should be set to undefined

extern ptrdiff_t

pc = CG_CODE(cg, last);
/* Arrange for convenient computation of quotients:

if (ok)
JS_XDRUint16(JSXDRState *xdr, uint16 *s)

js_Date_str,

};
do {
return cx->localeCallbacks->localeCompare(cx, str, thatStr, rval);
#ifdef DEBUG_notme
JS_GetFrameThis(JSContext *cx, JSStackFrame *fp)

length = 1;
log2++;
JS_ASSERT(JS_IS_SCOPE_LOCKED(scope));
}
#define OBJ_CHECK_SLOT(obj,slot) ((void)0)

3, 5, 6, 3, 3, 3, 3, 12, /* 67 */
js_BooleanToObject(JSContext *cx, JSBool b)
free(bytes);
}
*

{
jsatomid interns; /* number of interned strings */
js_LeaveSharpObject(cx, NULL);

pn2 = AssignExpr(cx, ts, tc);

entry->op = op;
* sure to free prop's slot and unlink it from obj's property list.

jsval *rval)

#ifdef TEST_CVTARGS
JSObject *proto = OBJ_GET_PROTO(cx, obj);
jsdouble *jsNaN;

* to build bustage when someone makes a change that depends in a subtle way
/* Even with the above, SunOS 4 seems to detonate if tm_zone and tm_gmtoff

if (!prop) {

*/

{JSVERSION_1_0, "1.0"},

finalizer(cx, thing);
scope->ownercx = cx;
ida->length = i;

JS_free(cx, (void *)reportp->messageArgs[i++]);

#define JS_BYTES_PER_FLOAT 4L
js_NewSrcNote(cx, cg, SRC_HIDDEN) < 0 ||
if (pn->pn_slot >= 0) {

if (argc > 1) {
expandedTime.tm_mday,

46, 46, 40, 40, 46, 40, 40, 3, /* 49 */

buf[0] = str->chars[index];
}

}
for (i = 0; i < half; i++) {

* This special case is necessary, not an optimization


break;

{
JSScopePrivate *priv;

JS_SetProperty(JSContext *cx, JSObject *obj, const char *name, jsval *vp);


endpc = pc + script->length;

0x0000440B, /* 108 No, decimal 2 */

** JSUint64 b: The quotient of the operation


/* Emit a bytecode pointing to the closure object in its immediate. */

case '[':

re = (JSRegExp*) JS_GetPrivate(cx, obj);

* JS string type implementation.


40, 40, 40, 40, 40, 40, 40, 40, /* 110 */

ok = JS_FALSE;
} else
return JS_TRUE;
if (script->principals)
}
}
/* Set by JS_SetCallReturnValue2, used to return reference types. */

i -= Bias;

preBytes = rt->gcBytes;

Number(JSContext *cx, JSObject *obj, uintN argc, jsval *argv, jsval *rval)
str = cx->runtime->emptyString;
date_setUTCFullYear(JSContext *cx, JSObject *obj, uintN argc,
printf("#define JS_WORDS_PER_DWORD_LOG2 %dL\n",
Log2(sizeof_dword/sizeof_word));
const char *file;
break;
{

SECURITY_CHECK(cx, NULL, "renameTo", file); /* may need a second argument!*/

todo = Sprint(&ss->sprinter, "%s", lval);

zs = (si >> 16) + (ys >> 16);

0x34570002, /* 53 Ll, hasUpper (subtract 209), identifier start */

if (!date)

op = (JSOp) JSVAL_TO_INT(rval);

va_list *app)

return JS_TRUE;
jsint i, j;
static JSHashNumber
return JS_FALSE;

/* burn the leading lines */

goto error;

//#endif
JS_ReportErrorNumber(cx, js_GetErrorMessage, NULL, JSMSG_CANT_WATCH,

* ECMA 12.6.3 says to eval the LHS after looking for properties
argv[0] = STRING_TO_JSVAL(str);
return JS_FALSE;
{

/*
return JS_FALSE;

if (!pn3)

if (!*messagep)
return;
JSDHashEntryHdr *entry;

void
* Copyright (C) 1998 Netscape Communications Corporation. All

op = JS_GetTrapOpcode(cx, jp->script, pc);

}
85, 85, 85, 85, 15, 60, 15, 60, /* 51 */
40, 40, 40, 40, 46, 40, 46, 40, /* 35 */
reportWarnings = JS_TRUE;
lastc = c;

JSDHashEntryHdr *entry, *probe;


case 'f':
}

* The contents of this file are subject to the Netscape Public


SPROP_SETTER_SCOPE(sprop, scope)),
#define JS_BUG_EMPTY_INDEX_ZERO 1 /* o[""] is equivalent to o[0] */
# include "jsautocfg.h" /* Use auto-detected configuration */

*/

ok = OBJ_DEFINE_PROPERTY(cx, target, id, value, NULL, NULL,

return JS_FALSE;

return ok;
#ifdef HAVE_MEMORY_H
return OFF2STR(sp, off);

case '9':
return log2;

}
}

#define MEM_BLOCK 8192


}
str = JS_NewString(cx, bytes, strlen(bytes));
/* Otherwise, replace obj with a new RegExp object. */
JS_SetCallReturnValue2(JSContext *cx, jsval v);

if (!date)
taglen += str->length + 2 + endlen + 1; /* 'str</end>' */

* Also allow the Unicode line and paragraph separators.

do {

free(fl_list_table);

d = js_DoubleToInteger(d);

*/
{

if (length > 0) {
JSAtom *getterAtom;
if (sn && SN_TYPE(sn) == SRC_HIDDEN)
case '0':
* the engine are predicated on OBJ_IS_NATIVE or equivalent checks. These uses

if (!JS_XDRUint32(xdr, &b))

else
* Conceivably this could actually be used, but there is lots of code out
case 1: *--tobufp = (unsigned char)onechar; break;

fprintf(fp, " total bytes allocated: %u\n", stats->nbytes);

jsid id;

JSAtomListElement *
z = (*bx >> 16) - (zs & 0xffff) - borrow;

goto out; \

while(x < xae);


fun = fp->fun;

/*
ungetc(ch, fh);

16, 16,
16, 56, 16, 16, 16, 16, /* 10 */
/* Allocate 1 + 1 at end for closing brace and terminating 0. */
#define PR_ArenaCountAllocation PL_ArenaCountAllocation

if (clasp->checkAccess) {

case TOK_DOT:
JS_IsDebuggerFrame(JSContext *cx, JSStackFrame *fp);

#include "jsexn.h"

scope->u.link = NULL;
rv = (*ss->stuff)(ss, " ", 1);

if (dp > rdata->repstr->chars && dp[-1] == '\\')

{"lastParen",
goto out;
notsharp = JS_TRUE;
* Compute a pointer to the last JSParseNode element in a singly-linked list.

#endif /* !JS_HAS_XDR */

case GCX_DOUBLE:

JSNative call;

for (i = 0; i < n; i++) {


METER(rt->gcStats.freelen--);
}

return NULL;

* JS_NewScriptObject, and root the resulting object using JS_Add[Named]Root.


* function f() { return this }
#define M_LOG2E 1.4426950408889634074
* correct action would have been to round up instead of down. An
goto retfree;
else {
{
80, 80, 80, 80, 80, 46, 60, 80, /* 44 */

#include "jsarena.h" /* Added by JSIFY */


if (js_NewSrcNote(cx, cg, SRC_HIDDEN) < 0 ||
obj = JSVAL_TO_OBJECT(v);

if (JS_HAS_STRICT_OPTION(cx)) {
js_GetArgsObject(JSContext *cx, JSStackFrame *fp);
JS_PUBLIC_API(JSBool)
{

*vp = INT_TO_JSVAL((jsint)str->length);
{

/* This matches the ECMA escape set when mask is 7 (default.) */

return pn;
case JSOP_CALL:
if ($infile !~ /^prmj/) {

return dp;

js_FreeSlot(cx, scope->object, slot);


# error "JS_HAS_EXCEPTIONS must be defined to use JS_HAS_ERROR_EXCEPTIONS"
str = JS_NewUCStringCopyZ(cx, va_arg(ap, jschar *));

/*
if (JS_TOLOWER(c) == 'e') {

js_with_statement_str, /* WITH */
JSHashNumber num = (JSHashNumber) key; /* help lame MSVC1.5 on Win16 */

{
hook(cx, &frame, JS_FALSE, &ok, hookData);
*vp = STRING_TO_JSVAL(JS_NewStringCopyZ(cx, unicodestring));
if (!LookupArgOrVar(cx, &cg->treeContext, pn2))

uint16 bmsize; /* bitmap size, based on max char code */


}
*/
JS_EnumerateStub(JSContext *cx, JSObject *obj)

printf("\n");
if (!js_LookupProperty(cx, obj, id, &pobj, &prop))
js_InitStringClass(cx, obj) &&

continue;

uintN i, length;
rsh = 32 - lsh;

return js_ValueToUint16(cx, v, ip);


{

flag = JS_TRUE;

/*

JSFile *file = JS_GetInstancePrivate(cx, rhsObject, &file_class, NULL);


/*
return NULL;
for (k = start + m;

* js_DestroyScopeProperty purges for us).


JSObject *pobj;
JSString *idstr;
RENode *next; /* next in concatenation order */

MSG_DEF(JSMSG_CANT_LOCK, 6, 0, JSEXN_NONE, "can't lock memory")


JS_PUBLIC_API(JSBool)
if (!js_GetCallObject(cx, &frame, parent)) {
#define JS_BYTES_PER_INT64 8L
const char *filename, uintN lineno,
JSInt32 diff;

file = fopen(script->filename, "r");

extern JS_FRIEND_DATA(FILE *) js_DumpGCHeap;

return regexp_exec(cx, JSVAL_TO_OBJECT(argv[-2]), argc, argv, rval);


todo = Sprint(&ss->sprinter, "%s%s",
case 2: /* towards +infinity */
ren->flags = RENODE_SINGLE | RENODE_NONEMPTY;

OBJ_DROP_PROPERTY(cx, obj2, prop);


JS_PUBLIC_API(JSBool)
JSLL_MUL(dlsOffset, dlsOffset, us2s);

}
#define JS_HAS_SCRIPT_OBJECT 1 /* has (new Script("x++")).exec() */

}
/* set the flags */
for (dp = rdata->dollar; dp; dp = js_strchr(dp, '$')) {

if (state.parenCount == 0) {
* License Version 1.1 (the "License"); you may not use this file

extern const char js_Number_str[];

JSAtom *atom;
* building optimized as well as DEBUG.

if (!prop) {
return kidMatch;
skip[c] = (uint8)(m - i);
JSBool ok;
str2 = ATOM_TO_STRING(pn2->pn_atom);
#undef ELSE

aux = (unsigned char*)JS_malloc(cx, len);

while ((parent = OBJ_GET_PARENT(cx, thisp)) != NULL)


PeekChar(JSTokenStream *ts)

* are doing these days.


/* no native files past this point */
} else if (ValueIsLength(cx, argv[0], &length)) {
newifp->frame.rval = JSVAL_VOID;
jsword spare1;
JS_PUBLIC_API(JSBool)

#ifdef Avoid_Underflow

#endif
} else {
(js_LockScope(cx, scope), \

* Communications Corporation. Portions created by Netscape are

_p = (jsuword)JS_ArenaAllocate(pool, _nb); \

{"class", TOK_RESERVED, JSOP_NOP, JSVERSION_DEFAULT},

#define JS_BYTES_PER_BYTE 1L
fp = cx->fp;

case JSOP_TYPEOF:

j = 0;
* in an iterative use of a global regexp started from last match,
* when done. Then push the return value.
40, 40, 40, 40, 40, 40, 40, 40, /* 33 */

* Corporation, 2000

ale = js_IndexAtom(cx, atom, &cg->atomList);

(* CRT_CALL JSCheckAccessOp)(JSContext *cx, JSObject *obj, jsval id,

* to be a deadlock, other parts of the engine would have to nest scope

if (!pn)
jsval junk;

jsval *argv, jsval *rval, char *format)


if (pobj == obj &&

for (cp2 = cp; cp2 < cpend; cp2++) {


word0(rv) = L | Bndry_mask1;
JS_BEGIN_MACRO \
}

stmt->down = tc->topStmt;
return NULL;

#endif

if (c == '\\') {

JS_PUBLIC_API(JSBool)
fprintf(fp, " valid lock calls: %lu\n", rt->gcStats.lock);

} while (delta >= SN_DELTA_LIMIT);


#define MINBUCKETSLOG2 4

/*
return OBJ_DELETE_PROPERTY(cx, obj, INT_TO_JSVAL(index), rval);

#define JSVAL_TO_STRING(v) ((JSString *)JSVAL_TO_GCTHING(v))

JSLL_UI2L(s, tv.tv_sec);

#define JS_HAS_INITIALIZERS 1 /* has var o = {'foo': 42, 'bar':3} */


}
{
struct RENode *ren; /* regular expression tree root */

j = 0;
JSPROP_ENUMERATE|JSPROP_READONLY|JSPROP_SHARED,

/* Maximum number of characters (including trailing null) that one of the other
conversions

/*
if (nb > 0 && !SprintAlloc(sp, nb))
#define Infinite(x) (word0(x) == 0x7ff00000) /* sufficient test for here */

}
#if JS_HAS_GETTER_SETTER
}

mode = JSACC_PARENT;
case JSOP_INCVAR:

#endif /* JS_HAS_INITIALIZERS || JS_HAS_TOSOURCE */

* set to zero.

PN_NAME = -1,
pn->pn_pos.end = CURRENT_TOKEN(ts).pos.end;
}

// (see comment from dgeorge in jsregexp.h


if (pn2->pn_pos.end.lineno == ts->lineno &&
#if JS_HAS_INITIALIZERS

**** Start of jsxdrapi.h ****

else

if (!js_SetSrcNoteOffset(cx, cg, (uintN)noteIndex, 1,


* implied. See the License for the specific language governing

*/

if (*cp != ')') {

SIOUXSettings.autocloseonquit = true;
* Contributor(s):

goto out;
NULL, NULL);
* under the terms of the GPL and not to allow others to use your
}
{

JSBool

JS_free(cx, vsharp);
case SRC_FOR:

return (int) YearFromTime(LocalTime(*date));

if (d < 0 || str->length <= d) {

case JSTRAP_CONTINUE:

tn->length = (ptrdiff_t) catchLength;

return JS_FALSE;

return NULL;
JSInt64 __pascal __loadds __export

static JSWatchPoint *
tp->t_atom = atom;

sprintf(fout, fin, d);


}

SCOPE_ADD(priv,

* which is likely spurious.

case '4':

/*
/* We use little-endian byteorder for all encoded data */
if (!str) {

}
{
}

uint32 entrySize, entryCount;


#if JS_HAS_DEBUGGER_KEYWORD
d += d2;

* escape sequence - returning it's value if so.

JSArenaStats stats;

JS_BEGIN_MACRO \

return JS_TRUE;

if (js_Emit1(cx, cg, op) < 0)

}
usetz ? " " : "",

DateFromTime(local),
56, 56, 56, 56, 56, 56, 56, 56, /* 0x5800 */
**** Start of jsdhash.c ****

cp += 4;
#define script_static_methods NULL
}

exponentialNotation = JS_TRUE;

size_t i;

*rval = STRING_TO_JSVAL(str);
if (!JSVAL_IS_FUNCTION(cx, fval)) {
/* Clamp it to the nearest representable year. */

40, 40, 40, 40, 40, 40, 40, 40, /* 106 */

return oldcb;

collected_args = cp;
(1 << JSCT_OTHER_LETTER) | \
}
fp->script ? fp->script->principals

* provisions of the GPL are applicable instead of those above.


ok = HasFinalReturn(pn->pn_kid1);
JS_snprintf(numBuf, sizeof numBuf, "%u", (unsigned) i);
} else {
case JSOP_BITAND:

default:
} else {

goto out;

return "JavaScript-C 1.5 pre-release 3 2001-03-07";


28, 28, 28, 28, 28, 28, 28, 28, /* 0x4000 */
{

}
case '^':
atom = GetSlotAtom(jp, js_GetArgument, GET_ARGNO(pc));

jschar *buf;

i = 0;

JSString *str, *str2;

k = hi0bits(y);

} else if (c == ':') {

size_t length, start, k;

if (!obj) {
JSMSG_DEPRECATED_USAGE,

}
/*

* the provisions above, a recipient may use your version of this

{
return log2;
// DREAMWEAVER: added JavaScript profiling - see jsprofiler.h

const char js_isFinite_str[] = "isFinite";

if (!newReport->ucmessage)
return;
if (js_GetToken(cx, ts) != tt) { \

"digit",

"if statement", /* IF */
}
if (!Decompile(ss, pc + off, diff))
local ($replacement);

* Make sure linebuf contains \n for EOL (don't do this in

JSString *str;
bufp += strlen(bufp);

56, 56, 56, 56,


56, 56, 56, 56, /* 0x5000 */
default:
buf[0] = '0'; buf[1] = '\0'; /* copy "0" to buffer */

}
parent = js_ConstructObject(cx, &js_ObjectClass, NULL,
{

extern JS_PUBLIC_API(void)

JSDHashTable *table;

while (pn && js_MatchToken(cx, ts, TOK_BITOR)) {

/* Emulate eval() by using caller's this, scope chain, and sharp array. */

/*

tl->fat = NULL;

x <<= 2;
if (!js_TryMethod(cx, obj, cx->runtime->atomState.toStringAtom, 0, NULL,

* JS atom table.

{ NULL, count } ,

#include <windows.h>

goto bump_up;

pn->pn_kid1 = pn1;
prefix = JS_smprintf("%s:", report->filename);
#include "jspubtd.h"

} Sprinter;
DeleteListOfFatlocks(fl_list_table[i].taken);

#include "jstypes.h"
format--;
JS_ARENA_ALLOCATE_TYPE(ale, JSAtomListElement, &cx->tempPool);

JS_PUBLIC_API(JSBool)

*ucs2p |= cont1 & CONTINUING_OCTET_MASK;


}

*/
* The basic operation of the locking primitives (js_Lock, js_Unlock,

return stub->key == key;

*/
*
{
static JSBool
return &res->rightContext;
JSPropertyCacheEntry *_pce = &_cache->table[_hashIndex]; \
static int fill_n(SprintfState *ss, const char *src, int srclen, int width,
pn = NewParseNode(cx, &CURRENT_TOKEN(ts), PN_NULLARY, tc);

* alias, name, OBJ_GET_CLASS(cx, obj2)->name);


}

rt = cx->runtime;
out:
* as well as "first".
tracefp);
if (*cp == 0 &&
MSG_DEF(JSSMSG_NOT_AN_ERROR, 0, 0, JSEXN_NONE, "<Error #0 is
reserved>")

uintN argc, jsval *argv, jsval *rval)

JS_ASSERT(scope->u.count == 0);
atom = js_AtomizeString(cx, str, ATOM_TMPSTR | flags);
break;

return JS_FALSE;
return JS_TRUE;

lval = ATOM_BYTES(atom);

ok = OBJ_DEFINE_PROPERTY(cx, obj, (jsid)atom, rval, NULL, NULL,

if (!out)
win2un = JSLL_INIT(0x19DB1DE, 0xD53E8000),
OPDEF(JSOP_NOP, 0, "nop", NULL, 1, 0, 0, 0, JOF_BYTE)

JSMSG_BAD_OCTAL,

* (We could get a more accurate k by invoking log10,

{
pn2->pn_slot = -1;

#endif /* JS_HAS_INSTANCEOF */
JS_PUBLIC_API(JSBool)
}

*rval = argv[0];

} else {

if ((cp == state->cpend) || (*cp == '|'))

local ($sym) = @_;

JSLL_NEG(_a, a); \

* The Initial Developer of the Original Code is Netscape


if (c == '+' || c == '-') {

JS_EnumerateStandardClasses(JSContext *cx, JSObject *obj);


if (max == 0)
#define jsdbgapi_h___
* March 31, 1998.

if (JSVAL_IS_INT(v)) {
jsval *rval)
}

d = 0.0;
}
#define PR_HashTableDestroy PL_HashTableDestroy
static JSObject *

CHECK_REQUEST(cx);

js_DateSetYear(JSContext *cx, JSObject *obj, int year)

}
rval = FETCH_OPND(i);
if (!ok)
#ifdef DEBUG

#endif /* JS_HAS_CALL_OBJECT */

((((jsuword)(obj) >> JSVAL_TAGBITS) ^ (jsuword)(id)) & PROPERTY_CACHE_MASK)

46, 40, 40, 40, 40, 40, 40, 40, /* 47 */


// DREAMWEAVER added this function
} else {
extern JSBool
goto out;
if (!js_EmitTree(cx, cg, pn3))

#ifdef XP_OS2
struct Bigint {

* If you wish to allow use of your version of this file only

break;

uint32 tableLength;

if ((he = *hep) != NULL) {


if(!JS_CallFunction(cx, obj, func, 1, args, &v)){
goto error;
funobj = (JSObject *) closure;

js_AddRoot(JSContext *cx, void *rp, const char *name)

#endif /* jsregexp_h___ */

#define JSREPORT_IS_EXCEPTION(flags) (((flags) & JSREPORT_EXCEPTION) != 0)


}
/*

obj->slots[slot] = v;
if (i < low)
extern JSBool js_IsObjLocked(JSObject *obj);
if (tt == TOK_ERROR)

#ifndef OLD_GETTER_SETTER

js_ReportCompileErrorNumber(cx, ts, NULL, JSREPORT_ERROR,

lineno = script->lineno;
parent = OBJ_GET_PARENT(cx, JSVAL_TO_OBJECT(argv[-2]));
res->input = JSVAL_TO_STRING(*vp);

rval = DOUBLE_TO_JSVAL(rt->jsNaN);
re = (JSRegExp *) JS_GetPrivate(cx, reobj);

bdr->digitMask = bdr->base >> 1;

};

/*
bupline = line2;
offset += SN_DELTA(sn);
*/

h = (h >> 28) ^ (h << 4) ^ *s;

*vp = JSVAL_VOID;

m2 += i;
{
* gets stuck at the end of the replacement string and may
JSXDR_DECODE,
return JS_FALSE;
/* -*- Mode: C; tab-width: 8; indent-tabs-mode: nil; c-basic-offset: 4 -*-
MSG_DEF(JSMSG_PAREN_BEFORE_SWITCH, 80, 0, JSEXN_SYNTAXERR, "missing ( before
switch expression")
nas[cn].type = TYPE_INTN;
NamedRootDumpArgs *args = (NamedRootDumpArgs *) arg;

/* XXXbe why does NEED even allow or cope with non-ENCODE mode? */
if (m2 > 0 && s2 > 0) {

#if JS_HAS_REGEXPS

void

* Communications Corporation. Portions created by Netscape are


}
}

goto out; \

* except in compliance with the License. You may obtain a copy of


}

return JS_FALSE;

jsint i;
hasDefault = JS_TRUE;
OBJ_DROP_PROPERTY(cx, obj, (JSProperty *)sprop);
#endif
static void Datom(JSAtom *atom) { if (atom) DumpAtom(&atom->entry, 0, gErrFile); }

getter = clasp->getProperty;

**** End of jspubtd.h ****

errno = ERANGE;
return JS_InitClass(cx, obj, NULL, &js_ArgumentsClass, Arguments, 0,

case PN_LIST:

if (!proto)

SECURITY_CHECK(cx, NULL, "creationTime", file);


JS_ASSERT(reportp);

return NULL;

cp = matchNonGreedyKid(state, ren, num,


(JSVAL_IS_OBJECT(v) && JSVAL_TO_OBJECT(v) && \

#define JSLL_UI2L(l, ui) ((l) = (JSInt64)(ui))


case TOK_UNARYOP:

static JSBool
#include "jsobj.h"

}
js_alloc_temp_entry, js_free_temp_entry
JSString *idstr, *valstr, *str;
The parameters are as follows:

goto out;

log2 += 16, n >>= 16;

/* Always force, so we wait for any racing GC to finish. */


js_InitRegExpClass(JSContext *cx, JSObject *obj);

rv += ulp(rv);

** TYPES: JSPackedBool
js_SweepAtomState(&rt->atomState);

/*
JSScopeProperty *sprop;

*
CHECK_FOR_FUNNY_INDEX(id);
pn2->pn_pos.end = CURRENT_TOKEN(ts).pos.end;

"Boolean",

pn->pn_arity = PN_NULLARY;
* Software distributed under the License is distributed on an "AS
k = (int32)ds;
if (!pn4)
sprop = (JSScopeProperty *)prop;
#define JS_HAS_PROP_DELETE 1 /* delete o.p removes p from o */
GCMarkNode *next = NULL;
/* Date.getSeconds is mapped to getUTCSeconds */

#define JS_LockRuntime JS_Lock

JS_ASSERT(**rve == '\0');

JSAtom *
c = TOK_BITAND;
"bol",

if (closurep)

case JSTRAP_THROW:

struct align_prword {

if (e <= Ten_pmax) {

return file->path[strlen(file->path)-1]==PIPE_SYMBOL;
}
*/

fmt0 = fmt - 1;
}
JSObject *glob, *it;

for (index = 0; index < length; index++) {

#endif
uintN i;
*
JS_UNLOCK_OBJ(cx, obj); \

if (JSVAL_IS_GCTHING(v)) {
{

/* off is the previous JSOP_CASE's bytecode offset. */


eps = ieps*d + 7.;

* catch discriminant nodes are binary


* is included in all copies of any software which is or includes a copy

return JS_TRUE;
JS_ENABLE_GC(cx->runtime);
return JS_FALSE;

#else
#include "jsdbgapi.h"

/* Get the immediate catch variable name into id. */


} else {
/*
growth = (nchars + (sepstr ? seplen : 0) +

extern char js_delete_str[];

struct JSTreeContext { /* tree context for semantic checks */

*/

*/
if (!js_EmitTree(cx, cg, pn3))
js_NewSrcNote2(JSContext *cx, JSCodeGenerator *cg, JSSrcNoteType type,
else if (nd < 16)

0x3A170002, /* 26 Ll, hasUpper (subtract 232), identifier start */

JSHashTable *table; /* hash table if list gets too long */


pc = script->main + i;
static JSBool
}

* the object is collected. Any persistent uses of the JSErrorReport contents

propobj->slots[JSSLOT_ITER_STATE] = iter_state;
"PR_ALIGN_OF_POINTER",
js_NewSrcNote2(JSContext *cx, JSCodeGenerator *cg, JSSrcNoteType type,
ok = OBJ_DEFINE_PROPERTY(cx, obj, id, JSVAL_VOID, NULL, NULL,

k = 0;
continue;
exn = errorToExceptionNum[errorNumber];

i = cmp(a,b);
"PR_ArenaCountRelease",

if (op == JS_DHASH_ADD) {

ren2 = NewRENode(state, REOP_ALT, kid);


uintN i, n, b, c, lastc, foldc, nchars;
JSScopePrivate priv;

}
46, 60, 60, 60, 60, 60, 60, 60, /* 52 */
} else {
fp->sharpDepth++;

{
/* Yield to pending GC operations, regardless of request depth */

goto bump_cp;
return JS_FALSE;
s1++;
* This facilitates sending source to JSD (the debugger system) in the shell

numStr = JS_dtostr(numBuf, sizeof numBuf, DTOSTR_STANDARD, 0, d);

JS_PUBLIC_API(jsrefcount)

state->ok = JS_FALSE;

math_atan2(JSContext *cx, JSObject *obj, uintN argc, jsval *argv, jsval *rval)
JS_DefineUCProperty(JSContext *cx, JSObject *obj,

* provisions of the GPL are applicable instead of those above.

(prevc == '/' && mon >= 0 && mday >= 0 && year < 0)) {

* only to avoid inevitable early growth from JS_DHASH_MIN_SIZE).


extern JSString *
#define ALE_ATOM(ale) ((JSAtom *) (ale)->entry.key)
40, 40, 40, 40, 40, 40, 40, 40, /* 93 */
}

} else {

#define fd_ceil ceil

"PR_AttachThread",

* version of this file under the NPL, indicate your decision by


***********************************************************************/
}
sprop->next = NULL;

return t;
break;
static const char *incop_name_str[] = {"increment", "decrement"};

#include <stdlib.h>
if (cx->version == JSVERSION_1_2) {

* + ( (d2-1.5)*0.289529654602168 + 0.176091259055681 );
* Software distributed under the License is distributed on an "AS
}

};
#if defined(SUNOS4)

* This header is included only in other .h files, for convenience and for
#define CHECK_VOID_TOSTRING(cx, v) \
}

if (preserveTop) {

void *newScriptHookData;

} else {

extern char js_void_str[];

extern void js_FinishDtoa(void);


}

*/
if (!js_LookupProperty(cx, obj, (jsid)atom, &pobj, (JSProperty **)&sprop))
#include "jsapi.h"

/* balance}] */
JSAtom **vector;
{"getFullYear", date_getFullYear, 0,0,0 },
JS_PUBLIC_API(JSBool)
case TOK_DOT:

frame.sharpDepth = 0;

#endif
str = js_DecompileValueGenerator(cx, fp ? vp - fp->sp : JSDVG_IGNORE_STACK,

js_AllocTryNotes(JSContext *cx, JSCodeGenerator *cg);


* The contents of this file are subject to the Netscape Public

return JS_FALSE;
report->uclinebuf);
e -= i;
m2 -= i;

static JSBool
static JSBool

currentGetter, currentSetter,

JSLL_SUB(exttime,exttime,tmp);

JSAtom *atom;

extern JSBool
/* Collect the lengths for all the function-argument arguments. */

*vp = DOUBLE_TO_JSVAL(dp);
} else {

extern JS_PUBLIC_API(JSBool)

d1 = y << (32-Ebits + k) | w >> (Ebits - k);


return JS_TRUE;
*vp = OBJ_GET_SLOT(cx, obj, slot);

#include <string.h> /* for memset, called by jsarena.h macros if DEBUG */

JSStackFrame *fp;
intN caseNoteIndex = -1;
"%s %s %.2d %.2d:%.2d:%.2d GMT%+.4d %s%s%.4d",
JSObject *
case REGEXP_STATIC_LAST_PAREN:
"trying to open it, proceeding", file->path);

#define JS_HAS_DEBUGGER_KEYWORD 1 /* has hook for debugger keyword */


#define ATOM_MARK 0x04 /* atom is reachable via GC */

#include "jsinterp.h"
{
offset = 0;
{"getUTCMilliseconds", date_getUTCMilliseconds,0,0,0 },

};
return 2;
*

if (*rval != JSVAL_VOID)

if (offset > target)


MSG_DEF(JSMSG_NOT_A_SUBSPECIES, 73, JSEXN_NONE, 2,
extern JS_PUBLIC_API(JSTrapStatus)

RecycleTree(pn2, tc);

JSPRHashFunction keyHash; /* key hash function */

js_InflateString(JSContext *cx, const char *bytes, size_t length);

* by making pobj be obj's prototype or parent.


* TypeError.) See 10.15.3.1.
}

}
* overrun pascal buffer. Instead we use a temp variable.

/* make sure we are not reading a file open for writing */


typedef RENode *REParser(CompilerState *state);

/* Fix up and clean up previous catch block. */

c = GetChar(ts);

if (rt->gcThread != cx->thread) {
if (!js_LinkFunctionObject(cx, fun, funobj)) {

return JS_TRUE;
sp = js_AllocStack(cx, argc, markp);
ieps++;
return 1;
* "Internal" calls may come from C or C++ code using a JSContext on which no

js_NewFileObject(JSContext *cx, char *filename)

nchains = 0;
} else {

uint32 m = n / base;
* loading oldval. XXX remove implied force, fix jsinterp.c's "second arg
{ JSEXN_ERR, js_InternalError_str, InternalError },

break;
if ((file->mode&PR_RDONLY)==PR_RDONLY) {

//#if XP_MAC

#define gc_lock_decrement(he) gc_lock_set_count(he, gc_lock_get_count(he)-1)

{
js_CloseTokenStream(cx, ts);

str_encodeURI_Component(JSContext *cx, JSObject *obj, uintN argc, jsval *argv,

#define RESOLVE_PATH js_canonicalPath /* js_absolutePath */

static JSParseNode *

FILE *fh)

pn2->pn_atom = CURRENT_TOKEN(ts).t_atom;

/* Pop and conditionally atomize the element id. */


{
return JS_FALSE;

*/

{
if (n & (n-1))
}
JSString *str;
if (slot >= scope->map.nslots) {
regexp_static_getProperty, regexp_static_getProperty},

*
PUSH_OPND(JSVAL_ONE);
(pathname[index]!=FILESEPARATOR2)) index--;
if (ren)
char numBuf1[12], numBuf2[12];

lval,

DestroyTrap(cx, trap);
js_FinishCodeGenerator(cx, &cg2);
if (!str)
SAVE_SP(fp);

}
ULong *xa, *xa0, *xb, *xb0;

JSRuntime *rt;

JSHashNumber keyHash, const void *key, void *value)


str = js_ValueToString(cx, OBJECT_TO_JSVAL(obj));

freeRENtree(cx, re->ren, NULL);

flags = 0;
{"getTimezoneOffset", date_getTimezoneOffset, 0,0,0 },

JS_PUBLIC_API(JSBool)

JSInt64 __pascal __loadds __export

46, 46, 46, 46, 46, 15, 46, 46 /* 121 */


pc += len;
static int32

JS_DestroyIdArray(cx, ida);

return NULL;
JS_PropertyStub, JS_PropertyStub, JS_PropertyStub, JS_PropertyStub,

if (js_options[j].flag == flag) {

JSDOUBLE_HI32(d) ^= JSDOUBLE_HI32_SIGNBIT;

* k = (i - Bias)*0.301029995663981
} else if (type == SRC_NEWLINE) {
if (tt != TOK_EOF) {
return NULL;

void *tempMark, JSBool *eofp)

JSPrincipals *principals;
JS_GetLocaleCallbacks(JSContext *cx);

*rv = -1;

OBJ_SET_PROTO(cx, obj, obj_proto);


* <Definitions>
VarPrefix(sn), ATOM_BYTES(atom));

METER(rt->gcStats.fail++);

if (!PatchGotos(cx, cg, stmt, stmt->breaks, CG_NEXT(cg), JSOP_GOTO) ||

/* We avoid a large number of unnecessary calls by doing the flag check first */

case JSOP_INITELEM:
#define CHECK_BRANCH(len) \
endpc = pc + script->length;

i = ( i * 10 ) + ( c - '0' );

JS_ASSERT(scope->u.count == 0);
*/
}
const char *name;
carry = z2 >> 16;
/* Usually we don't grow or shrink the table. */

} JSXDRWhence;
newchars = (jschar *) JS_malloc(cx, (str->length + 1) * sizeof(jschar));

if (action == -1 && hour == 12) { /* am */


fprintf(fp, "\nHash table statistics:\n");

sort_compare(const void *a, const void *b, void *arg);

case ASCII:

width = va_arg(ap, int);


rt->gcThread = 0;

/*

/* Avoid recursive death through js_DecompileValueGenerator. */

#define GCF_LOCKSHIFT (GCX_NTYPES_LOG2 + 2) /* lock bit shift and mask */

* UTF8 defines and macros

memcpy(newsp, frame.argv, argc * sizeof(jsval));

PRFileDesc *handle = NULL;

/* i is the number of leading zero bits in the most significant word of S*2^s2.
*/

CHECK_REQUEST(cx);
static JSBool buildBitmap(MatchState *state, RENode *ren)
*pobjp = NULL;
/* XXX should use cpp */

}
{
*formatp = format + map->length;
/* -*- Mode: C; tab-width: 8; indent-tabs-mode: nil; c-basic-offset: 4 -*-
* simplicity of type naming. The alternative for structures is to use tags,

return JS_FALSE;
}
off = GET_JUMP_OFFSET(pc2);
js_ErrorToException(JSContext *cx, const char *message, JSErrorReport *reportp)

"PR_BITS_PER_INT_LOG2",
_b = b; \

break;

goto do_setlval;

default:
* (via *app) to point past the converted arguments and their result pointers
JSTokenType tt, JSBool preorder)

#endif /* JS_HAS_NUMBER_FORMATS */

case ',': c = TOK_COMMA; break;

if (pn2->pn_slot >= 0) {

* runtime will be left in a partially initialized state, with zeroes and

free(path);
* JS File object
cx->runtime->objectHook(cx, obj, JS_TRUE, cx->runtime->objectHookData);
** need to stop when we hit 10 digits. In the signed case, we can
if (begin < 0)
}

JSMSG_BAD_CASE);

#define JS_HAS_SCRIPT_OBJECT 1 /* has (new Script("x++")).exec() */

if ((s[0] == 'I' && bufsize < 9) || (s[0] == 'N' && bufsize < 4)) {
rt->requestDone = JS_NEW_CONDVAR(rt->gcLock);
uintN i, nargc;

case TOK_STRING:
if (vsharplength) {
int hashShift;

date_setMonth(JSContext *cx, JSObject *obj, uintN argc,

"eol",

* script for fun from cg.


return JS_FALSE;

js_ReportUncaughtException(cx);

return JS_FALSE;

JSAtom *arityAtom;

#endif /* defined(_WINDOWS) && !defined(_WIN32) */

pn->pn_pos.end = pn3->pn_pos.end;

JSString *str;
wp->userid = id;

* everything up into a function definition and pass it to the


}

/* append lineno as ``, {lineno_as_str}'' */

else {
"PRPtrDiff",
if (!OBJ_LOOKUP_PROPERTY(cx, obj, (jsid)atom, &pobj, &prop))

#ifdef DEBUG
#include "jsprf.h"

#else

name = number,
cx = JS_NewContext(rt, gStackChunkSize);

This is the JavaScript error message file.

JSObject *parent)

cx->fp = &frame;

*/

OBJ_DROP_PROPERTY(cx, obj, prop);

**** Start of jsotypes.h ****


ok = JS_FALSE;
JSMSG_BAD_RETURN);
#else

if (!script->filename) {

continue;

if (*pc == JSOP_TYPEOF)
#if JS_HAS_REGEXPS
JSScopeProperty *sprop;

#endif
* This can happen when a segment ends in
return str;
printf( "malloc() error for \"%s\"\n", fmt );
(list)->pn_tail = &(pn)->pn_next; \

JS_ASSERT(JSVAL_IS_INT(rval));
state->skipped = cp2 - cp;

#include "jsarray.h"
* terms of the GNU Public License (the "GPL"), in which case the
SecFromTime(local),

goto out;

next += (InLeapYear(t) ? 29 : 28);


JSREPORT_WARNING | JSREPORT_STRICT,
if (!JSDOUBLE_IS_NaN(x)) {

JS_EvaluateScriptForPrincipals(JSContext *cx, JSObject *obj,

}
jsdouble result;

ok = JS_FALSE;

if (!js_SetJumpOffset(cx, cg, pc, high))

JS_ReportErrorFlagsAndNumber(JSContext *cx, uintN flags,


"wbdry",
}
return JS_FALSE;

char* result = (char*)JS_malloc(cx, strlen(base)+strlen(name)+2);

if (clasp->flags & JSCLASS_SHARE_ALL_PROPERTIES)


argv[-1] = STRING_TO_JSVAL(str);
op = pn->pn_op;

switch (pn2->pn_type) {

slen = prec;
static JSBool
attrs, foundp);
case '?':

#define HoursPerDay 24.0

"lock\n"

GCMarkNode *next;

if (mask == URL_XPALPHAS && ch == ' ') {

goto have_dig;
sprop = (JSScopeProperty *) sym->entry.value;
}

JSCT_END_PUNCTUATION = 22,
if (js_NewSrcNote2(cx, cg, SRC_PCBASE, CG_OFFSET(cg) - off) < 0)
#define JS_HAS_INSTANCEOF 0 /* has {p:1} instanceof Object */
{

#define JSVAL_IS_VOID(v) ((v) == JSVAL_VOID)

ok = js_FoldConstants(cx, pn, &funcg.treeContext) &&


return tagify(cx, obj, argv, begin, param->chars, end, rval);

ValueIsLength(JSContext *cx, jsval v, jsuint *lengthp)

#include "jsgc.h"

{"funny", ITS_FUNNY, JSPROP_ENUMERATE},


cx->requestDepth = 1;

*vp = OBJECT_TO_JSVAL(argsobj);
Bigint *b;

JS_ASSERT(ida);
prefix);
if (!str)
{
*/
** JSLL_L2D Convert to floating point

if (!atom)

if (strlen(linep) > 0)
older = JS_SetErrorReporter(cx, NULL);

#include "jsscript.h"
c = TOK_COLON;
script = (JSScript *) JS_GetPrivate(cx, obj);
};

for (c = '9' + 1; c < nchars; c++)

else
sn = js_GetSrcNote(jp->script, pc2);
word0(a) = L;
*pobjp = pobj;
JSRegExp *re;
}
if (vector)
**** Start of jsscan.c ****
static JSParseNode *

JSPropertyOp getter, JSPropertyOp setter, uintN attrs,


OPDEF(JSOP_SUB, 28, "sub", "-", 1, 2, 1, 8, JOF_BYTE)
/* Now S*2^s2 has exactly four leading zero bits in its most significant word.
*/
continue;

js_BoyerMooreHorspool(const jschar *text, jsint textlen,


case JSOP_PROPDEC:

}
if (!js_ValueToObject(cx, argv[0], &scopeobj))

goto out;
{
/*

JSString *str;

'\\', '\\',

JS_DestroyIdArray(cx, ida);
* The contents of this file are subject to the Netscape Public
}
if (!LookupProperty(cx, obj, name, &obj2, &prop))

ida = NULL;

JSSymbol *sym;
JS_ASSERT(!rt->gcRunning || rt->gcLevel > 0);

js_PatchOpcode(JSContext *cx, JSScript *script, jsbytecode *pc, JSOp op)

if (ownercx->scopeToShare &&

JSREPORT_STRICT,
87, 87, 87, 87, 87, 87, 87, 87, /* 65 */

len = js_Disassemble1(cx, script, pc,


nchars = 0;
*/

#define JS_UnlockRuntime JS_Unlock

* instruction if so desired. Not always possible if trapping due to exception

CHECK_REQUEST(cx);

pn = NewBinary(cx, TOK_AND, JSOP_AND, pn, AndExpr(cx, ts, tc), tc);

PROPERTY_OP(-2, CACHED_SET(OBJ_SET_PROPERTY(cx, obj, id, &rval)));


if (*cp2 == '\n')

46, 46, 46, 46, 46, 46, 46, 46, /* 103 */


int rv, n = 0;

flag = optset;
goto no_digits;

*/
if (!str)

*/
#define PRMJ_HOUR_SECONDS 3600L

return js_hash_id((const void *)v);


return JS_TRUE;

JSPR_NewHashTable(JSPRUint32 n, JSPRHashFunction keyHash,


js_NewRegExpOpt(JSContext *cx, JSTokenStream *ts,

if (base == 10) {
/* Save code space on error: let JS_free ignore null vsharp. */
/*

JS_GetElement(JSContext *cx, JSObject *obj, jsint index, jsval *vp);


fprintf(tracefp, "%4u: ", js_PCToLineNumber(script, pc));

obj = fp->sharpArray;
jsbytecode *opcodes; /* parallel stack of JS opcodes */

? JS_UnlockGCThing(cx, JSVAL_TO_GCTHING(v)) \
} \
ok = JS_FALSE;

if (!chars) {

}
cg->firstLine = cg->currentLine = lineno;

static JSParseNode *
return JS_FALSE;
JSMSG_TRAILING_COMMA)) {
VALUE_TO_NUMBER(cx, rval, d2); \
** stop when the number is zero.
sp++; \

((map)->ops == &js_ObjectOps || \

#include "jsclist.h"

ok = js_ValueToNumber(cx, v, &d); \
if (!ok) \

JS_GetFramePC(JSContext *cx, JSStackFrame *fp);

val = JSVAL_NULL;
static JSBool
* synonyms.

sharpid = ++map->sharpgen << 1;


return JS_FALSE;
jp->indent = indent;
*cp++ = ','; *cp++ = ' '; *cp++ = '"'; *cp++ = '"';

/* XXX must come after JSCLists or MSVC alignment bug bites empty lists */
return str->length;
if (!JS_SetPrivate(cx, obj, file)) {
#define GCF_TYPEMASK JS_BITMASK(GCX_NTYPES_LOG2)
args.data = data;
JS_GetScriptFilename(JSContext *cx, JSScript *script)
/* -*- Mode: C; tab-width: 8; indent-tabs-mode: nil; c-basic-offset: 4 -*-

#include "jsstr.h"
JS_GetFunctionObject(JSFunction *fun)

val = save;
}

JS_END_MACRO

JS_FinishArenaPool(JSArenaPool *pool);

if ((size_t)++j == sep->length)

0x0000500B, /* 18 No, decimal 8 */


* file under either the NPL or the GPL.
JSInt32 days = 0;

**** End of jsotypes.h ****

mhi = lshift(mhi, m2);

* Rights Reserved.

} js_options[] = {
extern JS_PUBLIC_API(JSBool)

} \
uint8 utf8buf[6];
* is immediately below, to decompile that helper bytecode via
return JS_TRUE;

while (ts->lookahead != 0) {
s = lshift(s, s2);

JS_snprintf(buf, sizeof buf, "%ld", (long)i);

#define JOF_ELEM 0x0030 /* obj[index] operation */

return NULL;

* case at the end.


*

{
* Rights Reserved.

/* No valid function object should lack private data, but check anyway. */
}
xval = JS_GetStringBytes(str);

obj = js_NewObject(cx, clasp, proto, parent);


#define JSDOUBLE_HI32_SIGNBIT 0x80000000

}
while(*--s == '9')

out:

* An id is an array index according to ECMA by (15.4):

*/

#define IS_ATOM_OFFSET(ptr) ((size_t)(ptr) < sizeof(JSAtomState))

if (!pn2->pn_next)

lval,
/* Store rval and pop stack back to our frame's sp. */
if (!lval)

*/

*/
JS_free(cx, path);

static JSBool

while ((entry = PR_ReadDir(dir, PR_SKIP_BOTH))) {


for (i = 0; i < argc; i++) {
return ParseQuantAtom(state);
OPDEF(JSOP_SETTER, 124,js_setter_str,js_setter_str,1, 0, 0, 0, JOF_BYTE)

goto bad;
}

*/

CHECK_REQUEST(cx);

JS_free(cx, file->path);
for (j = 0; i < n; i++, j++)
JSHashNumber
*/
jsval *rval)

jsid id;

if (flag == HT_FREE_ENTRY)
* rights and limitations under the License.
printString(JSVAL_TO_STRING(val));

atom = GET_ATOM(cx, script, pc);

js_hash_object(const void *key)


SRC_CONST = 21, /* JSOP_SETCONST in a const decl */

tm = *ptm;
nbytes += args.nbytes;

pc += len - oplen;
year = *argp++;

* not already in the table).


* getting and setting variables (which will be stored as special slots in
return JS_FALSE;

pn = NewParseNode(cx, &CURRENT_TOKEN(ts), PN_LIST, tc);

return JS_TRUE;

#if JS_HAS_OBJ_PROTO_PROP

TOK_HOOK = 11, TOK_COLON = 12, /* conditional (?:) */

jsid id, id2;

#ifdef IS_LITTLE_ENDIAN
JS_ArenaCountAllocation(pool, nb);

ok = OBJ_LOOKUP_PROPERTY(cx, obj, INT_TO_JSVAL(index), &obj2, &prop);


}
JS_PUBLIC_API(JSClass *)
tp->t_op = MatchChar(ts, '=') ? JSOP_NEW_NE : (JSOp)cx->jsop_ne;
static char *

fwrite(message, 1, ctmp - message, gErrFile);

JSPR_CompareStrings(const void *v1, const void *v2);


extern JS_PUBLIC_API(JSBool)
{

if (!name)

static JSBool
* Copyright (C) 1998 Netscape Communications Corporation. All
// DREAMWEAVER: replacing
REGEXP_PAREN_SUBSTRING with js_RegExpParenSubString
sym_id(((JSScopeProperty *)_pce_prop)->symbols) == id && \
return ren;
/* Grow the buffer */

JSLL_ISHL(tmp, 0x5D, 32);


56, 56, 56, 56, 56, 56, 56, 56, /* 0xCC00 */
}

#if defined(XP_OS2)
#define CHECK_RANGE() if (inrange) { MATCH_BIT(lastc); MATCH_BIT('-'); \

#endif
qp->hi = q1;
/*
char *_m = (char *)(mark); \

str = JS_NewString(cx, names, strlen(names));


typedef JSInt64 int64;

atom = js_AtomizeObject(cx, fun->object, 0);

return JS_FALSE;
*p = '0';
}
JS_ASSERT(surplus >= 0);

js_DestroyContext(cx, JS_FORCE_GC);
*idp = ida->vector[state->next_index++];

#Get rid of #include "prlog.h"


#!/usr/local/bin/perl
JS_NOTIFY_REQUEST_DONE(rt);

reportp->messageArgs[argCount] = NULL;
}

#ifdef JS_THREADSAFE
str = js_ValueToString(cx, argv[0]);
while ((cp < state->cpend) && (c = *cp) != '|' && c != ')') {
JS_ArenaCountRelease(pool, _m); \

d = 0;
js_FinishCodeGenerator(cx, &cg);

if (pn2->pn_slot < 0 || !(pn2->pn_attrs & JSPROP_READONLY)) {


/* Object has a private scope; Enumerate all props in scope. */
static JSParser MulExpr;
dp = JSVAL_TO_DOUBLE(v);
todo = Sprint(&ss->sprinter, "%s", rval);

* Alternatively, the contents of this file may be used under the


}

* Skip eval and debugger frames when looking for the function whose code
* return reference types. See JSOP_SETCALL just below for

goto badchar;

EMIT_FINALLY_GOSUB(cx, cg, jmp);

proto = JS_InitClass(cx, obj, NULL, &js_FunctionClass, Function, 1,

uintN count;
if (radix != 0 && (radix < 2 || radix > 36)) {

if (width > cvtwidth) {

/* Find a prototype property with the same id. */

}
60, 60, 60, 60, 60, 60, 60, 60, /* 12 */
goto enum_next_property;
x >>= 16;

cx = jp->sprinter.context;

return JS_FALSE;

js_getter_str);
/* Close before proceeding */

: "r" (w), "r" (nv), "a" (ov)


#ifndef jshash_h___

10, 10, 10, 10, 10, 10, 10, 10, /* 1 */

fval = argv[-1];

(int)ren->offset, (ren->next) ? (int)ren->next->offset : -1,

js_GetErrorMessage, NULL,

* provisions of the GPL are applicable instead of those above.

ptrdiff_t off);
case TOK_WHILE:

***********************************************************************/

//#if XP_MAC
/* Initialize the JSGCPageInfo records at the start of every thing page. */
/* Let the setter modify vp before copying from it to obj->slots[slot]. */
pc += JUMP_OFFSET_LEN;
}
if (buffer != smallBuffer)
report.filename = fp->script->filename;
* JSOP_FORARG and JSOP_FORVAR don't require any lval computation
} while (JS_ISFORMAT(c));
result = DateFromTime(result);

#define JS_HAS_EVAL_THIS_SCOPE 1 /* Math.eval is same as with (Math) */

#define JS_ISSPACE(c) ((JS_CCODE(c) & 0x00070000) == 0x00040000)


* they're being called for tutorial purposes.

VALUE_TO_OBJECT(cx, lval, obj);


}

fl->susp = 0;

#define fd_atan2 atan2


JS_ReportErrorNumber(JSContext *cx, JSErrorCallback errorCallback,
{"split", str_split, 1,0,0},
}

z = fd_sin(x);

break;

date_toDateString(JSContext *cx, JSObject *obj, uintN argc,


}

if(file->isOpen && !file->isNative){

CHECK_REQUEST(cx);

JSSMSG_UNEXPECTED_EOF,
#endif

continue;

JSContext *cx = xdr->cx;


PRExplodedTime
{

hep = JS_HashTableRawLookup(table, hash, obj);

sprop->id = INT_TO_JSVAL(tinyid);
nbytes = sizeof *sprop;
if (!OBJ_SET_PROPERTY(cx, obj, id, &argv[i]))

table->hashShift = JS_DHASH_BITS - log2;


int32 lineno;
{

break;

pn->pn_left = pn2;
js_HasInstance(JSContext *cx, JSObject *obj, jsval v, JSBool *bp)
static JSObjectOps *

* The Initial Developer of the Original Code is Netscape


pn2->pn_op = JSOP_SETNAME;

{
#endif
return 7;

jschar c;

pn2 = NewParseNode(cx, &CURRENT_TOKEN(ts), PN_LIST, tc);


jsbytecode *pc2 = pc;

j = 0;

u.l = (long)va_arg(ap, unsigned int);


#include "jsscope.h"
if (!result) return NULL;

/* Lock before clearing to interlock with ClaimScope, in jslock.c. */

oldsp = fp->sp;

15, 15, 15, 15, 15, 15, 15, 15, /* 83 */

if (JS_HAS_STRICT_OPTION(cx) &&
* get the difference in seconds between this time zone and UTC (GMT)
label = CURRENT_TOKEN(ts).t_atom;

JSSharpObjectMap *map;
pn2->pn_kid3 = Statements(cx, ts, tc);

JSFatLock *next;
*

OBJ_DROP_PROPERTY(cx, obj, prop);

return -1;

return JS_TRUE;

static JSBool

if (parsenodes - recyclednodes > maxparsenodes)

* N.B.: fp->argv must be set, fp->argv[-1] the nominal 'this' paramter as


#define JSLL_OR2(r, a) ((r).lo = (r).lo | (a).lo, \

pn3->pn_left = NULL;
* IS" basis, WITHOUT WARRANTY OF ANY KIND, either express oqr
extern JS_PUBLIC_API(JSBool)

if (_index != 0) { \

fp->argc = (uintN)argc;

#define JS_HAS_OBJ_PROTO_PROP 1 /* has o.__proto__ etc. */


2 + (mode & 1). These modes are mainly for
random_init(JSRuntime *rt)

* operating-system dependence on strftime (which

JSPROP_SETTER, NULL);
}

#define JS_HAVE_LONG_LONG
xval,

* Propagate NONEMPTY to the front of a concatenation list, so that the


if (tt == TOK_DEFAULT) {
q1--, r1 += b;

#endif

for (k = 0; k < length; k++) {


case REOP_DOTSTARMIN:

JSContext *cx;

}
stmt = stmt->down;
case JSOP_DUP:
js_DateSetSeconds(JSContext *cx, JSObject *obj, int seconds);
int32 count, i, j;
/* Fill ts->userbuf so that \r and \r\n convert to \n. */

JS_FinishArenaPool(&cx->stackPool);

/* See ECMA 15.1.2.2. */

#define ATOM_IS_BOOLEAN(atom) JSVAL_IS_BOOLEAN(ATOM_KEY(atom))


JS_PUBLIC_API(JSIdArray *)

JS_PUBLIC_API(void) jsll_udivmod(JSUint64 *qp, JSUint64 *rp, JSUint64 a, JSUint64


b)

/* Return slots not pushed to the current stack arena. */


if (sym_id(sym) == id) {
#endif /* JS_BUG_SHORT_CIRCUIT */

c = *++s;
scope->u.count = 0;

switch (tt) {

ITS_COLOR, ITS_HEIGHT, ITS_WIDTH, ITS_FUNNY, ITS_ARRAY, ITS_RDONLY

switch (op) {
clasp = OBJ_GET_CLASS(cx, *objp);

2}; /* DTOSTR_PRECISION */
#define OBJ_GET_ATTRIBUTES(cx,obj,id,prop,attrsp) \
JSBool ok;
* implied. See the License for the specific language governing
}

if (!lval)

MSG_DEF(JSMSG_PAREN_AFTER_WITH, 100, 0, JSEXN_SYNTAXERR, "missing ) after


with-statement object")
if (!useful) {

}
return JS_TRUE;

if (noprop)
re = (JSRegExp*) JS_malloc(cx, JS_ROUNDUP(resize, sizeof(jsword)));
if (!proto)

MSG_DEF(JSMSG_MISSING_FORMAL, 70, 0, JSEXN_SYNTAXERR, "missing formal


parameter")

* of multiplying the hash code returned from the hashKey callback (see below)

40, 46, 40, 46, 46, 46, 40, 40, /* 31 */

if (JSVAL_IS_OBJECT(v) &&
return JS_FALSE;

break;
static const char HexDigits[] = "0123456789ABCDEF"; /* NB: uppercase */
/* Arguments ndigits, decpt, sign are similar to those

case 2: *--tobufp = (onechar | BYTE_MARK) & BYTE_MASK; onechar >>=6;


OBJ_SET_SLOT(cx, obj, slot, OBJECT_TO_JSVAL(pobj));
RecycleTree(pn2, tc);

#define Bletch 0x10


* leaves the original operand value on the stack and jumps; otherwise
return JS_TRUE;

*/

typedef struct JSSubString JSSubString;

*vp = STRING_TO_JSVAL(JS_NewStringCopyZ(cx, file->path));


if (js_Emit1(cx, cg, JSOP_PUSH) < 0)
JS_ARENA_ALLOCATE_CAST(p, type *, pool, sizeof(type))

* except in compliance with the License. You may obtain a copy of

{"tracing", Tracing, 0},

WORD cbHeapSize, LPSTR lpszCmdLine )

* and server-side JS user-defined functions shared among requests.

cp = kidMatch;
JSObject *obj = (JSObject *)thing;

return rv;
#define jsbool_h___

MUST_MATCH_TOKEN(TOK_RC, JSMSG_CURLY_AFTER_BODY);

#define fd_fmod fmod


date_setTime(JSContext *cx, JSObject *obj, uintN argc, jsval *argv, jsval *rval)
/* Slide up the array to make room for argc at the bottom. */

void *data;

case 'u':
* induced by the recursive parsing (not precise syntax trees, see jsparse.h).
JSLL_SHL(g1970GMTMicroSeconds,g1970GMTMicroSeconds,16);

extern jsval

*vp = OBJECT_TO_JSVAL(js_NewDateObject(cx, expandedTime.tm_year,

JS_SetElement(JSContext *cx, JSObject *obj, jsint index, jsval *vp);


"PR_NewLogModule",

#define JS_LOCK_OBJ_VOID(cx,obj,e) (e)


/* Allocate the frame and space for vars and operands. */

jsdouble *date = date_getProlog(cx, obj, argv);


* and pointed to by 32-bit jsvals on the stack and in object properties.
* for use by JSOP_PUSHOBJ.
* Contributor(s):

Deal with pipes here. We can't use NSPR for pipes,

* object to Object.prototype, but only if the Object class hasn't

/* log(x) ~=~ log(1.5) + (x-1.5)/1.5

/* Check for overflow to avoid gobbling arbitrary decimal digits. */


JSLL_UI2L(result1,PRMJ_HOUR_SECONDS);

if (!AddToTokenBuf(cx, &ts->tokenbuf, (jschar)c))

JSAtom *callerAtom;

extern JS_PUBLIC_API(JSUint32) JS_snprintf(char *out, JSUint32 outlen, const char


*fmt, ...);

i = DBL_DIG - nd;
{
}

JS_SetDestroyScriptHook(JSRuntime *rt, JSDestroyScriptHook hook,

uint32 addMisses; /* adds that miss, and do work */

* Save the thing to the right of 'in' as origobj. Later on, we


}
JS_DefineElement(JSContext *cx, JSObject *obj, jsint index, jsval value,
if (flag != HT_FREE_ENTRY)

*p++ = '-';

Bfree(bs);
/* The scanner or one of its subroutines reported the error. */
if ((file->mode&PR_CREATE_FILE)==PR_CREATE_FILE) {

} else {
15, 15, 15, 15, 15, 15, 15, 15, /* 74 */
start = s1; /* Mark - if string is empty, we return NaN. */
high = GET_JUMP_OFFSET(pc2);
js_FinishLock(&scope->lock);
fprintf(gOutFile, "setting its property %s,",
}

return NULL;

return JS_TRUE;
case JSOP_GETPROP:

#define JS_HAS_CALL_FUNCTION 0 /* has fun.call(obj, arg1, ... argN) */


*/

(r).lo = (jslo16(_y1) << 16) + jslo16(_y0); \

todo = Sprint(&ss->sprinter, "%s ? %s : %s",


if (!SetNext(&state, ren, ren2))

MSG_DEF(JSMSG_READ_ONLY, 19, 1, JSEXN_ERR, "{0} is read-only")

static JSBool
* Check for a two octet sequence

} else if (OBJ_IS_NATIVE(pobj) && OBJ_SCOPE(pobj) != scope) {


* Date Modified by Description of modification
char buf[20];
}
{
size_t i, size;

JS_ASSERT(*pc2 == JSOP_CASE || *pc2 == JSOP_DEFAULT);

minNDigits = precision;

if (findEquivalent) {

JS_ReportOutOfMemory(cx);
*hep = &sym->entry;
* this request, but possible.

#define MEM_NEED(xdr, bytes) \


obj = NULL;
* which loaded the DLL.
ATOM_TO_STRING(cx->runtime->atomState.getAtom);

v = OBJECT_TO_JSVAL(obj);

goto out;

JSMSG_BAD_URI, NULL);

rt->lengthSquaredSum += (double)length * (double)length));

op = REOP_DOTSTAR;
}
break;

if (!pn)

return FunctionDef(cx, ts, tc, JS_TRUE);

kidMatch = matchRENodes(state, (RENode *)ren->kid, stop, cp);

}
Bfree(b);
case 'c':
oldfp = cx->fp;

if (i >= sizeof enuf - 6)


slots = (jsval *)
gc_finalizers[GCX_DOUBLE] = (GCFinalizeOp)js_FinalizeDouble;
* License Version 1.1 (the "License"); you may not use this file

return JS_FALSE;

/* get the difference between this time zone and gmt timezone in seconds */
jsid symid;

c = GetChar(ts);
if (tt == TOK_ERROR)
obj = ATOM_TO_OBJECT(atom);
JSString *str;

if (str) {

/* TODO: compile, execute, get/set other statics... */

return JS_FALSE;
return JS_TRUE;
JSTYPE_BOOLEAN, /* boolean */

parent = fp->scopeChain;

rval = POP_STR();
file->nativehandle = NULL;

break;
length = newlength;

CG_NEXT(cg) = base + offset;


return JS_FALSE;

MSG_DEF(JSMSG_BAD_PROTOTYPE, 135, 1, JSEXN_TYPEERR, "'prototype'


property of {0} is not an object")

if (fl_list_table) {

NEW_EQUALITY_OP(==, JS_FALSE);
{
* under the terms of the GPL and not to allow others to use your

}
FILE_RANDOMACCESS = -17,
}
} else {

JS_STATIC_DLL_CALLBACK(intN)

startline);

#if JS_HAS_SWITCH_STATEMENT

*/

/* Insert m in fl_list_table[i].free. */

60, 40, 40, 40, 40, 40, 40, 40, /* 25 */


#endif
}

utfbuf[0] = utfbuf[1];

if (!pn2)

len = js_GetSrcNoteOffset(sn, 0);

type = (JSSrcNoteType) SN_TYPE(sn);


for (i = 0; i < n; i++)

ok = JS_FALSE;
frame.rval = JSVAL_VOID;
nalloc = nslots;

#define JS_HAS_INITIALIZERS 1 /* has var o = {'foo': 42, 'bar':3} */

/* Initialize the String class, returning its prototype object. */

OBJ_DROP_PROPERTY(cx, fun->object, (JSProperty *)sprop);


if (cg->currentLine != (uintN) off) {

* in each Convert or PushArguments call is passed to the formatter, so that


word0(rv) -= P*Exp_msk1;

pn->pn_op = JSOP_NUMBER;

return JS_FALSE;

/* If compiling top-level statements, emit as we go to save space. */

* Append a new source note of the given type (and therefore size) to cg's

lastKid = cp;
* arithmetic (not IEEE double-extended).
** INPUTS: JSUint64 a: The dividend of the operation
15, 15, 15, 15, 15, 15, 15, 15, /* 85 */

*
z = fd_ceil(x);

extern JSBool
tn->start = (ptrdiff_t) start;

* the License at http://www.mozilla.org/NPL/

#endif

} \

rt->gcRootsHash = JS_NewHashTable(GC_ROOTS_SIZE, gc_hash_root,


return ok;

#define PCE_PROPERTY(entry) ((entry).s.property)

*/
for (i = 0; i < argc; i++)

return JS_TRUE;

/* ----------------- Platform-specific includes and defines ----------------- */

str = js_NewString(cx, chars, nchars, 0);


callobj = fp->callobj;
}
uint32 grows; /* table expansions */
if (tracefp) {
#define t_dval u.dval

ren->flags = ren2->flags & (RENODE_ANCHORED | RENODE_NONEMPTY);


#include "jsstr.h"
#endif

default_val = (JSVAL_IS_INT(id) && JSVAL_TO_INT(id) >= 0)


}

#include "jsconfig.h"

JSProperty *prop;

JSLL_I2L(tmp, 1);
0x0004000E, /* 106 Zp, whitespace */

OPDEF(JSOP_DEFCONST, 126,"defconst", NULL, 3, 0, 0, 0, JOF_CONST|


JOF_NAME|JOF_SET)

} JSFile;

const char js_constructor_str[] = "constructor";

JS_ASSERT(scope->u.count == 0);
ATOM_TO_STRING(cx->runtime->atomState.getterAtom);
array_length_getter(JSContext *cx, JSObject *obj, jsval id, jsval *vp)

* Communications Corporation. Portions created by Netscape are


step += (InLeapYear(t) ? 29 : 28);

(pathname[index]==FILESEPARATOR2))) index--;

*/
break;
js_EmitTree(JSContext *cx, JSCodeGenerator *cg, JSParseNode *pn);

nb = n * sizeof(JSHashEntry*) / 2;

SET_SCOPE_INFO(scope,__FILE__,__LINE__)))
* (Right?)

if (!JSVAL_IS_OBJECT(rval)) {
#if JS_HAS_SHARP_VARS

* License Version 1.1 (the "License"); you may not use this file

if (!str)
{

GC_POKE(cx, *vp);
JSString *str;

printf("#define JS_ALIGN_OF_WORD %dL\n", align_of_word);

return JS_TRUE;
wp->nrefs = 1;

js_ReportCompileErrorNumber(cx, ts, NULL, JSREPORT_ERROR,

xc = xc0;

#define TRYNOTE_SIZE(n) ((n) * sizeof(JSTryNote))


{

break;

break;
/* Used to synchronize down/up state change; uses rtLock. */
drop_down:

if (!JSVERSION_IS_ECMA(cx->version)) {
if (x == 0)
#if defined( _WIN32) || defined(XP_OS2)
printf("Bad number %d in js_SetupLocks()!\n", l);
JS_PUBLIC_API(intN)

a = a->next = b;

js_GetErrorMessage, NULL,

* (the most significant bit of n1 is set)

JSAtom *DateAtom;

*/

* The contents of this file are subject to the Netscape Public


}

GC_MARK(cx, JSVAL_TO_GCTHING(fp->rval), "rval", NULL);

40, 46, 40, 40, 40, 40, 40, 40, /* 43 */


* (pointers) on any host architecture. It allocates from an arena pool (see
return JS_TRUE;

JS_END_MACRO
SRC_PCDELTA = 7, /* offset from comma-operator to next POP,

if (!atom)
}

} else {

"PR_HashTableLookup",
TOK_ERROR = -1, /* well-known as the only code < EOF */

PRFileInfo info;
static JSInt64 ll_minint = JSLL_INIT( 0x80000000, 0x00000000 );
buf = JS_malloc(cx, want*sizeof buf[0]);
((year - ((year/100) * 100)) != 0)) || \

*decpt = 1;

js_InitStringClass(JSContext *cx, JSObject *obj)

int64 ms2us;

0xE0A70001, /* 103 Lu, hasLower (add -126), identifier start */


for (i = 0, j = ida->length; i < j; i++) {

* -2 if the buffer is too short


return JS_FALSE;

JS_HashTableRemove(JSHashTable *ht, const void *key)

} \
JS_PUBLIC_API(size_t)

*
return JS_TRUE;
return JS_TRUE;

* found, return true with *objp non-null and locked, and with a held property

JSString *str;
#if JS_HAS_GETTER_SETTER
todo = he;
gc_lock_set_count(he, 1);
switch (kid->pn_type) {
* that use extended-precision instructions to compute rounded

uint8 flags; /* flags */


sh->down = cx->stackHeaders;

break;
JS_free(cx, base);
{

extern JS_PUBLIC_API(jsval)
* Report an exception using a previously composed JSErrorReport.

len = GET_JUMP_OFFSET(pc);
}
sn = js_GetSrcNote(jp->script, pc);
#define JOF_SET 0x0040 /* set (i.e., assignment) operation */

#include "jsutil.h" /* Added by JSIFY */

{"max", math_max, 2, 0, 0},

#undef FAST_INCREMENT_OP
while ((c = *fmt++) != 0) {

void *mark;

str_search(JSContext *cx, JSObject *obj, uintN argc, jsval *argv, jsval *rval)

* Rights Reserved.
JSBool ok, locked;

if (status == JSTRAP_CONTINUE) {
tbsize = (size_t)(length * sizeof(jschar));

js_DestroyScript(cx, script);

if (c == '-') flags |= _LEFT;


ts->flags |= TSF_CRFLAG; /* clear NLFLAG? */
*sp = sym; \
void *thing = JSVAL_TO_GCTHING(v);
* implied. See the License for the specific language governing
}
js_Call(JSContext *cx, JSObject *obj, uintN argc, jsval *argv, jsval *rval);
return JSVAL_TO_PRIVATE(v);

* JavaScript API.

index = AllocSrcNote(cx, cg);


if (!he)
digit++;

cx->fp = &frame;

attrs = fun->flags & (JSFUN_GETTER | JSFUN_SETTER);


}
/* Now add user-supplied parens only if PopOff did not. */

40, 40, 40, 40, 40, 40, 40, 40, /* 94 */

*xc = carry;

JS_HashString(const void *key);

MatchState state;
t[i] = 0;
return NULL;

ren = NewRENode(state, REOP_FLAT1, NULL);


return atom;
(pn)->pn_type == TOK_STRING || \
*/

V = Utf8ToOneUcs4Char(octets, n);
if (d2 == 0) {
}
JS_AliasProperty(JSContext *cx, JSObject *obj, const char *name,
pn->pn_op = JSOP_IMPORTPROP;
rdata->leftIndex += cx->regExpStatics.lastMatch.length;
* accordingly. NB: We know that JSOP_DELNAME on an argument or variable

ok = js_CompileFunctionBody(cx, ts, fun) &&


if (r1 < m) {

sp[-2] = ltmp;
* sep->length to our return value.

(_oldIndex == (JSVAL_INT_MAX / 10) && \

15, 46, 46, 46, 46, 46, 46, 46, /* 36 */

if (w <= 0)
* memory allocations from a private pool of memory when possible.

JS_DHashVoidPtrKeyStub(JSDHashTable *table, const void *key)

/* -*- Mode: C; tab-width: 8; indent-tabs-mode: nil; c-basic-offset: 4 -*-


if (d == 0 || JSDOUBLE_IS_NaN(d))
atom = (JSAtom *) malloc(sizeof(JSAtom));

} else {

JS_PUBLIC_API(uint32)
pn2 = NewParseNode(cx, &CURRENT_TOKEN(ts), PN_NULLARY, tc);
if (!base) {

obj = ATOM_TO_OBJECT(atom);
#ifndef HAVE_LOCALTIME_R

}
JSNative construct;
}
if (j & 1) {
* to +0). These round-trip modes return the minimum number of significand digits
that

#define DTOSTR_VARIABLE_BUFFER_SIZE(precision) ((precision)+24 >


DTOSTR_STANDARD_BUFFER_SIZE ? (precision)+24 : DTOSTR_STANDARD_BUFFER_SIZE)
extern JS_PUBLIC_API(void)
script = JS_CompileUCScript(cx, obj, chars, length, filename, lineno);
obj = fp->varobj;
#define JS_BUG_EVAL_THIS_FUN 0 /* eval('this') in function f is f */
JS_EvaluateInStackFrame(JSContext *cx, JSStackFrame *fp,

if (!argsobj)

jsval *rval);
MSG_DEF(JSMSG_EQUAL_AS_ASSIGN, 112, 1, JSEXN_NONE, "test for equality (==)
mistyped as assignment (=)?{0}")
#define JSLL_NE(a, b) ((a) != (b))
* file under either the NPL or the GPL.
args.rt = state->runtime;

atomIndex = (jsatomid) pn2->pn_slot;

type = JSTYPE_BOOLEAN;

}
/* Skip the JSOP_PUSHOBJ-created empty string. */

JSContext *cx;
EMIT_CHAINED_JUMP(cx, cg, *last, JSOP_GOTO, jmp);
{"setTime", date_setTime, 1,0,0 },
#define JS_DLL_CALLBACK

#undef SIGNED_SHIFT_OP

JS_DumpArenaStats(stdout);
* deleted during the iteration.
lineno = 0;

js_UnlockObj(JSContext *cx, JSObject *obj)


js_IsDelegate(JSContext *cx, JSObject *obj, jsval v, JSBool *bp);
/*
typedef enum JSTrapStatus {

ImportProperty(JSContext *cx, JSObject *obj, jsid id)

(1 << JSCT_TITLECASE_LETTER) | \

if (V >= 0x10000) {
*rval = JSVAL_FALSE;
lsh = CountLeadingZeros(b.hi);

extern void
#endif

return usage();
} \

goto out2;

struct JSSharpObjectMap {
/*

begin = js_DoubleToInteger(d);

js_Emit1(cx, cg, JSOP_POP) < 0 ||

if (!str)

40, 40, 40, 40, 46, 46, 46, 46, /* 103 */


if (!str)
*
JSObject *
{
JSRuntime *rt;
#define TYPE_INT64 6

js_DateSetDate(JSContext *cx, JSObject *obj, int date);


SECURITY_CHECK(cx, NULL, "exists", file);

#define FIRST_THING_PAGE(a) (((a)->base + GC_FLAGS_SIZE) & ~GC_PAGE_MASK)

JSClass *clasp; /* if non-null, constructor for this class */

if (!pn2)

/* (uint) end could be 0, so can't use vanilla >= test */

* Convert between a C string and the XDR representation:

#include "jsopcode.h"

switch (type) {
* License Version 1.1 (the "License"); you may not use this file

"catch block", /* CATCH */

cx->resolving = NULL;
#endif
* the provisions above, a recipient may use your version of this
JS_COUNT_ARENA(pool,--);

*rval = JSVAL_FALSE;

if (!date)

}
table->ops->freeTable(table, entryStore);
JSBool allowCallSyntax)

* under the terms of the GPL and not to allow others to use your
for(; j; j >>= 1, i++)

* Avoid dependence on PRMJ_FormatTimeUSEnglish, because it


js_free_symbol(&priv, &sym->entry, HT_FREE_ENTRY);

break;

56, 56, 56, 56, 56, 56, 56, 56, /* 0xC600 */


FILE_CANWRITE = -10,
MSG_DEF(JSMSG_REDECLARED_PARAM, 164, 1, JSEXN_TYPEERR, "redeclaration of
formal parameter {0}")

JSErrorFormatString JSFile_ErrorFormatString[JSFileErr_Limit] = {
extern JS_PUBLIC_API(JSBool)
* Software distributed under the License is distributed on an "AS
ap = nas[i-1].ap;

** last for subsequent calls, or NULL if there is a malloc failure.

* address with ~1023 to find a JSGCPageInfo record at the front of a mythical

/* fprintf(stderr, "%f\n", result); */


if (!OBJ_SET_PROPERTY(cx, obj, id2, &v))
**** End of jsdtoa.h ****

{"getDate", date_getDate, 0,0,0 },


y = (*bx & 0xffff) - (ys & 0xffff) - borrow;

* the given string.


extern JSBool

ok = js_ReportCompileErrorNumber(cx, ts, NULL,


JSBool

JSScopeProperty *

z = (*xa++ >> 16) - borrow;


typedef enum JSType {
JS_LookupProperty(JSContext *cx, JSObject *obj, const char *name, jsval *vp)

jsval *vp, uintN *attrsp);

if(!file->isOpen){
}

EMIT_ATOM_INDEX_OP(op, atomIndex);
pc2 += JUMP_OFFSET_LEN;

* NB: This sets cx's global object to obj if it was null.

*
registry[nclasses++] = clasp;

JS_ReportErrorNumber(cx, js_GetErrorMessage, NULL,


js_qsort_r(qa, lo, lohi);

* GC_PAGE_SIZE (see below for why).


#define JS_HAS_SOME_PERL_FUN 1 /* has array.join/reverse/sort */

for (pn3 = pn2->pn_head; pn3; pn3 = pn3->pn_next) {

pn = NewParseNode(cx, &CURRENT_TOKEN(ts), PN_UNARY, tc);


JS_GetStringBytes(JSVAL_TO_STRING(key)));
uintN num;
for (sp = (JSSymbol **)&scope->data; (sym = *sp) != 0;

translateLFtoCR(buffer, sizeof buffer);

if (!str)

}
}
rt->rtLockOwner = 0;
return JS_FALSE;

fun->flags |= (op == JSOP_GETTER) ? JSPROP_GETTER : JSPROP_SETTER;


(jsid)cx->runtime->atomState.classPrototypeAtom,

value = OBJECT_TO_JSVAL(closure);
intN
#endif

strcat(result, tmp);

oplen = js_CodeSpec[JSOP_GOTO].length;
extern JS_FRIEND_API(int)
*

if (!t)
/* bit2 is the 54th bit (the first dropped from the mantissa) */

/* (0 q0) = (n1 n0) / (0 D0) */

case TOK_STRING:

extern void
switch (type) {
if (!js_InitStringGlobals())

if (!JS_XDRUint32(xdr, &type) ||
typedef uint32 jsatomid;
JS_ARENA_RELEASE(&cx->codePool, cg->codeMark);

* string indices to integers if appropriate.


#endif
*/

} else {

#define CURRENTDIR_PROPERTY "currentDir"


vlength -= n;

if (message)
CHECK_REQUEST(cx);
jschar *
if (!strcmp(ctype, unicodestring))

return js_SetLengthProperty(cx, obj, length);

#ifdef HPUX

case JSOP_DECPROP:
/* -*- Mode: C; tab-width: 8; indent-tabs-mode: nil; c-basic-offset: 4 -*-

onError = cx->errorReporter;

#define ADDRESS_ENTRY(table, index) \


frame.vars = sp;
if (propp)

*
file->hasRandomAccess = JS_TRUE; /* innocent until proven guilty */

MSG_DEF(JSMSG_BAD_SHARP_USE, 30, 1, JSEXN_ERR, "invalid sharp variable


use #{0}#")

global_lock_count = i;

PStrFromCStr(debuggerMsg, pStr);
if (c >> 8)

PN_FUNC = -3,

rt->gcLocksHash = NULL; /* create lazily */


}

void printAtom(JSAtom *atom) {

ok = JS_ExecuteScript(cx, obj, script, &result);


If k_check is zero, we're guaranteed that k = floor(log10(d)). */

#endif
notelen = end - script->notes;

/* We couldn't optimize it, so it's not an arg or local var name. */

/* Finally, emit the specialized assignment bytecode. */

file = JS_malloc(cx, sizeof *file);


(OBJ_GET_PROTO(cx,obj) && scope == OBJ_SCOPE(OBJ_GET_PROTO(cx,obj)))) {
JS_CompileUCFunctionForPrincipals(JSContext *cx, JSObject *obj,

if (!AddToTokenBuf(cx, &ts->tokenbuf, (jschar)c))

if (0 <= argc && argc < fp->argc)


JSPropertyCache *_cache = (cache); \

* enclosing function, if any, must be heavyweight.


#include "jsdhash.h"
/* Unqualified __parent__ and __proto__ uses require activations. */
endofline = JS_TRUE;

* Rights Reserved.

}
* Return false if out of memory.

}
OBJ_DROP_PROPERTY(cx, obj, prop);
int64 rngMask;

* deleting the provisions above and replace them with the notice
* collected_args and its tokenstream in one swoop.

JS_UNLOCK_OBJ(cx, proto);

he->keyHash = keyHash;
d /= d2;
SECURITY_CHECK(cx, NULL, "pipe_open", file);
return JS_FALSE;
JSStmtInfo *stmt;

{"do", TOK_DO, JSOP_NOP, JSVERSION_DEFAULT},


}
#else
#include "jsdbgapi.h"
#include <math.h>
JS_SaveExceptionState(JSContext *cx);
return JS_FALSE;

* whether testing or not. On match, return an extended Array object.

result = JS_TRUE;
attrs = JSPROP_GETTER;

"PR_BYTES_PER_WORD",
*sn++ = (jssrcnote)(SN_3BYTE_OFFSET_FLAG | (offset >> 16));

JS_UNLOCK_SCOPE(cx, scope_); \

CHECK_REQUEST(cx);
#define JS_EXPORT_DATA(__type) __type

"PR_FREE_PATTERN",

JS_PUBLIC_API(JSString *)

* also used for the catch-all trynote for capturing exceptions

#endif

} else {
SRC_NEWLINE = 22, /* bytecode follows a source newline */
char *cur;
JSPackedBool gcPoke;

}
tt = js_GetToken(cx, ts);

jsdouble d;
if (xdr->mode == JSXDR_ENCODE) {
res = &cx->regExpStatics;
goto out;

goto unlocked_read_only;

{
#error No suitable type for JSInt32/JSUint32
jsdouble d;

bd = Balloc(bd0->k);

rval);

return 0;

argv[1] = STRING_TO_JSVAL(opt);
str = JS_InternString(cx, OBJ_GET_CLASS(cx, obj)->name);
*tryp = NULL;
JSObjectMap *
remainder = 0;

/* FALL THROUGH */

continue;

*/

goto out;

*/
else

type = JSTYPE_FUNCTION;
js_ValueToInt32(JSContext *cx, jsval v, int32 *ip);

#ifdef DEBUG_SCOPE_COUNT
if (d < (step += 30))

return JS_FALSE;
JSWatchPoint *wp;
} else {
{
/* -*- Mode: C; tab-width: 8; indent-tabs-mode: nil; c-basic-offset: 4 -*-

js_free_temp_space(void *priv, void *item)


}

JS_ReportOutOfMemory(cx);
* a string using one of these mode and then converted back to a number, the result
JSWatchPointHandler handler, void *closure);
#define RENODE_ISNEXT 0x08 /* ren is next after at least one node */
if (!js_DefineProperty(cx, varobj, (jsid)funAtom,
case FILE_MODIFIED:
/* -*- Mode: C; tab-width: 8; indent-tabs-mode: nil; c-basic-offset: 4 -*-

* Root the parent slot so we can get it even in our finalizer

return atom;

badstr:

JSScopeProperty *sprop;
}

#define JS_ALIGN_OF_LONG 4L

* Contributor(s):
return state->complete;
// if (FwEnumDestroyer(iter_state))

JS_free(cx, priv);
/* Path must be defined at this point */
{
* OS (and machine, and compiler XXX) dependent information.

/* Otherwise convert the first arg to 'this' and skip over it. */
116, 116, 116, 116, 116, 116, 116, 116, /* 81 */
* License Version 1.1 (the "License"); you may not use this file
{
/*

} while (js_MatchToken(cx, ts, TOK_COMMA));

{js_count_str, 0, JSPROP_PERMANENT,obj_getCount, obj_getCount},

JS_ReportOutOfMemory(cx);
jsuword depthdiff = fp->script->depth * sizeof(jsval);

* empty string).

STORE_NUMBER(cx, -1, d);


const char *filename, uintN lineno,
struct JSArgumentFormatMap {
* implied. See the License for the specific language governing
num_toPrecision(JSContext *cx, JSObject *obj, uintN argc, jsval *argv, jsval *rval)
re = js_NewRegExp(cx, NULL, cx->runtime->emptyString, 0, JS_FALSE);

else {
pivot = malloc(elsize);
static JSClass boolean_class = {
}

{
js_GetErrorMessage, NULL,

if (!(xdr->data = JS_malloc(cx, MEM_BLOCK))) {


/*

cache = &cx->runtime->propertyCache;
js_FlushPropertyCacheByProp(JSContext *cx, JSProperty *prop);

if (outermost) {
40, 40, 40, 40, 40, 40, 40, 40, /* 94 */
/*

* Do this before calling the enumerator, which could


#define JS_BYTES_PER_LONG 4L

ss->base = newbase;
#define fd_sin sin
stmt = &stmtInfo;
jsdouble *date = date_getProlog(cx, obj, argv);

format++;
#include "jsarena.h" /* Added by JSIFY */
*/
*

JS_PUBLIC_API(JSBool)

attrs = JSVERSION_IS_ECMA(cx->version) ? 0 : JSPROP_ENUMERATE;


* the License at http://www.mozilla.org/NPL/
}

ren = ren2;
"print([expr ...]) Evaluate and print expressions",

return cx->localeCallbacks->localeToUpperCase(cx, str, rval);

ida = JS_Enumerate(cx, obj);

/*
Process(cx, obj, filename);

}
static JSClass global_class = {

#ifdef DEBUG

JS_ASSERT(fp->callobj);

{0.0, 31.0, 60.0, 91.0, 121.0, 152.0, 182.0, 213.0, 244.0, 274.0, 305.0, 335.0}
cx->newborn[GCX_OBJECT] = NULL; \
/* Stub function just returns v1 == v2 */

* see if the prop exists. If it does, define the property now.

} else if (end > length) {


aadj1 += 0.5;

return JS_FALSE;

return NULL;

js_InitCallClass(JSContext *cx, JSObject *obj)


}
}
if (!proto)

JS_PUBLIC_API(JSObject *)
if (cx->runtime->objectHook) {

regexp_static_setProperty(JSContext *cx, JSObject *obj, jsval id, jsval *vp)

scopeobj = NULL;
JSObject *funobj;

#define JS_HAS_REPLACE_LAMBDA 0 /* has string.replace(re, lambda) */

}else \

*/
#define JSFILE_CHECK_OPEN(op) \
JS_ARENA_ALLOCATE_CAST(p, void *, pool, nb)

#endif
argv[0] = STRING_TO_JSVAL(src);

fun_convert, fun_finalize,
extern JS_PUBLIC_API(void)

* The Original Code is Mozilla Communicator client code, released

#endif /* jsgc_h___ */

*/
46, 46, 46, 46, 46, 46, 46, 46, /* 13 */

dir = PR_OpenDir(file->path);

* thread's request. So it is safe to wait on rt->scopeSharingDone.

xa = a->x;
char *prefix, *tmp;

} \

obj = chain;
* thread can attempt to acquire scope->lock.fat until scope->ownercx

}else{

"global", 0,
JS_ASSERT(off == (uintN) PTRDIFF(pc, begin, jsbytecode));

pn = MulExpr(cx, ts, tc);


* error reports so flagged. Returns JS_TRUE if an associated exception is

if (c > '0' && c <= '9') {


atom = NULL; \
pascal void __JSTerminate(void);
#endif

static JSBool
gsop[valcnt] =

#endif

JS_PUBLIC_API(JSObject *)
#if JS_HAS_SHARP_VARS

}
JS_ReportWarning(cx,"Seek on directories is not supported, proceeding");
if (!ok)
16, 16, 16, 16, 46, 46, 46, 46, /* 61 */
JSObject *parent;

sn = js_GetSrcNote(jp->script, pc);

* Software distributed under the License is distributed on an "AS

id, js_setter_str);

#define JS_HAS_DFLT_MSG_STRINGS 1 /* provides English error messages */


index = (size_t)i;

#define JSPD_PERMANENT 0x04 /* property cannot be deleted */


* NB: JS_NewString takes ownership of bytes on success, avoiding a copy; but

# define CURRENT_DIR "HARD DISK:Desktop Folder"

for (sp = base; sp < limit; sp++) {

const jschar *cpend;

fp->argv[JSVAL_TO_INT(id)] = *vp;

if (!cx->throwing)

}
JSHashNumber hash;

int32 want, count;

extern const char js_String_str[];


#endif
if (d < 0)

#endif
extern JS_PUBLIC_API(JSObject *)
js_FindWatchPoint(JSRuntime *rt, JSObject *obj, jsval userid)
}
"PR_MapEvents",

{"setUTCHours", date_setUTCHours, 4,0,0 },


if (!js_ValueToNumber(cx, *vp, &d))

#ifdef XP_PC
* License Version 1.1 (the "License"); you may not use this file
}

FILE *file = fopen(name, "w");


/* check for another catch after unconditional catch */

return JS_FALSE;
if (js_Emit1(cx, cg, JSOP_ZERO) < 0)

} else {

return JS_FALSE;
pn->pn_atom == cx->runtime->atomState.lengthAtom)) {

* 11/97 - jsdate.c has been rewritten to conform to the ECMA-262 language

obj = ATOM_TO_OBJECT(atom);
* __parent__ or __proto__; use of with, eval, import, or export; and
/* Tell the debugger about our temporary copy of the script structure. */
res = &cx->regExpStatics;
ok = OBJ_GET_ATTRIBUTES(cx, obj2, id, prop, &attrs);
js_DestroyRegExp(cx, oldre);

goto bad_import;

JSObject *obj2 = NULL;

*
EMIT_FINALLY_GOSUB(cx, cg, jmp);

js_NewFunction(JSContext *cx, JSObject *funobj, JSNative native, uintN nargs,

}
/* allow TZA before the year, so

typedef struct JSPRHashEntry JSPRHashEntry;

7, 7, 7, 7, 7, 7, 7, 7, /* 75 */

"prdtoa_h___",

if (JS_HAS_STRICT_OPTION(cx) && !ReportStrictSlot(cx, JSSLOT_COUNT))


}
for (trap = (JSTrap *)rt->trapList.next;

case SRC_WHILE:
/* return NaN if any arg is NaN */

JS_BEGIN_MACRO \

}
* rights and limitations under the License.
} else {
JSAtom *classPrototypeAtom;

* in case this bytecode is part of an 'arguments[i](j, k)' or

extern JSObject *
ts = js_NewBufferTokenStream(cx, base, JS_LINE_LIMIT);
* The Original Code is Mozilla Communicator client code, released
}

** JS_END_EXTERN_C
GetPropertyAttributes(JSContext *cx, JSObject *obj, JSAtom *atom,

46, 40, 40, 40, 46, 40, 46, 40, /* 49 */

*objp = scope->object; /* XXXbe hide in jsscope.[ch] */


40, 40, 40, 40, 40, 40, 40, 40, /* 109 */

* Copyright (C) 1998 Netscape Communications Corporation. All

newReport->linebuf = report->linebuf;

jsval *rval, JSBool localeString)


{

/* Concatenate string constants. */

#if JS_BUG_EVAL_THIS_SCOPE

b->wds = n;
len -= REOP_FLATLEN_MAX;

* the number of required arguments. More arguments than format specifies


40, 40, 40, 40, 40, 40, 40, 40, /* 108 */

/* If cache miss, take the slow path. */

FETCH_NUMBER(cx, -1, d2);

jsval *argv, jsval *rval)

#if JS_HAS_UNDEFINED
void *codeMark; /* low watermark in cx->codePool */

uintN flags;
i = 0;
{
CHECK_REQUEST(cx);

case 0:
(void) js_GetArgsObject(cx, fp);

JS_TRUE, ap)) {

* The array returned on match has element 0 bound to the matched


if (!ida) {
* ARM is a little endian architecture but 64 bit double words are stored
* s A signed short (16-bit) value.
} else {
str = js_ValueToString(cx, argv[0]);
* version of this file under the NPL, indicate your decision by

** Produce both a quotient and a remainder given an unsigned


return OBJ_SET_PROPERTY(cx, obj, (jsid)atom, vp);

JSFunction *fun = JS_ValueToFunction(cx, argv[i]);

#define NBUCKETS(ht) JS_BIT(JS_HASH_BITS - (ht)->shift)


ok = JS_GetElement(cx, aobj, (jsint)i, sp);
#define SPROP_HAS_VALID_SLOT(sprop) ((sprop)->slot != SPROP_INVALID_SLOT)

digits++;
fp = (JSStackFrame *) JS_GetPrivate(cx, obj);

className = NULL;

*
}

for(i = 1;; i++) {

{"isFinite", num_isFinite, 1,0,0},

return JS_TRUE;
return JS_FALSE;
}
ren->flags = RENODE_NONEMPTY;
!strcmp(JS_GetStringBytes(JSVAL_TO_STRING(argv[0])), "-l")) {

if (!ts)
JS_TRANSFER_SCOPE_LOCK(cx, scope, newscope);

_y1 += jshi16(_y0); /* can't carry */ \

frame.fun = NULL;
{
#undef __STDC__
JSObject *obj2;

if (cond == JS_TRUE) {
pn->pn_right = pn2;

uintN i;

{
continue;
JS_UNLOCK_GC(rt);
}
#define JS_ALIGN_OF_INT 2L

return saveDepth;
*/

#if JS_HAS_LEXICAL_CLOSURE
{

if (JS7_ISDEC(*cp)) {
*

if (!chars)
#define CHECK_AND_SET_JUMP_OFFSET(cx,cg,pc,off) \
(r).lo = (_a.hi << (32 - (b))) | (_a.lo >> ((b) & 31)); \

#define JS_HAS_TOSOURCE 0 /* has Object/Array toSource method */

/* General-purpose C string hash function. */

nas[ cn ].type = TYPE_UNKNOWN;

600 Mountain Avenue


#undef SEARCH_PAIRS

#if JS_HAS_SWITCH_STATEMENT

if (!opt)

rval = FETCH_OPND(-1);

goto do_initprop;
cstr[length] = 0;

{
* The Initial Developer of the Original Code is Netscape
js_DefaultValue(JSContext *cx, JSObject *obj, JSType hint, jsval *vp)

static JSBool

if (!cx->lastMessage)
/***** jschang - this is in js_Execute: I don't think we
need it here

1, /* SRC_PCDELTA */

* rights and limitations under the License.

MSG_DEF(JSMSG_SYNTAX_ERROR, 133, 0, JSEXN_SYNTAXERR, "syntax error")

case 'W':

if (!x & 1)

* XXX A command line option to enable debugging (or not) would be good
#endif

while ((tt = js_GetToken(cx, ts)) == TOK_DOT || tt == TOK_LB) {

return str;

return 0;

tp->t_op = cx->jsop_ne;

* in the above line breaks old javascript, so we keep it

struct align_pointer {
if (!OBJ_GET_CLASS(cx, obj)->convert(cx, obj, JSTYPE_FUNCTION,
JSScript *script;
break;

* stored in a local variable slot that the compiler allocated.

JS_FRIEND_API(JSBool)
// DREAMWEAVER Adobe change - jschang 6/1/01
MSG_DEF(JSMSG_CURLY_AFTER_BODY, 73, 0, JSEXN_SYNTAXERR, "missing } after
function body")

JSDToStrMode oneArgMode, jsint precisionMin, jsint precisionMax, jsint


precisionOffset)

JSScope *scope;

JSOP_GOSUB)) {

y = *bx - (ys & 0xffffffffUL) - borrow;

#if defined XP_PC && defined _MSC_VER && _MSC_VER <= 800

xval = QuoteString(&ss->sprinter, str, (jschar)'\'');

js_Lock(JSThinLock *tl, jsword me)

*rval = BOOLEAN_TO_JSVAL(cx->tracefp != 0);


/* Initialize the stack frame. */
* and other provisions required by the GPL. If you do not delete
* IS" basis, WITHOUT WARRANTY OF ANY KIND, either express oqr
JS_ReportErrorNumber(cx, JSFile_GetErrorMessage, NULL,
* March 31, 1998.

* Empty string match: never split on an empty match at the start


{

with_GetProperty, with_SetProperty,

static char* mac_argv[] = { "js", NULL };

* Corporation, 2000
{
unsigned char* curdst = &dst[1];

pn2 = Statement(cx, ts, tc);


CHECK_REQUEST(cx);

if (reobj)

* - look at saving results across multiple calls to supporting


}

/* Setting a property makes it enumerable. */


count = INT_TO_JSVAL(PR_Read(file->handle, buffer, size));

OBJ_DROP_PROPERTY(cx, obj, prop);

#endif
return JS_FALSE;
}

return NULL;

static Bigint *d2b(double d, int32 *e, int32 *bits)

LOCAL_ASSERT(*pc == JSOP_GOTO);

* work as well; the result string has "can't get timezone" for ECMA-valid

}
*decpt = k + 1;

goto out;
while (1) {

if (obj) {

default:

/*
case JSTYPE_NUMBER:
#ifdef MALLOC
return JS_FALSE;

JSInt64 rad;
for (pn2 = pn->pn_head; pn2; pn2 = pn2->pn_next) {
#if JS_HAS_REGEXPS

return pn;
clasp = LOCKED_OBJ_GET_CLASS(obj);
return js_NewNumberValue(cx, result, rval);
if (!re)
}
js_Interpret(JSContext *cx, jsval *result)
JS_LOCK_RUNTIME(rt);
return JS_FALSE;

JSMSG_END_OF_DATA); \
* indicating failure.

JSPropertyCacheEntry _entry; \

/* Insert each ale on al->list into the new hash table. */


/* Synonyms for quick JOF_QARG and JOF_QVAR bytecodes. */

end = length;

ATOM_BYTES(atom))) {

: (jsbytecode) op;

* for callers to do an extra test to handle the empty splice case.


* the previous note. If 3 bits of offset aren't enough, extended delta notes

ale = (JSAtomListElement *)js_alloc_temp_entry(cx, atom);

*/
n = scope->map.freeslot;

JS_BEGIN_MACRO \
int16 sizeLog2; /* log2(table size) */

pn->pn_attrs = 0;

} else {
{

else {
typedef struct JSHashTable JSHashTable;

JS_free(cx, message);

/*

JS_ASSERT(arena_freelist_lock);

#undef MSG_DEF

const jschar *ucmessage; /* the (default) error message */

pn->pn_type = TOK_SEMI;

40, 40, 40, 40, 40, 40, 40, 40, /* 91 */


case JS_DHASH_REMOVE:

#include "jsconfig.h"
* the License at http://www.mozilla.org/NPL/

{
: js_SetSlotThreadSafe(cx, obj, slot, value))

if (!js_EmitTree(cx, cg, pn4))


* IS" basis, WITHOUT WARRANTY OF ANY KIND, either express oqr
};

0x0000001B, /* 11 Sk */

"PR_BITS_PER_FLOAT_LOG2",
}
};

goto error;

* definition, or try/finally.

#include "jsapi.h"
JS_EvaluateInStackFrame(JSContext *cx, JSStackFrame *fp,

#define CG_NEXT(cg) ((cg)->current->next)


else if (e1 < 0) {

static JSBool
ok = locked = JS_FALSE;
}
no_catch:
wb = b->wds;
tc->flags &= ~TCF_IN_FOR_INIT;
nDigits = numEnd - numBegin;

js_UnlockGlobal(tl);

#define ARGC_LO(argc) ((jsbytecode)(argc))

}
JS_SetDebugErrorHook(JSRuntime *rt, JSDebugErrorHook hook, void *closure);

#define JSFILE_CHECK_READ \

return JS_FALSE;

case PN_TERNARY:

}
#endif
jsint year = YearFromTime(t);

cs = &js_CodeSpec[op];
"PR_ARENA_MARK",
**** End of jslong.c ****

JS_ASSERT((*utf8Buffer & 0xC0) == 0x80);


"ucflat1",

break;

* except in compliance with the License. You may obtain a copy of

JS_DestroyRuntime(rt);
*/
case SRC_BREAK2LABEL:
#endif
FROB(protoAtom, js_proto_str);

{"concat", str_concat, 0,0,0},


}

JSPR_END_EXTERN_C

return (int) MonthFromTime(LocalTime(*date));


}

#include "jsarena.h" /* Added by JSIFY */

* The Original Code is Mozilla Communicator client code, released


"prprf",

*rval = fp->sp[-1];
* except in compliance with the License. You may obtain a copy of
return JS_FALSE;

} s;
* allows table->ops-specific code to finalize table->data.
#define JS_BYTES_PER_WORD_LOG2 2L

return NULL;

* Software distributed under the License is distributed on an "AS


PR_DestroyCondVar(fl->svar);
#define JS_HAS_APPLY_FUNCTION 0 /* has fun.apply(obj, argArray) */
if ((cp != cpend) && JS_ISSPACE(*cp))

ts->linebuf.ptr = ts->linebuf.base;

/*
return JS_FALSE;

JSAtom *atom;
frame.scopeChain = chain;
&vsharp);
return JS_FALSE;

* provisions of the GPL are applicable instead of those above.

break;
*/

TREE_CONTEXT_FINISH(&tc);

argAtom = CURRENT_TOKEN(ts).t_atom;
{
do_fornameinloop:
{"cos", math_cos, 1, 0, 0},
if (!fun)

JS_ClearScope(cx, obj);
JS_END_EXTERN_C

#define PR_ArenaAllocate PL_ArenaAllocate


ss.top = 0;
cp = dp + 2;
if (noteIndex < 0 ||
* License Version 1.1 (the "License"); you may not use this file
JS_ReportErrorNumber(cx, JSFile_GetErrorMessage, NULL, \

* provisions of the GPL are applicable instead of those above.

sn = js_GetSrcNote(jp->script, pc2);

chars[nchars] = 0;
if ((gSleepQEntry.sleepQProc = NewSleepQUPP(MySleepQProc)) != NULL) {

#define GCX_STRING 1 /* JSString */


*--cvt = hexp[digit & 0xf];

JS_ASSERT(JS_IS_SCOPE_LOCKED(scope));

return 0;

else

*/

* to free this memory.

return NULL;
}
static JSBool

CHECK_REQUEST(cx);

15, 15, 15, 15, 46, 46, 46, 15, /* 97 */


#ifdef DEBUG
{

for (i = 0; i < argc; i++) {

: JSVAL_TO_PRIVATE(privateValue);

JSScript *oldscript;

tt = CURRENT_TOKEN(ts).type;

mday = /*byte*/ n;

const jschar *ep;

/*

} \
*ap = a;
result[index+1] = '\0';
return JS_TRUE;

40, 40, 40, 40, 40, 40, 40, 40, /* 56 */

extern JS_PUBLIC_API(JSVersion)
* and other provisions required by the GPL. If you do not delete
v = OBJ_GET_SLOT(cx, obj, JSSLOT_PRIVATE);

#include "jsprvtd.h"
return (PR_Access(file->path, PR_ACCESS_EXISTS)==PR_SUCCESS);
if (!OBJ_IS_NATIVE(obj)) {

JSFunction *fun;
if (OBJ_GET_CLASS(cx, obj2) == &js_FunctionClass) {

{
#if defined ( DEBUG_mccabe ) && defined ( PRINTNAMES )
prologLength = script->main - script->code;

* IS" basis, WITHOUT WARRANTY OF ANY KIND, either express oqr

if (!table) {

getKey = table->ops->getKey;
chars[length] = 0;

JSTrap *trap;

str = rdata->base.str;

for (i = 0; i < pda->length; i++) {

*/
extern JS_PUBLIC_API(JSBool)

/* Restore the calling script's interpreter registers. */


const jschar *uctokenptr; /* unicode (original) token pointer */
if (pool->stats.name)
OPDEF(JSOP_ENUMELEM, 122,"enumelem", NULL, 1, 3, 0, 1, JOF_BYTE |
JOF_ELEM|JOF_SET)
str = js_QuoteString(cx, str, '\'');

cs = &js_CodeSpec[op2];
* and other provisions required by the GPL. If you do not delete
{
114, 114, 114, 114, 114, 114, 114, 114, /* 80 */

#endif
static JSPropertySpec object_props[] = {
}

* XXX swizzle page to freelist for better locality of reference


if (top == 0)

JS_CompileFileHandleForPrincipals(JSContext *cx, JSObject *obj,


16, 16, 16, 16, 16, 16, 16, 16, /* 10 */
goto break2;
** buffer on success, NULL on failure. Call "JS_smprintf_free" to release

/* adjust 2-digit years into the 20th century */

goto out;
pc += oplen;
file_list(JSContext *cx, JSObject *obj, uintN argc, jsval *argv, jsval *rval)
jsint slot;

void *mark;

extern JS_PUBLIC_API(JSInt64) JSLL_Zero(void);

JSObject *nobj;
JSLocaleCallbacks *localeCallbacks;

(1 << JSCT_LOWERCASE_LETTER) | \

{"super", TOK_RESERVED, JSOP_NOP, JSVERSION_DEFAULT},

#include "jsprvtd.h"

/* Use js_EscapeMap, \u, or \x only if necessary. */


case JSOP_IMPORTALL:

enum_next_property:

{
} else {

callerScopeChain);
} else {

{
GC_MARK(cx,

EQUALITY_OP(==, JS_FALSE);
nflags++;
#include <string.h>

JSHashTable *table; /* hash table containing all atoms */


JSObject *obj2, *target, *funobj, *closure;
if (pn->pn_type == TOK_NAME) {
}

#define JSDOUBLE_HI32_EXPMASK 0x7ff00000


/* Mode */
js_BoyerMooreHorspool(const jschar *text, jsint textlen,

JSPROP_ENUMERATE)) {

(obj)->map->ops->defineProperty(cx,obj,id,value,getter,setter,attrs,propp)

for (he = oldbuckets[i]; he; he = next) {


i++;
/* Initialize new properties to undefined. */
extern JSBool

if (!js_XDRObject(xdr, &obj))
0x0007720A, /* 120 Nl, identifier start, decimal 25 */

low = GET_JUMP_OFFSET(pc2);

JS_STATIC_DLL_CALLBACK(void)
extern JS_PUBLIC_API(void *)
rval = OFF2STR(&ss->sprinter, ss->offsets[ss->top-1]);
if ((j_) >> 2) \
{"implements", TOK_RESERVED, JSOP_NOP, JSVERSION_DEFAULT},

METER(rt->gcStats.alloc++);

obj = fp->varobj;

hasDefault = JS_TRUE;
switch (data) {
Murray Hill, NJ 07974-0636
/* Losing, need to insert another two bytes for this offset. */

** TYPES: JSBool
CHECK_REQUEST(cx);
if (MatchChar(ts, c)) {

JSProperty *prop;

/* JSVAL_INT_MAX as a string */
*xc = z2;
JSBool throwing;

cg->noteMask = (cg->noteMask << 1) | 1;


JS_PUBLIC_API(void)

* March 31, 1998.

* NB: this is a "raw" or low-level routine, intended to be used only where

METER(table->stats.hits++);
return table;

return JS_TRUE;

if (buffer != smallBuffer)

JS_GetFrameScript(JSContext *cx, JSStackFrame *fp)

JS_SuspendRequest(JSContext *cx);
*
interpret_dollar(JSContext *cx, jschar *dp, ReplaceData *rdata, size_t *skip)
}
return JS_TRUE;

* Any indexed property reference could call a getter with


c = (uintN) *cp++;
uint32 removedCount; /* removed entry sentinels in table */

if (!pn4)

return -1;
#include <time.h>
*rval = BOOLEAN_TO_JSVAL(b);

#define JS_ISALPHA(c) ((((1 << JSCT_UPPERCASE_LETTER) | \

attrs,

xval = POP_STR();
if (!date || JSDOUBLE_IS_NaN(*date))

&v)) {

/* Success: lock re->source string. */


obj->slots[JSSLOT_PROTO] = OBJECT_TO_JSVAL(proto);

/*
JS_ACQUIRE_LOCK(deflated_string_cache_lock);

JSObject *obj;

JSPrinter *

return JS_FALSE;

*
pn2 = ArgumentList(cx, ts, tc, pn2);
*/

#endif /* JSDEBUGGER */

JS_GetFrameScopeChain(JSContext *cx, JSStackFrame *fp)

STMT_FOR_IN_LOOP = 11, /* for/in loop statement */

* deleting the provisions above and replace them with the notice

#include "jsinterp.h"
*/
* Suppress any compiletime errors that don't occur at the top level.

tl = &scope->lock;
file = file_init(cx, obj, filename);
{X} where X is an integer representing the argument number that will

cp = ocp = state->cp;

const char js_Infinity_str[] = "Infinity";


extern JSBool

} else {

LOGIT(scope, '1');
{
}

result = js_NewString(cx, chars, length, 0);


goto out;
#endif
JS_AddArgumentFormatter(JSContext *cx, const char *format,

extern JS_PUBLIC_API(JSInt64) JSLL_MaxInt(void);


if (state->flags & JSREG_FOLD) {

sub = interpret_dollar(cx, dp, rdata, &skip);


len = GET_JUMP_OFFSET(pc);

pn->pn_kid = pn2;
tnotes = script->trynotes;

* Each letter may be followed by a number giving the repeat count. Together

static JSBool
"PR_BYTES_PER_LONG",

sn = js_GetSrcNote(jp->script, pc);
case 'w':

JSObject *varobj;
}
* terms of the GNU Public License (the "GPL"), in which case the
JSFILEMSG_CANNOT_COPY_FILE_OPEN_FOR_WRITING_ERROR, file->path);
n1 = a.hi;

* file under either the NPL or the GPL.

JSBool ok, limited;


/*
return JS_FALSE;

/* Must come through here once in primordial thread to init safely! */


goto out;
/* We want to hash. Have we already made a hash table? */

FETCH_ELEMENT_ID(-1, id); \
40, 40, 40, 40, 40, 40, 40, 40, /* 93 */
* terms of the GNU Public License (the "GPL"), in which case the

to hold the suppressed trailing zeros.


}
its_resolve(JSContext *cx, JSObject *obj, jsval id)

extern JSScope *
int fputs(const char *s, FILE *file)
/* Initialize frame except for varobj, thisp, sp, spbase, and scopeChain. */

* The Initial Developer of the Original Code is Netscape

return JS_FALSE;
JS_PUBLIC_API(JSClass *)

15, 15, 15, 15, 15, 15, 15, 15, /* 86 */

(flags & JSFUN_SETTER)


return str_nyi(cx, "replace");
goto do_forloop;
* If allocOps is null, use default allocator ops built on top of malloc().

js_GetClassPrototype(JSContext *cx, const char *name, JSObject **protop)


slot = JSVAL_TO_INT(id);

#define PR_HashTableLookup PL_HashTableLookup


ok = js_InitRuntimeStringState(cx);
0, /* SRC_VAR */

rval = QuoteString(&ss->sprinter, ATOM_TO_STRING(atom),

jsdouble d;
/*

ss->offsets[top] -= 2;
_hep = JS_HashTableRawLookup((_al)->table, _atom->number, _atom); \

xdr->data = data;
js_atom_unpinner(JSHashEntry *he, intN i, void *arg)
} else {
* not in NscpJavaScript). Instead of switching the compiler flag and

if (sprop &&
bytes[i] = 0;
JSStackFrame *fp, frame;

28, 28, 28, 28, 28, 28, 28, 28, /* 0x4C00 */

**** Start of jsconfig.h ****


if (JSVAL_IS_GCTHING(fp->rval))

JSSubString leftContext; /* input to left of last match (perl $`) */


cx->exception = rval;
GC_MARK(cx, fp->argsobj, "arguments object", NULL);
b = Balloc(k);

case 'o':

if (!IndexToId(cx, length, &id))


#include "jsnum.h"
for (; script->trynotes[numtrys].catchStart; numtrys++)
/* Store the return value in the caller's operand frame. */
file->linebuffer = NULL; /* TODO: check for mem. leak? */
#endif

}
#define STMT_IS_LOOP(stmt) ((stmt)->type >= STMT_DO_LOOP)

28, 28, 28, 28, 28, 28, 28, 28, /* 0x3A00 */

if (!(IdIsIndex(id, &index)))

JS_PUBLIC_API(JSBool)

};
fun = (JSFunction *) JS_GetPrivate(cx, funobj);

JSLL_UI2L(us2s, PRMJ_USEC_PER_SEC);
return JS_FALSE;

}
(mday >= mtab[month]))){

$line = '#include "jsopcode.tbl"' . "\n";


{0}

10000 + 7 * 60, 10000 + 6 * 60, /* MST/MDT */


JSClass *clasp;
(void) JS_realloc(cx, R->chars, (R->length + 1) * sizeof(jschar));
}

result = JS_strdup(cx, oldpathname); /* may include drive selector */

OBJ_DROP_PROPERTY(cx, obj2, prop);


MUST_MATCH_TOKEN(TOK_RP, JSMSG_PAREN_AFTER_WITH);
newchars[ni++] = ch;

case JSOP_TRY:

sn += 2;

ok = JS_FALSE;

static JSBool
jsval elemval;
46, 46, 46, 46, 46, 46, 46, 46, /* 70 */

if (fp->argv)
continue;
/* NSPR dependencies */

JSBool
}

return buffer;

beq = js_Emit3(cx, cg, JSOP_IFEQ, 0, 0);

JS_END_MACRO
LOCAL_ASSERT(atom);
pn->pn_op = op;

cx->requestDepth = saveDepth;
case 'I':

typedef struct GCMarkNode GCMarkNode;


x[0] = y;
* So, now we preserve the links to these 'dormant' frame chains in cx

typedef struct JSDHashTable JSDHashTable;


ok = JS_TRUE;

JSObject *parent;
return ok;

* License Version 1.1 (the "License"); you may not use this file
46, 46, 46, 46, 46, 46, 46, 46, /* 102 */

ATOM_LIST_SEARCH(ale, &tc->decls, atom);

frame.varobj = fp->varobj;
mem_get32, mem_set32, mem_getbytes, mem_setbytes,
if ((y = *xb >> 16) != 0) {
*/

(mask = (jsint)d) != d ||

* License Version 1.1 (the "License"); you may not use this file
ida = JS_Enumerate(cx, obj);

JSScript *script; /* script being printed */

return !_check_lock((atomic_p)w, ov, nv);


#endif /* XP_MACOSX */
ELEMENT_OP(-1, ok = ImportProperty(cx, obj, id));

JS_PUBLIC_API(JSBool)

}
{"import", TOK_IMPORT, JSOP_NOP, JSVERSION_DEFAULT},

#define JS_MIN(x,y) ((x)<(y)?(x):(y))

JSStackFrame *fp;
ok = js_ReportErrorVA(cx, JSREPORT_WARNING, format, ap);

uint32 retry; /* allocation attempt retries after running the GC */


/* -*- Mode: C; tab-width: 8; indent-tabs-mode: nil; c-basic-offset: 4 -*-

if (!obj)

JSObject *
PRMJTime split;
matchEntry = table->ops->matchEntry;
* Double hashing implementation.
}

frame.varobj = chain;

ok = OBJ_LOOKUP_PROPERTY(cx, obj, id, &obj2, &prop);

switch (pn2->pn_type) {
if (!OBJ_GET_PROPERTY(cx, obj, id, &v))
cp = matchNonGreedyKid(state, ren, 1, 0, kidMatch);
}
sizeof(JSGCThing));

return JS_FALSE;

#endif

JS_ASSERT(action == -1 || action == -2);


"plus",
/************************************************************************

nas[ cn ].type = TYPE_UINT32;

JS_PUBLIC_API(JSBool)
js_DestroyPrinter(jp);

JS_ASSERT(cx->runtime->gcDisabled);
{
STORE_OPND(-1, BOOLEAN_TO_JSVAL(cond)); \

JSTryNote *
}
r0 = (r0 << 16) | jslo16(a.lo);
}
*/

* ignored", etc.
if (!chars) {

ts->principals = principals;
extern JS_PUBLIC_API(JSErrorReporter)

fprintf(gErrFile, "usage: js [-s] [-w] [-W] [-b branchlimit] [-c


stackchunksize] [-v version] [-f scriptfile] [scriptfile] [scriptarg...]\n");
!JS_XDRUint32(xdr, &numtrys)) {

jumpOffset = PTRDIFF(target, pc, jsbytecode);

return JS_FALSE;
return JS_TRUE;
case TOK_TRY: {

#define ATOM_LIST_LOOKUP(_ale,_hep,_al,_atom) \
void *thing = (void *)he->key;

break;

static JSBool
"JS engine warning: 1 GC root remains after destroying the JSRuntime.\n"
if (!OBJ_LOOKUP_PROPERTY(cx, obj, (jsid)atom, &pobj, &prop))

static JSBool

if (state->complete)
{
}

}
getter = SPROP_GETTER(sprop, pobj);
/*
pn2 = Expr(cx, ts, tc);
}

EMIT_ATOM_INDEX_OP(JSOP_INITPROP, ALE_INDEX(ale));
if (ok) {

jssrcnote *sn;

}
uint8 *flagp, *split, *pagep, *limit;

#include <stdio.h>

#define FOUR_OCTET_MASK 0x07 /* 00000111 */


goto error;
return JS_FALSE;

* properties of the variables object to flag as exported.

js_ReportCompileErrorNumber(cx, ts, NULL, JSREPORT_ERROR,

break;

JSArenaPool *pool = &rt->gcArenaPool;


The format for each JS error message is:
if (!pn2)
#include <float.h>

js_UnlockGCThing(cx, rt->jsNegativeInfinity);
/*

*date = result;
if (!js_ValueToNumber(cx, *argv, &d))

#if JS_HAS_UNEVAL

vp[-(intN)fp->script->depth] = (jsval)fp->pc;
caller = cx->fp->down;

result = WeekDay(result);
if ((word0(rv) & Exp_mask) <= P*Exp_msk1

case REOP_JUMP:
/* size */
if (!js_MatchToken(cx, ts, TOK_EOF)) {

JSString *str;

jsdouble *date = date_getProlog(cx, obj, argv);

* Interned strings are atoms that live until state's runtime is destroyed.
return JS_FALSE;
/* -*- Mode: C; tab-width: 8; indent-tabs-mode: nil; c-basic-offset: 4 -*-

(((a).hi == (b).hi) && ((a).lo op (b).lo)))


return JS_FALSE;

JSVAL_TO_GCTHING((jsval)

#endif
ts->lookahead--;

/* Now convert the startup time into a wide so that we can figure out GMT and
DST.

#endif
jschar *chars;
return ok;

break;
JS_SetObjectHook(JSRuntime *rt, JSObjectHook hook, void *closure);
proto_obj = OBJ_GET_PROTO(cx, obj);

/* Reload in case ownercx went away while we blocked on the lock. */

intN result = (intN) fmod(floor(t / msPerMinute), MinutesPerHour);


bb2 = bb5 = 0;
JS_ReportErrorNumber(cx, JSFile_GetErrorMessage, NULL,

JSTreeContext tc;
#define fd_atan2 atan2

break;
H = (jschar)((V >> 10) + 0xD800);

* file under either the NPL or the GPL.

d = length;
level--;
}
{"exec", regexp_exec, 0,0,0},
break;
fun = JS_ValueToFunction(cx, argv[i]);
if (!obj) {
newfunobj = js_NewObject(cx, &js_FunctionClass, funobj, parent);

{
case 'b':
else

}
break;

return thing;
}
/* fun might be onerror trying to report a syntax error in itself. */

}
JS_XDRString(JSXDRState *xdr, JSString **strp)
if (!js_InternalCall(cx, obj, OBJECT_TO_JSVAL(fun->object), argc, argv,

}
}

file_readAll(JSContext *cx, JSObject *obj, uintN argc, jsval *argv, jsval *rval)
ptrdiff_t gosub; /* offset of last GOSUB for this finally */

JSContext *cx;

#include "jsstr.h"
#define CRT_CALL _Optlink
if (!sym || !sym->next || (pd->flags & (JSPD_ARGUMENT | JSPD_VARIABLE))) {

sharpid = (jsatomid) he->value;

/* open(STATUS, "netstat -an 2>&1 |") */


/* Magic values */
cycles = (year >= 0) ? year / CYCLE_YEARS

funobj = JSVAL_TO_OBJECT(v);

JSVersion version; /* JSVersion */

#endif
}

JSFile *file = JS_GetInstancePrivate(cx, obj, &file_class, NULL);


* The Original Code is Mozilla Communicator client code, released
_catchpc = (script)->main + _tn->catchStart; \
#if JS_BYTES_PER_INT >= 2

/***********************************************************************
** JSLL_USHR Unsigned shift right [0..64] bits
JSCT_PARAGRAPH_SEPARATOR = 14,
} else {
pc = fp->pc;

if (argc && JSVAL_IS_STRING(argv[0])) {

JSREPORT_WARNING | JSREPORT_STRICT,

typedef JSBool

d = js_DoubleToInteger(d);
p = q;

chars[length] = 0;
* rights and limitations under the License.

result = js_NewString(cx, chars, length, 0);


#define JS_TOUPPER(c) ((JS_CCODE(c) & 0x00100000) ? (c) - ((int32)JS_CCODE(c) >>
22) : (c))
JS_PropertyStub, JS_PropertyStub, \

JS_EXTERN_API(JSPropertyOp)

&cval)) {

jschar *chars;

ok = OBJ_GET_ATTRIBUTES(cx, obj, (jsid)atom, prop, attrsp);


/* XXX: js -f foo.js should interpret foo.js and then

#ifndef NSPR_LOCK

* and other provisions required by the GPL. If you do not delete

JS_IsAssigning(JSContext *cx);

* Alternatively, the contents of this file may be used under the


if (xdr->mode == JSXDR_DECODE)
JS_FreeArenaPool(JSArenaPool *pool)

*/

path = JS_GetStringBytes(JS_ValueToString(cx, *vp));


atom = GET_ATOM(cx, script, pc);

len = GET_JUMP_OFFSET(pc);
js_puts(jp, ";");

*
fprintf(gOutFile, "\n");

*va_arg(ap, char **) = JS_GetStringBytes(str);

off = GET_JUMP_OFFSET(pc2);

* Copyright (c) International Business Machines

* name in that scope object. See comments at case JSOP_NAMEDFUNOBJ:


if (fp) {

(ptrdiff_t)(CG_OFFSET(cg) - pn2->pn_offset)) < 0) {


if (!atom)
#endif
return js_Emit1(cx, cg, JSOP_ARGCNT) >= 0;
JS_SetUCPropertyAttributes(JSContext *cx, JSObject *obj,
static JSBool file_close(JSContext *cx, JSObject *obj, uintN argc, jsval *argv,
jsval *rval);

TOK_DEFAULT = 41, /* default keyword */


* If you wish to allow use of your version of this file only
log2++;

15, 15, 15, 15, 15, 15, 15, 15, /* 87 */

jsval *vp, v;
/* Pop everything off the stack and restore cx->fp. */

/* XXXbe push this into jsobj.c or jsscope.c */


global_locks_log2 = 0;
while ((index>=0)&&(pathname[index]!=FILESEPARATOR)&&

tc->nodeList = pn->pn_next;

JSRuntime *rt;

return result;

JSBool extra; /* extra comma flag for [1,2,,] */


JS_BEGIN_EXTERN_C
label = pn->pn_atom;
jschar c = *s1;
}

#if JS_HAS_DO_WHILE_LOOP

NULL, NULL, NULL, NULL)) {

pn->pn_kid = pn2;

if (!cstr) {

return 1;

sigma = sqrt(variance);

#define fd_sqrt sqrt

uintN line;

#endif /* DEBUG */
}
return NULL;
DefaultFreeEntry(void *pool, JSHashEntry *he, uintN flag)

* Copyright (C) 1999,2000 Netscape Communications Corporation.

JS_ASSERT(JSVAL_IS_NUMBER(v));

if (!ok)

{ NULL, count } ,

{
break;
if (!IndexToId(cx, slot, &id))
jsid id, id2;
int kidCount, const jschar *cp, const jschar *previousKid)

tc->tryCount++;

typedef struct JSObject JSObject;

if (grState->stop == NULL) {

JSInterpreterHook hook;

(pc)[2] = JUMP_OFFSET_LO(off))

return JS_FALSE;
/*

}
}
ok &= js_PutArgsObject(cx, &frame);

** declaring variables of type JSUint64 or JSInt64. Different hardware


if (js_EmitContinue(cx, cg, stmt, ale) < 0)
}
pn2->pn_expr = NULL;

JS_snprintf(numBuf, sizeof numBuf, "%lx", (unsigned long) mask);

*
#ifdef JS_THREADSAFE
* Always accept the 'in' operator in a parenthesized expression,
return JS_TRUE;
return JS_FALSE;
* Alternatively, the contents of this file may be used under the
{

size_t nbytes;

}
}

"position, proceeding", file->path);


*
} else if (JSVAL_IS_NUMBER(v)) {
JS_ASSERT(JSVAL_IS_INT(id));

--len;

JS_END_EXTERN_C

* 4. We remove common factors of powers of 2 from relevant

(1 << JSCT_MODIFIER_LETTER) | \
JSAtom *atom;
if (precision < precisionMin || precision > precisionMax) {

if (!prop)

JS_SetGCCallbackRT(JSRuntime *rt, JSGCCallback cb);

*/
#ifdef DEBUG
}

return mktime(&ltime) - (24L * 3600L);


/* Lacking a constructor, name the prototype (e.g., Math). */
"PR_INIT_ARENA_POOL",
JSInt32 hours = 0;
EMIT_ATOM_INDEX_OP(JSOP_USESHARP, (jsatomid) pn->pn_num);
/* Skip leading zeros. */

#else /* ifndef Bad_float_h */


unlocked_read_only:

#else

*rval = STRING_TO_JSVAL(cx->runtime->emptyString);
JSLL_UI2L(local_time,PRMJ_MAX_UNIX_TIMET);
{
** growing it as necessary using realloc. If last is NULL, JS_sprintf_append
}
/*

const char *className;


case JSOP_GETVAR:

return -1;
#endif
}

{
* Create a new array value to return. Our ECMA v2 proposal specs

jsval *rval)

(obj)->map->ops->setProperty(cx,obj,id,vp)
if (js_Emit1(cx, cg, JSOP_PUSHOBJ) < 0)

JSSubString rightContext; /* input to right of last match (perl $') */

rt->requestCount -= requestDebit;
}

JSRuntime *rt;

num = ren->u.num;

ren->u.chr = *ocp;
printf("#define JS_BITS_PER_BYTE_LOG2 %dL\n", Log2(bpb));
while (report.messageArgs[i])
JSDHashAllocTable allocTable;
* promote compile-cost sharing and amortizing, and because
Script
* provisions of the GPL are applicable instead of those above.

JS_CompileUCFunction(JSContext *cx, JSObject *obj, const char *name,

if (word0(rv0) == Tiny0
#endif /* jsclist_h___ */
}

} else {

}
word0(rv) = 0x7ff00000;

JSBool empty;
* Free phase.
case 'b': c = '\b'; break;

JSBool

* ECMA-compliant switch statement ops.

hash1 = maxChainHash1;

*/

#include "jsprvtd.h"
40, 40, 46, 40, 40, 46, 40, 40, /* 108 */

#endif

* If the given jsval is an engine exception with an attached error report

jsdouble d;
JS_INLINE void
#endif /* XP_PC */

*rval = JSVAL_NULL;

15, 15, 15, 15, 15, 15, 15, 15, /* 81 */


#else

if (!js_ValueToInt32(cx, *sp, va_arg(ap, int32 *)))

if (offset < 0) {

str = cx->regExpStatics.input;

GC_POKE(cx, *vp);
#define JS_USE_FDLIBM_MATH 0

frame.vars += nslots;

_absval = l; \
JSFunction *fun;

* provisions of the GPL are applicable instead of those above.

mark = JS_ARENA_MARK(&cx->tempPool);

js_printf(jp, "\t%s:\n", ATOM_BYTES(atom));


JSRTS_UP,

* Rights Reserved.

*
static JSBool

static JSUint32 CountLeadingZeros(JSUint32 a)


/*
extern double fd_copysign __P((double, double));
#define JSVAL_IS_GCTHING(v) (!((v) & JSVAL_INT) && !JSVAL_IS_BOOLEAN(v))
return 1;

if (argc && !js_ValueToECMAUint32(cx, argv[0], &indent))

#endif

JSBool ok;
}
return JS_FALSE;
* twiddling.
SRC_ASSIGNOP = 8, /* += or another assign-op follows */
/*
return JS_FALSE;
static JSStdName standard_class_names[] = {
static void

/* Return floor(b/2^k) and set b to be the remainder. The returned quotient must
be less than 2^32. */
*messagep = (char *)JS_malloc(cx, nbytes);

extern JSBool
rval = POP_OPND();
}

MinFromTime(local),

return JS_FALSE;

if (re->flags & JSREG_GLOB) {


** sprintf into a function. The function "f" is called with a string to

* at the last case.


* exception is thrown, then the JSREPORT_EXCEPTION flag will be set in
iter_state = obj->slots[JSSLOT_ITER_STATE];
#include "jsprvtd.h"

if (scope->object) {

return -1;

JS_ASSERT(0);
js_IndexAtom(JSContext *cx, JSAtom *atom, JSAtomList *al);

if (!trap) {
int32 j, j1;

return JS_FALSE;

*vp = BOOLEAN_TO_JSVAL(!file->isNative &&

JSFatLock *fat;

reportp->ucmessage = NULL;

JS_ReportErrorNumber(cx, js_GetErrorMessage, NULL, JSMSG_NAN,


return JS_FALSE;

jsdouble *date = date_getProlog(cx, obj, argv);


return NULL;
*

JSObject *pobj;
#ifdef XP_MAC

JSPropertyOp setter;
extern double fd_acos __P((double));

if (!(atom->flags & ATOM_INTERNED) || !ATOM_IS_STRING(atom))


/* Construct the scope holder and push it on. */

"else statement", /* ELSE */


#define pn_attrs pn_u.name.attrs

{
#define INT64 long
case REOP_JUMP:

if (ok && result != JSVAL_VOID) {

if (fun->atom != cx->runtime->atomState.ObjectAtom) {

return(local_time);

* 2. Convert the next line to assign the result of OBJ_LOOKUP_PROPERTY

fprintf(fp, " number of entries: %u\n", ht->nentries);


{js_isPrototypeOf_str, obj_isPrototypeOf, 1,0,0},
if (!ts) {
MEM_INCR(xdr, 4);
}
he->next = NULL;

const char *format, va_list ap);

* standard, which then had a definition of getYear which always subtracted

return JS_FALSE;
cx->version == JSVERSION_1_1 ||
ctor = JSVAL_TO_OBJECT(v);

}
for (i = 0; i <= argc; i++) {

if (funclasp)
JSBool ok;
/* Construct a Number instance that wraps around d. */

NULL, NULL, 0, NULL);

js_Disassemble1(JSContext *cx, JSScript *script, jsbytecode *pc, uintN loc,


if (!JSVAL_IS_FUNCTION(cx, cval)) {

*/
#define JS_BUG_NULL_INDEX_PROPS 0 /* o[0] defaults to null, not void */

}
* 4. Create a property in the object Result(1). The property's

* rights and limitations under the License.


JS_PUBLIC_API(JSBool)
return (info.type==PR_FILE_DIRECTORY);
};

goto out;

* setSeconds (setUTCSeconds)
{
if (!ok)
case JSOP_INCELEM:

break;
{
*date = *cx->runtime->jsNaN;
"gc() Run the garbage collector",

endpc = script->code + script->length;


bytes = NULL;
#endif
#define Bndry_mask 0xfffff

if (cx->runtime->objectHook) {
int count;

regexp_static_getProperty, regexp_static_getProperty},

* The Initial Developer of the Original Code is Netscape


switch (op) {

unsigned long currentLocalTimeSeconds,


*rval = JSVAL_TRUE;
JS_CompareValues(const void *v1, const void *v2)
JSTokenType tt;

i = (jsint) GET_ATOM_INDEX(pc);
int32 pos;

#endif
#define GC_ARENA_SIZE (GC_THINGS_SIZE + GC_FLAGS_SIZE)

jsval exn;

jsdouble year, month, day;


js_ReportErrorVA(JSContext *cx, uintN flags, const char *format, va_list ap)

return JS_FALSE;
MSG_DEF(JSMSG_DEPRECATED_USAGE, 158, 1, JSEXN_REFERENCEERR, "deprecated {0}
usage")

case '8':
JS_PUBLIC_API(JSBool)
uint32 gcMaxBytes;

EMIT_ATOM_INDEX_OP(JSOP_NUMBER, ALE_INDEX(ale));
{"short", TOK_RESERVED, JSOP_NOP, JSVERSION_DEFAULT},

rt = cx->runtime;
case TOK_IMPORT:
/* Advance offset and copy s into sp's buffer. */
*/

* Software distributed under the License is distributed on an "AS

40, 40, 40, 40, 40, 40, 5, 6, /* 111 */


/* FORELEM is not a SET operation, it's more like BINDNAME. */
JSLL_UI2L(us, tv.tv_usec);

#define DayWithinYear(t, year) ((intN) (Day(t) - DayFromYear(year)))


return JS_TRUE;

return NULL;

EmitNumberOp(JSContext *cx, jsdouble dval, JSCodeGenerator *cg)


* deleting the provisions above and replace them with the notice
JS_ASSERT(JS_FALSE);
js_Emit1(cx, cg, JSOP_SWAP) < 0 ||

************************************************************************/
* the word pointed at by p, compare-and-swap(p, 0, A) success implies that p

int amount = fmt1 - fmt0;


MatchState *state;

n += JS7_UNHEX(c);

JSAtom *atom;
* Rights Reserved.

* March 31, 1998.


#endif
JSArgumentFormatMap *map;
28, 28, 28, 28, 28, 28, 28, 28, /* 0x1800 */

pn->pn_left = left;
JS_ReportErrorNumber(cx, my_GetErrorMessage, NULL, JSSMSG_LINE2PC_USAGE);

}
while (optset != 0) {
/*

break;
return JS_TRUE;
* constructor.

JSBool ok;

}
* This Original Code has been modified by IBM Corporation. Modifications made by
IBM
&newmark);
if (pn3 && !js_FoldConstants(cx, pn3, tc))
cx->fp = fp;
}

JSFunction *fun;

if (flags & _LEFT) {


dsign = delta->sign;

/*
break;
* struct that includes the filename, lineno where the exception was
break;
if (!d) {

ctor = proto;

atom = OFFSET_TO_ATOM(rt, standard_class_atoms[i].atomOffset);


if (!w)
js_ReportIsNotDefined(cx, ATOM_BYTES(atom));
static JSParseNode *
funobj = fp->argv ? JSVAL_TO_OBJECT(fp->argv[-2]) : fp->fun->object;

return tagify(cx, obj, argv, "SUB", NULL, NULL, rval);

40, 40, 40, 40, 40, 40, 40, 40, /* 108 */


JS_free(cx, res->moreParens);

} else {
return JS_FALSE;

extern JSObjectMap *
js_ValueToNumber(JSContext *cx, jsval v, jsdouble *dp);
js_hash_scope_remove,
todo = Sprint(&ss->sprinter, "");

/*
goto out; \
c = *fmt++;

(pn)->pn_arity = (pn2)->pn_arity; \
extern const char js_RegExp_str[];

* the old behavior... now, rather than thrash the behavior yet again,
JS_SetContextPrivate(JSContext *cx, void *data);

js_DestroyScript(cx, script);

JS_DESTROY_CONDVAR(rt->stateChange);

JSTokenBuf userbuf; /* user input buffer if !file */


* under the terms of the GPL and not to allow others to use your

return JS_FALSE;

return script;
ok = OBJ_DEFINE_PROPERTY(cx, obj, id, rval, NULL, NULL,
return JS_FALSE;
# define JS_IMPORT_API(__x) __x

/* Try less frequently used top-level functions and constants. */

JS_BEGIN_MACRO \

*
{

{
fp = cx->fp;
p = malloc(nbytes);

fprintf(fp, "%ld\n", (long)ATOM_TO_INT(atom));

str_charCodeAt(JSContext *cx, JSObject *obj, uintN argc, jsval *argv,


* arenasize. Otherwise take any arena big enough, but not by
js_alloc_temp_entry(void *priv, const void *key)
*/
: JS_TRUE)
file->mode = mask;
* The contents of this file are subject to the Netscape Public

if (flags & GCF_MARK) {

*(uint32 *)MEM_DATA(xdr) = *lp;


const jschar *name, size_t namelen,
JSVERSION_1_3 = 130,
*rval = JSVAL_TRUE;
sp = js_AllocRawStack(cx, 2 + nslots, markp);
rt->gcLastBytes = rt->gcBytes;
#if JS_HAS_ERROR_EXCEPTIONS

/* Date called as constructor */


if (!rdata.chars) {

jsval cval;

typedef JSUintn uintn;


JSObject *obj2;

atom = GET_ATOM(cx, script, pc);

} else
goto out;
* under the terms of the GPL and not to allow others to use your

sprop->slot = SPROP_INVALID_SLOT;
argv[0] = STRING_TO_JSVAL(str2);

#define JS_ALIGN_OF_SHORT 2L
{"hasAutoFlush", FILE_AUTOFLUSH, JSPROP_ENUMERATE | JSPROP_READONLY },

ok = JS_FALSE;
if (flags & _ZEROS) {
*
JSType type;
* Rights Reserved.
}

*/
/*
typedef struct JSHashEntry JSHashEntry;
return JS_TRUE;

ok = JS_FALSE;

static JSAtom *

ok &= hasDefault;

* Initialize cg to allocate bytecode space from cx->codePool, source note


filename, lineno, rval);

return NULL;

* constructable object expression.

/* Not an argument, must be a redeclared local var. */

const char *bytes, uintN length,


#define TYPE_INTN 2

*/

| ((d) & SN_DELTA_MASK)))


* deleting the provisions above and replace them with the notice

dolPt = fmt;

js_true_str
fprintf(gOutFile, " current value %s\n",

if (!(*sn & SN_3BYTE_OFFSET_FLAG)) {


return;
if (nbytes > 60000U) {

JSPROP_ENUMERATE | JSPROP_PERMANENT |
aux[i]=buf[i]%256;
* JS regular expression interface.

{
goto out2;
return 0;
atom = js_AtomizeString(cx, str, 0);
vp[-depth] = (jsval)pc;

cp += lineno_as_str->length;

error:

#error "Must define one of XP_MAC, XP_PC, XP_UNIX, or XP_BEOS"

#endif
cp++;
#ifndef Sudden_Underflow

JSScope **todop;

(void) execvp(name, (char **)nargv);

name = js_GetPrinterOutput(jp);

* to js_DecompileValueGenerator from code that hasn't fully

if (cp3 != NULL) {
offset = sp->offset;

ptrdiff_t jmp;

if(PR_Close(file->handle)!=PR_SUCCESS){
* License Version 1.1 (the "License"); you may not use this file
JS_PUBLIC_API(void)
}
if (its_noisy) {

else

pn2 = Expr(cx, ts, tc);

} else {

JSBool neg;
/* it's a Feb, check if this is a leap year */
js_DropScopeProperty(JSContext *cx, JSScope *scope, JSScopeProperty *sprop)

}else

#undef FINISH_TOKENBUF

JS_snprintf(name, sizeof name, "'%s'",


high = -1;
#endif /* !NSPR_LOCK */

{
OPDEF(JSOP_TYPEOF, 39, js_typeof_str,NULL, 1, 1, 1, 10, JOF_BYTE)

3, 10, 10, 10, 10, 10, 10, 10, /* 1 */

}
static JSBool
return JS_FALSE;
do_forinloop:
js_Object_str,

if (JS_HAS_STRICT_OPTION(cx) && !ReportStrictSlot(cx, slot))


* function object. Also, fp->constructing must be set if we are preparing

* identifier

!(sprop->attrs & JSPROP_READONLY)) { \

#ifndef jsobj_h___

break;

NULL, NULL,

js_ResumeThread(tl);

* 3 bits 0 may not be part of an identifier

js_ReportCompileErrorNumber(cx, ts, NULL, JSREPORT_ERROR,


JSBool
# define POPEN _popen
!(indent & JS_DONT_PRETTY_PRINT));

static uint32 global_locks_log2 = 0;


jsdouble double_arg;

atom = GET_ATOM(cx, jp->script, pc);


nuses = cs->nuses;
** This really just finds the highest set bit in the word.
}

log2++;

41, 42, 43, 44, 45, 46, 28, 28, /* 0x0C00 */


*/
* iterator function that has type JSNewEnumerate.
* The Original Code is Mozilla Communicator client code, released
if (xdr->mode == JSXDR_ENCODE)

js_DropObjectMap(cx, &scope->map, obj);

if (!pn)

}
#include "jsutil.h" /* Added by JSIFY */

cx->errorReporter = er;

#define JSLL_F2L(l, f) ((l) = (JSInt64)(f))


/*
{js_toLocaleString_str, num_toLocaleString, 0,0,0},
chars[nchars++] = ')';

* terms of the GNU Public License (the "GPL"), in which case the

cp2 = matchGreedyKid(state, ren, stop, num, cp, lastKid);

*
JSFunction *fun;
105, 105, 105, 105, 105, 105, 105, 105, /* 0xEC00 */
(script->notes = (jssrcnote *)
map->ops = ops;

#define JS_ALIGN_OF_INT 4L
JS_ASSERT(0);

* locks in the opposite order. XXXbe ensure they don't!

if (js_Emit1(cx, cg, JSOP_LEAVEWITH) < 0)


return JS_FALSE;
{

* So we don't define these four types here to avoid conflicts in case

* deleting the provisions above and replace them with the notice

c = *p++;
if (u.c[0] == 0x01) {

enuf[i] = 0;
JS_LOCK_GC(rt);

idstr = ATOM_TO_STRING(rt->atomState.FunctionAtom);

if (n == 0 || !JS_ISIDENT_START(c))

state = &cx->runtime->atomState;

return JS_FALSE;

OPDEF(JSOP_TRUE, 67, js_true_str, js_true_str, 1, 0, 1, 12, JOF_BYTE)

#define TAG_CHAR_STRING(name) name

extern JS_PUBLIC_API(JSBool)
JS_ReportErrorFlagsAndNumberUC(JSContext *cx, uintN flags,

b = b1;

{
JSParseNode *pn2;
#endif

static JSBool
if (cs->token) {

/*

jsval *vp)

0,0,0,0,0,0,0,0,0,0,7,4,0,7,7,4, /* 2x !"#$%&'()*+,-./ */

}
stmt = cg->treeContext.topStmt;

fprintf(stderr, "jschar* (0x%p) \"", cp);


#elif defined(SUNOS4)
"alt",
#else

forelem_done = pc + GET_JUMP_OFFSET(pc);

{js_InitExceptionClasses, TAG_CHAR_STRING(js_URIError_str)},

*
file->mode = file->type = 0;

if (!OBJ_DEFINE_PROPERTY(cx, obj, id, JSVAL_VOID, NULL, NULL,


if (!parent)
} else {
* jschang, Adobe - (new function added 11/12/99 for OptionsArray setter function)
while ((dc = *++cp) != 0 && JS7_ISDEC(dc)) {

static JSBool didReadLocation = JS_FALSE;


date_getUTCMinutes(JSContext *cx, JSObject *obj, uintN argc, jsval *argv,
break;
/* Allocate the parallel (to avoid padding) offset and opcode stacks. */

todo = PopOff(ss, lastop);


cp += filename->length;
#include "jslong.h"

if (scope == OBJ_SCOPE(obj)) {

return JS_TRUE;
r1 = (r1 << 16) | jshi16(a.lo);

if (!EmitPropOp(cx, pn3, JSOP_FORPROP, cg))

/*
if (js_Emit1(cx, cg, JSOP_TRUE) < 0)

JSAtomListElement *ale;

end = NewRENode(&state, REOP_END, NULL);

/*

// in the document, so we can execute some of the functions selectively


later on

if (!file || !js_exists(cx, file) || !js_isDirectory(cx, file)){


if (rv < 0) {

argc = 0;

ok = js_LockGCThing(cx, thing);
}

}
(re->flags & JSREG_GLOB) ? "g" : "",

{
* TOK_DEFAULT pn_right: TOK_LC node for this case's statements

js_strncpy(chars + rdata.length, cx->regExpStatics.rightContext.chars,

/*boundary case -- increment exponent*/


if (switchop == JSOP_TABLESWITCH) {

* Examine optional flags. Note that we do not implement the

/*
break;
{
#if JS_HAS_REGEXPS

return HT_ENUMERATE_NEXT;

"PRArenaPool",

break;
MUST_MATCH_TOKEN(TOK_NAME, JSMSG_NAME_AFTER_DOT);
reobj = JSVAL_TO_OBJECT(argv[0]);

}
#if JS_HAS_EXCEPTIONS
* TOK_PRIMARY nullary pn_op: JSOp bytecode

if (cp < state->cpend)


return "unknown";

void *allocPriv; /* allocation private data */


** MACROS: JSLL_*
JS_ASSERT(JS_UPTRDIFF(fp->sp, fp->spbase) <= depthdiff);

* If allocOps is null, use default allocator ops built on top of malloc().

cn = 0;
js_SetClassPrototype(JSContext *cx, JSObject *ctor, JSObject *proto,
}
if (cx->version == JSVERSION_1_2) {
}

js_DoubleToECMAUint32(JSContext *cx, jsdouble d, uint32 *ip)


JS_SetArrayLength(JSContext *cx, JSObject *obj, jsuint length)

const jschar *complete;


case JSOP_NAME: op = JSOP_GETVAR; break;
goto out;
/* Only add the first element as an array if it looks like one. Treat the
15, 15, 46, 46, 15, 15, 15, 15, /* 87 */

#define date_valueOf date_getTime


nbytes = (length + 1) * sizeof(jschar);

switch (op2) {
ok = CheckSideEffects(cx, tc, pn->pn_kid, answer);

if (!ok)
JSBool ok, cond;

** TYPES: JSUint8

js_GetSlotThreadSafe(JSContext *cx, JSObject *obj, uint32 slot)


while ((c = GetChar(ts)) != EOF && c != '\n')

# This script was used in 9/98 to facilitate the incorporation of some NSPR

pn = MemberExpr(cx, ts, tc, JS_TRUE);


*

return JS_FALSE;

*/
* IS" basis, WITHOUT WARRANTY OF ANY KIND, either express oqr

}
#define G1970GMTMICROHI 0x00dcdcad /* micro secs to 1970 hi */
*/

5, 6, 3, 7, 3, 8, 3, 3, /* 0 */

*/
* small set of threads (contexts).
if (!OBJ_DEFAULT_VALUE(cx, obj, JSTYPE_STRING, &v))

PUSH_OPND(rtmp);

extern JSBool
tc->flags = oldflags | (tc->flags & TCF_FUN_FLAGS);
}
static JSBool

* It's not interactive - just execute it.


goto out;
}

nbytes += sizeof *scope;

JSObject *proto = OBJ_GET_PROTO(cx, obj);


getter, setter, attrs, NULL);
if (i <= st + 1)

*/

length = ida->length;

for (i = 0; i < argc; i++) {


#endif

#define FIVE_OCTET_BASE 0xF8 /* 111110xx */

do_forinbody:
extern JS_PUBLIC_API(jsval)

ULong borrow, y;

frame.annotation = down->annotation;
*answer = JS_TRUE;

ss.stuff = GrowStuff;

/* Return early to dodge the common TOK_NUMBER code. */

if (SPROP_GETTER(sprop, pobj) == js_GetCallVariable) {


JS_STATIC_DLL_CALLBACK(intN)

return tagify(cx, obj, argv, "STRIKE", NULL, NULL, rval);


case REOP_UCFLAT:
len = GET_JUMP_OFFSET(pc);

h = (h >> 28) ^ (h << 4) ^ *s;

} else {

return JS_TRUE;
if (!rt->gcRootsHash)
#define Big1 0xffffffff

if (!chars) {

JSMSG_SEEK_BEYOND_START);
strlen(argText) - 1);

else
JS_FRIEND_API(int)

*/
JS_ATOMIC_INCREMENT(&fun->nrefs);
**** Start of jsexn.c ****
* Stack macros and functions. These all use a local variable, jsval *sp, to

#endif

return 11;
if (bs2 > 0)

* terms of the GNU Public License (the "GPL"), in which case the
js_InitExceptionClasses(JSContext *cx, JSObject *obj)
* the License at http://www.mozilla.org/NPL/

if (SPROP_GETTER(sprop, pobj) == js_GetArgument) {

* Rights Reserved.

* The contents of this file are subject to the Netscape Public

#define Storeinc(a,b,c) (((unsigned short *)a)[1] = (unsigned short)b, \

exception,
return JS_TRUE;

for(j = j1 >> 4; j; j >>= 1, i++)

fprintf(gOutFile, prompt);

out:
} while (js_MatchToken(cx, ts, TOK_COMMA));

40, 40, 40, 40, 40, 46, 40, 40, /* 41 */


NULL,
}

case JSTRAP_CONTINUE:
{"while", TOK_WHILE, JSOP_NOP, JSVERSION_DEFAULT},
"It", 0,

if (!table->entryStore)
if (rve)

JS_ASSERT(pn2->pn_type != TOK_RP);

0x0000600B, /* 17 No, decimal 16 */

*sp = BOOLEAN_TO_JSVAL((JSBool) va_arg(ap, int));


default:

while (1) {

{
}

report.filename = fp->script->filename;

#define JSLL_ADD(r, a, b) { \

state->tablegen = 0;
js_FreeStringGlobals()

NULL);

* rights and limitations under the License.

"PR_BEGIN_MACRO",

if (--map->depth == 0) {
fprintf(gOutFile, "adding its property %s,",
c = TOK_ASSIGN;

JSLL_L2D(msec_time, ms);

nbytes = capacity * entrySize;

**** Start of jsscan.h ****

DestroyFatlock(JSFatLock *fl)

* for all such "flyweight" (ownercx != NULL) locks, so that control


*sp = s + 1;
}
case 0:
return rv;

if (beq < 0)
*
return JS_FALSE;

tc->flags |= TCF_FUN_CLOSURE_VS_VAR;
#define DBL_DIG 15
* bulk of js_GC, API users have come to depend on JS_AddRoot etc. locking
const char *id = (atom && ATOM_IS_STRING(atom))
* a given thing's page. So we store the split pointer (the pointer to tp0)

* Inflate bytes to JS chars and vice versa. Report out of memory via cx
jsint slot;

/* Add separating comma or terminating 0. */

* for statement.

*
return JS_TRUE;
JSAtom *atom;

d = (pn->pn_op == JSOP_LSH) ? i << j : i >> j;


sp--;
if (js_PeekToken(cx, ts) == TOK_RP) {
JSPROP_ENUMERATE | JSPROP_READONLY );
* This hook captures high level script execution and function calls
}
* License Version 1.1 (the "License"); you may not use this file

JS_ReportErrorNumber(cx, JSFile_GetErrorMessage, NULL,


}
*

static JSConstDoubleSpec number_constants[] = {

JSErrorReporter onError;

if ((tt == TOK_EOF || tt == TOK_RC) &&


tc->flags |= TCF_FUN_HEAVYWEIGHT;
#include "jsexn.h"

names ? "," : "", js_options[j].name);

#ifdef va_start
#endif /* __GNUC__ */

"PR_BITS_PER_FLOAT",
todo = Sprint(&ss->sprinter, "%s && %s", lval, rval);

* header file "jsconfig.h" has been included.

* If ownercx's thread is calling js_SetProtoOrParent, trying to lock


* The Initial Developer of the Original Code is Netscape
{

}
* Communications Corporation. Portions created by Netscape are
*

{js_instanceof_str, TOK_RESERVED, JSOP_NOP, JSVERSION_1_4},

k--; /* want k = floor(ds) */

SRC_RESERVED0 = 10, /* reserved for future use */


utfbuf[1] = utfbuf[2];

goto out;

if(!file_write(cx, obj, argc, argv, rval)) return JS_FALSE;

* kept (in js_Enqueue), and if not, the fat lock is deallocated.


static struct NumArgState* BuildArgArray( const char *fmt, va_list ap, int* rv,
struct NumArgState* nasArray )

die "Can't open $infile" if !open(INFILE, "<$infile");

rval = DOUBLE_TO_JSVAL(rt->jsNaN);
}
"PRStuffFunc",

OPDEF(JSOP_SETPROP, 54, "setprop", NULL, 3, 2, 1, 1, JOF_CONST|


JOF_PROP|JOF_SET)
}
46, 46, 46, 46, 46, 40, 40, 40, /* 94 */

}
return cx->runtime->emptyString;

**** End of js.c ****

rt = cx->runtime;
* each name node has pn_atom: variable name and

if (C < 0xD800 || C > 0xDBFF) {

break;

RETURN(TOK_ERROR);

gettimeofday(&tv, 0);
JS_ASSERT(sp - fp->spbase >= 2);
return 0;

#if JS_HAS_GETTER_SETTER

rval = POP_STR();
JS_ASSERT(strlen(fout) < sizeof(fout));

#define JSLL_SHL(r, a, b) ((r) = (JSInt64)(a) << (b))

default:
beq = 0;

(JSDOUBLE_LO32(x) || (JSDOUBLE_HI32(x) & JSDOUBLE_HI32_MANTMASK)))


/*
#ifdef JS_ARENA_CONST_ALIGN_MASK
if ((b) < 32) { \
do {

todo = -2; /* NB: different from Sprint() error return. */


getter == js_GetCallVariable)
(r).hi = -(JSInt32)(a).hi - ((r).lo != 0))

if (!OBJ_SET_PROPERTY(cx, nobj, id2, &v))


* Use math routines in fdlibm.

return 0;
str = js_DecompileValueGenerator(cx, JSDVG_IGNORE_STACK,
{M_SQRT1_2, "SQRT1_2", 0, {0,0,0}},
{
delta = diff(bb, bd);

TimeWithinDay(jsdouble t)
* (i) rt->gcLock held

if (!AddToTokenBuf(cx, &ts->tokenbuf, (jschar)c))

* of property if executing with the strict option. We check


JS_FRIEND_API(jsval *)
if (!equal || strcmp(equal + 1, "yes") == 0)

if (k < Ebits) {
goto ret; */

end = tmp;

* effect (their return value) is discarded.


/* Set the property named by obj[id] to rval. */

} else { \
len = GET_JUMP_OFFSET(pc);

#define MARK_ENTRY_FREE(entry) ((entry)->keyHash = 0)

void
JS_NewNumberValue(JSContext *cx, jsdouble d, jsval *rval)
}

#define JS_INSERT_AFTER(_e,_l) \
rval = JSVAL_VOID;
};
arena_stats_list = &pool->stats;
**

#include "jstypes.h"

JS_GetNegativeInfinityValue(JSContext *cx);
MonthFromTime(local),
return JS_FALSE;

if (!js_FoldConstants(cx, pn2, tc))

#define JS_BUG_EAGER_TOSTRING 0 /* o.toString() trumps o.valueOf() */

60, 60, 46, 46, 46, 46, 46, 46, /* 13 */

}
jsval id; /* primary id, a string or int */
js_SetProperty(JSContext *cx, JSObject *obj, jsid id, jsval *vp);

#include "jsbool.h"
REOP_JUMP = 23, /* for deoptimized closure loops */

} else {

case '=':
js_ValueToObject(JSContext *cx, jsval v, JSObject **objp);
lval = FETCH_OPND(-1);
if (argc == 0) {
rval = POP_STR();

JSMSG_ANON_NO_RETURN_VALUE);

0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, /* 1x */
printf( "invalid argument number (valid range [1, %d]), \"%s\"\n",
number, fmt );
js_strncpy(&chars[nchars], sepstr, seplen);
}
return JS_FALSE;
parent = OBJ_GET_PARENT(cx, ctor);
#include "jsatom.h"
extern intN

ptrdiff_t diff, off, off2, caseExprOff;


#define OBJ_SET_SLOT(cx,obj,slot,value) \
if (fl_list_table[i].taken)
{

return JS_FALSE;

? BYTECODE_GRAIN
};
#define JSLL_ZERO JSLL_Zero()
case JSOP_RETURN:

* by format, so there is no argc parameter.

(JSProperty **)&sprop)) {
js_DestroyScopeProperty(cx, scope, sprop);
*/

PRCondVar *svar;

/*

DecompileSwitch(SprintStack *ss, TableEntry *table, uintN tableLength,

* Handle old bug that took empty string as zero index. Also convert
PN_INIT_LIST(pn2);

"PR_LOG_DEFINE",
char *js_incop_str[] = {"++", "--"};

for (n = -ndefs; n < 0; n++) {


11, 11, 16, 94, 16, 46, 16, 16, /* 66 */

obj = NULL;

char line[256];

for (i = 1; i <= length; i++) {

op = REOP_WNONBDRY;

cx->scannerVersion = cx->version;
if (!(B & 0x80)) {
str = js_NewString(cx, news, js_strlen(news), gcflag);
/*

js_XDRScript(JSXDRState *xdr, JSScript **scriptp, JSBool *hasMagic)

* exception
MulExpr(JSContext *cx, JSTokenStream *ts, JSTreeContext *tc)
js_Emit1(cx, cg, JSOP_ENTERWITH) < 0) {

* and so would a call to f from another top-level's script or function.

case TOK_WHILE:

char *dirName = JS_GetStringBytes(JS_ValueToString(cx, argv[0]));

if (!date)
*xc = (ULong)carry;
typedef struct JSString JSString;

if (!ren)

* and other provisions required by the GPL. If you do not delete

rv += adj;

JSJS_EXTERN_API(JSPRIntn)

enum regexp_static_tinyid {
JS_PUBLIC_API(JSBool)

do_longlong:

** DESCRIPTION:
if (iter) {

JSObject *
tt = js_PeekTokenSameLine(cx, ts);

left = pn->pn_left;
#define JS_EXTERN_DATA(__type) extern __type

}
} else {

} else {
56, 56, 56, 56, 56, 56, 56, 56, /* 0x7E00 */
char *entryStore; /* entry storage */
#endif
if (oldre)
{

*/

#define JS_UNLOCK0(P,M) ((void)0)

(void) js_GetToken(cx, ts);

file_read(JSContext *cx, JSObject *obj, uintN argc, jsval *argv, jsval *rval)
return JS_FALSE;

if (!EmitElemOp(cx, pn2, JSOP_DELELEM, cg))

40, 40, 40, 40, 40, 40, 40, 40, /* 113 */

#endif

day = MakeDay(year, mon, mday);


else
*/
save = jp->scope;

{
if (!js_EmitTree(cx, cg, pn->pn_right))

/* Unicode control-format characters, ignored in input */


0 /* SRC_XDELTA */

OBJ_ENUMERATE(cx, obj, JSENUMERATE_DESTROY, &iter_state, 0);


*
c = Balloc(a->k);

static char *
tt = CURRENT_TOKEN(ts).type;
args[i] = js_DoubleToInteger(args[i]);
#define JSLL_CMP(a, op, b) JSLL_REAL_CMP(a, op, b)

return NULL;
return JS_FALSE;
return obj;

cx->throwing = JS_TRUE;
jsdouble *date = date_getProlog(cx, obj, NULL);
DTOSTR_PRECISION /* Either fixed or exponential format;
<precision> significant digits */

static JSBool

uint32 nreclaims; /* number of reclaims from freeArenas */

*/
elem = JSVAL_TO_OBJECT(elemval);

{"goto", TOK_RESERVED, JSOP_NOP, JSVERSION_DEFAULT},


}
if (!JS_ValueToInt32(cx, *vp, &offset)){
#if defined(_WIN32) && defined(_M_IX86)
* In order to avoid unnecessary js_LockGCThing/js_UnlockGCThing calls, these
*vp = fp->argv ? fp->argv[-2] : OBJECT_TO_JSVAL(fp->fun->object);

str_substr(JSContext *cx, JSObject *obj, uintN argc, jsval *argv, jsval *rval)
JSProperty *prop;
}
uint32 entrySize, uint32 capacity)
else {

* Use readline only if fh is stdin, because there's no way to specify

56, 56, 56, 56, 56, 56, 56, 56, /* 0x6400 */


ptrdiff_t off, len, nb;

nslots = (obj->map->ops->mark)

result = UTC(result);
40, 40, 40, 40, 40, 40, 46, 46, /* 102 */
* u uint32 ECMA uint32
ok = OBJ_DEFINE_PROPERTY(cx, parent, (jsid)fun->atom,

JSCT_LETTER_NUMBER = 10,
#endif

JSRuntime *rt;

if (JSVAL_IS_PRIMITIVE(rval)) {

case JSOP_TABLESWITCH:

js_RemoveRoot(cx->runtime, &exnObject);

"PR_GetEventQueueMonitor",
}

STMT_TRY = 6, /* try statement */

cg2.treeContext.tryCount = pn->pn_tryCount;

break;
js_BooleanToString(JSContext *cx, JSBool b)
pn3->pn_val = JSVAL_FALSE;
return JS_FALSE;

JS_ASSERT(ts->lookahead == 0 ||

40, 40, 40, 40, 3, 40, 60, 60, /* 27 */


/*
proto = JSVAL_TO_OBJECT(rval);
id = (jsid) FETCH_OPND(n); \

#endif /* JSDEBUGGER */
if ((j_) >> 1) \
* while parsing the function's body
ULong *x, y, z;

"PR_ARENA_DEFAULT_ALIGN",

case TOK_VAR:

} else {

46, 46, 46, 46, 46, 46, 46, 46, /* 9 */

{"getUTCDate", date_getUTCDate, 0,0,0 },


JS_UNLOCK_OBJ(cx, obj);
if (!len)

#ifdef __cplusplus

*
* The contents of this file are subject to the Netscape Public

JSStackFrame *fp;
JS_STATIC_DLL_CALLBACK(void)
*/
}

* TOK_CASE, binary pn_left: case expr or null if TOK_DEFAULT

#if JS_HAS_REPLACE_LAMBDA

* License Version 1.1 (the "License"); you may not use this file
str_unescape(JSContext *cx, JSObject *obj, uintN argc, jsval *argv, jsval *rval)
} else if (argc == 1) {

uintN cursor; /* index of last parsed token */

/* Note that this is before it gets flagged with JSREPORT_EXCEPTION */

const jschar *name, size_t namelen, jsval value,


if (js_PeekToken(cx, ts) == TOK_SEMI) {
if (!js_ValueToNumber(cx, *argv, &d))

JSSubString *maybeParens; /* possible paren substring pointers */

js_printf(jp, "\t%s: {\n", ATOM_BYTES(atom));

jsuint c = 0;

for (i=0; i < str->length; i++)


MSG_DEF(JSMSG_END_SEEK, 66, 0, JSEXN_NONE, "illegal end-based seek")

static Bigint *mult(CONST Bigint *a, CONST Bigint *b)


number_constants[NC_MIN_VALUE].dval = u.d;

* [< catchguard code >] if there's a catchguard


46, 46, 38, 46, 38, 46, 38, 46, /* 15 */

if (trap) {

jsdouble *date = date_getProlog(cx, obj, argv);


{

for (pce = &cache->table[0]; pce < end; pce++) {

}
/* not supported feature, for the argument is not numbered */

JS_LOCK_RUNTIME(rt);

#define JS_HAS_NUMBER_FORMATS 0 /* numbers have formatting methods */

* implied. See the License for the specific language governing

* restoring cx->requestDepth.

log2 += 4, n >>= 4;

#ifdef JSDEBUGGER

if (ren) {

table->nentries = nsyms;

* JS_UNLOCK_OBJ macro calls, which will decrement newscope->u.count only

*vp = fp->argv[slot];
if (data2!='\n') { /* We read one char too far. Buffer it. */
pc2 += JUMP_OFFSET_LEN;
* implied. See the License for the specific language governing

if (callback) {
/* above doesn't work for negative dates... */

JS_DestroyIdArray(cx, ida);

if (!(raw = (jschar *) xdr->ops->raw(xdr, nbytes)))


/* Null-valued symbol left behind from a delete operation. */
} else {

uint32 requestCount;

JSInt64 _a; \
SRC_CONT2LABEL = 17, /* JSOP_GOTO for 'continue label' with atomid */

{
#ifdef XP_OS2_VACPP /* OS2TODO */
* This routine tries to optimize name gets and sets to stack slot loads and
}
}

* Here is an script:
/* Allocate a slot for this property. */

}
if (fh == stdin) {
#if JS_HAS_TOSOURCE

if (y <= P*Exp_msk1 && aadj > 1.)

todo = -2;

{
size = TRYNOTE_SIZE(cg->treeContext.tryCount);
CHECK_REQUEST(cx);
ss->top = ++top;
# ifdef __MWERKS__
return ok;
return NULL;

parsenodes - recyclednodes);
fval = JSVAL_NULL;

/* Move t forward from s past un-quote-worthy characters. */

* setter might be stored apart from sprop -- say in scope->gsTable[i] for

#endif
if (SN_TYPE(sn) == SRC_VAR)
} JSGCPageInfo;
s = str->chars;

* the License at http://www.mozilla.org/NPL/


extern JSObject *
if (i < 0) {

borrow = (z & 0x10000) >> 16;

* use. But if a function calls eval, the string argument is treated as a

* some HP systems), it may be necessary to #define NAN_WORD0


if (closurep)
static JSBool
}
pc = fp->pc;
DebugStr(pStr);

break;

return JS_FALSE;
}

{M_LOG10E, "LOG10E", 0, {0,0,0}},

jsval *rval)

};

extern JSBool

* is passed on the cmd line.

}
* properties are accessed by opcodes using stack slot numbers

/* clean up the sleepQ entry */

"flat1",

SecFromTime(local),

for (i = 0; i < ncases; i++) {

const char js_propertyIsEnumerable_str[] = "propertyIsEnumerable";

if (!al->table) {

27, 23, 24, 23, 24, 23, 24, 28, /* 5 */


JSLL_UI2L(tmp, PRMJ_USEC_PER_SEC);
{

EMIT_ATOM_INDEX_OP(JSOP_NAME, ALE_INDEX(ale));
#endif /* JS_HAS_REGEXPS */

? js_const_str

if (script->trynotes) {
*/
if (!reportp->messageArgs)

else {
JS_ReportErrorNumber(cx, js_GetErrorMessage, NULL,
JSMSG_PRECISION_RANGE, numStr);

val = JSVAL_VOID;
JSInt64 _a, _b; \

if (++gBranchCount == gBranchLimit) {
jsword me = cx->thread;
* The contents of this file are subject to the Netscape Public
goto fetch_and_convert;
/*
}

goto out;

* We are typically called with non-null ts and null cg from jsparse.c.

return entry;

if (!script)

(obj2 = JSVAL_TO_OBJECT(lval)) == NULL ||


*/
lval = POP_STR();
MEM_PRIV(xdr)->limit = MEM_BLOCK;
*

math_round(JSContext *cx, JSObject *obj, uintN argc, jsval *argv, jsval *rval)

lval = POP_OPND();

#endif

15, 15, 15, 15, 15, 15, 15, 15, /* 84 */


js_ResetBuffers(file);
#if JS_HAS_APPLY_FUNCTION
* Call js_ExecuteRegExp with true for the test argument. On successful

/*
/*
for (base = sn++; arity--; sn++) {

);
if (fun->script)
fullName = js_combinePath(cx, file->path, dirName);

if (tt == TOK_NAME) {
fun = JS_DefineFunction(cx, obj, fs->name, fs->call, fs->nargs,
} else {
}

printf("#define JS_BITS_PER_SHORT %dL\n", bpb * sizeof_short);


return JS_DeleteProperty2(cx, obj, name, &junk);

rt->debugErrorHookData = closure;

* version of this file under the NPL, indicate your decision by


entryAddr = entryStore;
if (!thisp)
goto good;
file->handle = PR_Open(file->path, mask, 0644);

extern JS_PUBLIC_API(char *)
freeRENtree(cx, (RENode *)(ren->kid), (RENode *)(ren->next));
(_l)->prev->next = (_e); \

//extern JSBool FwEnumDestroyer(jsval iter_state);


jsval v;

return obj;
pn = OrExpr(cx, ts, tc);

for (ok = JS_TRUE; ps->name; ps++) {

* NB: list must be non-empty for correct PN_LAST usage!


}
static uint32 gBranchLimit;
if (format & JOF_SET)

* rights and limitations under the License.


/* GC flag definitions, must fit in 8 bits (type index goes in the low bits). */

#else

} while ((ale = ALE_NEXT(ale)) != NULL);

#include "jsconfig.h"

* version of this file under the NPL, indicate your decision by


!( (defined(_WIN32) && defined(_M_IX86)) || \

/* Optimize for two int-tagged operands (typical loop control). */ \


JS_BEGIN_EXTERN_C
}
15, 15, 15, 15, 15, 15, 15, 15, /* 99 */
scope = js_MutateScope(cx, obj, id, getter, setter, attrs, &sprop);

#define ATOM_INDEX_LEN 2
JS_GC(JSContext *cx);
#if JS_HAS_TOSOURCE

**** End of jsmath.h ****


JS_ASSERT(pn->pn_type == TOK_NAME);

* JS_FormatTime to get a string representing the time zone. */

hep = JS_HashTableRawLookup(table, keyHash, (void *)key);


map->table = NULL;
JS_ASSERT(CURRENT_TOKEN(ts).type == TOK_VAR);

} else {
goto out; \
*/

return NULL;

if(file->handle && PR_Close(file->handle)){

#endif
* APIs block in js_AddRoot or js_RemoveRoot (see above in this file),
table = (TableEntry *)
js_UnlockScope(cx, scope))
for (m = n / 8; n >= m; s += m, n -= m)
/* Tell js_EmitTree to generate a final POP. */
#define JS_HAS_NEW_OBJ_METHODS 0 /* has Object.prototype query methods */

return b;

js_strncpy(news, s, n);

Returned string must be freed. Returned string must be freed.


if (!ok) {

};

15, 15, 15, 15, 15, 15, 15, 15, /* 83 */


LOCAL_ASSERT(atom);
}
switch (op) {
else

{#name, #exception},
obj->map = js_HoldObjectMap(cx, map);

if (filename || isInteractive)

JSFILE_CHECK_NATIVE("copyTo");
**

return NULL;

while ((tt = js_PeekToken(cx, ts)) > TOK_EOF && tt != TOK_RC) {


/* top is the first clause in a disjunction (||). */
**** End of jsconfig.h ****

(ptrdiff_t)(CG_OFFSET(cg) - top))) {
*sp = sym;
#define JS_HAS_GETTER_SETTER 0 /* has JS2 getter/setter functions */
short length = 0;
c = TOK_ASSIGN;

char *cstr, *istr, *estr;

case PN_NAME:

OBJ_DELETE_PROPERTY(cx, obj, id2, &v); /* v is junk. */

kidMatch = matchRENodes(state, (RENode *)ren->kid,


56, 56, 56, 56, 56, 56, 56, 56, /* 0x6000 */

*/

return NULL;
if (ok)

extern JSBool

return JS_FALSE;
return JS_FALSE;
{
#endif
JS_PUBLIC_API(JSBool)
*

* file.
report.lineno = 0;
typedef JSInt64 JSUint64;

}
size_t length;
buffer = '\r';

return js_AtomizeHashedKey(cx, key, keyHash, flags);

regexp_static_getProperty, regexp_static_getProperty},
if (!js_AddRoot(cx, &pd[i].id, NULL))

do {

variance = nchains * sqsum - nentries * nentries;


extern JS_PUBLIC_API(JSBool)

#define JS_HAS_LABEL_STATEMENT 0 /* has break/continue to label: */


xval = POP_STR();

# define CURRENT_DIR "c:\\"

/************************************************************************/
return js_NewNumberValue(cx, z, rval);

return sym;

* depth slots below the operands.


* Test whether cx took ownership of obj's scope during js_LockObj.
return Encode(cx, str, js_uriReservedPlusPound_ucstr, js_uriUnescaped_ucstr,

JS_ASSERT(0);
thing);
* "08" or "4.0" as array indices, which they are not.

}
JSString *str;

return -1;

* control point of view.

if (!obj)
return JS_FALSE;
if (!str2)
continue;
#endif
goto out;
report = privateData->errorReport;
60, 60, 60, 60, 46, 46, 46, 46, /* 115 */

#define JSVAL_TO_PRIVATE(v) ((void *)((v) & ~JSVAL_INT))

case JSOP_SETSP:

#endif
#define IEEE_MC68k

OBJ_GET_PARENT(cx, JSVAL_TO_OBJECT(fval)),

* except in compliance with the License. You may obtain a copy of

obj_valueOf(JSContext *cx, JSObject *obj, uintN argc, jsval *argv, jsval *rval)
JSObject *obj;

* points with signatures matching the following six, and that doesn't seem
{

return JS_FALSE;
#define jspubtd_h___

46, 46, 46, 46, 46, 46, 46, 46, /* 28 */


uint32 i;
* Copyright (C) 1998 Netscape Communications Corporation. All

if (xdr->mode == JSXDR_DECODE) {

static JSBool

mov ebx, w
* and other provisions required by the GPL. If you do not delete

Array(JSContext *cx, JSObject *obj, uintN argc, jsval *argv, jsval *rval)

res->moreLength += 10;
*result = POP_OPND();

JS_DestroyRuntime(JSRuntime *rt)

{
}

Re-direct all output to "results.txt"

JSTryNote *tn, *tnotes;


!JS_DHashTableInit(&logtbl, JS_DHashGetStubOps(), NULL,

sn = js_GetSrcNote(jp->script, pc);
ren = NewRENode(state, REOP_ALNUM, NULL);

if (report.messageArgs) {
}

} else {

IndexToId(JSContext *cx, jsuint length, jsid *idp)


js_UnlockRuntime(JSRuntime *rt)

if (df != 0.0) {

utfbuf[1] = utfbuf[2];
extern const char js_getter_str[];

return ok;
#else
PR_DestroyLock(global_locks[i]);
/*
}
return JS_FALSE;
*/

122, 122, 122, 122, 122, 122, 122, 122, /* 104 */

if (--sprop->nrefs == 0) {

#if JS_HAS_IN_OPERATOR
MSG_DEF(JSMSG_BAD_INDIRECT_CALL, 146, 1, JSEXN_EVALERR, "function {0} must be
called directly, and not by way of a function of another name.")
* The Initial Developer of the Original Code is Netscape
typedef struct NamedRootDumpArgs {

uint32 argc;

lval = POP_STR();

static JSBool

if (!mark)

NC_NEGATIVE_INFINITY,

* assignment to arguments), flag the function as heavyweight (requiring

uint32 gcMallocBytes;

js_ReportCompileErrorNumber(cx, ts, NULL, JSREPORT_ERROR,

js_Invoke(JSContext *cx, uintN argc, uintN flags);

goto out;

}
JSJS_EXTERN_API(void)
**** Start of jsosdep.h ****

d = fmod(d, two32);

str = NULL;

pmem_next += len;
#define JS_HAS_IN_OPERATOR 1 /* has in operator ('p' in {p:1}) */
* #define MULTIPLE_THREADS if the system offers preemptively scheduled
#endif

}
msec_time = date_msecFromDate(year, mon, mday, hour, min, sec, 0);

js_InterpretInternal(JSContext *cx, jsval *result)

"PRHashEntry",
state.parenCount = 0;

for (i = k, j = m; ; i--, j--) {

* must evaluate to false, due to JSPROP_PERMANENT.

slot = JSVAL_TO_INT(id);
entryAddr = table->entryStore;

case PN_LIST:

* stddef inclusion here to first declare ptrdif as a signed long instead of a

JSLL_UDIVMOD(&(r), 0, _a, _b); \


JSObject *arrayobj, *reobj;
/* Call the finalizer with GCF_FINAL ORed into flags. */
break;
*/

JS_ASSERT(OBJ_IS_NATIVE(obj));

if (noprop) {

jsuint length, last;


{

if (attrs & JSPROP_READONLY)

if (b >= ren->u.ucclass.bmsize) {

#define RESERVE_JAVA_KEYWORDS

CHECK_AND_SET_JUMP_OFFSET_AT(cx, cg, beq);


#define HASH2(hash0,log2,shift) ((((hash0) << (log2)) >> (shift)) | 1)

double da, db;

goto do_octal;

return JS_FALSE;

id = (jsid)atom;
fp = cx->fp;
#define TCF_IN_FUNCTION 0x02 /* parsing inside function body */

* It's then likely in some other character encoding, and we probably

return NULL;

p = (type) JS_ArenaGrow(pool, p, size, incr); \


{ "mkdir", file_mkdir, 0},
extern JS_PUBLIC_API(JSInt32) JS_sscanf(const char *buf, const char *fmt, ...);
* 'chars' must be large enough for 'length'+1 jschars.
* the License at http://www.mozilla.org/NPL/

JSErrorFormatString jsShell_ErrorFormatString[JSErr_Limit] = {

JS_PUBLIC_API(JSBool)
/* If no args, leave private undefined and return early. */

JSPROP_ENUMERATE | JSPROP_PERMANENT,
}

ptrdiff_t delta;

0x0417620A, /* 111 Nl, hasUpper (subtract 16), identifier start, decimal 17 */

23, 24, 23, 24, 23, 24, 23, 24, /* 61 */

JS_HashTableRawRemove(ht, hep, he);


/***********************************************************************
JS_UNLOCK_GC(rt);
break;
JSFILEMSG_FIRST_ARGUMENT_MUST_BE_A_NUMBER,
"position", *vp);
#include "jsparse.h"

} else

return "script";
(oldIndex < (MAXINDEX / 10) ||

GC_MARK(cx, acx->newborn[GCX_STRING], "newborn string", NULL);


}
jsdouble x, z;

JS_DHashTableRawRemove(JSDHashTable *table, JSDHashEntryHdr *entry)


!JS_XDRUint8(xdr, &fun->flags)) {

chars = str->chars;

static JSBool

}
/* Get immediate argc and find the constructor function. */
/*
if (!js_qsort(vec, (size_t) len, sizeof(jsval), sort_compare, &ca)) {
ts->flags |= TSF_NEWLINES;
/* Print the keyword and the possibly empty init-part. */

* Set rt->gcRunning here within the GC lock, and after waiting for any

c = *bdr->digits++;

uint32 steps; /* hash chain links traversed */


ULong borrow, carry, y, ys;
/* If obj still has this scope, we're done. */

"prbit",

kid = NewRENode(state, REOP_EMPTY, NULL);


*vp = BOOLEAN_TO_JSVAL(length > 0);
ht->buckets = (JSHashEntry**) (*ht->allocOps->allocTable)(ht->allocPriv,
nb);

"File %s is already open, we will close it and reopen, proceeding",

#define CG_PROLOG_CODE(cg,poff) (CG_PROLOG_BASE(cg) + (poff))


/* Flag the error as an exception. */

typedef void

return;
* Alternatively, the contents of this file may be used under the

CHECK_REQUEST(cx);

return NULL;
}
if (!pn)
105, 105, 105, 105, 105, 105, 105, 105, /* 0xE600 */

z2 = (*x++ >> 16) * y + (*xc & 0xffff) + carry;


* purpose without fee is hereby granted, provided that this entire notice
(cs->format & JOF_INC) ? (rval += 2) : (rval -= 2);
if (!js_SetJumpOffset(cx, cg, pc, low))
break;

retry:

OBJ_DEFINE_PROPERTY(cx, proto, id, val, NULL, NULL, 0, NULL);


js_HoldObjectMap(cx, &scope->map);

{"setYear", date_setYear, 1,0,0 },

i = m2 < s2 ? m2 : s2;

return fwrite(&buffer, 1, 1, file);

JS_ASSERT(GCX_EXTERNAL_STRING <= type && type < (intN) GCX_NTYPES);


/* These two are time-optimized to avoid stub calls. */

return;
*

js_ValueToNonNullObject(JSContext *cx, jsval v);

JS_UNLOCK_GC(rt);

chars = (jschar *) JS_malloc(cx, (nchars + 1) * sizeof(jschar));

MEM_INCR(xdr, len);

JSTrapHandler handler = rt->interruptHandler;

#include "jsobj.h"
report.linebuf = NULL;

void

40, 40, 40, 40, 40, 40, 40, 40, /* 93 */

if (c == '(') depth++;
((JSDHashEntryStub *)entry)->key = idstr;

JS_UNLOCK_OBJ(cx, obj);

return js_GetCallObject(cx, fp, NULL);

if (!filename)

default:

return clasp->hasInstance(cx, obj, v, bp);

js_GetErrorMessage, NULL,

JSFunction *fun;

#ifndef jsemit_h___
return;

#if JS_HAS_CALL_OBJECT
}

compatibility.
* Rights Reserved.
Decode(JSContext *cx, JSString *str, const jschar *reservedSet, jsval *rval)

15, 15, 16, 38, 38, 38, 16, 16, /* 71 */


}
lval = ATOM_BYTES(atom);
}

ok = JS_FALSE;

if (!ok)
#ifdef JSDEBUGGER_C_UI

break;

CHECK_REQUEST(cx);

JS_PUBLIC_API(JSBool)

#include "jsstddef.h"

*
#define JS_HAS_OBJ_WATCHPOINT 1 /* has o.watch and o.unwatch */

if (action != 0) {
* deleting the provisions above and replace them with the notice
OBJ_DROP_PROPERTY(cx, pobj, (JSProperty *)sprop);

return 0;

JS_ASSERT((uintN)slot < fp->fun->nvars);

js_UnlockGCThing(cx, rt->jsPositiveInfinity);
#undef d1
* Find or create the atom for a Boolean value. If we create a new atom, give

if (t == z)

#define JS_ISFORMAT(c) (((1 << JSCT_FORMAT) >> JS_CTYPE(c)) & 1)

{M_LOG2E, "LOG2E", 0, {0,0,0}},


*cp++ = '"';

* The Original Code is Mozilla Communicator client code, released

if (!newReport->messageArgs)
if (!fun)

fprintf(stderr, "id %d (0x%p) is ", (int)id, (void *)id);


* Software distributed under the License is distributed on an "AS
40, 40, 40, 40, 40, 40, 40, 40, /* 45 */
}
}
month = MonthFromTime(lorutime);

return JS_FALSE;

size_t n, m;
if (obj)

* License Version 1.1 (the "License"); you may not use this file

intN noteIndex;

DropWatchPoint(cx, wp);

id = (jsid)atom; \
#endif
if (!js_ReportCompileErrorNumber(cx, ts, NULL,
}
*/
if (!tried_gc) {
if (!cg->tryBase)

extern JSRegExp *

static CONST double

#define JS_INITIAL_NSLOTS 5
*/
if(file->isNative){ \
#define JS_EXPORT_API(__type) __type

u.ll = va_arg(ap, JSInt64);


*/
if (atom == NULL)

case 'i':
}

#ifdef XP_OS2

#endif /* JS_HAS_SHARP_VARS */
"JS engine warning: %lu atoms remain after destroying the JSRuntime.\n"
* modification into the JS1.5rc2 code. While updating to JS1.5rc3, I

variance = chainCount * sqsum - entryCount * entryCount;

* deleting the provisions above and replace them with the notice

* License Version 1.1 (the "License"); you may not use this file
* A duplicate parameter name. We create a dummy symbol
if (*++s)
}
jsval *rval)

extern JS_PUBLIC_API(JSFunction *)

return JS_FALSE;
if (slot == JSSLOT_PROTO && OBJ_IS_NATIVE(obj)) {

case JSOP_PROPINC:

const char js_index_str[] = "index";


*/

}
#define JS_HAS_EXPORT_IMPORT 1 /* has export fun; import obj.fun */

sx = S->x;

} else if (JSVAL_IS_BOOLEAN(v)) {
*/
JSScope *scope;
hash1 &= table->sizeMask;
found = 0;

#define JSLL_SUB(r, a, b) { \

{"bold", str_bold, 0,0,0},

* License Version 1.1 (the "License"); you may not use this file

#define JSLL_IS_ZERO(a) ((a) == 0)


x >>= 2;
js_ForceGC(cx);
* Local macros
if (!JSVAL_IS_INT(id))
/* Any kid may be null (e.g. for (;;)). */
L = (Long)d;
js_NewScope(JSContext *cx, jsrefcount nrefs, JSObjectOps *ops, JSClass *clasp,
87, 87, 87, 87, 87, 87, 87, 87, /* 65 */
if (al->count <= 5) {

* code.

*/

* provisions of the GPL are applicable instead of those above.


}

return js_DecompileCode(jp, script, script->code, (uintN)script->length);

#define HT_ENUMERATE_UNHASH 4 /* just unhash the current entry */

break;
res->lastMatch.chars = cp;

js_map_atom(JSHashEntry *he, intN i, void *arg)


*/
if (!pc)

case REOP_ASSERT:
}

return JS_FALSE;
pn->pn_extra = JS_TRUE;
rt->debuggerHandlerData = closure;

#endif

if (!fun)

vector = map->vector;
str = js_ValueToString(cx, OBJECT_TO_JSVAL(obj));

JSPropertyOp getter;

s1 += 2;

OPDEF(JSOP_DEFSHARP, 93, "defsharp", NULL, 3, 0, 0, 0, JOF_UINT16)

FILE_PATH = -4,

void *pivot, *vec, *arg, *a, *b;


/*
* Date Modified by Description of modification

pc2 = pc + off;
JS_GetContextPrivate(JSContext *cx);

return JS_FALSE;
return fallback ? fallback : js_ValueToString(cx, v);

* where it's unambiguous, even if we might be parsing the init of a

MEM_INCR(xdr, len);

newresolve = (JSNewResolveOp)resolve;
} else if (JSVAL_IS_BOOLEAN(v)) {

#define FIX_FPU() ((void)0)


for (pn3 = pn2->pn_head; pn3; pn3 = pn3->pn_next) {

if (ts->flags & TSF_REGEXP) {

46, 46, 46, 46, 46, 46, 46, 46, /* 20 */

str = ATOM_TO_STRING(atom);
* Compute a hash function from str.

privateData = (JSExnPrivate*) JSVAL_TO_PRIVATE(privateValue);

}
return ok;
uint32 nslots;

/* CFM library init and terminate routines. We'll use the terminate routine

gs_get_lval:

if ($outdir) {

ownercx = scope->ownercx;

return JS_TRUE;

}
if( l10n_debug )

lval = OBJECT_TO_JSVAL(obj);
goto advance_pc; \

JSObject *
final[count].start = 0;
* file under either the NPL or the GPL.
return JS_TRUE;
align_of_float = PR_ALIGN_OF_FLOAT;
JSGCThing *newborn[GCX_NTYPES];
extern JS_PUBLIC_API(void)

Help(JSContext *cx, JSObject *obj, uintN argc, jsval *argv, jsval *rval)
JSHashNumber keyHash;
LOCKED_OBJ_SET_SLOT(obj, sprop->slot, value);
jsword thread;
// DREAMWEAVER snewman 3/16/01: see declaration of gInCompileTokenStream.
strcpy(name, "__private__");

cx->fp = fp;

if (pn->pn_pos.end.lineno == ts->lineno &&

OBJ_SET_SLOT(cx, obj, JSSLOT_PRIVATE, BOOLEAN_TO_JSVAL(b));

return JS_FALSE;

REOP_NUCCLASS = 30, /* negated Unicode character class */

if (!repstr) {

}
break;

* SRC_SETLINE, and SRC_XDELTA) applies to a given bytecode.

/*

}
JS_FRIEND_API(int)

pc += len;

frame.overrides = 0;

extern void
--n;

*/
40, 40, 40, 40, 40, 40, 40, 40, /* 93 */
ECMA 'variables object' */
#include "jsobj.h"
* the stdarg.h va_list on the C stack. The JS_TRUE passed for fromJS tells

/*

return NULL;
*

room = JS_GetStringLength(file->linebuffer);

#include "jshash.h" /* Added by JSIFY */

4-9 should give the same return values as 2-3, i.e.,


pn->pn_pos.begin = pn1->pn_pos.begin;

else

typedef int JSIntn;


JS_ASSERT(cg->tryBase <= cg->tryNext);

*answer = JS_TRUE;

OPDEF(JSOP_INCNAME, 41, "incname", NULL, 3, 0, 1, 10, JOF_CONST|


JOF_NAME|JOF_INC)

morenum = num - 9;
if (fp->fun && !fp->fun->native) {

*s++ = '1';
*/

unsigned char *utfbuf;


/* Top of stack is the first clause in a disjunction (||). */
*vp = fp->down->argv[-2];

pn->pn_arity = arity;

+ totalArgsLength;
/* -*- Mode: C; tab-width: 8; indent-tabs-mode: nil; c-basic-offset: 4 -*-
*

JS_AWAIT_GC_DONE(rt);

* psuedo-context. On "hi there bye", the following would result:

JS_DecompileFunctionBody(JSContext *cx, JSFunction *fun, uintN indent)

default:

if (n < 16) {

* format specifier and store them at sp, updating ap and sp appropriately.

*/
jsval *rval)

JS_GetArrayLength(JSContext *cx, JSObject *obj, jsuint *lengthp)

if (*cp == '-' && cp + 1 < end && cp[1] != ']') {


* W jschar * Unicode character vector, 0-terminated (W for wide)
return HT_ENUMERATE_NEXT;
}
ltmp = JSVAL_TAG(lval); \

return JSTRAP_RETURN;
const jschar *s;
* Rights Reserved.
TOK_EXPORT = 35, /* export keyword */

* javascript statement with the addition of more lines. Otherwise return


msec += tzoffset * msPerMinute;
#include "jsdbgapi.h"

printf(" next %d min %d max %d\n",

#endif
extern JSObject *
word0(rv) -= P*Exp_msk1;

*/

JS_ValueToInt32(JSContext *cx, jsval v, int32 *ip);

*/
PRMJ_LocalGMTDifference(void);
* and other provisions required by the GPL. If you do not delete
ts = js_NewTokenStream(cx, chars, length, filename, lineno, principals);

// DREAMWEAVER added this function


jssrcnote *notes; /* source notes, see below */
/* -------------------- Functions exposed to the outside -------------------- */
{

file->path = strdup(filename);

JS_ClearTrap(cx, script, script->code + i, NULL, NULL);

/* get the hours */


/* Not found via a shared scope: we must follow the proto chain. */
typedef JSBool (*EnumDestroyerProcPtr)(jsval iter_state);

(jsatomid) js_GetSrcNoteOffset(sn, 0));


n = str->length;
#endif

static JSClass date_class = {


122, 122, 122, 122, 122, 122, 122, 122, /* 104 */
uintN ungetpos; /* next free char slot in ungetbuf */

*rval = STRING_TO_JSVAL(R);

}
JSLL_DIV(upTimeSecondsLong, upTime, microSecondsToSeconds);

STORE_OPND(-1, DOUBLE_TO_JSVAL(rt->jsNaN));
a = (JSArena *) realloc(a, size);
{M_PI, "PI", 0, {0,0,0}},
return NULL;

extern void
extern JS_PUBLIC_API(void)

tc);

#endif

d = js_DoubleToInteger(d);
extern void js_UnlockRuntime(JSRuntime *rt);

if (ltmp == JSVAL_DOUBLE && JSVAL_IS_INT(rval)) { \


JS_PUBLIC_API(JSObject *)

if (V > 0xFFFFF)
#include "jsinterp.h"
case 1:

extern JS_PUBLIC_API(void)
jschar *
SrcNotes(JSContext *cx, JSScript *script)

jsdouble local = LocalTime(*date);


* rights and limitations under the License.
**** End of jslong.h ****
{
#endif
if (!sym)
nbytes += GetAtomTotalSize(cx, script->atomMap.vector[i]);

/* Push fval, obj, and aobj's elements as args. */

case TOK_AND:

JS_GetClass(JSObject *obj)

/*
JS_ReportOutOfMemory(cx);
* using a "thin" or (if necessary due to contention) "fat" lock. Called only

*rv = -1;
*rval = STRING_TO_JSVAL(str);
typedef struct JSStackHeader JSStackHeader;
}
MUST_MATCH_TOKEN(TOK_RP, JSMSG_PAREN_AFTER_SWITCH);

return JS_FALSE;

JS_ASSERT(JS_IS_SCOPE_LOCKED(scope));
SprintStack ss;
#define JS_BUG_EVAL_THIS_SCOPE 0 /* Math.eval('sin(x)') vs. local x */

op = pn2->pn_op;
JS_HashTableEnumerateEntries(al->table, js_map_atom, vector);
}

if (!JS_InstanceOf(cx, obj, &string_class, argv))


*/

if (!proto)

case JSOP_BITXOR:
return OBJ_DEFINE_PROPERTY(cx, obj, INT_TO_JSVAL(index), value,
result = TIMECLIP(result);

path = JS_sprintf_append(path, "%s(%s).",

} else if (tc->topStmt) {
cp++;

JSContext *
JS_SetGCCallback(JSContext *cx, JSGCCallback cb)
r -= 8, a = t;
*markp = JS_ARENA_MARK(&cx->stackPool);
uintN *attrsp, JSBool *foundp)

JSInlineFrame *ifp = (JSInlineFrame *) fp;


}
JS_PUBLIC_API(uint32)
s = s00;

case JSOP_SETCONST: op = JSOP_SETVAR; break;


goto loop;
}
JS_PUBLIC_API(JSObject *)
* discontiguous spans, one before the things and one after (if we're really

case JSOP_ARGINC:

#include "jsprf.h"

its_getProperty(JSContext *cx, JSObject *obj, jsval id, jsval *vp)

else
*rval = STRING_TO_JSVAL(str);

return 3;

#define JS_HAS_CATCH_GUARD 0 /* has exception handling catch guard */


js_InitLock(&scope->lock);
chars[len] = 0;
static JSBool

* even if ownercx->requestDepth is 0 (see below where we suspend our


jsval fval, *sp, *oldsp;

lval = POP_STR();

chars[0] = '{';

goto out;
op = pn->pn_op;

carry = z >> 16;

atom = GET_ATOM(cx, script, pc);

* Alternatively, the contents of this file may be used under the

rt->gcStats.maxlevel = rt->gcLevel);
table->sizeMask = JS_BITMASK(table->sizeLog2);

#endif

*/

JS_DELETE( nas );
break;

break;

return JS_FALSE;
jsint len;

n = high - low + 1;
pn->pn_pos.end = PN_LAST(pn)->pn_pos.end;
MSG_DEF(JSMSG_STACK_UNDERFLOW, 16, 2, JSEXN_INTERNALERR, "internal error
compiling {0}: stack underflow at pc {1}")

#ifdef DEBUG

} else {

#define JS_HAS_CONST 0 /* has JS2 const as alternative var */


if (js_DumpGCHeap != stdout)

fval = argv[1];

uint32 slot; /* index in obj->slots vector */

OneUcs4ToUtf8Char(uint8 *utf8Buffer, uint32 ucs4Char);


28, 28, 28, 28, 28, 28, 28, 28, /* 0x2800 */
{"array", ITS_ARRAY, JSPROP_ENUMERATE},
* March 31, 1998.

jsval *rval)

* Try to find operand-generating pc depth slots below sp.

if (!valstr) {

goto out;

a = *ap;
principals = fp->script->principals;
*rval = STRING_TO_JSVAL(str);
#define JS_BUG_VOID_TOSTRING 0 /* void 0 + 0 == "undefined0" */
JSObjectMap *map;

PUSH_REGEXP_STATIC(parens[j]);

{
#define JS_USE_FDLIBM_MATH 1

if (num >= state->parenCount)


key = ATOM_KEY(atom);

pn->pn_body = body;
*
}
d = (jsdouble)JSVAL_TO_INT(v); \
}

PR_Lock(rt->rtLock);
0x09570002, /* 66 Ll, hasUpper (subtract 37), identifier start */
if (JS_UPTRDIFF(mark, a->base) <= JS_UPTRDIFF(a->avail, a->base)) {

/*

JSContext *cx;

int rv;

#define JSLL_REAL_CMP(a,op,b) (((JSInt32)(a).hi op (JSInt32)(b).hi) || \

* The Original Code is Mozilla Communicator client code, released


(uintN) js_GetSrcNoteOffset(sn, 0),

for (sprop = scope->props; sprop; sprop = sprop->next) {


#include "jsarena.h" /* Added by JSIFY */

cx->rval2set = JS_FALSE;
}

js_ReportCompileErrorNumber(state->context,
jsval specialPropVal;
} else {
}

case '<':

0x0FD70002, /* 68 Ll, hasUpper (subtract 63), identifier start */


*va_arg(ap, jsdouble *) = js_DoubleToInteger(d);

if (q) {

CONST char *s = *sp;

size_t switchsize, tablesize;

return state->complete;

#if JS_HAS_DFLT_MSG_STRINGS
* the License at http://www.mozilla.org/NPL/

valcnt++;
#include "jstypes.h"

#include "jsobj.h"

{
#define PR_ARENA_GROW PL_ARENA_GROW

#define JS_HAS_LABEL_STATEMENT 1 /* has break/continue to label: */

} \
if (xdr->mode == JSXDR_ENCODE) {
JSObject *proto = OBJ_GET_PROTO(cx, obj);

JS_PUBLIC_API(void)

if (argc == 1) {
if (!pn)
JSLL_UI2L(result1,60);
d += length;
* deleting the provisions above and replace them with the notice

setter = NULL;

if (c == '0') {

* If you wish to allow use of your version of this file only

const JSDHashEntryHdr *entry,


*rval = STRING_TO_JSVAL(str);

} else if (JSVAL_IS_DOUBLE(v)) {
return JS_FALSE;

jsval *rval)
#endif

else if (xval)

extern JSBool
/*
}

*/

typedef struct JSPrinter JSPrinter;

* pn_op: JSOP_LSH, JSOP_RSH, JSOP_URSH

extern JSAtom *
* An alternative that might be better on some machines is

cp = chars = (jschar*) JS_malloc(cx, (length + 1) * sizeof(jschar));


{
(c == '=' || c == '#')) {
re = NULL;

/* -------------------------- Text conversion ------------------------------- */


extern JSRegExp *

} else {
if (j1 > 0) {
* file under either the NPL or the GPL.
JS_ASSERT(*pc == op);
JSFinalizeOp finalize;

extern void js_TransferScopeLock(JSContext *, JSScope *, JSScope *);


k--;

#ifdef GC_MARK_DEBUG

static JSBool

out:

#include <unistd.h>
}

extern JSObjectMap *

}
return str;
/*

FILE_CANREAD = -9,

return JS_FALSE;
# include <sys/stat.h>

* TOK_RB list pn_head: list of pn_count array element exprs

tb->ptr = base + offset;


case 'W':

if (xdr->mode == JSXDR_ENCODE)

js_Enqueue(tl, me);

*/
static REParser ParseRegExp;

if (!nz && !nz0) {


#endif

if (!rt->jsNegativeInfinity ||

* Alternatively, the contents of this file may be used under the

js_FinishTakingTryNotes(JSContext *cx, JSCodeGenerator *cg, JSTryNote **tryp);

JSHashNumber h;
return JS_TRUE;
print OUTFILE $line;

*/
}

* IS" basis, WITHOUT WARRANTY OF ANY KIND, either express oqr

ale = js_IndexAtom(cx, pn->pn_atom, &cg->atomList);


JS_AliasElementToProperty(JSContext *cx, JSObject *obj, const char *name, jsint
alias);

* except in compliance with the License. You may obtain a copy of


* JS date methods.

for(; xb < xbe; xc0++) {

** %X - unsigned uppercase hex

cx->exception = v;

* The 'ok' param is significant only on the post execution invocation to


* if they find newscope->ownercx != cx.
* ignore this for all but toplevel compilation errors.

total = str->length + length + 1;


} JSInt64;
}

#define JSLL_EQ(a, b) ((a) == (b))

#define ONE_OCTET_MASK 0x7F /* x1111111 */

*/
c = *fmt++;

JSBool
{

i = JSVAL_TO_INT(pn3->pn_val);
OPDEF(JSOP_STRING, 61, "string", NULL, 3, 0, 1, 12, JOF_CONST)
case '(': c = TOK_LP; break;
return;
* quantatom '{' n '}' Atom must occur exactly n times.

if (report != JSREPORT_ERROR) {

JSString *str; /* output: 'this' parameter object as string */


jschar *chars, *newchars;

* Software distributed under the License is distributed on an "AS

{
extern JS_FRIEND_DATA(JSScopeOps) js_list_scope_ops;

JSStmtType type; /* statement type */


* The Original Code is Mozilla Communicator client code, released

#include "jsprf.h"

js_CheckRedeclaration(JSContext *cx, JSObject *obj, jsid id, uintN attrs,


JS_PUBLIC_API(JSString *)

* Require that any time we return failure, an exception has


if (argc > 1) {

JS_PUBLIC_API(void *)

* having been pushed, at a minimum (if no args). Those two


JS_snprintf(numBuf1, sizeof numBuf1, "%d", op);

/*
Bfree(bd0);

* modulus operands and results require a 64-bit IEEE double. These are GC'ed

scope = OBJ_SCOPE(obj);

else if (c == ')')
* The Original Code is Mozilla Communicator client code, released
#include "jsobj.h"
if (pn->pn_slot < 0) {

/* Seems to fail whenever the requested date is outside of the 32-bit

PRStatus stat;
#define PR_HashTableRawRemove PL_HashTableRawRemove

SAVE_SP(fp);
JSLL_ADD(s, s, us);

table = state->table;
* GC_LAST_CONTEXT Called from js_DestroyContext for last JSContext in a

if (len <= 0) {

V -= 0x10000;
data = MEM_DATA(xdr);
case FILE_PARENT:

* deleting the provisions above and replace them with the notice
if (!obj) {

9, 9, 9, 9, 9, 9, 9, 9, /* 48 */

op = REOP_LPAREN;
if (state->throwing)
* Contributor(s):

7, 7, 7, 7, 7, 7, 7, 7, /* 76 */
40, 40, 40, 40, 40, 40, 40, 40, /* 56 */

if (_delta) { \

rt = cx->runtime;

#define CG_BASE(cg) ((cg)->current->base)

* jsval result;

*
enuf[i] = (char)c;

GC_MARK(cx, JSVAL_TO_GCTHING(v), name, arg);

extern JS_PUBLIC_API(intN)

/* want = (want>262144)?262144:want; * arbitrary size limitation */


todo = Sprint(&ss->sprinter, "%ld", ival);
} else {

* the provisions above, a recipient may use your version of this

uint8 *bitmap;
nas[i].type = TYPE_UNKNOWN;

/*

xb = b->x;

return NULL;

if (nbytes == 0)

#endif

b = (unsigned char)(u >> 8);

JS_UNLOCK_GC(rt);

#else /* arch-tests */
* except in compliance with the License. You may obtain a copy of

JS_HashTableAdd(JSHashTable *ht, const void *key, void *value)


JS_GetFrameFunctionObject(JSContext *cx, JSStackFrame *fp);
return tt;

{"slice", str_slice, 0,0,0},


SRC_LABEL = 13, /* JSOP_NOP for label: with atomid immediate */
}

* These Java (and ECMA-262) methods are supported:


if (!pn2)

else {
const char *bytes, size_t length)

JSCodeGenerator cg;
if (!cg->tryBase)
if (js_Emit1(cx, cg, JSOP_PUSH) < 0)

OPDEF(JSOP_RSH, 25, "rsh", ">>", 1, 2, 1, 7, JOF_BYTE)


goto out;

if (argc)

STORE_NUMBER(cx, -1, d); \

SAVE_SP(fp); \
OPDEF(JSOP_IN, 111,js_in_str, js_in_str, 1, 2, 1, 6, JOF_BYTE)

z = 10*z + c;
* except in compliance with the License. You may obtain a copy of
JSCT_TITLECASE_LETTER = 3,

$line = '#include "jsutil.h"'. " /* Added by JSIFY */\n";


JSBool ok;
46, 46, 46, 46, 46, 46, 46, 46, /* 50 */
*
* We don't post an exception in this case, since doing so runs into
return JS_FALSE;

if (bit < 0)

jsint nbBytesInBuf; /* number of bytes stored in the buffer above */


/*
#include "jsscope.h"
return JS_FALSE;

static const jschar *matchGreedyKid(MatchState *state, RENode *ren, RENode *stop,


if (!OBJ_SET_PROPERTY(cx, obj, id, &argv[i]))
sym->entry.value = NULL; \
{"int", TOK_RESERVED, JSOP_NOP, JSVERSION_DEFAULT},
STRING_TO_JSVAL(cx->runtime->emptyString),
JSAtom *toLocaleStringAtom;

jschar *ptr; /* beginning of token in line buffer */

#ifdef GC_MARK_DEBUG

"Number",
if (tc->flags & TCF_FUN_CLOSURE_VS_VAR)

pn->pn_op = op;

JSLL_SUB(m, m, b);
if (!date)

* except in compliance with the License. You may obtain a copy of

** DESCRIPTION:

JS_END_MACRO
JS_PUBLIC_API(JSBool)

jsrefcount inlineCalls;

* from table. A hash code may have any JSDHashNumber value.

JS_ClearTrap(JSContext *cx, JSScript *script, jsbytecode *pc,

* the provisions above, a recipient may use your version of this


JS_free(cx, (void *)report.messageArgs[i++]);
*/
*/

#include "jspubtd.h"

result = (result - LocalTime(result)) / msPerMinute;


break;

* Copyright (C) 1998-1999 Netscape Communications Corporation. All


str = js_NumberToString(cx, *JSVAL_TO_DOUBLE(v));

#define JS_HAS_SOME_PERL_FUN 1 /* has array.join/reverse/sort */


} else {

* Define a JS object called "it". Give it class operations that printf why

const char js_defineSetter_str[] = "__defineSetter__";


rval = FETCH_OPND(-1);
{"continue", TOK_CONTINUE, JSOP_NOP, JSVERSION_DEFAULT},

* or found in the 'constructor' property of one of its prototypes.

* Contributor(s):

else
RESTORE_SP(fp);
return OBJ_GET_PROPERTY(cx, obj, id, vp);

CHECK_AND_SET_JUMP_OFFSET_AT(cx, cg, pn3->pn_offset);


* when growing or shrinking the table. Other callback types are defined
return JS_TRUE;

chars = js_InflateString(cx, bytes, length);


break;

rt->rngSeed = nextseed;

}
MSG_DEF(JSMSG_TOO_MANY_FUN_ARGS, 45, 0, JSEXN_SYNTAXERR, "too many function
arguments")
* lifetime of the exception.

}
if (ndefs) {

}
i = 0;

* TOK_NAME, name pn_atom: name, string, or object atom


return NULL;
OBJ_SET_SLOT(cx, obj, JSSLOT_PRIVATE, v);
else {

table = state->table;
static JSAtom *

if(file->isOpen && !fileInitiallyOpen){


/***********************************************************************
break;

if (!pn)
#define LINE_BUF_LEN 512

* The Original Code is Mozilla Communicator client code, released

if (!name)
*/

#ifndef _XP_Core_

#define fd_acos acos

#define JS_BYTES_PER_SHORT 2L
js_ReportCompileErrorNumber(cx, ts, NULL, JSREPORT_ERROR,
(list)->pn_count++; \
}

ts->filename = filename;

return state->complete;
return JS_FALSE;

"JS engine warning: leaking GC root \'%s\' at %p\n",


* The final arg is used by GC_MARK_DEBUG code to build a ref path through
i = PTRDIFF(cp, state.cpbegin, jschar);

borrow = (z & 0x10000) >> 16;

0x14170002, /* 74 Ll, hasUpper (subtract 80), identifier start */


#include "jshash.h" /* Added by JSIFY */
}

* implied. See the License for the specific language governing


}

/* XXX don't worry about aliases (extra symbols for an sprop) */


cx->newborn[GCX_OBJECT] = NULL;
k = str->length;

static JSParser AddExpr;

* Alternatively, the contents of this file may be used under the

#include "jsscript.h"
#ifdef DEBUG

js_SetClassPrototype(JSContext *cx, JSObject *ctor, JSObject *proto,


/* FALL THROUGH */

JSDHashGetKey getKey;
if (JSVAL_IS_FUNCTION(cx, value)) {

if (radix == 8 && c >= '8') {

rt->gcStats.maxlevel = rt->gcLevel);

}
}

flagp += GC_THINGS_SIZE;

*rval = OBJECT_TO_JSVAL(obj);

bad:
* file under either the NPL or the GPL.
uintN argc, jsval *argv, jsval *rval)

* characters by unescape.)
* version of this file under the NPL, indicate your decision by

return JS_FALSE;

* on jsscope.h being included directly or indirectly, but does not test by


numtrys++; /* room for the end marker */
** INPUTS: _size: size in bytes of item to be allocated
JSScript *script;

JSObject *newfunobj;

#define EMIT_CHAINED_JUMP(cx, cg, last, op, jmp) \

break;

wp = (JSWatchPoint *) JS_malloc(cx, sizeof *wp);


PRLock *setSlotLock;
/* Fix stmtInfo and emit a push to allocate the iterator. */
if (!newresolve(cx, obj, js_IdToValue(id), flags, &obj2))
JSPackedBool reserved; /* reserved for future use */
(unsigned long) args.leaks);

break;

}
id = (jsid) rt->atomState.lengthAtom;
(r).lo = _a.lo - _b.lo; \
if (!ale)
filename = fp->script->filename;

if (!stmt2 || !STMT_IS_LOOP(stmt2)) {
jsword o, n;
} else {
JS_STATIC_DLL_CALLBACK(JSSymbol *)

cx->version >= JSVERSION_1_4;

js_AllocStack(JSContext *cx, uintN nslots, void **markp)

* except in compliance with the License. You may obtain a copy of

if (pn->pn_kid2 &&
i = 0;

MUST_MATCH_TOKEN(TOK_LP, JSMSG_PAREN_BEFORE_WITH);

JS_GetStringBytes(JS_ValueToString(cx, *vp)));
} while ((obj = OBJ_GET_PARENT(cx, obj)) != NULL);

jsatomid number; /* atom serial number and hash code */


}
{

/*

js_Emit1(JSContext *cx, JSCodeGenerator *cg, JSOp op);


}

JSAtom *atom;
return ok;
end = pc + script->length;
/* Work around msvc double optimization bug by making these runtime values; if
JSFILE_CHECK_NATIVE("lastModified");
static struct v2smap {

CHECK_REQUEST(cx);
if (state->complete)
jsval *vp, uintN *attrsp)

JS_CompileFunction(JSContext *cx, JSObject *obj, const char *name,


return 3;

VALUE_TO_PRIMITIVE(cx, lval, JSTYPE_VOID, &ltmp);


} else {

JS_ASSERT(0 < patlen && patlen <= BMH_PATLEN_MAX);

* provisions of the GPL are applicable instead of those above.

JS_free(cx, aux);

off = (jsint) GET_JUMP_OFFSET(pc2);


u.ll = va_arg(ap, JSUint64);

size_t index;

NULL);

#define JS_DELETE(_ptr) { free(_ptr); (_ptr) = NULL; }

return JS_TRUE;
* TOK_RELOP binary pn_left: left-assoc REL expr, pn_right: SH expr

stmt = tc->topStmt;

JS_free(cx, cstr);

return ok;
signwidth = 1;
40, 40, 40, 40, 40, 40, 40, 40, /* 57 */
*rval = JSVAL_ZERO;
for (i = 0; object_prototype_names[i].init; i++) {

char *name = js_GetStringBytes(ATOM_TO_STRING(fun->atom));

bits_per_int64_log2 = 6;

if (!OBJ_DELETE_PROPERTY(cx, obj, id, &junk))

split = (uint8 *) FIRST_THING_PAGE(a);

js_ValueToECMAUint32(JSContext *cx, jsval v, uint32 *ip)


gc_dump_thing(JSGCThing *thing, uint8 flags, GCMarkNode *prev, FILE *fp)
#endif /* JS_HAS_GETTER_SETTER */
(al)->count = 0)

op = JS_GetTrapOpcode(cx, script, pc);

return;

JS_PropertyStub, JS_PropertyStub, file_getProperty, file_setProperty,

JS_ASSERT(utf8Length >= 1 && utf8Length <= 6);

extern void* reallocSmaller(void* block, size_t newSize);


{
* The local variable's slot number is the first immediate two-byte operand.
str = js_ValueToString(cx, argv[0]);

: JSXDR_FUNVAR;

{
&& r0 < m) {

JS_LOCK_RUNTIME_VOID(_rt, e); \
* 6 may start or continue a JS identifier but not a Unicode

* was changed to this:

v = JSVAL_TRUE; /* non-null object is true */


}

#define sym_property(sym) ((JSScopeProperty *)(sym)->entry.value)

}
jsdouble *date = date_getProlog(cx, obj, NULL);

* zero on HPUX. Perform the operation by bit


Trap(JSContext *cx, JSObject *obj, uintN argc, jsval *argv, jsval *rval)

/* Convert from base time to extended time */

* Emit code into cg for the tree rooted at body, then create a persistent
#else
'\'', '\'',
js_strncpy(cp, filename->chars, filename->length);

if (!MatchLabel(cx, ts, pn))


month++;
js_ReportCompileErrorNumber(cx, ts, NULL, JSREPORT_ERROR,
/* Define output */
return JS_FALSE;

wa = a->wds;
extern JS_PUBLIC_API(JSBool)
cmp = js_CompareStrings(astr, bstr);
* the provisions above, a recipient may use your version of this
46, 46, 46, 46, 46, 46, 46, 46, /* 28 */
JSLL_L2I(seconds,tsecs);

*p = p[1];

SAVE_SP(fp);
}
JSPROP_ENUMERATE,

16, 23, 24, 23, 24, 23, 24, 23, /* 4 */


JS_LOCK_OBJ(cx, obj); \

40, 46, 40, 40, 40, 40, 40, 40, /* 41 */


/*
}
16, 21, 21, 21, 21, 21, 21, 21, /* 14 */

JS_UNLOCK_OBJ(cx, obj);
JS_ASSERT(fl->susp >= 0);

return NULL;

#define JS_BUG_WITH_CLOSURE 1 /* with(o)function f(){} sets o.f */

/* Either dig or dig+1 would work here as the least


significant digit.

{"join", array_join, 1,0,0},


mask|=(js_FileHasOption(cx, mode, "readWrite"))? PR_RDWR : 0;

case JSOP_FINALLY:

/* If another thread is already in GC, don't attempt GC; wait instead. */

prefix = JS_smprintf("%s%swarning: ",

* Clone the function object with the current scope chain as the

#define SN_XDELTA_BITS 6
ok = js_DefineProperty(cx, obj, INT_TO_JSVAL(num + 1),
JSString *str;
return -2;

op = (JSOp)pc[len];
JSRuntime *rt;

static JSBool
? (preorder ? JSOP_INCNAME : JSOP_NAMEINC)
POP_ELEMENT_ID(id);
*

* implied. See the License for the specific language governing


case REOP_STAR:
if (++j == patlen) {

tmp = *script;

extern JS_PUBLIC_API(void)
/*

chars[nchars++] = ',';
#ifndef ROUND_BIASED

JSLL_UI2L(result,0);
return proto;

JS_ASSERT(bufferSize >= (size_t)(mode <= DTOSTR_STANDARD_EXPONENTIAL ?


DTOSTR_STANDARD_BUFFER_SIZE :

*/

}
free(he);

}
JSString *str;

/*

*
#define MSG_DEF(name, number, count, exception, format) \

char js_const_str[] = "const";


#include <stddef.h>

"PRHashFunction",
*/
}

nas[ cn ].type = TYPE_UINTN;


} else if (av == JSVAL_VOID || bv == JSVAL_VOID) {

}
return NULL;

if (!GetTrapArgs(cx, argc, argv, &script, &i))

if (!ok)
}

frame.script = script;
ok = Decompile(&ss, pc, len);

}
symid = (jsid) sym_atom(sprop->symbols);

js_DecompileScript(JSPrinter *jp, JSScript *script);


*cp++ = (i + 1 < n) ? ',' : 0;

} else {

* From it, get the function to close.

/*

return NULL;

40, 46, 40, 40, 46, 40, 40, 40, /* 35 */


if (!str)
}

* The contents of this file are subject to the Netscape Public


RESTORE_SP(fp);
a->limit = (jsuword)a + sz;
* In general, one of the thing pages will have some of its things' flags on
struct JSProperty {
rt->debuggerHandlerData)) {
#ifdef _WIN32
fprintf(stderr, "(int) %d\n", JSVAL_TO_INT(val));

atom = js_AtomizeObject(cx, obj, 0);

* The contents of this file are subject to the Netscape Public


if (n >> 16)

JS_ReportErrorNumber(cx, js_GetErrorMessage, NULL, JSMSG_NO_REG_EXPS);

jp = js_NewPrinter(cx, "js_DecompileValueGenerator", 0, JS_FALSE);

extern JSBool

if (!atom)

#endif

#include <math.h>

SAVE_SP(fp);
return NULL;

sprop = js_DropScopeProperty(cx, scope, sprop);

* file under either the NPL or the GPL.

js_Emit1(cx, cg, JSOP_NOP) < 0) {

* JS execution context.

* the provisions above, a recipient may use your version of this


return;

* sub-statement.
if (ts)

extern JS_PUBLIC_API(void)

m0 = m = NewFatlock();

char numBuf[12];

OPDEF(JSOP_PUSH, 1, "push", NULL, 1, 0, 1, 0, JOF_BYTE)

if (js_Emit3(cx, cg, JSOP_IFNE,


if (frame.callobj)
JS_BEGIN_MACRO \
case JSOP_SETELEM:

return JS_FALSE;
* tI ---------+ |

{js_unescape_str, str_unescape, 1,0,0},


*newsp++ = vp[0];

* and its arguments. This exception message string is passed to a pre-set

* TOK_FUNCTION func pn_fun: function, contains arg and var properties

* integer type (of >= 64 bits). If long long is available and the name is
{js_const_str, TOK_RESERVED, JSOP_NOP, JSVERSION_DEFAULT},
fprintf(fp, " mean hash chain length: %g\n", mean);
jssrcnote *notes;

JSParseNode *head; /* first node in list */

JS_BufferIsCompilableUnit(JSContext *cx, JSObject *obj,


} else {

gBranchLimit = atoi(argv[++i]);

return js_LineNumberToPC(script, lineno);


/* A fancier test would sometimes let us do
if ((ren->flags & RENODE_MINIMAL) == 0) {
case '\v':
if ((tt == TOK_FUNCTION || lastExprType == TOK_FUNCTION) &&
MSG_DEF(JSMSG_BAD_CLASS_RANGE, 57, 0, JSEXN_SYNTAXERR, "invalid range in
character class")
{js_InitRegExpClass, ATOM_OFFSET(RegExp)},
JSLL_NEG(r, r); \

while (prev) {
ok = JS_FALSE;

{"debugger", TOK_DEBUGGER, JSOP_NOP, JSVERSION_1_3},


*
#define PR_ARENA_RELEASE PL_ARENA_RELEASE

46, 46, 46, 46, 46, 46, 46, 46, /* 70 */

x >>= 8;

*/

switch (REOP(ren1)) {
return ok;

return rv;
FETCH_ELEMENT_ID(-1, id);
* Look for a try block within this frame that can catch the exception.
#define fd_cos cos

#include <string.h>

typedef struct JSRuntime JSRuntime;


return JS_TRUE;

JS_UNLOCK_OBJ(cx, obj);
case JSOP_NOT:
slot = (uintN)sprop->slot; \

if (local)

return NULL;
#endif /* !JS_HAS_XDR */

}
do_nonint_fast_incop:

jsdouble cmp = -1;

#else

* #define ROUND_BIASED for IEEE-format with biased rounding.

{
atom = js_AtomizeChars(cx, name, AUTO_NAMELEN(name,namelen), 0);

(_log2) += 2, (j_) >>= 2; \

{"getMilliseconds", date_getUTCMilliseconds,0,0,0 },

local = date_msecFromDate(YearFromTime(local),
}

#include "jsnum.h"
}

#endif
if (beq < 0)
* XXX
if (rv & (HT_ENUMERATE_REMOVE | HT_ENUMERATE_UNHASH)) {
size_t size; /* size of buffer allocated at base */
pc += js_CodeSpec[*pc].length;

#if JS_HAS_UNEVAL

*xc++ = (ULong)(y & 0xffffffffUL);


0x0007400A, /* 121 Nl, identifier start, decimal 0 */

OPDEF(JSOP_BITOR, 15, "bitor", "|", 1, 2, 1, 2, JOF_BYTE)

default:

NULL, NULL, JSPROP_ENUMERATE)) {

#define JS_VERSION 150

if (!date)
vp = fp->vars;

case FILE_CREATED:

endofline = JS_TRUE;

defsharp = NewParseNode(cx, &CURRENT_TOKEN(ts), PN_UNARY, tc);


{

* We nest locks in this function, and only here, in the following orders:

* version of this file under the NPL, indicate your decision by


jsval v;

* keyword here, even if JavaScript recognizes 'in' as an operator,


#if JS_HAS_CALL_OBJECT

JS_free(cx, (void *)lval);


*/

JSObject *obj;
}
uintN top;
: (preorder ? JSOP_DECPROP : JSOP_PROPDEC);
* Software distributed under the License is distributed on an "AS

#define PR_CreateEventQueue PL_CreateEventQueue


goto error;
return ret;
} else {
*
}
str = js_ValueToString(cx, OBJECT_TO_JSVAL(obj));
ren->next, cp);
}

TOK_IN = 47, /* in keyword */

* are for optimizations above the JSObjectOps layer, under which object locks

}
* Undo all the damage done by exn_newPrivate.
#define JS_ALIGN_OF_FLOAT 4L
/* Compute the number of entries below which we shrink the table by half */

break;
}

filename = cx->runtime->emptyString;
js_InitLock(JSThinLock *tl)
e = -e;

* for/in and with that are active upon entry to the block keep state

**** End of jscompat.h ****


NULL, NULL, 0)) {

LOCAL_ASSERT(ss->top >= 2);


* The contents of this file are subject to the Netscape Public
#include <stdlib.h>
* pn_kid2: cond expr before second ';'
* Negation of a zero doesn't produce a negative

#else

*vp = JSVAL_NULL;
* terms of the GNU Public License (the "GPL"), in which case the
while (pn && js_MatchToken(cx, ts, TOK_SHOP)) {

**
const char js_getter_str[] = "getter";
if (!js_GetLengthProperty(cx, obj, &length))
i = JSVAL_TO_INT(v_); \

CONST char *s, *s0, *s1;


TOK_NEW = 51, /* new keyword */
/*

break;

#define _APS_NEXT_RESOURCE_VALUE 101


static JSBool
ok = OBJ_GET_ATTRIBUTES(cx, obj, id, NULL, &attrs);

if (!ok)

* Emit a jump op with offset pointing to the previous jump of this type,
return NULL;

JS_GetPositiveInfinityValue(JSContext *cx)
chars = js_InflateString(cx, bytes, length);
for (pn2 = pn->pn_head; pn2; pn2 = pn2->pn_next)

if (!JSDOUBLE_IS_FINITE(result))

/* print as "Wed Nov 05 19:38:03 GMT-0800 (PST) 1997" The TZA is

* JS Garbage Collector.

{
JSCLASS_HAS_PRIVATE | JSCLASS_NEW_RESOLVE,
* Define a local function object as a local variable.

uintN refcount;
inrange = JS_TRUE;

void

* fat lock and trying to grab rt->gcLock. This is because no other


/* rt->rngDscale = (jsdouble)(1L << 54) */

#define JSSLOT_FREE(clasp) (((clasp)->flags & JSCLASS_HAS_PRIVATE) \

JS_DELETE(ss.base);

if (tl->fat == NULL)

uintN attrs;

jsval *statep, jsid *idp)

#include "jstypes.h"

(cx->version == JSVERSION_DEFAULT ||

if (!OBJ_IS_NATIVE(obj) || (clasp->flags & JSCLASS_NEW_ENUMERATE)) {

js_SetProtoOrParent(JSContext *cx, JSObject *obj, uint32 slot, JSObject *pobj);

}
sprop->id = INT_TO_JSVAL(fun->nargs++);
* The Initial Developer of the Original Code is

JS_ASSERT(nvars++ <= fun->nvars);

table->ops->freeTable(table, table->entryStore);
{

} else {
op = JSOP_NOP;
tt = js_PeekToken(cx, ts);

JS_NewStringCopyN(JSContext *cx, const char *s, size_t n);

JSTokenType tt;
JSFILEMSG_FIRST_ARGUMENT_CONSTRUCTOR_NOT_STRING_ERROR, argv[0]);

*--cvt = hexp[digit];
40, 40, 40, 40, 40, 40, 40, 40, /* 111 */
20, 20, 20, 20, 20, 20, 20, 20, /* 16 */
vp = sp - (2 + argc);

if (!newEntryStore) {

if (!JS_XDRBytes(xdr, (char **)&script->code, length) ||


/* Unicode separators that are treated as line terminators, in addition to \n, \r
*/
STORE_OPND(-1, rval);
depth = cg->stackDepth;

b = JSVAL_TO_STRING(v)->length ? JS_TRUE : JS_FALSE;

const char *linebuf; /* offending source line without final \n */

return NULL;

entry = (JSDHashEntryHdr *)entryAddr;

static JSBool

out:
JS_ArenaShutDown();
case 'o':

}
rt->destroyScriptHookData = callerdata;

0 ==> shortest string that yields d when read in

*/
if ((word0(rv) & Exp_mask) <= P*Exp_msk1)
| ((getter == js_GetLocalVariable) ? JSPD_VARIABLE : 0);

{"localeCompare", str_localeCompare, 1,0,0},


str = ALIGN(buf, JSString);
* bits in b in bits. d must be finite and nonzero. */
PRLock *rtLock;
#define GC_POKE(cx, oldval) ((cx)->runtime->gcPoke = JSVAL_IS_GCTHING(oldval))

(jsid)cx->runtime->atomState.classPrototypeAtom,
*rval = JSVAL_TRUE;
typedef enum JSTokenType {
{"toLowerCase", str_toLowerCase, 0,0,0},
#include "jsinterp.h"

ht->valueCompare = valueCompare;

if (!newReport)
VALUE_TO_OBJECT(cx, lval, obj);

case TOK_VAR:
}

JSAtom *funAtom, *argAtom;


uintN i, len, line1, line2, bupline;

fp = fp->down;
JS_PUBLIC_API(JSFunction *)

FILE_APPEND = -19,

mark = JS_ARENA_MARK(&cx->tempPool);
}
#endif
obj = js_NewArrayObject(cx, 0, NULL);
}
? SN_MAKE_XDELTA(sn, delta) \
goto out;
? sz >= nb && sz <= nb + pool->arenasize
* If you wish to allow use of your version of this file only
/* -*- Mode: C; tab-width: 8; indent-tabs-mode: nil; c-basic-offset: 4 -*-

free(ochars);

/*

/* FALL THROUGH */
}

ok = LookupProperty(cx, obj, name, &obj2, &prop);

}
if (base[len]!=FILESEPARATOR

x = xa;
* Allocate trynotes from cx->tempPool.
"'text' instead, proceeding", ctype);

jsval val;
JSSetObjectSlotOp setProto;

** Stuff routine that discards overflow data


width = (width * 10) + (c - '0');

js_PushStatement(tc, &stmtInfo, STMT_SWITCH, -1);

JS_ASSERT(fp->scopeChain == caller->scopeChain);
while ((acx = js_ContextIterator(rt, &iter)) != NULL) {

if (!JS_DefineFunctions(cx, obj, string_functions))


return map->formatter(cx, format, fromJS, vpp, app);
#define JS_BUG_SET_ENUMERATE 1 /* o.p=q flags o.p JSPROP_ENUMERATE */

extern JSString *
{

static void PStrFromCStr(const char* src, Str255 dst)


if (principals == NULL)
cx->newborn[GCX_STRING] = NULL;
}

CheckSideEffects(cx, tc, pn->pn_kid3, answer);


rt = cx->runtime;

20, 20, 20, 20, 20, 20, 20, 20, /* 16 */


if (onError)
* The Initial Developer of the Original Code is Netscape

JS_PUBLIC_API(JSBool)

#if JS_BUG_AUTO_INDEX_PROPS

return JS_TRUE;
JS_PUBLIC_API(void)

name = NULL;
file->linebuffer->chars[offset++] = data;
align_of_long = PR_ALIGN_OF_LONG;
if (JSVAL_IS_NULL(lval) || JSVAL_IS_VOID(lval)) { \

str->chars = NULL;

ok = OBJ_SET_PROPERTY(cx, obj, id, &rval);

* This Original Code has been modified by IBM Corporation.

state.cpbegin = state.cp = str->chars;

**** Start of prmjtime.c ****

#define PUSH(v) (*sp++ = (v))


*

#if JS_HAS_INSTANCEOF

}
} else if (d > length) {
/*
#define PRMJ_USEC_PER_MSEC 1000L
static void
char *cstr;
* C An unsigned char value.

JS_LockGCThing(JSContext *cx, void *thing);

* "mozilla" or "main" thread in Mozilla-the-browser.

if ((JSInt32)(b).hi < 0) { \
MSG_DEF(JSMSG_CURLY_AFTER_TRY, 90, 0, JSEXN_SYNTAXERR, "missing } after try
block")
if (!LOCKED_OBJ_GET_CLASS(obj)->delProperty(cx, obj, sprop->id, rval)) {

if (fp->argsobj)
#else
} while (PCE_OBJECT(*pce) != PCE_OBJECT(entry) || \

file->linebuffer->chars = buf;

* Alternatively, the contents of this file may be used under the


JS_DestroyScript(JSContext *cx, JSScript *script);

!JSVAL_IS_BOOLEAN(lval)) {

if (!rt->gcLock)

return JS_FALSE;
*

size_t length;

}
FILE_LENGTH = -2,

GC_MARK(cx, thing, "locked object", NULL);


size_t n;

break;
#define OBJ_ENUMERATE(cx,obj,enum_op,statep,idp) \

* Unsafe macro to call js_SetJumpOffset and return false if it does.


aadj = 1./FLT_RADIX;

uint32 length; /* length of code vector */


/* Some kind of a fraction in fixed notation */

JS_free(cx, (char *)lval);


** JSLL_ISHL Signed shift left [0..64] bits
}

pn->pn_op = JSOP_ARGUMENTS;
state->cp = cp;

MSG_DEF(JSMSG_PAREN_BEFORE_COND, 74, 0, JSEXN_SYNTAXERR, "missing ( before


condition")
#define JSPD_ARGUMENT 0x10 /* argument to function */
/*
js_FreeStack(cx, mark);
str = js_NewString(cx, chars, nchars, 0);

clazz = OBJ_GET_CLASS(cx, obj)->name;

}else{
* in case some magic happens there (see call_getProperty in jsfun.c).

UpdateLinenoNotes(JSContext *cx, JSCodeGenerator *cg, JSParseNode *pn)


array = JS_NewArrayObject(cx, 0, NULL);
};

JS_ReportErrorNumber(xdr->cx, js_GetErrorMessage, NULL,


else {

index = (size_t)d;

for (c = *++cp; JS7_ISDEC(c); c = *++cp) {

if (oldscript)
}

* the getFullYear method. But we try to protect existing scripts that


case '?': c = TOK_HOOK; break;

#endif

if (JSVAL_IS_INT(v)) { \
case TOK_RETURN:
while(xb < xbe);
file->hasAutoflush|=(js_FileHasOption(cx, mode, "autoflush"));

* in each JSGCPageInfo, along with the flags pointer for the 128 flag bytes

* provisions of the GPL are applicable instead of those above.


*/
(obj)->map->ops->lookupProperty(cx,obj,id,objp,propp,__FILE__,__LINE__)
if (!obj)
if (script)

if (js_CompareAndSwap(&tl->owner, 0, me)) {

pn2->pn_op = JSOP_SETPROP;

if (guardnote < 0 || js_Emit1(cx, cg, JSOP_NOP) < 0)


JSInt32 seconds = 0;
REOP_NONALNUM = 17, /* match a non-alphanumeric char: [^0-9a-z_A-Z] */

jsval *rval)
if (!str_escape(cx, obj, 0, rval, rval)) return JS_FALSE;
offset = PTRDIFF(next, base, jsbytecode);

* The contents of this file are subject to the Netscape Public


_jsdjc = JSDJ_CreateContext();
return JS_FALSE;
gc_lock_marker(JSHashEntry *he, intN i, void *arg)

*rv = 0;
JS_DefineProperties(JSContext *cx, JSObject *obj, JSPropertySpec *ps);
/* -*- Mode: C; tab-width: 8; indent-tabs-mode: nil; c-basic-offset: 4 -*-
c = GetChar(ts);

* 3. Insert the following seven lines (the "if (ret && *propp == NULL)"

#define JSLL_DIV(r, a, b) { \
#endif
s = str->chars;

ok = OBJ_LOOKUP_PROPERTY(cx, origobj, rval, &obj2, &prop);


/*
RETURN(TOK_OBJECT);
begin = js_DoubleToInteger(d);

}
extern JS_PUBLIC_API(JSBool)

f->nbBytesInBuf--;

#define JS_UNLOCK0(P,M) js_Unlock(P,M)


j += str->length;
return js_NewNumberValue(cx, d, rval);

return JS_TRUE;
}
word0(rv) += P*Exp_msk1;
if (!date)

js_ReportCompileErrorNumber(cx, ts, NULL, JSREPORT_ERROR,


} else

static void

JS_UNLOCK0(tl, me);

maxparsenodes = parsenodes - recyclednodes;

* the single-splice-out case, requiring callers to test and wrap


op = JSOP_GETTER;

#ifdef _WIN32
* the License at http://www.mozilla.org/NPL/

40, 40, 40, 40, 40, 40, 40, 40, /* 107 */

DateFromTime(local),
*/

if (!SPROP_SET(cx, sprop, obj, obj, vp)) {


js_AtomizeValue(JSContext *cx, jsval value, uintN flags);

if (c == '\\') {
JSProperty **propp)

fprintf(fp, "%3d %08x", i, (uintN)he->keyHash);

}
JS_BEGIN_EXTERN_C

JSSymbol *sym;
JSObject *pobj;
* deleting the provisions above and replace them with the notice
default:
if (!js_NewNumberValue(cx, d, &v))

return JS_FALSE;
}
{
#define JS_HAS_NEW_OBJ_METHODS 0 /* has Object.prototype query methods */
static RENode *

case TOK_TRY: {
JSAtom *
}
*/

ren->next, cp);
*/

JS_free(cx, options);

cmp = s1[i] - s2[i];


_a = a; _b = b; \

return JS_FALSE;

"string",
* JS1.2 emulated Perl too closely and returned a non-Array for

/* -*- Mode: C; tab-width: 8; indent-tabs-mode: nil; c-basic-offset: 4 -*-

GLOB_SEARCH
call_getProperty, call_setProperty,

#define PR_CLEAR_UNUSED PL_CLEAR_UNUSED

#define JS_HAS_INSTANCEOF 0 /* has {p:1} instanceof Object */

# &convert_asserts($line);

RELATIONAL_OP(>);
void

JSObject **objp, jsval *vp);


memset(table, 0, tablesize);

*
*vp = fp->argv[slot];
* here if the flags are specified. (We must use the flags

JS_ASSERT(sp <= argv + argc);

#ifdef DEBUG

for (sprop = scope->props; ; sprop = sprop->next) {

rt->requestCount--;
* Portions created by the Initial Developer are Copyright (C) 1998

atom = GET_ATOM(cx, script, pc);

goto do_fallback;
return JS_FALSE;
deflated_string_cache_bytes += str->length;

pn2->pn_expr = pn;

* #define Sudden_Underflow for IEEE-format machines without gradual

c = PeekChar(ts);
* If we've got a finally, mark try+catch region with additional

fetch_and_convert:

obj2 = JSVAL_TO_OBJECT(v);
if (JSVAL_IS_OBJECT(v)) {

}
const jschar *chars, size_t length,
* and other provisions required by the GPL. If you do not delete

46, 46, 46, 46, 46, 46, 46, 46, /* 69 */


double d1 = *JSVAL_TO_DOUBLE(v1);

const char *name;


return JS_FALSE;
**** Start of prmjtime.h ****

return JS_TRUE;
}
JSScope *link; /* next link in rt->scopeSharingTodo */

11, 13, 13, 13, 13, 13, 13, 13, /* 119 */

return JS_FALSE;
(* CRT_CALL JSObjectHook)(JSContext *cx, JSObject *obj, JSBool isNew,
jp->indent += 4;

pn = FunctionBody(cx, ts, fun, &funcg.treeContext);

* TOK_IMPORT list pn_head: list of pn_count sub-trees of the form

static JSBool

#define JS_HAS_ARGS_OBJECT 0 /* has minimal ECMA arguments object */


for (pn2 = pn2->pn_next; pn2; pn2 = pn2->pn_next) {

jsdouble d;

}
if (!ok)
/* syntax error */
#endif
} else if (min >= 0 && sec < 0) {

for (wp = (JSWatchPoint *)rt->watchPointList.next;


Decompile(SprintStack *ss, jsbytecode *pc, intN nb)

break;
* The contents of this file are subject to the Netscape Public

JS_free(((JSScopePrivate *)priv)->context, item);


* rights and limitations under the License.

OBJ_DROP_PROPERTY(cx, obj, (JSProperty *)sprop);


break;
cx->throwing = JS_TRUE;
}

#endif

JS_UNLOCK_OBJ(cx, obj);
extern JS_PUBLIC_API(JSBool)
*

const char js_Date_str[] = "Date";


JS_UNLOCK_OBJ(cx, obj);

return JS_FALSE;
0x00000018, /* 3 Po */

break;

str3 = str2;
JS_ASSERT(pn != tc->nodeList); /* catch back-to-back dup recycles */

case JSENUMERATE_NEXT:

#else

* The contents of this file are subject to the Netscape Public


return NULL;
for (sprop = scope->props; sprop; sprop = sprop->next) {

return h;

JS_free(JSContext *cx, void *p);

*/

JSPrincipals *principals)

}
* Rights Reserved.

return js_ValueToBoolean(cx, v, bp);


/*
JSContext *context;
jsval iter_state, num_properties;

return NULL;

} else if (strcmp(bytes, "atom") == 0) {

prword a;

CHECK_REQUEST(cx);
/*
*/

#include "jsstddef.h"

** variable number of arguments, each of them is a pointer to


goto out;
{

js_MarkScript(cx, script, arg);

sqsum = 0;

newifp->hookData = hook(cx, &newifp->frame, JS_TRUE, 0,


return NULL;
break;
static JSBool

ren = NewRENode(state, REOP_FLAT1, NULL);


return JS_FALSE;
extern JS_FRIEND_API(int)

a->next = NULL;

case '+':

if (pn2->pn_atom == cx->runtime->atomState.argumentsAtom)

(void)js_GetToken(cx, ts); /* eat `if' */

*rval = JSVAL_FALSE;
return JS_FALSE;

}
if (JSVAL_IS_PRIMITIVE(v))

ok = JS_TRUE;
JS_free(cx, (void *)xval);

c = (jschar)num;
UninternArgs args;
if (n >> 2)

id = (jsid) cx->runtime->atomState.lengthAtom;

*
switch (pn3->pn_type) {
return JS_FALSE;

#define JS_HAS_ARGS_OBJECT 0 /* has minimal ECMA arguments object */

if (sizeof(void *) == sizeof(JSInt32)) {
JSAtom *lengthAtom;
static REParser ParseItem;

JSFunction *func = NULL;


* called as the default case inside js_DecompileValueGenerator (and

#else /* !JS_THREADSAFE */
slot = JSVAL_TO_INT(id);
*vp = JSVAL_VOID;

} pn_u;

}
pn = AssignExpr(cx, ts, tc);

if (i == ilim) {
if (!JS_ValueToNumber(cx, vp[1], &im))
*ep = s1;

if (!JS7_ISDEC(c)) {

FILETIME time, midnight;


}

typedef struct JSExceptionState JSExceptionState;

return JS_FALSE;
js_GetArgument(JSContext *cx, JSObject *obj, jsval id, jsval *vp);

}
* Contributor(s):

JS_ASSERT(sprop);
/* ECMA says to return true if name is undefined or inherited. */
*flagp = (uint8)(flags + GCF_LOCK);
: JS_TRUE)

JS_free(cx, re);

LOCAL_ASSERT(*pc == JSOP_GOTO);
static int
break;

if (onechar < 0x80) { numUTF8bytes = 1;

#define JS_DHASH_ENTRY_IS_FREE(entry) ((entry)->keyHash == 0)

pc2 = pc;

return JS_FALSE;
void *callerdata);

ale = js_IndexAtom(cx, atom, &cg->atomList);

/* Optimize o['p'] to o.p by rewriting pn2. */

* If you wish to allow use of your version of this file only

JS_free(cx, argv[i]);

PUSH_OPND(rval);
if (he) {
/* XXX store parent and proto, if defined */

i = PTRDIFF(pc, script->main, jsbytecode) + len;

static const uint8 urlCharType[256] =

#else

#define fd_tan tan

atom = GET_ATOM(cx, script, pc2); \

fun = NULL;

jsval fval, junk;


JSFile *file = JS_GetInstancePrivate(cx, obj, &file_class, NULL);
return NULL;
b = Balloc(1);

reportp->ucmessage = out = (jschar *)


char *rv;

goto out;
}
atom = pn->pn_atom;

int n = -1;

#include "jsconfig.h"
goto out;

const uintN errorNumber, ...)

JS_SetProperty(cx, ctor, "output", &vp);


* Add methods only to Exception.prototype, because ostensibly all
*/

FETCH_NUMBER(cx, -2, d);

case JSOP_NOT:
mdata.base.mode = GLOB_SEARCH;
**** Start of jscompat.h ****

if(count==-1){
#define JSLL_NE(a, b) (((a).hi != (b).hi) || ((a).lo != (b).lo))

return -1;
* to the inline code under JSOP_RETURN.
sprop->nrefs++;

<EXCEPTION_NAME> is an exception index from the enum in jsexn.c;


pool->stats.variance += nb * nb;
cg->principals)) {

* and other provisions required by the GPL. If you do not delete

#define JSXDR_SWAB32(x) (((x) >> 24) | \


}
* The Initial Developer of the Original Code is Netscape
};

return NULL;
length = rdata.length + rightlen;

* multiple-precision integer arithmetic only if we cannot

/* this is deprecated, use JS_GetFrameScopeChain instead */

local = LocalTime(*date);
{0,0,0,{0,0,0}}

JSBool ok;
if (!pn5)

return JS_FALSE;
static REParser ParseQuantAtom;
JS_ValueToConstructor(JSContext *cx, jsval v)

#endif

}
JS_SetTrap(JSContext *cx, JSScript *script, jsbytecode *pc,

grState.maxKid = (ren->op == REOP_QUANT) ? ren->u.range.max : 0;

#include "jstypes.h"

PR_GetOpenFileInfo(file->handle, &info):
obj = JSVAL_TO_OBJECT(propobj->slots[JSSLOT_PARENT]);

}
static JSBool

* Alternatively, the contents of this file may be used under the

}
JSString *str;
JS_NewString(JSContext *cx, char *bytes, size_t length)
/* First kid may be null (for default case in switch). */

JS_FRIEND_API(jsval *)

* The contents of this file are subject to the Netscape Public

goto out;

*/
}

done = JS_TRUE;
if (op == JSOP_TRAP) {
if (b) { \
MSG_DEF(JSMSG_UNTERMINATED_STRING, 138, 0, JSEXN_SYNTAXERR, "unterminated string
literal")
return (intN)(l1 - l2);
} else {

nargv[i] = JS_GetStringBytes(str);
#define OBJ_SET_SLOT(cx,obj,slot,value) LOCKED_OBJ_SET_SLOT(obj,slot,value)
* dropped bit is a one. If any of the following digits in the
{

JSBool ok;
#define JS_USE_FDLIBM_MATH 1

if (attrs & JSPROP_READONLY)


if (!argsobj)

obytes = (obytes + fun->nrefs - 1) / fun->nrefs;

#ifndef NSPR_LOCK
}

"trap([fun] [pc] expr) Trap bytecode execution",

JSDHashEntryStub stub;
SRC_CONTINUE = 5, /* JSOP_GOTO is a continue, not a break;
}
for (pn2 = pn->pn_head; pn2; pn2 = pn2->pn_next) {
oldsp = fp->sp;

#define fd_sin sin

js_GetToken(JSContext *cx, JSTokenStream *ts)

grState->state->complete = match;

{
void *data;
*rval = STRING_TO_JSVAL(str);

case 'd':

return array_nyi(cx, "unshift");


void * (*raw)(JSXDRState *, uint32);
} func;

file->type)==-1){

JS_free(cx, wp);

switch (type) {
#include "jslock.h"
xi = *x;

* which means this function reported an error.

#include "jstypes.h"
if (JSVAL_IS_INT(sym_id(sym)))

for (i = 0; report->messageArgs[i] != NULL; i++)

todo = Sprint(&ss->sprinter, "#%u#", (unsigned) i);


** Numbered Arguement State
mhi = multadd(mhi, 10, 0);
js_DateIsValid(JSContext *cx, JSObject* obj);

/* Execute using caller's new scope object (might be a Call object). */


js_InCatchBlock(tc, atom)) {
* exception is thrown, then the JSREPORT_EXCEPTION flag will be set
#define jsutil_h___

return JSLL_ZERO;

if (decPt != 9999) {

if (((jsuword)thing & GC_PAGE_MASK) == 0) {

40, 40, 40, 40, 40, 40, 40, 40, /* 93 */

return fp->special & JSFRAME_DEBUGGER;


obj = js_NewObject(cx, &js_ScriptClass, NULL, NULL);

jschar *tokenptr;
#define JS_ALIGN_OF_INT64 2L
num = tmp;

** A type for representing the size of objects.

#endif

*vp = INT_TO_JSVAL(count);
* Alternatively, the contents of this file may be used under the

change = -1;
jsword me;

23, 24, 23, 24, 23, 24, 23, 24, /* 62 */

if (!IndexToId(cx, begin + i, &id))

#undef DEFVAL
* another handle. Are other filehandles interactive?

ptrdiff_t top; /* offset of loop top from cg base */


{

length = (message->length > 0) ? name->length + message->length + 10

JSTrapHandler handler, void *closure);


JS_DELETE(ss.base);
#endif

}
BITWISE_OP(^);

{
jsid id;

#define FIX_FPU() _control87(MCW_EM, MCW_EM)


return NULL;
JS_DHashTableFinish(JSDHashTable *table);

#define JS_BUG_FALLIBLE_TONUM 1 /* fallible ValueToNumber primitive */


/*
uintN errorNumber; /* the error number, e.g. see js.msg */

#define IS_UTF8_1ST_OF_2(x) (( (x)&~TWO_OCTET_MASK ) == TWO_OCTET_BASE)


case REOP_ASSERT_NOT:
if (ok) { \

JS_EnumerateStub, JS_ResolveStub, JS_ConvertStub, prop_iterator_finalize,

/*

*/

i = 0;
if (!ts) {
if (i == 0) {
if ((uintN)slot < fp->nvars)
return JS_FALSE;
#include "jsatom.h"
* XXX case where JS_DestroyContext is called outside of a request on cx

_hep = NULL; \
jsval v;
break;

static JSInt64

*
static int

*/

java_env = JSDJ_CreateJavaVMAndStartDebugger(_jsdjc);

gStackChunkSize = atoi(argv[++i]);
* If you wish to allow use of your version of this file only

he = JS_HashTableAdd(rt->gcLocksHash, thing, NULL);


}

}
jsdouble length, begin, end;
/* ilim is the maximum number of significant digits we want, based on k and
ndigits. */
* version of this file under the NPL, indicate your decision by
defsharp = NULL;
args_length = 0;
if (JSVAL_IS_FUNCTION(cx, argv[0])) {

** OUTPUTS: untyped pointer to the node allocated


# define POPEN popen

* Infinity and NaN (case insensitively). On some systems (e.g.,

* the License at http://www.mozilla.org/NPL/


"PR_ALIGN_OF_INT",
JS_ValueToString(JSContext *cx, jsval v);

he->next = *hep;
#ifdef DREAMWEAVER_JAVASCRIPT_PROFILING
return d1 == d2;
*rval = OBJECT_TO_JSVAL(nobj);

js_LeaveSharpObject(JSContext *cx, JSIdArray **idap)

(const jschar *)JS_malloc(cx, capacity * sizeof(jschar));

>> JS_CTYPE(c)) & 1)


}
* version of this file under the NPL, indicate your decision by

#define fd_fabs fabs


; \
#if JS_HAS_SWITCH_STATEMENT

if (s1 == start) {
* from sprop, and finally release that lock and

return;

extern JS_PUBLIC_API(JSBool)
JS_BEGIN_MACRO \
*rval = JS_GetEmptyStringValue(cx);

JSObject *argsobj;

state.parenCount = 0;
offset += SN_DELTA(sn);

if (!JS_InstanceOf(cx, obj, &js_RegExpClass, argv))

case REOP_DIGIT:

105, 105, 105, 105, 105, 105, 105, 105, /* 0xE800 */

if( number == 0 ){
*/
* JS1.2 never failed (except for malloc failure) to convert an
rewrite = JS_TRUE;

* '\d' A digit (same as [0-9]).


* deleting the provisions above and replace them with the notice
static JSParseNode *

#include "jsinterp.h"
JS_GetScriptBaseLineNumber(JSContext *cx, JSScript *script);
unsigned char b, c;
JS_DefineProperties(JSContext *cx, JSObject *obj, JSPropertySpec *ps)

extern void

date_makeDate(JSContext *cx, JSObject *obj, uintN argc,

JS_ReportErrorNumber(cx, js_GetErrorMessage, NULL,


goto retry;
**** End of jsdtoa.c ****
#if XP_MAC //AJFMOD

if (!js_ReportCompileErrorNumber(cx, NULL, cg,

** circular list is not empty


#include "jsparse.h"
JS_ASSERT(base >= 2 && base <= 36);
break;
/*

*ownp = (pobj == obj && prop);


CHECK_REQUEST(cx);

NULL, NULL, JSPROP_ENUMERATE,

OPDEF(JSOP_POS, 82, "pos", "+", 1, 1, 1, 10, JOF_BYTE)


{js_toSource_str, math_toSource, 0, 0, 0},
/* set sign for everything, including 0's and NaNs */

#endif
JS_END_MACRO
return offset;

static intN

return jp;

{js_defineSetter_str, obj_defineSetter, 2,0,0},

if (c == '\n' || c == EOF) {
uintN i;
* provisions of the GPL are applicable instead of those above.
(* CRT_CALL JSHasInstanceOp)(JSContext *cx, JSObject *obj, jsval v,
while(d = *t++) {
case JSOP_LE:

JSBool goodnext;
fp = NULL;

JSInt64 maxtimet;
*
case TYPE_INT16:

*/

#endif
}
buf = JS_GetStringChars(str);

*
}
a->avail += sizeof(JSGCThing);

#endif /* jslock_h___ */

case JSOP_DEFFUN:

JS_DHashTableDestroy(JSDHashTable *table)

/* Trap into debugger for breakpoint, etc. */


const jschar *cp, *ocp;
* and other provisions required by the GPL. If you do not delete

lockbits = (flags & GCF_LOCKMASK);

case TOK_LB:
#include "jsprf.h"
return JS_FALSE;
js_DestroyScopeProperty(cx, scope, sprop);
js_Emit1(cx, cg, JSOP_POP) < 0) {
a = b;

* Modifications to Mozilla code or documentation identified per MPL Section 3.3


* least significant bit will be set unless y was originally zero. */

* Software distributed under the NPL is distributed on an "AS IS" basis,

if (pn3->pn_type != TOK_LB) {
op = (tt == TOK_PLUS) ? JSOP_ADD : JSOP_SUB;
* appropriate. If MALLOC is undefined, malloc will be invoked

* The Original Code is Mozilla Communicator client code, released


#else

re = js_NewRegExpOpt(cx, NULL, str, opt, JS_FALSE);


if (!pn2)

return JS_FALSE;
static JSFunctionSpec number_methods[] = {
/* Ok, bad undefined property reference: whine about it. */

if ((cp != cpend) && JS_ISDIGIT(*cp))

ok = JS_FALSE;

ts->linelen = olen;

return;

(pn)->pn_u = (pn2)->pn_u; \

if (pn->pn_pos.end.lineno == ts->lineno &&

*/

SET_STATEMENT_TOP(&stmtInfo, top);
if (!chars)

jsbytecode *pc;
JS_GetTypeName(cx, JS_TypeOfValue(cx, fval)));
}
#ifdef Bad_float_h
{

46, 46, 46, 46, 46, 46, 46, 46, /* 95 */


*
static JSLock *arena_freelist_lock;
* except in compliance with the License. You may obtain a copy of

sprop = js_DropScopeProperty(cx, scope_, sprop); \

extern JS_FRIEND_DATA(JSScopeOps) js_list_scope_ops;


JS_ASSERT(JS_IS_SCOPE_LOCKED(spriv->scope));

int32 k, ka, kb;

if ((!lambda && funAtom && tc->topStmt) ||

#if JS_HAS_VALUEOF_HINT

return JS_FALSE;
#include <math.h>

js_FileOpen(cx, obj, file, "read"); \


**** Start of jsobj.c ****
}

JS_PUBLIC_API(void)
#define JS_EXPORT_API(__type) _declspec(dllexport) __type
*sn++ = (jssrcnote)(offset >> 8);

JS_PUBLIC_API(jsbytecode *)
JSPrinter *jp;

JSBool matched;
ts->flags |= TSF_EOF;

return NULL;
'\b', 'b',

break;
js_InitObjectMap(JSObjectMap *map, jsrefcount nrefs, JSObjectOps *ops,
p5->next = p51;
} else {
* License Version 1.1 (the "License"); you may not use this file

#if JS_BUG_SET_ENUMERATE

return JS_FALSE;

#define SIGNED_SHIFT_OP(OP) INTEGER_OP(OP, j &= 31;)

pn2 = Expr(cx, ts, tc);

align_of_word = PR_ALIGN_OF_WORD;

if (!sym || !js_GetProperty(cx, obj, sym_id(sym), &pd->value)) {

* and other provisions required by the GPL. If you do not delete

else
#define JS_HAS_MORE_PERL_FUN 0 /* has array.push, str.substr, etc */
JS_PropertyIterator(JSObject *obj, JSScopeProperty **iteratorp);

/*
}

*sep = cx->regExpStatics.lastMatch;
e1 += nd - k;

if (n >> 4)
return ok;
for (sp = &sprop->symbols; *sp; sp = &(*sp)->next) {

#define OBJ_DEFINE_PROPERTY(cx,obj,id,value,getter,setter,attrs,propp) \

if (--ht->nentries < UNDERLOADED(n)) {

if (!ok)
cond = js_CompareStrings(str, str2) OP 0; \

js_NewScriptFromParams(JSContext *cx, jsbytecode *code, uint32 length,


case JSOP_IMPORTPROP:
off = JSVAL_TO_INT(table[ncases-1].key);
free(dStr);
JS_GetFunctionScript(JSContext *cx, JSFunction *fun);

str = (argc==0)?JS_InternString(cx, ""):JS_ValueToString(cx, argv[0]);

JS_UNLOCK(&state->lock,cx);
15, 5, 6, 15, 15, 15, 15, 15, /* 77 */
*/
if ('0' <= c && c <= '9') {
return ok;
case '/':

file->isNative = JS_TRUE;
size_t nbytes;
TOK_NAME = 29, /* identifier */

JS_ARENA_ALLOCATE(space, &cx->tempPool, offsetsz + opcodesz);


* second tells offset to first JSOP_CASE if condswitch.

GLOB_MATCH,

JS_GetArrayLength(JSContext *cx, JSObject *obj, jsuint *lengthp);


#define JSLL_I2L(l, i) ((l) = (JSInt64)(i))
return result;

if (!str) {
static void

return 0;
*
40, 23, 24, 23, 24, 46, 46, 23, /* 19 */
* i A signed integer (32-bit) value.
#endif
case 'f':
/* j1 is b/S compared with 1 - mhi/S. */
extern JS_PUBLIC_API(void) jsll_udivmod(JSUint64 *qp, JSUint64 *rp, JSUint64 a,
JSUint64 b);
{
int len = strlen(base)-1;
CHECK_REQUEST(cx);
state.skipped = 0;

JSParseNode *pn;

if (!cg->tryBase) {

#define JS_HAS_WERROR_OPTION(cx) ((cx)->options & JSOPTION_WERROR)


JS_snprintf(numBuf, sizeof numBuf, "%#lx", type);

***********************************************************************/

{
JS_CompileUCFunction(JSContext *cx, JSObject *obj, const char *name,

const jschar *cp, *ep;

#define CRT_CALL
rp->hi = a.hi >> lsh;
arena_freelist_lock = JS_NEW_LOCK();

uint32
JS_RemoveExternalStringFinalizer(JSStringFinalizeOp finalizer);

{
JS_ASSERT((uint32)slot < JS_MAX((map)->nslots, (map)->freeslot))
{

void *value; /* ptr to opaque value */


#if JS_HAS_INSTANCEOF

if (setCallerVarObj)

*date = UTC(local);

}
* 12:30, instead of blindly adding 12 if PM.

return JS_FALSE;
nslots = fp->sp - fp->spbase;

return JS_FALSE;
return JS_FALSE;
}

js_FinishAtomState(JSAtomState *state)
// > alert("first option = " + theSelect.options[0]);
#define fd_ceil ceil

JSAtom *constructorAtom;
while (--leftspaces >= 0) {

}
#include "jsprf.h"

newifp = (JSInlineFrame *) newsp;

SetIncOpKid(JSContext *cx, JSTokenStream *ts, JSTreeContext *tc,

JS_EndRequest(JSContext *cx)
* e.g., arguments[i](), the 'this' parameter would and must bind to the
propobj = js_NewObject(cx, &prop_iterator_class, NULL, obj);

goto read_only;
**** Start of jstypes.h ****

SRC_FUNCDEF = 19, /* JSOP_NOP for function f() with atomid */


return rv;

* Copyright (C) 1998 Netscape Communications Corporation. All


* If you wish to allow use of your version of this file only

return JS_TRUE;
} while (JS_DHASH_ENTRY_IS_BUSY(entry));

break;

"PR_COUNT_ARENA",
#endif

* the License at http://www.mozilla.org/NPL/

* 1 > df = b/2^s2 > 0;

numBuf, name, OBJ_GET_CLASS(cx, obj2)->name);


jsdouble *dp;
return JS_FALSE;
}
ok = JS_FALSE;

* zero on HPUX. Perform the operation by bit


static void

* The Initial Developer of the Original Code is Netscape

if (FLT_ROUNDS == 0)

jsatomid i;

JSClass *clasp, JSNative constructor, uintN nargs,

for (; numtrys; numtrys--) {

return ATOM_TO_STRING(atom);

else

i = cmp(delta, bs);

goto have_fun;
js_FinishRuntimeStringState(JSContext *cx);

return JS_FALSE;
LOCKED_OBJ_SET_SLOT(obj, JSSLOT_PROTO, OBJECT_TO_JSVAL(pobj));

return NULL;
}

/* -*- Mode: C; tab-width: 8; indent-tabs-mode: nil; c-basic-offset: 4 -*-


if (prop)

#define JSVAL_INT 0x1 /* tagged 31-bit integer value */


*rval = JSVAL_ZERO;

* Under ECMA3, deleting any unary expression is valid -- it simply


JSAtom *atom;

jsdouble *date = date_getProlog(cx, obj, argv);

}
JSCLASS_NO_OPTIONAL_MEMBERS
case ARGS_LENGTH:

return JS_GetPrivate(cx, obj);

if (maxargs >= 1 && argp < stop)

$line =~ s/PR_FREE/free/g;

if (switchop == JSOP_CONDSWITCH) {

114, 114, 83, 83, 83, 83, 83, 83, /* 89 */

"PR_SEGMENT_RDWR",

/* Hand off bytes to the deflated string cache, if possible. */


JS_free(cx, argv);

#define PCE_LOAD(cache, pce, entry) \

SIOUXSettings.asktosaveonclose = false;

str = JSVAL_TO_STRING(ltmp);

JS_SetPendingException(JSContext *cx, jsval v);


}

(char *)sbrk(0) - (char *)before,


bad:
valcnt = 1;

return -1;

JS_BEGIN_MACRO \

* Contributor(s):
/* No loop condition: flag this fact in the source notes. */
!js_LockGCThing(cx, rt->jsNegativeInfinity)) {

/* XXX too many "... statement" L10N gaffes below -- fix via js.msg! */
}
return JS_TRUE;

*statep = JSVAL_NULL;
mlo = mhi = multadd(mlo, base, 0);
*/
JSAtom *atom;
JSLL_DIV(result,tsecs,result1);
MUST_MATCH_TOKEN(TOK_RC, JSMSG_CURLY_AFTER_TRY);

* version of this file under the NPL, indicate your decision by

JSFatLock *taken;
{js_length_str, STRING_LENGTH,

#define JSLL_EQ(a, b) (((a).hi == (b).hi) && ((a).lo == (b).lo))


}

static JSBool

15, 15, 15, 15, 15, 46, 46, 46, /* 96 */


tagbuf[j++] = '"';
}

uint32 number, void *arg);

atom = js_Atomize(cx, alias, strlen(alias), 0);

NULL, string_static_methods);
int32 type; /* Asciiz, utf, unicode */
JS_ASSERT(!rt->emptyString);
40, 40, 40, 40, 40, 40, 40, 40, /* 110 */
** Prototypes and macros used to make up for deficiencies in ANSI environments
* under the terms of the GPL and not to allow others to use your

pn->pn_type == TOK_DELETE ||

NULL, JSPROP_ENUMERATE)) {

46, 40, 40, 40, 40, 40, 40, 40, /* 92 */

*/
#define JS_BYTES_PER_BYTE 1L

} else
* where we scan from fp->spbase to fp->sp or through fp->script->depth

chars = js_InflateString(cx, bytes, length);

JS_PUBLIC_API(JSString *)
if (ren2) {
while (nvars--)
return JS_FALSE;
jsuint length, index;
return JS_FALSE;

/* See ECMA-262 15.1.2.5 */


#endif /* JS_HAS_DO_WHILE_LOOP */

* from sp[-(1+depth)].
*ss->cur++ = *sp++;
js_LockGlobal(tl);
reportp->flags |= JSREPORT_EXCEPTION;
and return */

length += argc;
OPDEF(JSOP_GROUP, 131, "group", NULL, 1, 0, 0, 0, JOF_BYTE)

#ifdef JS_THREADSAFE

/*
js_printf(jp, " %s", POP_STR());
return JS_FALSE;
if (its_noisy) {
* each has pn_left: property id, pn_right: value

# Pre-compile a little subroutine to perform the regexp substitution

} else {

return NULL;
break;
#else

js_InitRegExpStatics(JSContext *cx, JSRegExpStatics *res);

MSG_DEF(JSMSG_BAD_REGEXP_FLAG, 142, 0, JSEXN_SYNTAXERR, "invalid flag after


regular expression")

cx = spriv->context;
}
JSTYPE_VOID, /* undefined */
#ifdef JS_THREADSAFE

uintN attrs;

#define jsregexp_h___

};
JSBool
JSObject *scopeChain; /* scope chain */
#define JS_BIT(n) ((JSUint32)1 << (n))

L -= Exp_shift;
} ELSE
for (i = 0; i < global_lock_count; i++) {

{"lastMatch",

jsval val;

#define JS_BYTES_PER_DOUBLE 8L
uintN
newReport->messageArgs[i] = NULL;
JSBool
} else {

jschar ch;
c = n;

// namespace std" (or include a header file that does this).

#define JSLL_IS_ZERO(a) (((a).hi == 0) && ((a).lo == 0))

40, 40, 40, 40, 40, 40, 40, 40, /* 119 */

"PR_BYTES_PER_SHORT",

bb = d2b(rv, &bbe, &bbbits); /* rv = bb * 2^bbe */


#define JS_NOTIFY_ALL_CONDVAR(cv) ((void)0)

if (tnotes) {
* backward-compatible and non-y2k with msvc; '%#x' requests that a

if (!grState->maxKid || (++grState->kidCount < grState->maxKid)) {

if( l10n_debug )

/*

* deleting the provisions above and replace them with the notice

JS_SetFrameAnnotation(JSContext *cx, JSStackFrame *fp, void *annotation)

* may have been optimized, e.g., from JSOP_NAME to JSOP_ARGUMENTS. Whether

case JSOP_NAMEINC: op = JSOP_ARGINC; break;

typedef struct JSTokenStream JSTokenStream;


JS_GetParent(JSContext *cx, JSObject *obj);

file_currentDirSetter(JSContext *cx, JSObject *obj, jsval id, jsval *vp)


/* The tolerances below are conservative. */

return JS_FALSE;

} else {
OPDEF(JSOP_ONE, 63, "one", "1", 1, 0, 1, 12, JOF_BYTE)
notes = script->notes;

return 0;

/* Objects may require "deep locking", i.e., rooting by value. */


lval = POP_STR();

if (!js_DefineProperty(cx, fun->object,
newReport->uclinebuf = newReport->uctokenptr = NULL;
break;
* March 31, 1998.
return NULL;
jschar hexBuf[4];
static JSBool

static void PRMJ_basetime(JSInt64 tsecs, PRMJTime *prtm);

}
* version of this file under the NPL, indicate your decision by

"lparen_non",
js_PopStatementCG(JSContext *cx, JSCodeGenerator *cg)

* rights and limitations under the License.


/* Function is inlined, all other classes use object ops. */

MSG_DEF(JSMSG_BAD_CASE, 18, 0, JSEXN_SYNTAXERR, "invalid case


expression")
JS_free(cx, temp);
}

return GetPropertyAttributes(cx, obj,

int8 tinyid, jsval value,

void *callHookData;

{
JS_CompareValues, JS_CompareValues,
Math = JS_DefineObject(cx, obj, "Math", &math_class, NULL, 0);

JSOp op;
* Create a new RegExp object.
str = js_NewString(cx, chars, length, 0);
NULL)
jsint i_; \

bval = JSVAL_TO_BOOLEAN(argv[0]);
JSToken tokens[NTOKENS];/* circular token buffer */
atom = js_GetAtom(cx, &jp->script->atomMap,

#endif

chars += leftlen;
#if JS_HAS_EVAL_THIS_SCOPE
#include "jsinterp.h"
jsval *argv, jsval *rval)
}

atom->number = state->number++;

"PR_cnvtf",

*/
} else if (cx->version != JSVERSION_1_2) {
#else
return JS_FALSE;

atom = js_Atomize(cx, name, strlen(name), 0);


}
uint8 js_SrcNoteArity[] = {
break;
size_t length = js_strlen(s1);
* Software distributed under the License is distributed on an "AS
* TOK_LC list pn_head: list of pn_count statements

}
JS_SetVersion(cx, (JSVersion) atoi(argv[i+1]));

q1 = 0;
#define JS_HAS_SWITCH_STATEMENT 1 /* has switch (v) {case c: ...} */
extern JS_PUBLIC_API(JSBool)

return JS_FALSE;
#define JS_BEGIN_EXTERN_C extern "C" {
* Communications Corporation. Portions created by Netscape are

DEFVAL(STRING_TO_JSVAL(str),
JS_ASSERT(fp->fun);
#endif
}

arena_freelist_lock = NULL;

void

JS_SetElement(JSContext *cx, JSObject *obj, jsint index, jsval *vp)


#define JS_ATOMIC_INCREMENT(p) PR_AtomicIncrement((PRInt32 *)(p))
/* Don't run gc if it is disabled (unless this is the last context). */
/*

pc += len - oplen;

jsdouble t;

if (!obj) {

* only) we return false, so the calling function knows to try to

JS_ASSERT(JSVAL_IS_BOOLEAN(val));
/*
}
}
ReportNoReturnValue(JSContext *cx, JSTokenStream *ts)
0, /* SRC_NULL */

JSParseNode *pn;
* March 31, 1998.

todo = Sprint(&ss->sprinter, "%s %s %s",

pascal OSErr __JSInitialize(const CFragInitBlock* initBlock)


if (!str)

RETURN(TOK_ERROR);
return ok;

81, 81, 81, 81, 81, 81, 81, 81, /* 36 */


rv = cvt_f(ss, u.d, pattern, &pattern[i+1] );
#endif
JSHashEntry *next; /* hash chain linkage */

JSSymbol *sym, **sp;

{
if (kidMatch == NULL)

vector = NULL;

x = (nd + 8) / 9;
* so recursing back to here).

#define JS_HAS_REGEXPS 0 /* has perl r.e.s via RegExp, /pat/ */

#define LINE_SEPARATOR 0x2028

1, /* SRC_BREAK2LABEL */

if (!ok)
if (!JSDOUBLE_IS_FINITE(*date)) {
sp--;

/*
* Push the generating bytecode's pc onto the parallel pc stack that runs
again:
* A new, opaque iterator state should be allocated and stored in *statep.
* the provisions above, a recipient may use your version of this

sp--;
math_acos(JSContext *cx, JSObject *obj, uintN argc, jsval *argv, jsval *rval)
static JSBool
*/
#if JS_HAS_SHARP_VARS

js_UnlockGCThing(cx, rt->emptyString);
return js_NewNumberValue(cx, result, rval);
str_strike(JSContext *cx, JSObject *obj, uintN argc, jsval *argv, jsval *rval)
}

/*

(void)JS_ExecuteScript(cx, obj, script, &result);

SAVE_SP(fp);
if (!js_ValueToNumber(cx, argv[1], &d))
/* Tue Oct 31 2000 */

JS_InitArenaPool(&cx->tempPool, "temp", 1024, sizeof(jsdouble));

SET_OBJ_INFO(obj,__FILE__,__LINE__)))

*
15, 15, 15, 15, 15, 15, 15, 15, /* 81 */
void *arg;

return JS_TRUE;
return NULL;
JS_GetStringBytes(JS_ValueToString(cx, id)));
if ((op == REOP_LPAREN) || (op == REOP_LPARENNON)) {

extern JSBool

if (flagp && ((*flagp & GCF_TYPEMASK) == GCX_OBJECT)) {


#define JS_HAS_EXCEPTIONS 0 /* has exception handling */

if (!fun)

} JSCList;
scope->data = NULL;

ptrdiff_t offset = EmitCheck(cx, cg, op, length);


}
mem_set32(JSXDRState *xdr, uint32 *lp)

*/
d = fmod(d, (double)m);

if (ss->base) {
indent = jp->indent;

if (!entry)

state->number = 0;
JS_PUBLIC_API(JSScript *)

* the low side of the split, and the rest of its things' flags on the high
0x00070005, /* 40 Lo, identifier start */
} else {
/*
jsint slot; /* -1 or arg or local var slot */
}

"ncclass",

if (!JSVAL_IS_NULL(userid))
pool->stats.nfastrels++;

next = (JSSymbol *)sym->entry.next;


JSString *str;
* JS_FALSE and the value of *attrsp is undefined.

JSFILE_CHECK_ONE_ARG("seek");

/* JS_ISSPACE is false on a null. */


* under the terms of the GPL and not to allow others to use your

extern char js_typeof_str[];


JSObject *

s = str->chars;
#endif

if (!js_strtointeger(cx, str->chars, &ep, radix, &d))

* JS script descriptor.
JS_ReportErrorNumber(cx, JSFile_GetErrorMessage, NULL,

if (g > 100 || g < 0) /* g equals number of global locks */

pool->current = &pool->first;
return NULL;
}
c = (JS7_UNHEX(cp[0]) << 4) + JS7_UNHEX(cp[1]);

*/

10, 10, 10, 5, 3, 6, 11, 12, /* 1 */


(((hour * MinutesPerHour + min) * SecondsPerMinute + sec) * msPerSecond + ms)
#ifndef jstypes_h___
len--;
default:
/* Because serial port and SLIP conflict with ReadXPram calls,
if (atom == rt->atomState.getAtom ||

#endif
}
((void)0)

static JSBool
if (!pn2)

return 0;

if (!thing)
str = js_NewString(cx, newchars, ni, 0);

if (!JS_InstanceOf(cx, obj, &date_class, argv))


* the provisions above, a recipient may use your version of this
}
out:

/* Set the open flag and return result */


msec_time = MakeTime(hour, min, sec, msec);
extern JSBool
goto out;
#define INT64 long long

JS_END_MACRO

#endif

}
if (!obj2)
};
* If we are, use 0 as the time. */
PR_Lock(global_locks[i]);

return ok;

if (!ok)

jschar c, c2;

# define JS_RUNTIME_METER(rt, which) JS_ATOMIC_INCREMENT(&(rt)->which)


* v jsval Argument value (no conversion)
switch (cp[2]) {
75, 75, 75, 76, 77, 78, 28, 28, /* 0x2200 */

JSFile *file = JS_GetInstancePrivate(cx, obj, &file_class, NULL);


attrs, NULL);
if (!OBJ_GET_PROPERTY(cx, obj, id, &v))
extern JS_PUBLIC_API(JSBool)
len = js_GetSrcNoteOffset(sn, 0);

script_call(JSContext *cx, JSObject *obj, uintN argc, jsval *argv, jsval *rval)

? js_DoubleToInteger(d + (+0.)) : *cx->runtime->jsNaN)

#define OBJ_CHECK_ACCESS(cx,obj,id,mode,vp,attrsp) \
if( rv < 0 ){
{

#else
3 ==> through ndigits past the decimal point. This
val = (jsval)

Returns everytynig but the last component from a path name.


}
case REOP_ASSERT_NOT:

#include "jsshell.msg"
#define d1 word1(d)

* This API can be called directly from a global object class's resolve op,
return JS_TRUE;

res = &cx->regExpStatics;

* another function), parented by the current scope chain, and

}
if (k >= 0) {
JS_SetErrorReporter(cx, older);

}
return JS_FALSE;
if (!ok)

56, 56, 56, 56, 56, 56, 56, 56, /* 0xD200 */

if (cx->version == JSVERSION_1_0 ||
}
JS_free(cx, (char *)lval);
JS_DecompileFunction(JSContext *cx, JSFunction *fun, uintN indent);
break;
}
}

cp[i] = (jschar)c;

/*
if (format & (JOF_SET | JOF_DEL | JOF_INCDEC | JOF_IMPORT)) {
JSAtom *getAtom;

js_FreeSlot(JSContext *cx, JSObject *obj, uint32 slot)


break;
char c;

}
if (!LookupProperty(cx, obj, name, &obj2, &prop))

// DREAMWEAVER snewman 3/28/01: added declaration to avoid "no prototype" warning


jsuint index, length;

15, 15, 15, 15, 15, 15, 15, 15, /* 100 */


* unconverted arguments.

sprop = NULL;

JS_XDRString(JSXDRState *xdr, JSString **strp);

cond = js_CompareStrings(str, str2) OP 0; \

*
return JS_FALSE;

/* Check whether we have enough space in the caller's frame. */

case JSOP_DECVAR:

JS_DefinePropertyWithTinyId(JSContext *cx, JSObject *obj, const char *name,

return JS_FALSE;

if (!ren2)

JS_UNLOCK_OBJ(cx, obj);
{
(r).lo = _a.lo << ((b) & 31); \

* State for sharing single-threaded scopes, once a second thread tries to


#define JS_BUG_EMPTY_INDEX_ZERO 0 /* o[""] is equivalent to o[0] */
}
JSInt64 _lo_d; \
&prop);
{

*
else
*/
* except in compliance with the License. You may obtain a copy of

return JS_FALSE;

&& !JSDOUBLE_IS_NEGZERO(d) \

if (d == HUGE_VAL)
{
* native methods store strings (possibly newborn) converted from their 'this'
ok = OBJ_DEFINE_PROPERTY(cx, parent, (jsid)funAtom,
JS_GetFunctionScript(JSContext *cx, JSFunction *fun)

#include "jsapi.h"

return JS_FALSE;

case SRC_FUNCDEF: {

switch (enum_op) {

} while (--decPt);
fun = JS_ValueToFunction(cx, argv[-2]);
pipemode[2] = '\0';

jsid symid;

break;

out:

#ifndef ULong
#define JSVAL_BOOLEAN 0x6 /* tagged boolean value */
JSLL_MUL(nextseed, rt->rngSeed, rt->rngMultiplier);
GC_MARK_ATOM(cx, vector[i], arg);
#define JS_USE_FDLIBM_MATH 1

#define SPROP_SETTER_SCOPE(sprop,scope) ((scope)->gsTable[(sprop)->setterIndex])

/* gosub <finally>, if required */


/* Remove any argument formatters. */
extern void js_LockRuntime(JSRuntime *rt);

uintN flags, JSObject *parent, JSAtom *atom);


tp->t_op = JSOP_STRING;
if (argc == 0)

* for the 'before'invocation, but is whatever value is returned from that

JSMSG_MAX_TOO_BIG, up);
return matchNonGreedyKid(state, ren, kidCount, maxKid, kidMatch);
JSEXN_EVALERR,

(r).hi = (r).hi | (a).hi)

TOK_FOR = 44, /* for keyword */


}

JS_PUBLIC_API(JSBool)

return NULL;
/* Need space for actuals plus missing formals minus surplus. */

extern JSBool

}
cx->data = data;
void *listenerData; /* listener 'this' data */

#define SPROP_GET(cx,sprop,obj,obj2,vp) \

/* Set the generated Exception object as the current exception. */


if (!table) {
tt = js_PeekToken(cx, ts);

pc = CG_CODE(cg, target);
* literals are vulnerable to garbage collection; to root script objects and
{

if (op == JSOP_GETTER) {

15, 15, 15, 15, 15, 15, 15, 15, /* 98 */


#include <string.h>
ida = NULL;

ts = js_NewBufferTokenStream(cx, base, length);


const char js_with_statement_str[] = "with statement";

return JS_FALSE;
JS_GetStringBytes(JS_ValueToString(cx, v)), re, im);

JSObjectOps *ops;

res->leftContext.chars = str->chars + start;


printf(" [");

15, 15, 15, 15, 15, 15, 15, 15, /* 85 */


MSG_DEF(JSMSG_BAD_JVAL_TYPE, 68, 1, JSEXN_NONE, "unknown jsval type {0}
for XDR")
goto out; \

jsdouble *date = date_getProlog(cx, obj, argv);


{

}
JS_UNLOCK_OBJ(cx, obj);

} else {

/* create JSArray here... */


/*
jp->scope = NULL;
TOK_PRIMARY = 33, /* true, false, null, this, super */

return JS_TRUE;
}

frame.fun = fun;
PUSH_OPND(ATOM_KEY(atom));

*/
* if the error is defined to have an associated exception. If an

*rval = JSVAL_FALSE;

*
fprintf(fp, " mean steps per search: %g\n", (double)table->stats.steps

const char *bytes, uintN length,


S = mhi = 0;

ptrdiff_t offset = EmitCheck(cx, cg, op, 1);

native = frame.constructing ? ops->construct : ops->call;

if (JSVAL_IS_STRING(id) &&
#ifdef JS_THREADSAFE

JS_BEGIN_MACRO \

if(!js_ExecuteRegExp(cx, re, str, &index, JS_TRUE, &v)){


(JSProperty **)&sprop)) {
ts->flags &= ~TSF_REGEXP;
* and other provisions required by the GPL. If you do not delete
switch (type) {
#endif

*
* someone may have set other options on cx already -- for each context in the
data->regexp = re;
int startline;

/* Get private data and set derived locals from it. */

NC_LIMIT

res->input = NULL;

}
} else {

jsdouble

/* Proposed ECMA 15.2.4.7. */


translateLFtoCR(buffer, n);

*/

JSTryNote *tmp, *final;


if (bdr->digitMask == 0) {

do_setlval:

**** Start of jsparse.h ****


break;
ptrdiff_t off;
NC_MAX_VALUE,

40, 40, 40, 40, 40, 40, 40, 40, /* 102 */


*
js_GetLengthProperty(JSContext *cx, JSObject *obj, jsuint *lengthp)
JS_IsExceptionPending(JSContext *cx)

if (!chars)

}
}

#ifdef TEST_CVTARGS

40, 46, 46, 46, 46, 46, 46, 46, /* 71 */

}
#ifdef JS_THREADSAFE

/*
#define JSVAL_INT_POW2(n) ((jsval)1 << (n))
newlength += 2; /* The character will be encoded as %XX */

if (!js_ValueToNumber(cx, argv[0], &d))


#include "jsobj.h"

const char *filename, uintN lineno);


46, 60, 60, 60, 60, 60, 60, 60, /* 22 */
/*
SET_BIT(slot, fp->overrides);
if (jmp < 0)
if (!ok)
*

funobj = fun->object;

pn = NewParseNode(cx, &CURRENT_TOKEN(ts), PN_LIST, tc);


{
} else if (hour >= 0 && min < 0) {

JSObject *obj2;

JS_DHashTableEnumerate(JSDHashTable *table, JSDHashEnumerator etor, void *arg);


str_sup(JSContext *cx, JSObject *obj, uintN argc, jsval *argv, jsval *rval)

#include "jsscope.h"

return JS_FALSE;

(nclasses + REGISTRY_CHUNK) * sizeof(JSClass *));


num = quot;
if (!obj) {
JSBool
40, 40, 40, 46, 40, 46, 40, 40, /* 116 */

if (state->throwing && JSVAL_IS_GCTHING(state->exception))

* data structure.
return JS_FALSE;
#define MinutesPerDay (HoursPerDay * MinutesPerHour)
}

JS_PUBLIC_API(void *)

return match;

uint32 depth; /* mark recursion depth */


JS_SetUCProperty(JSContext *cx, JSObject *obj,
}
p5 = i2b(625);
fprintf(stderr, "undefined\n");
else
return js_NewNumberValue(cx, *date, rval);

* Contributor(s):

// if the containing object has the special property -


MM_defineFunctionsOnCompile
return NULL;

87, 87, 87, 87, 87, 87, 87, 87, /* 64 */

printf("#undef IS_BIG_ENDIAN\n\n");

JS_NewString(JSContext *cx, char *bytes, size_t length);


JS_free(cx, file->path);
RETURN(TOK_ERROR);

53, 54, 16, 16, 16, 16, 16, 54, /* 9 */

pool->stats.nallocs++;

#include "jsobj.h"

}
if (JSDOUBLE_IS_NaN(x)) {

REOP_ANCHOR = 25, /* like .* but skips left context to unanchored r.e. */


OPDEF(JSOP_EXCEPTION, 116,"exception", NULL, 1, 0, 1, 0, JOF_BYTE)

((JSClass *)JSVAL_TO_PRIVATE(LOCKED_OBJ_GET_SLOT(obj, JSSLOT_CLASS)))

strcpy(result, dir);

k1++;

#define PR_EventLoop PL_EventLoop


char *q;

/* Skip properties not owned by obj, and leave next id in rval. */

lineno++;
strcpy(p, !word1(d) && !(word0(d) & Frac_mask) ? "Infinity" : "NaN");
* March 31, 1998.

JS_PUBLIC_API(JSBool)

}
memcpy(buffer, s, n);
#if JS_HAS_SEQUENCE_OPS

/* Compute the 'this' parameter and store it in frame as frame.thisp. */

return n ? n - 1 : n;

return JS_FALSE;

}
return 0;

if (!pn)
* terms of the GNU Public License (the "GPL"), in which case the
}
}
else if (e >= -Ten_pmax) {

/*

#else
uint32 misses;
return str_nyi(cx, "substr");

len = 1 + pc2 - pc;

// Microsoft Developer Studio generated include file.

REOP_DOTSTAR = 24, /* optimize .* to use a single opcode */

JSScopeProperty *sprop;
* Contributor(s):
} JSErrNum;
return NULL;
}
#include <io.h> /* for isatty() */

0, 1, 1, 1, 1, 1, 0, 0, /* 0 */

**** Start of jshash.c ****


return js_NewNumberValue(cx, z, rval);
JS_ARENA_RELEASE(&cx->stackPool, ifp->mark);

*/

return TOK_NAME;
JS_DELETE( nas );

return JS_FALSE;

#define G2037GMTMICROLOW 0x7a238000 /* micro secs to 2037 low */


{
* introducing a lot of risk, I'm adding this function to access the
if (loop == 2) {
*

* The Original Code is Mozilla Communicator client code, released

if (privateValue == JSVAL_NULL)

jsdouble x, z = *cx->runtime->jsPositiveInfinity;
const JSDHashEntryHdr *from,
*/
k += 2;

* Alternatively, the contents of this file may be used under the

return JS_FALSE;
JS_HashString(const void *key)

return (int32)q;

/* find UTC time from given date... no 1900 correction! */


#else

}
js_FileSeek(JSContext *cx, JSFile *file, int32 len, int32 mode)
else if (d > delta)
#ifdef DREAMWEAVER_INCLUDE_EXTENDED_CHARS_IN_CLASSES

* Software distributed under the License is distributed on an "AS

* The number may also be inaccurate for power-of-two bases. This

return NULL;

case FUN_CALLER:
/* Terminate the new freelist. */
Bigint *b, *b1, *delta, *mlo, *mhi, *S;

goto dig_done;
if (buffer == '\n')
} else { \
#endif
* The Original Code is Mozilla Communicator client code, released

}
JS_ValueToUint16(JSContext *cx, jsval v, uint16 *ip);
if (js_Emit1(cx, cg, JSOP_POP) < 0)
}

STMT_CATCH = 7, /* catch block */

* Rights Reserved.

goto syntax;
buf = (char *)to;

/* This is not the first iteration. Recover iterator state. */


size_t length, length2, newlength;

}
*/

JavaVM *java_vm = NULL;

static void do64(void)

* version of this file under the NPL, indicate your decision by


table[i].offset = off2;

JSProperty *_pce_prop; \

}
: *(sn) >> SN_DELTA_BITS)

TOK_IF = 37, /* if keyword */

if (pn->pn_op != JSOP_NOP) {
/*
uint8 flags, *flagp;

/* Find most recent non-native function frame. */

jsdouble *date = date_getProlog(cx, obj, argv);

if (!js_EmitTree(cx, cg, pn->pn_kid))

{
{

JS_ReportErrorNumber(cx, js_GetErrorMessage, NULL,


#endif

/* nas[cn] starts from 0, and make sure nas[cn].type is not assigned */

cx->rval2set = JS_FALSE;

JSRegExp *re;
}

extern const char js_unescape_str[];


for(i = 1; i < nz; i++)

if (!obj) {
pn->pn_offset = top = CG_OFFSET(cg);

**** End of jsexn.c ****

cp++;
if (caller->script) {

* Clinger missed -- when we're computing d * 10^n

for (index = 0; index < length; index++) {

JSTrapHandler debuggerHandler;

#endif

* Software distributed under the License is distributed on an "AS


pipemode[2] = '\0';
if (tt == TOK_ERROR)
if (state->complete)
unsigned int line[4]; /* line where lock was (re-)taken */
#define SN_IS_GETTABLE(sn) (SN_TYPE(sn) < SRC_NEWLINE)

/* OS2 lacks copysign */

nchars = 0;
#define GC_FLAGS_SIZE (GC_THINGS_SIZE / sizeof(JSGCThing))

if (JSDOUBLE_IS_NaN(d)) {
JSFILEMSG_OBJECT_CREATION_FAILED, "js_NewFileObjectFromFILE");
"PR_Segment",

extern JS_PUBLIC_API(void)
extern double fd_atan __P((double));

*/
#ifdef JS_THREADSAFE

putchar('\n');

}
* provisions of the GPL are applicable instead of those above.
static JSBool
#undef OFFSET_TO_ATOM
}
case REOP_EMPTY:

sn = &cg->notes[index];

/* Allocate a Bigint with 2^k words. */

/*

((cp[-1] == '(' || cp[-1] == '|') && /*balance)*/


JSAtom *indexAtom;

b->wds = n;
fp->argv[slot] = *vp;
if (kidMatch == NULL)

if (!newbase) {

JS_PUBLIC_API(void)

}
if (!useful) {

js_ReportCompileErrorNumber(cx, ts, NULL, JSREPORT_ERROR,


TOK_BITAND = 17, /* bitwise-and (&) */

**** End of jsdbgapi.h ****

if (!stmt) {
"space",

/* Divide d by 10^k, keeping track of the roundoff error and avoiding


overflows. */
*/
*
js_RemoveRoot(cx->runtime, &res->input);
#define JS_BITS_PER_WORD_LOG2 5L

uintN i;
#include "jspubtd.h"
text = str->chars;
oldscript = (JSScript *) JS_GetPrivate(cx, obj);
#endif

full = (char *)name;


#define INT64 PRInt64

#elif defined(WIN32)

js_with_statement_str)) {

JSFunction *fun; /* function being called or null */

JS_ARENA_ALLOCATE_CAST(chars, jschar *, &cx->tempPool, nbytes);


typedef enum JSXDRWhence {

rval = FETCH_OPND(-1);
if ((jsdouble)i == d) {

goto bad;

jsval *argv, jsval *rval)


case TOK_IMPORT:

* Contributor(s):

* terms of the GNU Public License (the "GPL"), in which case the

typedef struct MarkArgs {


* Communications Corporation. Portions created by Netscape are
nbytes += strlen(script->filename) + 1;

{
* If you wish to allow use of your version of this file only

* TOK_SWITCH binary pn_left: discriminant


{"setMonth", date_setMonth, 2,0,0 },

JSREPORT_STRICT,

ok = js_Invoke(cx, argc, 0);


VARARGS_ASSIGN(nas[cn].ap, ap);

*/

*dp = d;
if (!*bp && !JSVAL_IS_PRIMITIVE(v)) {
JS_ArenaCountInplaceGrowth(JSArenaPool *pool, JSUint32 size, JSUint32 incr)

*dp = *JSVAL_TO_DOUBLE(v);

#ifdef JS_ARENAMETER
}
JS_PUBLIC_API(size_t)
if ((uint32)offset > MEM_LIMIT(xdr)) {

while (i < limit) {


#endif /* !JS_THREADSAFE */

* Emit another stack fix, because the catch could itself

return num_to(cx, obj, argc, argv, rval, DTOSTR_FIXED, DTOSTR_FIXED, -20,


MAX_PRECISION, 0);
extern const char js_uneval_str[];
} else {
proto = JS_InitClass(cx, obj, NULL, &js_RegExpClass, RegExp, 1,

so we have to use POPEN.

JS_ASSERT(len > 0);

} \
REOP_NONSPACE = 19, /* match a non-whitespace char */

b = lshift(b, b2);

*rval = OBJECT_TO_JSVAL(obj);
* Contributor(s):

JSLL_MUL(tmp,tmp,tmp1);

end = SN_NEXT(end);

* exception constructor name in the current context. If the constructor

goto error;

#else

js_Function_str, "apply",
if (SPROP_GETTER_SCOPE(sprop, scope) != getter)
}
str = JS_NewStringCopyZ(cx, buf);

"PR_InitEvent",

lockbits = (flags & GCF_LOCKMASK);


Bfree(wasted_effort);

JSBool
}

sub convert_declarations {
jschar *chars;

# include "jsprf.h"

#include <sys/types.h>
if (!ok)
* have been mapped by scripts connected to live objects (Function and Script
* the decompiler knows to treat this case specially.
JS_END_MACRO
atom = GET_ATOM(cx, script, pc);

((ops == &js_ObjectOps) ? clasp->call : ops->call)) {

*ep = i ? s1 + i : s;

if (!JSVAL_IS_INT(id))
}
"%#c"
js_IdToValue(id), NULL);

* terms of the GNU Public License (the "GPL"), in which case the
} ELSE

jsval *sp, *base, *limit;

***************************************************************************

*/

JS_DumpArenaStats(fp);

#ifndef Omit_Private_Memory
/* (Can't trust DBL_MAX) */
*

extern const char js_class_prototype_str[];


JS_ASSERT(z);
JSClass *clasp;

JSREPORT_ERROR,

VALUE_TO_PRIMITIVE(cx, rval, JSTYPE_VOID, &rval); \

for (i = j = 0; i < n; i++) {

res->multiline = JSVAL_TO_BOOLEAN(*vp);
if (!OBJ_GET_PROPERTY(cx, aobj, id, &v))

return JS_FALSE;

15, 15, 15, 15, 15, 15, 15, 15, /* 86 */

MSG_DEF(JSMSG_NO_IMPORT_NAME, 76, 0, JSEXN_SYNTAXERR, "missing name in


import statement")
tc->nodeList = pn;

JS_ASSERT(REOP(ren) != REOP_ALT);

* Communications Corporation. Portions created by Netscape are

* JSENUMERATE_INIT
scope = fun->object ? OBJ_SCOPE(fun->object) : NULL;
#define JS_BUG_VOID_TOSTRING 0 /* void 0 + 0 == "undefined0" */

JSMSG_BYTECODE_TOO_BIG, numBuf1, numBuf2);


#define JS_PUBLIC_DATA(t) JS_IMPORT_DATA(t)

* ECMAv2 forbids conversion of discriminant, so we will skip to

wa--;

goto out;

"hidden",
static void
gc_hash_thing(thing),
// to the JS compiler. I'm getting a wierd illegal-access error when the
}

}
atom = (JSAtom *)he;
JS_PUBLIC_API(JSBool)
}

JSBool (*getbytes)(JSXDRState *, char **, uint32);


* malloc failure or runtime GC-thing limit.
3, 8, 8, 12, 12, 5, 6, 5, /* 115 */
{

#define JS_BUG_FALLIBLE_EQOPS 0 /* fallible/intransitive equality ops */


goto ret1;

* object, not found in any prototype object. Rewrite pn_op and update pn

parsenodes++;

if (argc > count) {


fh = fopen(filename, "r");

extern JSObject *
sp = js_AllocStack(cx, 2 + argc, &mark);

* Simultaneously test to see if the source note array must grow to

JSFunction *fun;

js_strncpy(chars, cp, len);

};
#endif

JS_free(cx, buf);

} else

FETCH_NUMBER(cx, -2, d); \

w = xa > xa0 ? *--xa : 0;


#include <string.h>

js_ReportCompileErrorNumber(state->context,

*/

typedef struct JSXDRState JSXDRState;

#define JS_BITS_PER_SHORT_LOG2 4L
if (grState->stop == NULL) {
return js_NewNumberValue(cx, z, rval);
/* Set lastc so we match just c's bit in the for loop. */

if (kidMatch != NULL)

SET_JUMP_OFFSET(pc, off);
extern JSBool

JS_ASSERT(newscope->ownercx == cx || !newscope->ownercx);
*
}

js_alloc_atom_space, js_free_atom_space,
JSCodeSpec FAR js_CodeSpec[] = {
newlen = 0;
js_ReportCompileErrorNumber(cx, ts, NULL, JSREPORT_ERROR,
return js_NewNumberValue(cx, result, rval);

#include "jsstddef.h"

continue;

op = CURRENT_TOKEN(ts).t_op;
MSG_DEF(JSMSG_NOT_AN_ERROR, 0, 0, JSEXN_NONE, "<Error #0 is reserved>")
free(bytes);

40, 40, 40, 40, 40, 40, 40, 40, /* 26 */

for (c = 0; c < '0'; c++)

JS_NewDHashTable(JSDHashTableOps *ops, void *data, uint32 entrySize,

pobj = NULL;
PUSH_OPND(rval);
setter = js_SetArgument;
atom = rt->atomState.typeAtoms[type];

JSMSG_OUT_OF_MEMORY);
*vp = BOOLEAN_TO_JSVAL(!file->isNative && file->hasAutoflush);

* rights and limitations under the License.


* Given a JSErrorReport, check to see if there is an exception associated with

do {
* Communications Corporation. Portions created by Netscape are

}
}
* Each hash table sub-type should nest the JSDHashEntryHdr structure at the

printf("\n");
JS_ATOMIC_INCREMENT(&cx->runtime->totalScopes);

*propp = (JSProperty *) sprop;


}

if (file->handle==NULL){
scope = OBJ_SCOPE(obj);

* Selected arguments can be expanded in initializers. The op argument is

if (!time.dwLowDateTime) {

#endif
} else {

if (clasp != &js_FunctionClass && clasp != &js_CallClass)

static JSPropertySpec regexp_props[] = {

{
slot = sprop->slot;

46, 46, 46, 46, 46, 46, 46, 80, /* 46 */

fprintf(fp, "\n\t%s: %d", cstr, off);


return rv;

static JSBool

} else {
engine when the corresponding error occurs.

getter = setter = NULL;


* the Date.setWhatever functions in ECMA are only varargs
JSFunction *cfun, *ofun;
#define jsprf_h___
? js_InternalCall(cx, obj, OBJECT_TO_JSVAL(SPROP_GETTER(sprop,obj2)), \

rval = FETCH_OPND(-1);
SecFromTime(local),

*pobjp = obj;

typedef JSUintn uint;

jsdouble result;
}

* TOK_INC, unary pn_kid: MEMBER expr


{

return JS_FALSE;

/* Drop atoms held by the property cache, and clear property weak links. */
}
js_GetScriptLineExtent(JSScript *script);
* If you wish to allow use of your version of this file only
} else if (onechar <= MAX_UCS2) { numUTF8bytes = 3;

op = CURRENT_TOKEN(ts).t_op;
} else { /* ECMA 3, 1-9 or 01-99 */

thisp = OBJ_THIS_OBJECT(cx, thisp);

#define jsxdrapi_h___

JSRuntime *rt;

JS_EnumerateStub, JS_ResolveStub, JS_ConvertStub, exn_finalize,

#else
*/
case JSOP_VOID:

? (JSPropertyOp) obj
cx->interpLevel++;

/* Side effect: will remove spaces in the beginning/end of the filename */


if (!OBJ_SET_PROPERTY(cx, obj, id, &v2))

return JS_FALSE;
void *vec;
jsdouble d;

* and asks each entry for its key when necessary via a getKey callback, used
/* A native file that is already open */
* Alternatively, the contents of this file may be used under the

cg->tryNoteSpace = size + incr;


fun = js_NewFunction(cx, proto, NULL, 0, 0, obj, atom);
*/

return OBJ_DEFAULT_VALUE(cx, proto, hint, vp);

JS_MaybeGC(cx);
: "unknown";
*

JSLL_MUL(dstLocalBaseMicroseconds, oneMillion, startupTimeMicroSeconds);

: NULL,
if (!nd) {
{"indexOf", str_indexOf, 2,0,0},

float a;

scope = OBJ_SCOPE(obj);

lval, cs->token, rval);

}
extern const char js_EvalError_str[];
return 0;

break;
js_NewSrcNote(JSContext *cx, JSCodeGenerator *cg, JSSrcNoteType type)

uintN lastIndex; /* index after last match, for //g iterator */


*
/* Return the current local time in micro-seconds */

* Copyright (C) 1998 Netscape Communications Corporation. All


break;
JSVAL_TO_OBJECT(OBJ_GET_SLOT(cx, obj, JSSLOT_PROTO))
case 'S':
#endif
jsval *rval);
if (!js_ValueToObject(cx, argv[1], &scopeobj))

if (!JSVAL_IS_PRIMITIVE(val) &&

mhi = pow5mult(mhi, m5);

if (!proto)
opt = NULL;

js_CheckRedeclaration(JSContext *cx, JSObject *obj, jsid id, uintN attrs,

dest = RESOLVE_PATH(cx, JS_GetStringBytes(JS_ValueToString(cx, argv[0])));

}
if (!js_EmitTree(cx, cg, pn->pn_kid3))
static JSBool

40, 40, 40, 40, 40, 40, 40, 40, /* 29 */

JS_PUBLIC_API(JSBool)

if (TimeFromYear(temp) > t) {
{InitFunctionAndObjectClasses, ATOM_OFFSET(Function)},

return state->complete;
#endif
46, 46, 46, 46, 40, 40, 40, 40, /* 49 */
*
#include "jsarray.h"

current = path;
*sp++ = argv[i];

ch = (((((JS7_UNHEX(chars[i + 1]) << 4)

case JSOP_FORNAME:

*/

#if JS_HAS_SWITCH_STATEMENT

* are stored in big endian`s way.


}
if (((cp == state->cpbegin) || !JS_ISWORD(cp[-1]))

* of deadlock because the GC doesn't set rt->gcRunning until after it has

/*
(r).hi = (a) << ((b) & 31); \

#define JS_BITS_PER_INT_LOG2 5L
cmp = 0;

if (kidMatch == NULL) {

eps = 0.5/tens[ilim-1] - eps;

extern double fd_cos __P((double));


}

/* Compute the unique int/atom symbol id needed by js_LookupProperty. */

{js_toString_str, bool_toString, 0,0,0},

return JS_TRUE;
jsdouble *date;
0x33A70001, /* 30 Lu, hasLower (add 206), identifier start */
len = JS_LINE_LIMIT - 1;

}
116, 116, 116, 116, 116, 116, 116, 116, /* 82 */
step = next;
} elsif ($ARGV[0] eq "-outdir") {
#endif /* JSplhash_h___ */
* identified by the format {N}, where N is a decimal digit. Each of these
return JS_TRUE;
if (JS7_ISHEX(c)) {
ts->linepos = 0;
/*

return JS_FALSE;

}
c = (jschar)JS_TOUPPER(c);
*

match = (lval == rval);


js_DestroyPrinter(jp);

extern JSBool

if (scope->object == obj) {

return js_NewNumberValue(cx, result, rval);

obj = js_NewObject(cx, &js_CallClass, NULL, NULL);

#define TCF_FUN_FLAGS 0xE0 /* flags to propagate from FunctionBody */

if (fun->object == obj)
return JS_FALSE;

JS_ASSERT(0);

JSString *astr, *bstr;


if (js_Emit1(cx, cg, JSOP_PUSHOBJ) < 0)

JSHashTable *table = (JSHashTable *) scope->data;


JSLL_MaxInt(void);

} else {

* and other provisions required by the GPL. If you do not delete

* Alternatively, the contents of this file may be used under the


#include "jstypes.h"

static int mtab[] = {

#endif
JSAtomList decls; /* function, const, and var declarations */
/* Emit JSOP_GOTO that points to the first op after the catch/finally blocks */

length += delta;
#include <string.h>
JS_ASSERT(b->wds <= n);

** architectures and even different compilers have varying support for

JS_GetStringChars(JSString *str);
} else {
return oldopts;
static const char js_call_str[] = "call";
}

} JSXDRMode;
typedef uint32 JSHashNumber;

0xFDE70001, /* 96 Lu, hasLower (add -9), identifier start */


#include "jscntxt.h"

return JS_FALSE;

break;

? (JSPropertyOp) obj

js_exists(JSContext *cx, JSFile *file)


static uint32

getter = (JSPropertyOp) JSVAL_TO_OBJECT(rval);


#define JSXDR_MAGIC_SCRIPT_1 0xdead0001
*
* License Version 1.1 (the "License"); you may not use this file

for (i = 0; standard_class_atoms[i].init; i++) {


40, 40, 40, 40, 40, 40, 40, 40, /* 120 */
if (!js_DefineProperty(cx, obj, symid, value, getter, setter, attrs,

if (!js_ValueToNumber(cx, argv[i], &x))


align_of_int64 = PR_ALIGN_OF_INT64;

*/

}
jschar *chars;
JSParseNode *left, *right;

* if the initial code segment can't be allocated.


*/
JSString *str, *str2, *str3;
JSCList links;

return fp->thisp;
#define LOCKED_OBJ_SET_SLOT(obj,slot,value) \
js_ReportIsNotDefined(cx, name);

{
# define JS_RUNTIME_UNMETER(rt, which) /* nothing */
OPDEF(JSOP_UINT16, 88, "uint16", NULL, 3, 0, 1, 12, JOF_UINT16)
/*

len = PTRDIFF(end, begin, jsbytecode);

EMIT_ATOM_INDEX_OP(JSOP_SETSP, (jsatomid)depth);
MSG_DEF(JSMSG_BAD_GETTER_OR_SETTER, 151, 1, JSEXN_SYNTAXERR, "invalid {0} usage")

}
obj = JSVAL_TO_OBJECT(v);
cg->stackDepth -= nuses;
*propp = prop;

const char *filename, uintN lineno)

tagify(JSContext *cx, JSObject *obj, jsval *argv,

*/
OPDEF(JSOP_PUSHOBJ, 57, "pushobj", NULL, 1, 0, 1, 0, JOF_BYTE)
cs = &js_CodeSpec[lastop];

* same value as in 'closure' to cause the 'after' invocation to be called

fun = (JSFunction *) JS_GetPrivate(cx, obj);

JS_PUBLIC_API(void)
}
JSObject *obj;

JS_UNLOCK_GC(rt);
if (getter == js_GetArgument) {

#define PR_PostEvent PL_PostEvent


* We reset the buffer to be NULL so that it doesn't free the chars

JS_RegisterClass(JSXDRState *xdr, JSClass *clasp, uint32 *lp);


JS_EnumerateStub, JS_ResolveStub, JS_ConvertStub, JS_FinalizeStub,

return JS_FALSE;
#endif

extern const char js_set_str[];


if (JSVAL_IS_INT(id)) {
MUST_MATCH_TOKEN(TOK_LP, JSMSG_PAREN_BEFORE_SWITCH);

if (c == '*') {
*/

sepstr = NULL;

newchars[ni++] = '%';
*/

case REGEXP_STATIC_RIGHT_CONTEXT:
#else

typedef struct JSContext JSContext;

/*
static uint32 maxparsenodes = 0;

/* embedded newlines -- argh! */

struct JSExceptionState {

y = (*bx & 0xffff) - (ys & 0xffff) - borrow;

if (k + 3 * (n - 1) >= length)
default:;

s = buf;
#endif
if (!js_SetJumpOffset(cx, cg, pc, off))

} else { \

JS_ASSERT(ATOM_IS_OBJECT(atom));
** OUTPUTS: the referenced object is returned to the heap

* TOK_AND binary pn_left: first in && chain, pn_right: rest of chain


#if JS_HAS_EXCEPTIONS

break;

return js_NewNumberValue(cx, *date, rval);


end += begin;

*vp = BOOLEAN_TO_JSVAL((re->flags & JSREG_GLOB) != 0);

#define INT64 UnsignedWide


/* Allocate space for s, including the '\0' at the end. */

CHECK_REQUEST(cx);
switch (slot) {
#define FETCH_UINT(cx, n, ui) \

*
if (hook &&
{"trap", Trap, 3},

JSSCRIPT_FIND_CATCH_START(script, pc, pc);

JSString *

#include "jsstddef.h"
#include "jslock.h"
static JSParseNode *

#elif defined(WIN16)

extern JS_PUBLIC_API(JSBool)
} \

do_replace(cx, &rdata, chars + leftlen);


*/

* Contributor(s):
if (nb > pool->stats.maxalloc)
ReplaceData *rdata;

***********************************************************************/

typedef intN (* JS_DLL_CALLBACK JSHashEnumerator)(JSHashEntry *he, intN i, void


*arg);

const char *bytes, uintN length,


#endif
char buffer[4096];

* even a concatenation of alternatives followed by non-alternatives (e.g.

JSLL_SHL(tmp2, tmp, 54);


goto out;
return TOK_ERROR;
*/

jsval old, jsval *newp, void *closure);

JS_ARENA_ALLOCATE_CAST(cp, jschar *, &cx->tempPool,


/* Flag the error report passed in to indicate an exception was raised. */
MSG_DEF(JSMSG_BAD_CONTINUE, 123, 0, JSEXN_SYNTAXERR, "invalid continue")
case CALL_ARGUMENTS:

Variables(JSContext *cx, JSTokenStream *ts, JSTreeContext *tc)

#ifndef Sudden_Underflow

* the provisions above, a recipient may use your version of this


*/

if (!jsdsrc) {
* provisions of the GPL are applicable instead of those above.
* to unsigned int; is qsort using -1 as a fencepost?
report.flags = JSREPORT_ERROR;

) {

*/
* provisions of the GPL are applicable instead of those above.

break;

uint32 i = GLOBAL_LOCK_INDEX(id);

}
extern JS_PUBLIC_API(char*) JS_vsprintf_append(char *last, const char *fmt, va_list
ap);
* indicates that ClearContextThread has been called on this context
day = MakeDay(year, month, day); /* day within year */
/************************************************************************/
* UTC
js_GC(JSContext *cx, uintN gcflags)
}
return $replacement;

* Communications Corporation. Portions created by Netscape are

#error 'sizeof(int)' not sufficient for platform use

#define THREE_OCTET_BASE 0xE0 /* 1110xxxx */

JS_ReportErrorNumber(cx, JSFile_GetErrorMessage, NULL,


JSHashEntry *todo = NULL;
* License Version 1.1 (the "License"); you may not use this file

chars[nchars++] = '[';

** This assert will catch overflow's of fout, when building with

40, 40, 40, 40, 40, 40, 40, 40, /* 52 */

c = JS_TOUPPER(c);
56, 56, 56, 56, 56, 56, 56, 56, /* 0x7A00 */
/* Make the prototype for the current constructor name. */
/*

#include "jsprvtd.h"
} else {

if (chars[k] != '%')

* implied. See the License for the specific language governing

c = Balloc(k);
* The contents of this file are subject to the Netscape Public

map->formatter = formatter;
*
case TOK_SWITCH:

? (void) LOCKED_OBJ_SET_SLOT(obj, slot, value) \


{
boolean_class.name,
fprintf(fp, " maximum mark recursion depth: %lu\n", rt->gcStats.maxdepth);

#define JS_REMOVE_LINK(_e) \

else

rt->sourceHandlerData = closure;
goto bad;

js_strlen(const jschar *s);

/*
flagp += GC_PAGE_SIZE >> (GC_THINGS_SHIFT - GC_PAGE_SHIFT);

goto error;

** "append" sprintf into a malloc'd buffer. "last" is the last value of

(1 << JSCT_DECIMAL_DIGIT_NUMBER)) \

* If you wish to allow use of your version of this file only

prtm->tm_sec = (JSInt8)seconds;

/* Sample a la java.lang.String.hash(). */
* IS" basis, WITHOUT WARRANTY OF ANY KIND, either express oqr

if (null) {
re->flags = flags;

/*

pn2 = pn2->pn_next;
} JSFatLockTable;
if (mode == JSXDR_ENCODE) {

return ren;
JSObject **objp);
JSScript *script;

*/

JSFILEMSG_SECOND_ARGUMENT_OPEN_NOT_STRING_ERROR, argv[1]);

lineno++;

}
{"help", Help, 0},
if (cache->empty)

num = JS7_UNHEX(c);

if (m5 >= j)
}
vector = (JSAtom **) JS_malloc(cx, (size_t) count * sizeof *vector);
: js_var_str,

* provisions of the GPL are applicable instead of those above.


JSDHashEntryHdr *to)

} else {

}
** JS_EXPORT_API( void ) DoWhatIMean( void ) { return; }

bad:
printf("\n");

lastop = op;

* provisions of the GPL are applicable instead of those above.


case JSOP_TABLESWITCH:
goto out;

/*

#include "jsstr.h"

(* CRT_CALL JSArgumentFormatter)(JSContext *cx, const char *format,


/* non-destructive, permissive defaults. */
{

*/
#endif
case UTF8:
str = js_ValueToString(cx, argv[0]);

return scope;

* value when popping scopes while returning from catch blocks.

if(!file->hasRandomAccess){

JSREPORT_WARNING | JSREPORT_STRICT,
* compiled scripts get depth slots for generating pc's allocated
return -1;

*/
if (!js_EmitTree(cx, cg, pn2))
int32 mask, type;
#if defined(XP_UNIX) || defined(XP_OS2)

}
JS_BEGIN_MACRO \
JSMSG_BAD_GETTER_OR_SETTER,
if (argc > 2) {
if (index == str->length)
if (!table) {
}

!js_AllocTryNotes(cx, (JSCodeGenerator *)tc) ||

* Communications Corporation. Portions created by Netscape are


while (cx->requestDepth != 0)
jsval key;

JS_RELEASE_LOCK(arena_freelist_lock);

if (MatchChar(ts, '/')) {
}
* to determine k = floor(log10(d)). We scale relevant
#define MAX_PATH_LENGTH 1024
if (js_NewSrcNote(cx, cg, SRC_COND) < 0)

* call to this function when enum_op was JSENUMERATE_INIT.

jp->indent -= 4;

JSAtomListElement *label);

switch (*cp) {
#ifdef LAZY_STANDARD_CLASSES
jsval *sp;
b->x[0] = y9;

#else

#endif
/* Pop and test the loop condition generated by JSOP_FOR*. */

JS_PUBLIC_API(JSBool)

}
* Rights Reserved.

case JSOP_INCVAR:

if (MatchChar(ts, c)) {
js_ReportCompileErrorNumber(JSContext *cx, JSTokenStream *ts,
if (he->keyHash == keyHash && (*ht->keyCompare)(key, he->key)) {

while ((acx = js_ContextIterator(rt, &iter)) != NULL) {


* If we claim ownership, return true. Otherwise, we wait for ownercx to be

/*

JS_UNLOCK_OBJ(cx, proto);

if(!(dir = PR_OpenDir(file->path))){

if (high < i)
JS_END_EXTERN_C

break;

uintN nargs, uintN attrs);


}

102, 102, 103, 103, 96, 11, 11, 46, /* 66 */


if (goodnext)
/* If we didn't already match TOK_COMMA in above case. */

atom = js_Atomize(cx, name, strlen(name), 0);

* IS" basis, WITHOUT WARRANTY OF ANY KIND, either express oqr


ok = DecompileSwitch(ss, table, (uintN)npairs, pc, len, off,

k += 8;

case JSOP_TYPEOF:
#define SET_ENUMERATE_ATTR(sprop) ((void)0)
if (cx->fp && (tmp = cx->fp->scopeChain) != NULL) {
}
static struct exnname { char *name; char *exception; } errortoexnname[] = {
JSFunction *fun;
!JS_XDRUint8(xdr, &flags)) {

? JSXDR_FUNCONST

/*
JSInt64 low;

out:

*
return JS_FALSE;

return JS_FALSE;

"{0} is not a member of the {1} family")

jsdouble *date = date_getProlog(cx, obj, NULL);

56, 56, 56, 56, 56, 56, 56, 56, /* 0x8000 */

* Type tags stored in the low bits of a jsval.

fun->extra = fs->extra;
CHECK_REQUEST(cx);

JS_BEGIN_MACRO \
if (!atom)

return JS_FALSE;
* the provisions above, a recipient may use your version of this
}
if (!js_ValueToECMAInt32(cx, argv[0], &base))

* JS lacks "list context", whereby in Perl one turns the single

JS_EnumerateStub, JS_ResolveStub, JS_ConvertStub, script_finalize,


if (SPROP_HAS_VALID_SLOT(sprop))

if (mlo && mlo != mhi)


js_canRead(JSContext *cx, JSFile *file)
JSFunction *fun;
ok = JS_TRUE;

str = js_ValueToString(cx, OBJECT_TO_JSVAL(obj));


}
{
;
}

n = (((((JS7_UNHEX(cp[0]) << 4)
/*

if (!AddToTokenBuf(cx, &ts->tokenbuf, (jschar)c))

* #n={...} produces TOK_DEFSHARP at head of list


chars = js_InflateString(cx, bytes, length);
nbytes += (sn - notes + 1) * sizeof *sn;

while (dp) {
}

15, 15, 15, 15, 15, 15, 15, 15, /* 84 */

va_list ap;

if(!file->isOpen){ \
}

register ULong x = *y;

enumerate = clasp->enumerate;

flags |= JSREG_MULTILINE;
(*(qp) = ((JSUint64)(a) / (b)), \
proto = parent = NULL;
align_of_pointer = PR_ALIGN_OF_POINTER;
/* Braindamaged rhs -- just return the old value */
* [[HasInstance]] internal method for Function objects: fetch the .prototype

GC_POKE(cx, JSVAL_NULL); /* XXX second arg ignored */\


#include "jsutil.h" /* Added by JSIFY */

/* -*- Mode: C; tab-width: 8; indent-tabs-mode: nil; c-basic-offset: 4 -*-

return JS_FALSE;

break;
q++;
#include "jsarena.h" /* Added by JSIFY */

* deleting the provisions above and replace them with the notice
*/

default:
}

value = ATOM_KEY(ALE_ATOM(ale));

SecFromTime(local),

} else {
#define __P(p) p
break;
return NULL;

* Used to iterate through the JS stack frames to extract

FETCH_NUMBER(cx, -1, d);

rt->callHookData = closure;

/* JSTokenStream flags */

JS_snprintf(buf, sizeof buf, js_NaN_date_str);

46, 40, 40, 40, 40, 40, 40, 40, /* 24 */

"prtypes_h___",
*/
cp += len;

}
JS_DestroyContextNoGC(JSContext *cx);

* rights and limitations under the License.

JS_ASSERT(sizeof(JSGCThing) >= sizeof(JSString));

JSAtom *atom;
)) {
switch (op) {
switch (c) {
goto enum_next_property;

case 'I':
return file;

} else {
if (op2 != JSOP_GROUP)

* Sweep phase.

if (c == 'e' || c == 'E') {
break;

b5 = 0;
JSArena *a;

JS_CompactArenaPool(JSArenaPool *pool)
/*

* deleting the provisions above and replace them with the notice

#define JSLL_L2I(i, l) ((i) = (JSInt32)(l))

if (JSDOUBLE_IS_NaN(local))

JSPrincipals *principals,

newEntry->keyHash = oldEntry->keyHash;
return NULL;
}
keyHash = js_hash_id(key);
for (;;) {
}

if (stats == &pool->stats) {

* Atomic increment and decrement for a reference counter, given jsrefcount *p.

pn2 = NewParseNode(cx, &CURRENT_TOKEN(ts), PN_NAME, tc);

*s = '\0';

return JS_TRUE;

* (not a reference to it). This bytecode sets the virtual machine's

/* Set loop and enclosing label update offsets, for continue. */

JSObject *proto;

{
case UTF8:
* active requests to end, so that new requests that try to JS_AddRoot,
FunctionBody(JSContext *cx, JSTokenStream *ts, JSFunction *fun,
JSNewObjectMapOp newObjectMap;

raw[i] = JSXDR_SWAB16(chars[i]);

DropWatchPoint(cx, wp);

str_bold(JSContext *cx, JSObject *obj, uintN argc, jsval *argv, jsval *rval)

* been set.
}

#error "Endianess not defined."

}
if (id == ATOM_KEY(cx->runtime->atomState.lengthAtom))
char pattern[20];

#error "This file is supposed to be auto-generated on UNIX platforms, but the"

extern JSClass js_RegExpClass;


return NULL;

cx->jsop_ne = JSOP_NEW_NE;

JSPROP_READONLY

break;

* set the former here in fun_resolve, but eagerly define the latter
obj = fp->sharpArray;
23, 24, 23, 24, 23, 24, 23, 24, /* 60 */
JS_PUBLIC_API(JSBool)

JSMSG_MISSING_PAREN, ocp);

JS_PUBLIC_API(uint32)

if (argc < 2)
return JS_FALSE;

} else {

break;

* requests are inactive. NB: if cx->thread is 0, then cx is not using

}
/* Return the absolute difference between x and the adjacent greater-magnitude
double number (ignoring exponent overflows). */

SRC_VAR = 6, /* JSOP_NAME/SETNAME/FORNAME in a var decl */


/*
if (JS7_ISHEX(c)) {
*/
* terms of the GNU Public License (the "GPL"), in which case the
#define JS_EXTERN_DATA(__type) extern __type _export

122, 122, 122, 122, 122, 122, 122, 122, /* 104 */


#define _SPACED 0x4
13, 13, 13, 5, 7, 6, 7, 0, /* 1 */

return JS_TRUE;
utf8_to_ucs2_char(const unsigned char *utf8p, int16 buflen, uint16 *ucs2p)
} else {

jsuint i;
word0(rv) = 1;

FROB(ScriptAtom, js_Script_str);

digit = divrem(b, base);


JSPRHashEntry **buckets; /* vector of hash buckets */
free(cstr);

* If you wish to allow use of your version of this file only


if (!AddToTokenBuf(cx, &ts->tokenbuf, (jschar)c))

* JS number type and wrapper class.


js_printf(jp, "\tfor (%s;", rval);

uintN temp = (uintN) js_GetSrcNoteOffset(sn, 0);

fprintf(stderr,

#define MAP_CHECK_SLOT(map,slot) \
* for a terminating 0. Mark cx->tempPool for later release, to free

char *comma, *equal, *current;

static void js_Dequeue(JSThinLock *);


STORE_NUMBER(cx, -1, d);
const jschar *cp);
* the provisions above, a recipient may use your version of this

*/
jsval v;
if (!js_ValueToNumber(cx, argv[0], &x))
static JSBool
} else {

case TOK_NUMBER:
: js_type_str[hint]);

jsval fval;

* return false, causing a goto out2 with ok set to false. Also set
len++;

typedef unsigned long JSUptrdiff;

js_PopStatementCG(cx, cg);
};
}

/*

cx = xdr->cx;

* rt->setSlotLock < pobj's grand-proto-or-parent's scope lock;


#define JS_NOTIFY_CONDVAR(cv) PR_NotifyCondVar(cv)

for (; a; a = next) {

rval = POP_OPND();
JSBool *foundp);

case 2:
js_GetErrorMessage(void *userRef, const char *locale, const uintN errorNumber)

#ifdef XP_UNIX
size_t n;

#define JS_HAS_REPLACE_LAMBDA 1 /* has string.replace(re, lambda) */


parent = cx->fp->scopeChain;

}
uint32 entrySize; /* number of bytes in an entry */
"january", "february", "march", "april", "may", "june",

if (digits == 0) {
JS_GetStringBytes(str));

js_RemoveRoot(cx->runtime, &mdata.arrayobj);

static JSBool

funobj = fun->object;

argv[0] = STRING_TO_JSVAL(str2);

case TYPE_UINT64:

newifp->frame.argv = vp + 2;
uint32 start = (ptrdiff_t) tn->start,

static unsigned long gJanuaryFirst1970Seconds;

#define fd_sin sin


case TOK_IF:

MSG_DEF(JSMSG_CURLY_BEFORE_CATCH, 94, 0, JSEXN_SYNTAXERR, "missing { before


catch block")
L = (Long)d;

if (rv < 0) {

strcpy(bufp, line);
chars[i] = JSXDR_SWAB16(chars[i]);
* final GC and then free atom state.

#include "jsstr.h"
RecycleTree(pn->pn_expr, tc);

(*rval == '{') ? '}' : ']');

JSObject *object; /* back-pointer to GC'ed object header */


59, 40, 40, 40, 40, 40, 40, 40, /* 25 */

{
* When used, the private pool is PRIVATE_MEM bytes long: 2000 bytes,
return JSVERSION_UNKNOWN;

s = str->chars;
if (argc == 0) {
OBJ_DROP_PROPERTY(cx, pobj, prop);
ts->flags &= ~TSF_REGEXP;
JS_XDRMemSetData(JSXDRState *xdr, void *data, uint32 len);

JSObject *parent;

return ok;

if (d < 0)

(r).hi = ~(a).hi)

ok = JS_FALSE;

return JS_FALSE;
ss->maxlen += len;

sn = js_GetSrcNote(jp->script, pc);

if (JSDOUBLE_IS_INT(d, i) && INT_FITS_IN_JSVAL(i)) {

if (!ok) \

int hour = -1;

* implied. See the License for the specific language governing


{

**** Start of jslock.c ****


#endif
JS_SetErrorReporter(cx, older);
break;

default:

77, 77, 77, 77, 77, 77, 77, 16, /* 22 */


return JS_FALSE;

JS_ASSERT(0);
if (u.l < 0) {
* splitting the cost of compilation evenly among the
scopes and

*vp = STRING_TO_JSVAL(str);
* under the terms of the GPL and not to allow others to use your

continue;

JS_snprintf(buf, sizeof buf, "#%u%c", n, c);


js_printf(jp, ") {\n");

#endif /* !JS_DOUBLE_HASHING */
if (spec_case) {
/* adjust 2-digit years into the 20th century */
* JSOP_OR converts the operand on the stack to boolean, and if true,
}

void *listenerTSData;/* listener data for this TokenStream */


report.filename = ts->filename;
/* NB: call OBJ_DROP_PROPERTY, as pobj might not be native. */
}
* deleting the provisions above and replace them with the notice
}
break;
* Rights Reserved.

k += 4;

#else /* this must be .EXE */


minutes,

} else { \

JSTrap *trap;

#include "jsdjava.h"
FILE_SIZE = -16,

if (!pn)
* wait bit is not set).
#define JS_ISIDENT(c) (JS_ISID_PART(c) || (c) == '_' || (c) == '$')
script = ValueToScript(cx, argv[i]);

}
/*

}
#include <stdlib.h>

return JS_TRUE;

if (JSVAL_IS_STRING(v)) {
base = 10;
* Alternatively, the contents of this file may be used under the
id = ida->vector[i];

}
uint8 spare[3];
if (pc[cond] == JSOP_IFEQ) {
#if defined XP_PC && defined _MSC_VER &&_MSC_VER <= 800
*
* call object from fp.
return ok;

OPDEF(JSOP_SETCALL, 132, "setcall", NULL, 3, -1, 2, 11, JOF_UINT16|


JOF_SET)
RecycleTree(pn->pn_kid, tc);

static JSHashNumber gc_hash_root(const void *key);


if (offset <= target)

JSScopeProperty **propp)

if (!(ok = (*onbranch)(cx, script))) \


* If you wish to allow use of your version of this file only

case JSOP_DEFLOCALFUN:
break;
* We may have overallocated stack due to a multi-character format code

if (pn && js_MatchToken(cx, ts, TOK_OR))

* The contents of this file are subject to the Netscape Public

JS_ReportWarning(cx, "Can't open directory %s", file-


>path);
js_EnterSharpObject(JSContext *cx, JSObject *obj, JSIdArray **idap,

GC_MARK(cx,
rval = FETCH_OPND(-1); \

JSTryNote *tn = &script->trynotes[numtrys - 1];

JSREPORT_WARNING|JSREPORT_STRICT,
ok = OBJ_DELETE_PROPERTY(cx, obj, id, &rval);
static JSBool

46, 46, 46, 46, 46, 46, 46, 46, /* 72 */

if (!ale ||
/* Preserve legacy API behavior of returning 0 for invalid dates. */
JSAtom *atom = (JSAtom *)he;
jsuword avail; /* points to next available byte */
#define JSVAL_TAG(v) ((v) & JSVAL_TAGMASK)

str = JSVAL_TO_STRING(lval); \

volatile int64 PR_t;

if (thisp && OBJ_GET_CLASS(cx, thisp) != &js_CallClass) {

JSString *str;

#define JS_ALIGN_OF_DOUBLE 4L
/* set to largest number */

JS_ValueToNumber(JSContext *cx, jsval v, jsdouble *dp)


}

/* popscope */

*
ptrdiff_t pn_offset; /* first generated bytecode offset */

* In the lambda case, not only do we find the replacement string's


str2 = JSVAL_TO_STRING(rval); \

int32 w;

return JS_EvaluateUCScriptForPrincipals(cx, obj, NULL, chars, length,


uintN argc;

"PR_HashTableRawRemove",
{

((JSClass *)JSVAL_TO_PRIVATE(OBJ_GET_SLOT(cx, obj, JSSLOT_CLASS)))

JS_PUBLIC_API(JSBool)

getter = clasp->getProperty;
#endif
switch (format) {

* License Version 1.1 (the "License"); you may not use this file
if (fp && fp->down && fp->down->script && fp->down->pc) {

ren->offset = gOffset++;
JSInt8 tm_hour; /* hour of day (0-23) */
}

jsdouble *date = date_getProlog(cx, obj, argv);

fprintf(fp, "alloc retries after running GC: %lu\n", rt->gcStats.retry);

*
JS_PUBLIC_API(JSBool)

propobj->slots[JSSLOT_PARENT] = OBJECT_TO_JSVAL(obj);

case JSOP_DECELEM:

17, 46, 46, 46, 17, 17, 17, 17, /* 68 */


#include "jslock.h"
**

return ok;

const jschar *cp;


*vp = js_name(cx, file);

}
(JSProperty **)&sprop)) {
{

JSProperty *prop;
return fp->annotation;
else

{ "close", file_close, 0},


if (literalize) {

size = BYTECODE_SIZE(PTRDIFF(limit, base, jsbytecode));

* except in compliance with the License. You may obtain a copy of

if (!OBJ_SET_PROPERTY(cx, obj, id2, &v))

/* empty the buffer */

#else /* !JS_HAS_GETTER_SETTER */

if (_negative) \

}
attrs |= JSPROP_READONLY;
uint8 overrides; /* bit-set of overridden Call properties */
* terms of the GNU Public License (the "GPL"), in which case the

#else

rval = FETCH_OPND(-1);

/* d is denormalized */
case 'E':
}

*/
}

"saturday", "sunday",
chars[i] = 0;

return JS_FALSE;

};

EMIT_ATOM_INDEX_OP(op, atomIndex);

tp->t_op = JSOP_DIV;

return JS_FALSE;
re = (JSRegExp*) JS_GetPrivate(xdr->cx, *objp);
if (!JSLL_GE_ZERO(u.ll)) {

if (reportp && reportp->errorNumber == JSMSG_UNCAUGHT_EXCEPTION)


state->parenCount = num + 1;

ss.func = func;

math_sqrt(JSContext *cx, JSObject *obj, uintN argc, jsval *argv, jsval *rval)
js_DestroyContext(cx, JS_NO_GC);

/*
return JS_FALSE;
JSGCThing *thing;

n1 = (n1 << lsh) | (n0 >> (32 - lsh));


logentry *entry;
flags = 0;

JSArena *next; /* next arena for this lifetime */


* TOK_HOOK ternary pn_kid1: cond, pn_kid2: then, pn_kid3: else
&& NGetTrapAddress(0xA28A, OSTrap) != NGetTrapAddress(_Unimplemented,
ToolTrap)

}
sn = js_GetSrcNote(jp->script, pc);

b5 = -k;

static JSBool

*vp = OBJECT_TO_JSVAL(argsobj);
fprintf(fp, " locks that hit stuck counts: %lu\n", rt->gcStats.stuck);
*
JSParseNode *kid3; /* else-part, default case, etc. */

case JSOP_LEAVEWITH:

/* The special case. Here we want to be within a quarter of the last


input

* Note that we test for PROTYPES_H, not JSOTYPES_H. This is to avoid

#elif defined(SOLARIS) && defined(sparc) && defined(ULTRA_SPARC)

*
#define word0(x) ((ULong *)&x)[0]

return older;
{js_toString_str, num_toString, 0,0,0},
pn2 = pn->pn_kid;

JSFILEMSG_OP_FAILED, "close", file->path);


JS_PUBLIC_API(JSBool)

const jschar *name, size_t namelen,

break;

JS_ASSERT(size > pool->arenasize);


}
* +--+-------+-------+-------+-------+-------+-------+-------+-------+-----+

uintN attrs, JSBool *foundp);


* need to follow the private slot to find fp.
extern JSHashNumber

* h A hexadecimal string, low nybble first.

* Alternatively, the contents of this file may be used under the


struct JSTokenStream {

{0,0,0,0,0}

obj->slots[i] = JSVAL_VOID;
u.s.hi = JSDOUBLE_HI32_EXPMASK | JSDOUBLE_HI32_MANTMASK;

/* New, infallible/transitive identity ops. */

(r).hi = _a.hi >> ((b) & 31); \


ts->listener = cx->runtime->sourceHandler;

return JS_FALSE;

60, 60, 60, 60, 46, 46, 46, 46, /* 53 */


* The Initial Developer of the Original Code is Netscape
break;
return trap->op;

if (*pc != JSOP_GROUP)

}
* under the terms of the GPL and not to allow others to use your
}
#endif /* INFNAN_CHECK */

JSBool

JSRTS_LAUNCHING,
#else

/*

#ifdef JS_ARENAMETER

if (!*objp)

* terms of the GNU Public License (the "GPL"), in which case the
goto out;
j = ilim - 1;
* Copyright (C) 1998 Netscape Communications Corporation. All

} else {

{
/ JS_BITS_PER_BYTE);

*vp = INT_TO_JSVAL((jsint) fp->argc);


*/

if (!js_DefineProperty(cx, fun->object,

case TOK_INC:

/* This is probably not a directory */


JSFile *file = JS_GetInstancePrivate(cx, obj, &file_class, NULL);

}
* be NULL.
date_getUTCFullYear(JSContext *cx, JSObject *obj, uintN argc, jsval *argv,

JS_PUBLIC_API(JSVersion)
&cg->atomList);
{

fprintf(fp, "Double hashing statistics:\n");


*/
* The character properties are currently encoded into 32 bits in the
break;

if (!js_EmitTree(cx, cg, pn->pn_left))

end = js_DoubleToInteger(d);
return JS_TRUE;

* compile-time expressions. Finally, it calls js_EmitTree (see jsemit.h) to


#else
chars[nchars++] = '}';

JSPrincipals *principals,
if ((rv = freelist[k]) != NULL)
* deleting the provisions above and replace them with the notice
}
ReportStatementTooLarge(JSContext *cx, JSCodeGenerator *cg)

VarPrefix(jssrcnote *sn)

#define JS_ATOMIC_DECREMENT(p) PR_AtomicDecrement((PRInt32 *)(p))

}
#include <stdlib.h> /* for free, called by JS_ARENA_DESTROY */
sprop->nrefs++;
void
*/
JS_ReportError(cx, "array