The source code to the JavaScript Interpreter supplied herewith has been changed as follows on or prior to August 1, 2003:

==== //depot/main/vendors/JavaScript_1_5/_DW/glue.cpp#3 (text) ====

142c142
< catch (CException &mfcEx) {
---
> catch (CException* mfcEx) {
150c150
< mfcEx.GetErrorMessage(buf + len, sizeof(buf) - len);
---
> mfcEx->GetErrorMessage(buf + len, sizeof(buf) - len);

==== //depot/main/vendors/JavaScript_1_5/jsapi.c#2 (text) ====

2832a2833,2847
> JS_PUBLIC_API(JSFunction *)
> JS_DefineUCFunction(JSContext *cx, JSObject *obj, const jschar *name, JSNative call,
> uintN nargs, uintN attrs)
> {
> JSAtom *atom;
> jsint namelen;
>
> CHECK_REQUEST(cx);
> namelen = js_strlen(name);
> atom = js_AtomizeChars(cx, name, namelen, 0);
> if (!atom)
> return NULL;
> return js_DefineFunction(cx, obj, atom, call, nargs, 0);
> }
>

==== //depot/main/vendors/JavaScript_1_5/jsapi.h#2 (text) ====

1025a1026,1029
> extern JS_PUBLIC_API(JSFunction *)
> JS_DefineUCFunction(JSContext *cx, JSObject *obj, const jschar *name, JSNative call,
> uintN nargs, uintN attrs);
>

 

==== //depot/main/vendors/JavaScript_1_5/DW_decls.h#2 (text) ====

35c35,37
< #pragma message( " NOT overriding js allocator " __FILE__ )
---
> // keckey 5/20/02 for flash we are not going to override the js allocator
> // ( at least for now ) so we don't want to see this warning...
> // #pragma message( " NOT overriding js allocator " __FILE__ )


==== //depot/main/vendors/JavaScript_1_5/_DW/JavaScript_1_5_DW.dsp#2 (text) ====

7c7
< CFG=JavaScript_1_5 - Win32 FlashDebug
---
> CFG=JavaScript_1_5 - Win32 Debug
16c16
< !MESSAGE NMAKE /f "JavaScript_1_5_DW.mak" CFG="JavaScript_1_5 - Win32 FlashDebug"
---
> !MESSAGE NMAKE /f "JavaScript_1_5_DW.mak" CFG="JavaScript_1_5 - Win32 Debug"
24,25c24,25
< !MESSAGE "JavaScript_1_5 - Win32 FlashDebug" (based on "Win32 (x86) Static Library")
< !MESSAGE "JavaScript_1_5 - Win32 FlashRelease" (based on "Win32 (x86) Static Library")
---
> !MESSAGE "JavaScript_1_5 - Win32 Debug" (based on "Win32 (x86) Static Library")
> !MESSAGE "JavaScript_1_5 - Win32 Release" (based on "Win32 (x86) Static Library")
127c127
< !ELSEIF "$(CFG)" == "JavaScript_1_5 - Win32 FlashDebug"
---
> !ELSEIF "$(CFG)" == "JavaScript_1_5 - Win32 Debug"
131,132c131,132
< # PROP BASE Output_Dir "JavaScript_1_5___Win32_FlashDebug"
< # PROP BASE Intermediate_Dir "JavaScript_1_5___Win32_FlashDebug"
---
> # PROP BASE Output_Dir "JavaScript_1_5___Win32_Debug"
> # PROP BASE Intermediate_Dir "JavaScript_1_5___Win32_Debug"
136,137c136,137
< # PROP Output_Dir "JavaScript_1_5___Win32_FlashDebug"
< # PROP Intermediate_Dir "JavaScript_1_5___Win32_FlashDebug"
---
> # PROP Output_Dir "JavaScript_1_5___Win32_Debug"
> # PROP Intermediate_Dir "JavaScript_1_5___Win32_Debug"
139c139
< # ADD BASE CPP /nologo /MDd /W3 /GR /GX /Z7 /Od /Gf /Gy /I "..\liveconnect" /I "..\liveconnect\_jni" /I "..\\" /I "..\..\..\Source\Include" /I "..\..\jdk1.2.2\jni" /I "$(MSDevDir)\..\..\VC98\MFC\SRC" /D "_DEBUG" /D "_WINDOWS" /D "WIN32" /D "XP_PC" /D "_WIN32" /D "JSFILE" /D "BUILDING_JS32" /D "EXPORT_JS_API" /YX /FD /c
---
> # ADD BASE CPP /nologo /MTd /W3 /GR /GX /Z7 /Od /Gf /Gy /I "..\liveconnect" /I "..\liveconnect\_jni" /I "..\\" /I "..\..\..\Source\Include" /I "..\..\jdk1.2.2\jni" /I "$(MSDevDir)\..\..\VC98\MFC\SRC" /D "_DEBUG" /D "_WINDOWS" /D "WIN32" /D "XP_PC" /D "_WIN32" /D "JSFILE" /D "BUILDING_JS32" /D "EXPORT_JS_API" /YX /FD /c
150c150
< !ELSEIF "$(CFG)" == "JavaScript_1_5 - Win32 FlashRelease"
---
> !ELSEIF "$(CFG)" == "JavaScript_1_5 - Win32 Release"
154,155c154,155
< # PROP BASE Output_Dir "JavaScript_1_5___Win32_FlashRelease"
< # PROP BASE Intermediate_Dir "JavaScript_1_5___Win32_FlashRelease"
---
> # PROP BASE Output_Dir "JavaScript_1_5___Win32_Release"
> # PROP BASE Intermediate_Dir "JavaScript_1_5___Win32_Release"
159,160c159,160
< # PROP Output_Dir "JavaScript_1_5___Win32_FlashRelease"
< # PROP Intermediate_Dir "JavaScript_1_5___Win32_FlashRelease"
---
> # PROP Output_Dir "JavaScript_1_5___Win32_Release"
> # PROP Intermediate_Dir "JavaScript_1_5___Win32_Release"
162c162
< # ADD BASE CPP /nologo /G6 /MD /W3 /GR /GX /O2 /I "..\liveconnect" /I "..\liveconnect\_jni" /I "..\\" /I "..\..\..\Source\Include" /I "..\..\jdk1.2.2\jni" /I "$(MSDevDir)\..\..\VC98\MFC\SRC" /D "NDEBUG" /D "_WINDOWS" /D "WIN32" /D "XP_PC" /D "_WIN32" /D "JSFILE" /D "BUILDING_JS32" /D "EXPORT_JS_API" /YX /FD /c
---
> # ADD BASE CPP /nologo /G6 /MT /W3 /GR /GX /O2 /I "..\liveconnect" /I "..\liveconnect\_jni" /I "..\\" /I "..\..\..\Source\Include" /I "..\..\jdk1.2.2\jni" /I "$(MSDevDir)\..\..\VC98\MFC\SRC" /D "NDEBUG" /D "_WINDOWS" /D "WIN32" /D "XP_PC" /D "_WIN32" /D "JSFILE" /D "BUILDING_JS32" /D "EXPORT_JS_API" /YX /FD /c
181,182c181,182
< # Name "JavaScript_1_5 - Win32 FlashDebug"
< # Name "JavaScript_1_5 - Win32 FlashRelease"
---
> # Name "JavaScript_1_5 - Win32 Debug"
> # Name "JavaScript_1_5 - Win32 Release"
346c346
< !ELSEIF "$(CFG)" == "JavaScript_1_5 - Win32 FlashDebug"
---
> !ELSEIF "$(CFG)" == "JavaScript_1_5 - Win32 Debug"
347a348
> # PROP BASE Exclude_From_Build 1
350c351
< !ELSEIF "$(CFG)" == "JavaScript_1_5 - Win32 FlashRelease"
---
> !ELSEIF "$(CFG)" == "JavaScript_1_5 - Win32 Release"
351a353
> # PROP BASE Exclude_From_Build 1
369c371
< !ELSEIF "$(CFG)" == "JavaScript_1_5 - Win32 FlashDebug"
---
> !ELSEIF "$(CFG)" == "JavaScript_1_5 - Win32 Debug"
370a373
> # PROP BASE Exclude_From_Build 1
373c376
< !ELSEIF "$(CFG)" == "JavaScript_1_5 - Win32 FlashRelease"
---
> !ELSEIF "$(CFG)" == "JavaScript_1_5 - Win32 Release"
374a378
> # PROP BASE Exclude_From_Build 1
392c396
< !ELSEIF "$(CFG)" == "JavaScript_1_5 - Win32 FlashDebug"
---
> !ELSEIF "$(CFG)" == "JavaScript_1_5 - Win32 Debug"
393a398
> # PROP BASE Exclude_From_Build 1
396c401
< !ELSEIF "$(CFG)" == "JavaScript_1_5 - Win32 FlashRelease"
---
> !ELSEIF "$(CFG)" == "JavaScript_1_5 - Win32 Release"
397a403
> # PROP BASE Exclude_From_Build 1
415c421
< !ELSEIF "$(CFG)" == "JavaScript_1_5 - Win32 FlashDebug"
---
> !ELSEIF "$(CFG)" == "JavaScript_1_5 - Win32 Debug"
416a423
> # PROP BASE Exclude_From_Build 1
419c426
< !ELSEIF "$(CFG)" == "JavaScript_1_5 - Win32 FlashRelease"
---
> !ELSEIF "$(CFG)" == "JavaScript_1_5 - Win32 Release"
420a428
> # PROP BASE Exclude_From_Build 1
438c446
< !ELSEIF "$(CFG)" == "JavaScript_1_5 - Win32 FlashDebug"
---
> !ELSEIF "$(CFG)" == "JavaScript_1_5 - Win32 Debug"
439a448
> # PROP BASE Exclude_From_Build 1
442c451
< !ELSEIF "$(CFG)" == "JavaScript_1_5 - Win32 FlashRelease"
---
> !ELSEIF "$(CFG)" == "JavaScript_1_5 - Win32 Release"
443a453
> # PROP BASE Exclude_From_Build 1
461c471
< !ELSEIF "$(CFG)" == "JavaScript_1_5 - Win32 FlashDebug"
---
> !ELSEIF "$(CFG)" == "JavaScript_1_5 - Win32 Debug"
462a473
> # PROP BASE Exclude_From_Build 1
465c476
< !ELSEIF "$(CFG)" == "JavaScript_1_5 - Win32 FlashRelease"
---
> !ELSEIF "$(CFG)" == "JavaScript_1_5 - Win32 Release"
466a478
> # PROP BASE Exclude_From_Build 1
484c496
< !ELSEIF "$(CFG)" == "JavaScript_1_5 - Win32 FlashDebug"
---
> !ELSEIF "$(CFG)" == "JavaScript_1_5 - Win32 Debug"
485a498
> # PROP BASE Exclude_From_Build 1
488c501
< !ELSEIF "$(CFG)" == "JavaScript_1_5 - Win32 FlashRelease"
---
> !ELSEIF "$(CFG)" == "JavaScript_1_5 - Win32 Release"
489a503
> # PROP BASE Exclude_From_Build 1
507c521
< !ELSEIF "$(CFG)" == "JavaScript_1_5 - Win32 FlashDebug"
---
> !ELSEIF "$(CFG)" == "JavaScript_1_5 - Win32 Debug"
508a523
> # PROP BASE Exclude_From_Build 1
511c526
< !ELSEIF "$(CFG)" == "JavaScript_1_5 - Win32 FlashRelease"
---
> !ELSEIF "$(CFG)" == "JavaScript_1_5 - Win32 Release"
512a528
> # PROP BASE Exclude_From_Build 1
530c546
< !ELSEIF "$(CFG)" == "JavaScript_1_5 - Win32 FlashDebug"
---
> !ELSEIF "$(CFG)" == "JavaScript_1_5 - Win32 Debug"
531a548
> # PROP BASE Exclude_From_Build 1
534c551
< !ELSEIF "$(CFG)" == "JavaScript_1_5 - Win32 FlashRelease"
---
> !ELSEIF "$(CFG)" == "JavaScript_1_5 - Win32 Release"
535a553
> # PROP BASE Exclude_From_Build 1
553c571
< !ELSEIF "$(CFG)" == "JavaScript_1_5 - Win32 FlashDebug"
---
> !ELSEIF "$(CFG)" == "JavaScript_1_5 - Win32 Debug"
554a573
> # PROP BASE Exclude_From_Build 1
557c576
< !ELSEIF "$(CFG)" == "JavaScript_1_5 - Win32 FlashRelease"
---
> !ELSEIF "$(CFG)" == "JavaScript_1_5 - Win32 Release"
558a578
> # PROP BASE Exclude_From_Build 1
576c596
< !ELSEIF "$(CFG)" == "JavaScript_1_5 - Win32 FlashDebug"
---
> !ELSEIF "$(CFG)" == "JavaScript_1_5 - Win32 Debug"
577a598
> # PROP BASE Exclude_From_Build 1
580c601
< !ELSEIF "$(CFG)" == "JavaScript_1_5 - Win32 FlashRelease"
---
> !ELSEIF "$(CFG)" == "JavaScript_1_5 - Win32 Release"
581a603
> # PROP BASE Exclude_From_Build 1
599c621
< !ELSEIF "$(CFG)" == "JavaScript_1_5 - Win32 FlashDebug"
---
> !ELSEIF "$(CFG)" == "JavaScript_1_5 - Win32 Debug"
600a623
> # PROP BASE Exclude_From_Build 1
603c626
< !ELSEIF "$(CFG)" == "JavaScript_1_5 - Win32 FlashRelease"
---
> !ELSEIF "$(CFG)" == "JavaScript_1_5 - Win32 Release"
604a628
> # PROP BASE Exclude_From_Build 1
622c646
< !ELSEIF "$(CFG)" == "JavaScript_1_5 - Win32 FlashDebug"
---
> !ELSEIF "$(CFG)" == "JavaScript_1_5 - Win32 Debug"
623a648
> # PROP BASE Exclude_From_Build 1
626c651
< !ELSEIF "$(CFG)" == "JavaScript_1_5 - Win32 FlashRelease"
---
> !ELSEIF "$(CFG)" == "JavaScript_1_5 - Win32 Release"
627a653
> # PROP BASE Exclude_From_Build 1
645c671
< !ELSEIF "$(CFG)" == "JavaScript_1_5 - Win32 FlashDebug"
---
> !ELSEIF "$(CFG)" == "JavaScript_1_5 - Win32 Debug"
646a673
> # PROP BASE Exclude_From_Build 1
649c676
< !ELSEIF "$(CFG)" == "JavaScript_1_5 - Win32 FlashRelease"
---
> !ELSEIF "$(CFG)" == "JavaScript_1_5 - Win32 Release"
650a678
> # PROP BASE Exclude_From_Build 1
668c696
< !ELSEIF "$(CFG)" == "JavaScript_1_5 - Win32 FlashDebug"
---
> !ELSEIF "$(CFG)" == "JavaScript_1_5 - Win32 Debug"
669a698
> # PROP BASE Exclude_From_Build 1
672c701
< !ELSEIF "$(CFG)" == "JavaScript_1_5 - Win32 FlashRelease"
---
> !ELSEIF "$(CFG)" == "JavaScript_1_5 - Win32 Release"
673a703
> # PROP BASE Exclude_From_Build 1
691c721
< !ELSEIF "$(CFG)" == "JavaScript_1_5 - Win32 FlashDebug"
---
> !ELSEIF "$(CFG)" == "JavaScript_1_5 - Win32 Debug"
692a723
> # PROP BASE Exclude_From_Build 1
695c726
< !ELSEIF "$(CFG)" == "JavaScript_1_5 - Win32 FlashRelease"
---
> !ELSEIF "$(CFG)" == "JavaScript_1_5 - Win32 Release"
696a728
> # PROP BASE Exclude_From_Build 1
714c746
< !ELSEIF "$(CFG)" == "JavaScript_1_5 - Win32 FlashDebug"
---
> !ELSEIF "$(CFG)" == "JavaScript_1_5 - Win32 Debug"
715a748
> # PROP BASE Exclude_From_Build 1
718c751
< !ELSEIF "$(CFG)" == "JavaScript_1_5 - Win32 FlashRelease"
---
> !ELSEIF "$(CFG)" == "JavaScript_1_5 - Win32 Release"
719a753
> # PROP BASE Exclude_From_Build 1
737c771
< !ELSEIF "$(CFG)" == "JavaScript_1_5 - Win32 FlashDebug"
---
> !ELSEIF "$(CFG)" == "JavaScript_1_5 - Win32 Debug"
738a773
> # PROP BASE Exclude_From_Build 1
741c776
< !ELSEIF "$(CFG)" == "JavaScript_1_5 - Win32 FlashRelease"
---
> !ELSEIF "$(CFG)" == "JavaScript_1_5 - Win32 Release"
742a778
> # PROP BASE Exclude_From_Build 1
760c796
< !ELSEIF "$(CFG)" == "JavaScript_1_5 - Win32 FlashDebug"
---
> !ELSEIF "$(CFG)" == "JavaScript_1_5 - Win32 Debug"
761a798
> # PROP BASE Exclude_From_Build 1
764c801
< !ELSEIF "$(CFG)" == "JavaScript_1_5 - Win32 FlashRelease"
---
> !ELSEIF "$(CFG)" == "JavaScript_1_5 - Win32 Release"
765a803
> # PROP BASE Exclude_From_Build 1
783c821
< !ELSEIF "$(CFG)" == "JavaScript_1_5 - Win32 FlashDebug"
---
> !ELSEIF "$(CFG)" == "JavaScript_1_5 - Win32 Debug"
784a823
> # PROP BASE Exclude_From_Build 1
787c826
< !ELSEIF "$(CFG)" == "JavaScript_1_5 - Win32 FlashRelease"
---
> !ELSEIF "$(CFG)" == "JavaScript_1_5 - Win32 Release"
788a828
> # PROP BASE Exclude_From_Build 1

 


Adopted for Flash on June 12, 2002


Comparing files C:\DREAMWEAVER\THIRDPARTY\JAVASCRIPT_1_5\jsregexp.c and C:\TEMP\JAVASCRIPT15\JS\SRC\jsregexp.c

***** C:\DREAMWEAVER\THIRDPARTY\JAVASCRIPT_1_5\jsregexp.c
77: /* Dreamweaver DREAMWEAVER dw Ultradev ULTRADEV ud VELCRO
78: *
79: * This is a dreamweaver specific addition to the mozilla
80: * release of JS 1.5. Defining DREAMWEAVER_LIMIT_REG_EXP_RECURSION
81: * will limit regular expression matching to the number of levels
82: * defined by MAX_REG_EXP_MATCH_LEVEL. All changes are wrapped in this define.
83: */
84: #define DREAMWEAVER_LIMIT_REG_EXP_RECURSION
85: #ifdef DREAMWEAVER_LIMIT_REG_EXP_RECURSION
86: #define MAX_REG_EXP_MATCH_LEVEL 0x00FFFFFF
87: static int regExpMatchLevel;
88: #endif // DREAMWEAVER_LIMIT_REG_EXP_RECURSION

***** C:\DREAMWEAVER\THIRDPARTY\JAVASCRIPT_1_5\jsregexp.c
1762: #ifdef DREAMWEAVER_LIMIT_REG_EXP_RECURSION
1763:
1764: // jalbano 10-03-02: Fix 77754, 79274
1765: // Limit the recursion to avoid infinite loop
1766:
1767: if (++regExpMatchLevel > MAX_REG_EXP_MATCH_LEVEL)
1768: {
1769: state->ok = JS_FALSE;
1770: return NULL;
1771: }
1772:
1773: #endif // DREAMWEAVER_LIMIT_REG_EXP_RECURSION
***** C:\TEMP\JAVASCRIPT15\JS\SRC\jsregexp.c

***** C:\DREAMWEAVER\THIRDPARTY\JAVASCRIPT_1_5\jsregexp.c
2179: #ifdef DREAMWEAVER_LIMIT_REG_EXP_RECURSION
2180:
2181: // jalbano 10-03-02: Fix 77754, 79274
2182: // Limit the recursion to avoid infinite loop
2183:
2184: regExpMatchLevel = 0;
2185:
2186:#endif // DREAMWEAVER_LIMIT_REG_EXP_RECURSION
***** C:\TEMP\JAVASCRIPT15\JS\SRC\jsregexp.c


Comparing files C:\DREAMWEAVER\THIRDPARTY\JAVASCRIPT_1_5\DW_decls.h and C:\TEMP\JAVASCRIPT15\JS\SRC\DW_DECLS.H

FC: no differences encountered



Comparing files C:\DREAMWEAVER\THIRDPARTY\JAVASCRIPT_1_5\js.c and C:\TEMP\JAVASCRIPT15\JS\SRC\JS.C


***** C:\DREAMWEAVER\THIRDPARTY\JAVASCRIPT_1_5\js.c
37: */
38: #include "DW_decls.h"
39:
40: #include "jsstddef.h"
***** C:\TEMP\JAVASCRIPT15\JS\SRC\JS.C
37: */
38: #include "jsstddef.h"
*****


Comparing files C:\DREAMWEAVER\THIRDPARTY\JAVASCRIPT_1_5\jsapi.c and C:\TEMP\JAVASCRIPT15\JS\SRC\JSAPI.C


***** C:\DREAMWEAVER\THIRDPARTY\JAVASCRIPT_1_5\jsapi.c
37: */
38: #include "DW_decls.h"
39:
40: #include "jsstddef.h"
***** C:\TEMP\JAVASCRIPT15\JS\SRC\JSAPI.C
37: */
38: #include "jsstddef.h"
*****

***** C:\DREAMWEAVER\THIRDPARTY\JAVASCRIPT_1_5\jsapi.c
117:
118: // DREAMWEAVER added this function
119: JS_PUBLIC_API(JSBool)
120: JS_DoubleIsNaN(jsdouble n)
121: {
122: return JSDOUBLE_IS_NaN(n);
123: }
124:
125: static JSBool
***** C:\TEMP\JAVASCRIPT15\JS\SRC\JSAPI.C
115:
116: static JSBool
*****

***** C:\DREAMWEAVER\THIRDPARTY\JAVASCRIPT_1_5\jsapi.c
2177:
2178: /* DREAMWEAVER jschang, Macromedia - (formerly JS_AliasElement)
2179: * JS_AliasElementToProperty assigns the array element so that it is an
2180: * alias to the named property. I changed the name so that it is more
2181: * descriptive and because I needed to add the function
2182: * JS_AliasPropertyToElement.
2183: *
2184: * HACK snewman 3/22/01: this seems to be a function we added back in the JS
2185: * 1.2 days based on JS_AliasProperty -- I haven't checked with Jeff, but
2186: * the code looks similar to JS_AliasProperty. It had been copied without
2187: * modification into the JS1.5rc2 code. While updating to JS1.5rc3, I
2188: * looked to see if JS_AliasProperty had changed since JS1.2, and indeed
2189: * it has -- this code:
2190: *
2191: * JS_ReportError(cx, "can't alias %s to %s in class %s",
2192: * alias, name, OBJ_GET_CLASS(cx, obj2)->name);
2193: *
2194: * was changed to this:
2195: *
2196: * JS_ReportErrorNumber(cx, js_GetErrorMessage, NULL, JSMSG_CANT_ALIAS,
2197: * alias, name, OBJ_GET_CLASS(cx, obj2)->name);
2198: *
2199: * and this:
2200: *
2201: * scope = (JSScope *) obj->map;
2202: *
2203: * was changed to this:
2204: *
2205: * scope = OBJ_SCOPE(obj);
2206: *
2207: * I've applied the scope change here, and in JS_AliasPropertyToElement
2208: * (below). Probably the ReportError change should be made as well, but
2209: * this would require some research, and I doubt that it's important.
2210: * (Famous last words...)
2211: */
2212: JS_PUBLIC_API(JSBool)
2213: JS_AliasElementToProperty(JSContext *cx, JSObject *obj, const char *name, jsint alias)
2214: {
***** C:\TEMP\JAVASCRIPT15\JS\SRC\JSAPI.C
2168:
2169: static jsval
2170: LookupResult(JSContext *cx, JSObject *obj, JSObject *obj2, JSProperty *prop)
2171: {
2172: JSScopeProperty *sprop;
2173: jsval rval;
2174:
2175: if (!prop) {
2176: /* XXX bad API: no way to tell "not defined" from "void value" */
2177: return JSVAL_VOID;
2178: }
2179: if (OBJ_IS_NATIVE(obj2)) {
2180: /* Peek at the native property's slot value, without doing a Get. */
2181: sprop = (JSScopeProperty *)prop;
2182: rval = (SPROP_HAS_VALID_SLOT(sprop))
2183: ? LOCKED_OBJ_GET_SLOT(obj2, sprop->slot)
2184: : JSVAL_TRUE;
2185: } else {
2186: /* XXX bad API: no way to return "defined but value unknown" */
2187: rval = JSVAL_TRUE;
2188: }
2189: OBJ_DROP_PROPERTY(cx, obj2, prop);
2190: return rval;
2191: }
2192:
2193: static JSBool
2194: GetPropertyAttributes(JSContext *cx, JSObject *obj, JSAtom *atom,
2195: uintN *attrsp, JSBool *foundp)
2196: {
*****

***** C:\DREAMWEAVER\THIRDPARTY\JAVASCRIPT_1_5\jsapi.c
2216: JSProperty *prop;
2217: JSScope *scope;
2218: JSBool ok;
***** C:\TEMP\JAVASCRIPT15\JS\SRC\JSAPI.C
2198: JSProperty *prop;
2199: JSBool ok;
*****

***** C:\DREAMWEAVER\THIRDPARTY\JAVASCRIPT_1_5\jsapi.c
2219:
2220: CHECK_REQUEST(cx);
2221: /* XXXbe push this into jsobj.c or jsscope.c */
2222: if (!LookupProperty(cx, obj, name, &obj2, &prop))
2223: return JS_FALSE;
2224: if (!prop) {
2225: js_ReportIsNotDefined(cx, name);
2226: return JS_FALSE;
2227: }
2228: if (obj2 != obj || !OBJ_IS_NATIVE(obj2)) {
2229: OBJ_DROP_PROPERTY(cx, obj2, prop);
2230: JS_ReportError(cx, "can't alias array element %ld to %s in class %s",
2231: (long)alias, name, OBJ_GET_CLASS(cx, obj2)->name);
2232: return JS_FALSE;
2233: }
2234: scope = OBJ_SCOPE(obj);
2235: ok = (scope->ops->add(cx, scope, INT_TO_JSVAL(alias),
2236: (JSScopeProperty *)prop)
2237: != NULL);
2238: OBJ_DROP_PROPERTY(cx, obj, prop);
***** C:\TEMP\JAVASCRIPT15\JS\SRC\JSAPI.C
2200:
2201: if (!atom)
2202: return JS_FALSE;
2203: if (!OBJ_LOOKUP_PROPERTY(cx, obj, (jsid)atom, &obj2, &prop))
2204: return JS_FALSE;
2205: if (!prop || obj != obj2) {
2206: *foundp = JS_FALSE;
2207: if (prop)
2208: OBJ_DROP_PROPERTY(cx, obj2, prop);
2209: return JS_TRUE;
2210: }
2211:
2212: *foundp = JS_TRUE;
2213: ok = OBJ_GET_ATTRIBUTES(cx, obj, (jsid)atom, prop, attrsp);
2214: OBJ_DROP_PROPERTY(cx, obj, prop);
*****

***** C:\DREAMWEAVER\THIRDPARTY\JAVASCRIPT_1_5\jsapi.c
2241:
2242: /* DREAMWEAVER
2243: * jschang, Macromedia - (new function added 11/12/99 for OptionsArray setter function)
2244: * JS_AliasPropertyToElement assigns the named property so that it is an
2245: * alias to the specified array element.
2246: *
2247: * snewman 3/22/01: see comments for JS_AliasElementToProperty (above).
2248: */
2249: JS_PUBLIC_API(JSBool)
2250: JS_AliasPropertyToElement(JSContext *cx, JSObject *obj, jsint index, const char *alias)
2251: {
***** C:\TEMP\JAVASCRIPT15\JS\SRC\JSAPI.C
2217:
2218: static JSBool
2219: SetPropertyAttributes(JSContext *cx, JSObject *obj, JSAtom *atom,
2220: uintN attrs, JSBool *foundp)
2221: {
*****

***** C:\DREAMWEAVER\THIRDPARTY\JAVASCRIPT_1_5\jsapi.c
2253: JSProperty *prop;
2254: JSScope *scope;
2255: JSBool ok;
2256: JSAtom *atom;
2257:
2258: CHECK_REQUEST(cx);
2259: /* XXXbe push this into jsobj.c or jsscope.c */
2260: if (!OBJ_LOOKUP_PROPERTY(cx, obj, INT_TO_JSVAL(index), &obj2, &prop))
2261: return JS_FALSE;
2262: if (!prop) {
2263: JS_ReportError(cx, "array element %ld is not defined", (long)index);
2264: return JS_FALSE;
2265: }
2266: if (obj2 != obj || !OBJ_IS_NATIVE(obj2)) {
2267: OBJ_DROP_PROPERTY(cx, obj2, prop);
2268: JS_ReportError(cx, "can't alias %s to array element %ld in class %s",
2269: alias, (long)index, OBJ_GET_CLASS(cx, obj2)->name);
2270: return JS_FALSE;
2271: }
2272: scope = OBJ_SCOPE(obj);
2273: atom = js_Atomize(cx, alias, strlen(alias), 0);
2274: if (!atom) {
2275: ok = JS_FALSE;
2276: } else {
2277: scope = OBJ_SCOPE(obj);
2278: ok = (scope->ops->add(cx, scope, (jsid)atom, (JSScopeProperty *)prop)
2279: != NULL);
2280: }
2281: OBJ_DROP_PROPERTY(cx, obj, prop);
***** C:\TEMP\JAVASCRIPT15\JS\SRC\JSAPI.C
2223: JSProperty *prop;
2224: JSBool ok;
2225:
2226: if (!atom)
2227: return JS_FALSE;
2228: if (!OBJ_LOOKUP_PROPERTY(cx, obj, (jsid)atom, &obj2, &prop))
2229: return JS_FALSE;
2230: if (!prop || obj != obj2) {
2231: *foundp = JS_FALSE;
2232: if (prop)
2233: OBJ_DROP_PROPERTY(cx, obj2, prop);
2234: return JS_TRUE;
2235: }
2236:
2237: *foundp = JS_TRUE;
2238: ok = OBJ_SET_ATTRIBUTES(cx, obj, (jsid)atom, prop, &attrs);
2239: OBJ_DROP_PROPERTY(cx, obj, prop);
*****

***** C:\DREAMWEAVER\THIRDPARTY\JAVASCRIPT_1_5\jsapi.c
2284:
2285: static jsval
2286: LookupResult(JSContext *cx, JSObject *obj, JSObject *obj2, JSProperty *prop)
2287: {
2288: JSScopeProperty *sprop;
2289: jsval rval;
2290:
2291: if (!prop) {
2292: /* XXX bad API: no way to tell "not defined" from "void value" */
2293: return JSVAL_VOID;
2294: }
2295: if (OBJ_IS_NATIVE(obj2)) {
2296: /* Peek at the native property's slot value, without doing a Get. */
2297: sprop = (JSScopeProperty *)prop;
2298: rval = (SPROP_HAS_VALID_SLOT(sprop))
2299: ? LOCKED_OBJ_GET_SLOT(obj2, sprop->slot)
2300: : JSVAL_TRUE;
2301: } else {
2302: /* XXX bad API: no way to return "defined but value unknown" */
2303: rval = JSVAL_TRUE;
2304: }
2305: OBJ_DROP_PROPERTY(cx, obj2, prop);
2306: return rval;
2307: }
***** C:\TEMP\JAVASCRIPT15\JS\SRC\JSAPI.C
2242:
2243:
2244: JS_PUBLIC_API(JSBool)
2245: JS_GetPropertyAttributes(JSContext *cx, JSObject *obj, const char *name,
2246: uintN *attrsp, JSBool *foundp)
2247: {
2248: CHECK_REQUEST(cx);
2249: return GetPropertyAttributes(cx, obj,
2250: js_Atomize(cx, name, strlen(name), 0),
2251: attrsp, foundp);
2252: }
*****

***** C:\DREAMWEAVER\THIRDPARTY\JAVASCRIPT_1_5\jsapi.c
2308:
2309: static JSBool
2310: GetPropertyAttributes(JSContext *cx, JSObject *obj, JSAtom *atom,
2311: uintN *attrsp, JSBool *foundp)
2312: {
2313: JSObject *obj2;
***** C:\TEMP\JAVASCRIPT15\JS\SRC\JSAPI.C
2253:
2254: JS_PUBLIC_API(JSBool)
2255: JS_SetPropertyAttributes(JSContext *cx, JSObject *obj, const char *name,
2256: uintN attrs, JSBool *foundp)
2257: {
2258: CHECK_REQUEST(cx);
2259: return SetPropertyAttributes(cx, obj,
2260: js_Atomize(cx, name, strlen(name), 0),
2261: attrs, foundp);
2262: }
2263:
2264: JS_PUBLIC_API(JSBool)
2265: JS_LookupProperty(JSContext *cx, JSObject *obj, const char *name, jsval *vp)
2266: {
2267: JSBool ok;
2268: JSObject *obj2;
*****

***** C:\DREAMWEAVER\THIRDPARTY\JAVASCRIPT_1_5\jsapi.c
2314: JSProperty *prop;
2315: JSBool ok;
2316:
2317: if (!atom)
***** C:\TEMP\JAVASCRIPT15\JS\SRC\JSAPI.C
2269: JSProperty *prop;
2270:
2271: CHECK_REQUEST(cx);
2272: ok = LookupProperty(cx, obj, name, &obj2, &prop);
2273: if (ok)
2274: *vp = LookupResult(cx, obj, obj2, prop);
2275: return ok;
2276: }
2277:
2278: JS_PUBLIC_API(JSBool)
2279: JS_GetProperty(JSContext *cx, JSObject *obj, const char *name, jsval *vp)
2280: {
2281: JSAtom *atom;
2282:
2283: CHECK_REQUEST(cx);
2284: atom = js_Atomize(cx, name, strlen(name), 0);
2285: if (!atom)
*****

***** C:\DREAMWEAVER\THIRDPARTY\JAVASCRIPT_1_5\jsapi.c
2318: return JS_FALSE;
2319: if (!OBJ_LOOKUP_PROPERTY(cx, obj, (jsid)atom, &obj2, &prop))
2320: return JS_FALSE;
2321: if (!prop || obj != obj2) {
2322: *foundp = JS_FALSE;
2323: if (prop)
2324: OBJ_DROP_PROPERTY(cx, obj2, prop);
2325: return JS_TRUE;
2326: }
2327:
2328: *foundp = JS_TRUE;
2329: ok = OBJ_GET_ATTRIBUTES(cx, obj, (jsid)atom, prop, attrsp);
2330: OBJ_DROP_PROPERTY(cx, obj, prop);
2331: return ok;
2332: }
***** C:\TEMP\JAVASCRIPT15\JS\SRC\JSAPI.C
2286: return JS_FALSE;
2287: return OBJ_GET_PROPERTY(cx, obj, (jsid)atom, vp);
2288: }
*****

***** C:\DREAMWEAVER\THIRDPARTY\JAVASCRIPT_1_5\jsapi.c
2333:
2334: static JSBool
2335: SetPropertyAttributes(JSContext *cx, JSObject *obj, JSAtom *atom,
2336: uintN attrs, JSBool *foundp)
2337: {
2338: JSObject *obj2;
2339: JSProperty *prop;
2340: JSBool ok;
2341:
2342: if (!atom)
***** C:\TEMP\JAVASCRIPT15\JS\SRC\JSAPI.C
2289:
2290: JS_PUBLIC_API(JSBool)
2291: JS_SetProperty(JSContext *cx, JSObject *obj, const char *name, jsval *vp)
2292: {
2293: JSAtom *atom;
2294:
2295: CHECK_REQUEST(cx);
2296: atom = js_Atomize(cx, name, strlen(name), 0);
2297: if (!atom)
*****

***** C:\DREAMWEAVER\THIRDPARTY\JAVASCRIPT_1_5\jsapi.c
2343: return JS_FALSE;
2344: if (!OBJ_LOOKUP_PROPERTY(cx, obj, (jsid)atom, &obj2, &prop))
2345: return JS_FALSE;
2346: if (!prop || obj != obj2) {
2347: *foundp = JS_FALSE;
2348: if (prop)
2349: OBJ_DROP_PROPERTY(cx, obj2, prop);
2350: return JS_TRUE;
2351: }
2352:
2353: *foundp = JS_TRUE;
2354: ok = OBJ_SET_ATTRIBUTES(cx, obj, (jsid)atom, prop, &attrs);
2355: OBJ_DROP_PROPERTY(cx, obj, prop);
2356: return ok;
2357: }
***** C:\TEMP\JAVASCRIPT15\JS\SRC\JSAPI.C
2298: return JS_FALSE;
2299: return OBJ_SET_PROPERTY(cx, obj, (jsid)atom, vp);
2300: }
*****

***** C:\DREAMWEAVER\THIRDPARTY\JAVASCRIPT_1_5\jsapi.c
2358:
2359:
***** C:\TEMP\JAVASCRIPT15\JS\SRC\JSAPI.C
2301:
2302: JS_PUBLIC_API(JSBool)
2303: JS_DeleteProperty(JSContext *cx, JSObject *obj, const char *name)
2304: {
2305: jsval junk;
2306:
2307: CHECK_REQUEST(cx);
2308: return JS_DeleteProperty2(cx, obj, name, &junk);
2309: }
2310:
*****

***** C:\DREAMWEAVER\THIRDPARTY\JAVASCRIPT_1_5\jsapi.c
2360: JS_PUBLIC_API(JSBool)
2361: JS_GetPropertyAttributes(JSContext *cx, JSObject *obj, const char *name,
2362: uintN *attrsp, JSBool *foundp)
2363: {
2364: CHECK_REQUEST(cx);
2365: return GetPropertyAttributes(cx, obj,
2366: js_Atomize(cx, name, strlen(name), 0),
2367: attrsp, foundp);
2368: }
***** C:\TEMP\JAVASCRIPT15\JS\SRC\JSAPI.C
2311: JS_PUBLIC_API(JSBool)
2312: JS_DeleteProperty2(JSContext *cx, JSObject *obj, const char *name,
2313: jsval *rval)
2314: {
2315: JSAtom *atom;
2316:
2317: CHECK_REQUEST(cx);
2318: atom = js_Atomize(cx, name, strlen(name), 0);
2319: if (!atom)
2320: return JS_FALSE;
2321: return OBJ_DELETE_PROPERTY(cx, obj, (jsid)atom, rval);
2322: }
*****

***** C:\DREAMWEAVER\THIRDPARTY\JAVASCRIPT_1_5\jsapi.c
2370: JS_PUBLIC_API(JSBool)
2371: JS_SetPropertyAttributes(JSContext *cx, JSObject *obj, const char *name,
2372: uintN attrs, JSBool *foundp)
2373: {
***** C:\TEMP\JAVASCRIPT15\JS\SRC\JSAPI.C
2324: JS_PUBLIC_API(JSBool)
2325: JS_DefineUCProperty(JSContext *cx, JSObject *obj,
2326: const jschar *name, size_t namelen, jsval value,
2327: JSPropertyOp getter, JSPropertyOp setter,
2328: uintN attrs)
2329: {
*****

***** C:\DREAMWEAVER\THIRDPARTY\JAVASCRIPT_1_5\jsapi.c
2374: CHECK_REQUEST(cx);
2375: return SetPropertyAttributes(cx, obj,
2376: js_Atomize(cx, name, strlen(name), 0),
2377: attrs, foundp);
2378: }
***** C:\TEMP\JAVASCRIPT15\JS\SRC\JSAPI.C
2330: CHECK_REQUEST(cx);
2331: return DefineUCProperty(cx, obj, name, namelen, value, getter, setter,
2332: attrs, NULL);
2333: }
*****

***** C:\DREAMWEAVER\THIRDPARTY\JAVASCRIPT_1_5\jsapi.c
2380: JS_PUBLIC_API(JSBool)
2381: JS_LookupProperty(JSContext *cx, JSObject *obj, const char *name, jsval *vp)
2382: {
2383: JSBool ok;
2384: JSObject *obj2;
2385: JSProperty *prop;
2386:
2387: CHECK_REQUEST(cx);
2388: ok = LookupProperty(cx, obj, name, &obj2, &prop);
2389: if (ok)
2390: *vp = LookupResult(cx, obj, obj2, prop);
2391: return ok;
2392: }
***** C:\TEMP\JAVASCRIPT15\JS\SRC\JSAPI.C
2335: JS_PUBLIC_API(JSBool)
2336: JS_GetUCPropertyAttributes(JSContext *cx, JSObject *obj,
2337: const jschar *name, size_t namelen,
2338: uintN *attrsp, JSBool *foundp)
2339: {
2340: CHECK_REQUEST(cx);
2341: return GetPropertyAttributes(cx, obj,
2342: js_AtomizeChars(cx, name, AUTO_NAMELEN(name,namelen), 0),
2343: attrsp, foundp);
2344: }
*****

***** C:\DREAMWEAVER\THIRDPARTY\JAVASCRIPT_1_5\jsapi.c
2394: JS_PUBLIC_API(JSBool)
2395: JS_GetProperty(JSContext *cx, JSObject *obj, const char *name, jsval *vp)
2396: {
2397: JSAtom *atom;
2398:
2399: CHECK_REQUEST(cx);
2400: atom = js_Atomize(cx, name, strlen(name), 0);
2401: if (!atom)
2402: return JS_FALSE;
2403: return OBJ_GET_PROPERTY(cx, obj, (jsid)atom, vp);
2404: }
***** C:\TEMP\JAVASCRIPT15\JS\SRC\JSAPI.C
2346: JS_PUBLIC_API(JSBool)
2347: JS_SetUCPropertyAttributes(JSContext *cx, JSObject *obj,
2348: const jschar *name, size_t namelen,
2349: uintN attrs, JSBool *foundp)
2350: {
2351: CHECK_REQUEST(cx);
2352: return SetPropertyAttributes(cx, obj,
2353: js_AtomizeChars(cx, name, AUTO_NAMELEN(name,namelen), 0),
2354: attrs, foundp);
2355: }
*****

***** C:\DREAMWEAVER\THIRDPARTY\JAVASCRIPT_1_5\jsapi.c
2406: JS_PUBLIC_API(JSBool)
2407: JS_SetProperty(JSContext *cx, JSObject *obj, const char *name, jsval *vp)
2408: {
2409: JSAtom *atom;
2410:
***** C:\TEMP\JAVASCRIPT15\JS\SRC\JSAPI.C
2357: JS_PUBLIC_API(JSBool)
2358: JS_DefineUCPropertyWithTinyId(JSContext *cx, JSObject *obj,
2359: const jschar *name, size_t namelen,
2360: int8 tinyid, jsval value,
2361: JSPropertyOp getter, JSPropertyOp setter,
2362: uintN attrs)
2363: {
2364: JSBool ok;
2365: JSProperty *prop;
2366: JSScopeProperty *sprop;
2367:
*****

***** C:\DREAMWEAVER\THIRDPARTY\JAVASCRIPT_1_5\jsapi.c
2411: CHECK_REQUEST(cx);
2412: atom = js_Atomize(cx, name, strlen(name), 0);
2413: if (!atom)
2414: return JS_FALSE;
2415: return OBJ_SET_PROPERTY(cx, obj, (jsid)atom, vp);
2416: }
***** C:\TEMP\JAVASCRIPT15\JS\SRC\JSAPI.C
2368: CHECK_REQUEST(cx);
2369: ok = DefineUCProperty(cx, obj, name, namelen, value, getter, setter, attrs,
2370: &prop);
2371: if (ok && prop) {
2372: if (OBJ_IS_NATIVE(obj)) {
2373: sprop = (JSScopeProperty *)prop;
2374: #ifdef JS_DOUBLE_HASHING
2375: sprop->attrs |= JSPROP_INDEX;
2376: sprop->tinyid = tinyid;
2377: #else
2378: sprop->id = INT_TO_JSVAL(tinyid);
2379: #endif
2380: }
2381: OBJ_DROP_PROPERTY(cx, obj, prop);
2382: }
2383: return ok;
2384: }
*****

***** C:\DREAMWEAVER\THIRDPARTY\JAVASCRIPT_1_5\jsapi.c
2418: JS_PUBLIC_API(JSBool)
2419: JS_DeleteProperty(JSContext *cx, JSObject *obj, const char *name)
2420: {
2421: jsval junk;
2422:
***** C:\TEMP\JAVASCRIPT15\JS\SRC\JSAPI.C
2386: JS_PUBLIC_API(JSBool)
2387: JS_LookupUCProperty(JSContext *cx, JSObject *obj,
2388: const jschar *name, size_t namelen,
2389: jsval *vp)
2390: {
2391: JSBool ok;
2392: JSObject *obj2;
2393: JSProperty *prop;
2394:
*****

***** C:\DREAMWEAVER\THIRDPARTY\JAVASCRIPT_1_5\jsapi.c
2423: CHECK_REQUEST(cx);
2424: return JS_DeleteProperty2(cx, obj, name, &junk);
2425: }
***** C:\TEMP\JAVASCRIPT15\JS\SRC\JSAPI.C
2395: CHECK_REQUEST(cx);
2396: ok = LookupUCProperty(cx, obj, name, namelen, &obj2, &prop);
2397: if (ok)
2398: *vp = LookupResult(cx, obj, obj2, prop);
2399: return ok;
2400: }
*****

***** C:\DREAMWEAVER\THIRDPARTY\JAVASCRIPT_1_5\jsapi.c
2427: JS_PUBLIC_API(JSBool)
2428: JS_DeleteProperty2(JSContext *cx, JSObject *obj, const char *name,
2429: jsval *rval)
2430: {
***** C:\TEMP\JAVASCRIPT15\JS\SRC\JSAPI.C
2402: JS_PUBLIC_API(JSBool)
2403: JS_GetUCProperty(JSContext *cx, JSObject *obj,
2404: const jschar *name, size_t namelen,
2405: jsval *vp)
2406: {
*****

***** C:\DREAMWEAVER\THIRDPARTY\JAVASCRIPT_1_5\jsapi.c
2433: CHECK_REQUEST(cx);
2434: atom = js_Atomize(cx, name, strlen(name), 0);
2435: if (!atom)
***** C:\TEMP\JAVASCRIPT15\JS\SRC\JSAPI.C
2409: CHECK_REQUEST(cx);
2410: atom = js_AtomizeChars(cx, name, AUTO_NAMELEN(name,namelen), 0);
2411: if (!atom)
*****

***** C:\DREAMWEAVER\THIRDPARTY\JAVASCRIPT_1_5\jsapi.c
2436: return JS_FALSE;
2437: return OBJ_DELETE_PROPERTY(cx, obj, (jsid)atom, rval);
2438: }
***** C:\TEMP\JAVASCRIPT15\JS\SRC\JSAPI.C
2412: return JS_FALSE;
2413: return OBJ_GET_PROPERTY(cx, obj, (jsid)atom, vp);
2414: }
*****

***** C:\DREAMWEAVER\THIRDPARTY\JAVASCRIPT_1_5\jsapi.c
2440: JS_PUBLIC_API(JSBool)
2441: JS_DefineUCProperty(JSContext *cx, JSObject *obj,
2442: const jschar *name, size_t namelen, jsval value,
2443: JSPropertyOp getter, JSPropertyOp setter,
2444: uintN attrs)
2445: {
2446: CHECK_REQUEST(cx);
2447: return DefineUCProperty(cx, obj, name, namelen, value, getter, setter,
2448: attrs, NULL);
2449: }
***** C:\TEMP\JAVASCRIPT15\JS\SRC\JSAPI.C
2416: JS_PUBLIC_API(JSBool)
2417: JS_SetUCProperty(JSContext *cx, JSObject *obj,
2418: const jschar *name, size_t namelen,
2419: jsval *vp)
2420: {
2421: JSAtom *atom;
2422:
2423: CHECK_REQUEST(cx);
2424: atom = js_AtomizeChars(cx, name, AUTO_NAMELEN(name,namelen), 0);
2425: if (!atom)
2426: return JS_FALSE;
2427: return OBJ_SET_PROPERTY(cx, obj, (jsid)atom, vp);
2428: }
*****

***** C:\DREAMWEAVER\THIRDPARTY\JAVASCRIPT_1_5\jsapi.c
2451: JS_PUBLIC_API(JSBool)
2452: JS_GetUCPropertyAttributes(JSContext *cx, JSObject *obj,
2453: const jschar *name, size_t namelen,
2454: uintN *attrsp, JSBool *foundp)
2455: {
2456: CHECK_REQUEST(cx);
2457: return GetPropertyAttributes(cx, obj,
2458: js_AtomizeChars(cx, name, AUTO_NAMELEN(name,namelen), 0),
2459: attrsp, foundp);
2460: }
***** C:\TEMP\JAVASCRIPT15\JS\SRC\JSAPI.C
2430: JS_PUBLIC_API(JSBool)
2431: JS_DeleteUCProperty2(JSContext *cx, JSObject *obj,
2432: const jschar *name, size_t namelen,
2433: jsval *rval)
2434: {
2435: JSAtom *atom;
2436:
2437: CHECK_REQUEST(cx);
2438: atom = js_AtomizeChars(cx, name, AUTO_NAMELEN(name,namelen), 0);
2439: if (!atom)
2440: return JS_FALSE;
2441: return OBJ_DELETE_PROPERTY(cx, obj, (jsid)atom, rval);
2442: }
*****

***** C:\DREAMWEAVER\THIRDPARTY\JAVASCRIPT_1_5\jsapi.c
2461:
2462: JS_PUBLIC_API(JSBool)
2463: JS_SetUCPropertyAttributes(JSContext *cx, JSObject *obj,
2464: const jschar *name, size_t namelen,
2465: uintN attrs, JSBool *foundp)
2466: {
***** C:\TEMP\JAVASCRIPT15\JS\SRC\JSAPI.C
2443:
2444: JS_PUBLIC_API(JSObject *)
2445: JS_NewArrayObject(JSContext *cx, jsint length, jsval *vector)
2446: {
*****

***** C:\DREAMWEAVER\THIRDPARTY\JAVASCRIPT_1_5\jsapi.c
2467: CHECK_REQUEST(cx);
2468: return SetPropertyAttributes(cx, obj,
2469: js_AtomizeChars(cx, name, AUTO_NAMELEN(name,namelen), 0),
2470: attrs, foundp);
2471: }
***** C:\TEMP\JAVASCRIPT15\JS\SRC\JSAPI.C
2447: CHECK_REQUEST(cx);
2448: /* NB: jsuint cast does ToUint32. */
2449: return js_NewArrayObject(cx, (jsuint)length, vector);
2450: }
*****

***** C:\DREAMWEAVER\THIRDPARTY\JAVASCRIPT_1_5\jsapi.c
2473: JS_PUBLIC_API(JSBool)
2474: JS_DefineUCPropertyWithTinyId(JSContext *cx, JSObject *obj,
2475: const jschar *name, size_t namelen,
2476: int8 tinyid, jsval value,
2477: JSPropertyOp getter, JSPropertyOp setter,
2478: uintN attrs)
2479: {
2480: JSBool ok;
2481: JSProperty *prop;
2482: JSScopeProperty *sprop;
2483:
2484: CHECK_REQUEST(cx);
2485: ok = DefineUCProperty(cx, obj, name, namelen, value, getter, setter, attrs,
2486: &prop);
2487: if (ok && prop) {
2488: if (OBJ_IS_NATIVE(obj)) {
2489: sprop = (JSScopeProperty *)prop;
2490: #ifdef JS_DOUBLE_HASHING
2491: sprop->attrs |= JSPROP_INDEX;
2492: sprop->tinyid = tinyid;
2493: #else
2494: sprop->id = INT_TO_JSVAL(tinyid);
2495: #endif
2496: }
2497: OBJ_DROP_PROPERTY(cx, obj, prop);
2498: }
2499: return ok;
2500: }
***** C:\TEMP\JAVASCRIPT15\JS\SRC\JSAPI.C
2452: JS_PUBLIC_API(JSBool)
2453: JS_IsArrayObject(JSContext *cx, JSObject *obj)
2454: {
2455: CHECK_REQUEST(cx);
2456: return OBJ_GET_CLASS(cx, obj) == &js_ArrayClass;
2457: }
*****

***** C:\DREAMWEAVER\THIRDPARTY\JAVASCRIPT_1_5\jsapi.c
2502: JS_PUBLIC_API(JSBool)
2503: JS_LookupUCProperty(JSContext *cx, JSObject *obj,
2504: const jschar *name, size_t namelen,
2505: jsval *vp)
2506: {
2507: JSBool ok;
2508: JSObject *obj2;
2509: JSProperty *prop;
2510:
2511: CHECK_REQUEST(cx);
2512: ok = LookupUCProperty(cx, obj, name, namelen, &obj2, &prop);
2513: if (ok)
2514: *vp = LookupResult(cx, obj, obj2, prop);
2515: return ok;
2516: }
***** C:\TEMP\JAVASCRIPT15\JS\SRC\JSAPI.C
2459: JS_PUBLIC_API(JSBool)
2460: JS_GetArrayLength(JSContext *cx, JSObject *obj, jsuint *lengthp)
2461: {
2462: CHECK_REQUEST(cx);
2463: return js_GetLengthProperty(cx, obj, lengthp);
2464: }
*****

***** C:\DREAMWEAVER\THIRDPARTY\JAVASCRIPT_1_5\jsapi.c
2518: JS_PUBLIC_API(JSBool)
2519: JS_GetUCProperty(JSContext *cx, JSObject *obj,
2520: const jschar *name, size_t namelen,
2521: jsval *vp)
2522: {
2523: JSAtom *atom;
2524:
2525: CHECK_REQUEST(cx);
2526: atom = js_AtomizeChars(cx, name, AUTO_NAMELEN(name,namelen), 0);
2527: if (!atom)
2528: return JS_FALSE;
2529: return OBJ_GET_PROPERTY(cx, obj, (jsid)atom, vp);
2530: }
***** C:\TEMP\JAVASCRIPT15\JS\SRC\JSAPI.C
2466: JS_PUBLIC_API(JSBool)
2467: JS_SetArrayLength(JSContext *cx, JSObject *obj, jsuint length)
2468: {
2469: CHECK_REQUEST(cx);
2470: return js_SetLengthProperty(cx, obj, length);
2471: }
*****

***** C:\DREAMWEAVER\THIRDPARTY\JAVASCRIPT_1_5\jsapi.c
2532: JS_PUBLIC_API(JSBool)
2533: JS_SetUCProperty(JSContext *cx, JSObject *obj,
2534: const jschar *name, size_t namelen,
2535: jsval *vp)
2536: {
2537: JSAtom *atom;
2538:
2539: CHECK_REQUEST(cx);
2540: atom = js_AtomizeChars(cx, name, AUTO_NAMELEN(name,namelen), 0);
2541: if (!atom)
2542: return JS_FALSE;
2543: return OBJ_SET_PROPERTY(cx, obj, (jsid)atom, vp);
2544: }
***** C:\TEMP\JAVASCRIPT15\JS\SRC\JSAPI.C
2473: JS_PUBLIC_API(JSBool)
2474: JS_HasArrayLength(JSContext *cx, JSObject *obj, jsuint *lengthp)
2475: {
2476: CHECK_REQUEST(cx);
2477: return js_HasLengthProperty(cx, obj, lengthp);
2478: }
*****

***** C:\DREAMWEAVER\THIRDPARTY\JAVASCRIPT_1_5\jsapi.c
2546: JS_PUBLIC_API(JSBool)
2547: JS_DeleteUCProperty2(JSContext *cx, JSObject *obj,
2548: const jschar *name, size_t namelen,
2549: jsval *rval)
2550: {
2551: JSAtom *atom;
2552:
2553: CHECK_REQUEST(cx);
2554: atom = js_AtomizeChars(cx, name, AUTO_NAMELEN(name,namelen), 0);
2555: if (!atom)
2556: return JS_FALSE;
2557: return OBJ_DELETE_PROPERTY(cx, obj, (jsid)atom, rval);
2558: }
***** C:\TEMP\JAVASCRIPT15\JS\SRC\JSAPI.C
2480: JS_PUBLIC_API(JSBool)
2481: JS_DefineElement(JSContext *cx, JSObject *obj, jsint index, jsval value,
2482: JSPropertyOp getter, JSPropertyOp setter, uintN attrs)
2483: {
2484: CHECK_REQUEST(cx);
2485: return OBJ_DEFINE_PROPERTY(cx, obj, INT_TO_JSVAL(index), value,
2486: getter, setter, attrs, NULL);
2487: }
*****

***** C:\DREAMWEAVER\THIRDPARTY\JAVASCRIPT_1_5\jsapi.c
2559:
2560: JS_PUBLIC_API(JSObject *)
2561: JS_NewArrayObject(JSContext *cx, jsint length, jsval *vector)
2562: {
2563: CHECK_REQUEST(cx);
2564: /* NB: jsuint cast does ToUint32. */
2565: return js_NewArrayObject(cx, (jsuint)length, vector);
2566: }
***** C:\TEMP\JAVASCRIPT15\JS\SRC\JSAPI.C
2488:
2489: JS_PUBLIC_API(JSBool)
2490: JS_AliasElement(JSContext *cx, JSObject *obj, const char *name, jsint alias)
2491: {
2492: JSObject *obj2;
2493: JSProperty *prop;
2494: JSScope *scope;
2495: JSBool ok;
2496:
2497: CHECK_REQUEST(cx);
2498: /* XXXbe push this into jsobj.c or jsscope.c */
2499: if (!LookupProperty(cx, obj, name, &obj2, &prop))
2500: return JS_FALSE;
2501: if (!prop) {
2502: js_ReportIsNotDefined(cx, name);
2503: return JS_FALSE;
2504: }
2505: if (obj2 != obj || !OBJ_IS_NATIVE(obj2)) {
2506: char numBuf[12];
2507: OBJ_DROP_PROPERTY(cx, obj2, prop);
2508: JS_snprintf(numBuf, sizeof numBuf, "%ld", (long)alias);
2509: JS_ReportErrorNumber(cx, js_GetErrorMessage, NULL, JSMSG_CANT_ALIAS,
2510: numBuf, name, OBJ_GET_CLASS(cx, obj2)->name);
2511: return JS_FALSE;
2512: }
2513: scope = OBJ_SCOPE(obj);
2514: ok = (scope->ops->add(cx, scope, INT_TO_JSVAL(alias),
2515: (JSScopeProperty *)prop)
2516: != NULL);
2517: OBJ_DROP_PROPERTY(cx, obj, prop);
2518: return ok;
2519: }
*****

***** C:\DREAMWEAVER\THIRDPARTY\JAVASCRIPT_1_5\jsapi.c
2568: JS_PUBLIC_API(JSBool)
2569: JS_IsArrayObject(JSContext *cx, JSObject *obj)
2570: {
2571: CHECK_REQUEST(cx);
2572: return OBJ_GET_CLASS(cx, obj) == &js_ArrayClass;
2573: }
***** C:\TEMP\JAVASCRIPT15\JS\SRC\JSAPI.C
2521: JS_PUBLIC_API(JSBool)
2522: JS_LookupElement(JSContext *cx, JSObject *obj, jsint index, jsval *vp)
2523: {
2524: JSBool ok;
2525: JSObject *obj2;
2526: JSProperty *prop;
2527:
2528: CHECK_REQUEST(cx);
2529: ok = OBJ_LOOKUP_PROPERTY(cx, obj, INT_TO_JSVAL(index), &obj2, &prop);
2530: if (ok)
2531: *vp = LookupResult(cx, obj, obj2, prop);
2532: return ok;
2533: }
*****

***** C:\DREAMWEAVER\THIRDPARTY\JAVASCRIPT_1_5\jsapi.c
2575: JS_PUBLIC_API(JSBool)
2576: JS_GetArrayLength(JSContext *cx, JSObject *obj, jsuint *lengthp)
2577: {
***** C:\TEMP\JAVASCRIPT15\JS\SRC\JSAPI.C
2535: JS_PUBLIC_API(JSBool)
2536: JS_GetElement(JSContext *cx, JSObject *obj, jsint index, jsval *vp)
2537: {
*****

***** C:\DREAMWEAVER\THIRDPARTY\JAVASCRIPT_1_5\jsapi.c
2578: CHECK_REQUEST(cx);
2579: return js_GetLengthProperty(cx, obj, lengthp);
2580: }
***** C:\TEMP\JAVASCRIPT15\JS\SRC\JSAPI.C
2538: CHECK_REQUEST(cx);
2539: return OBJ_GET_PROPERTY(cx, obj, INT_TO_JSVAL(index), vp);
2540: }
*****

***** C:\DREAMWEAVER\THIRDPARTY\JAVASCRIPT_1_5\jsapi.c
2582: JS_PUBLIC_API(JSBool)
2583: JS_SetArrayLength(JSContext *cx, JSObject *obj, jsuint length)
2584: {
***** C:\TEMP\JAVASCRIPT15\JS\SRC\JSAPI.C
2542: JS_PUBLIC_API(JSBool)
2543: JS_SetElement(JSContext *cx, JSObject *obj, jsint index, jsval *vp)
2544: {
*****

***** C:\DREAMWEAVER\THIRDPARTY\JAVASCRIPT_1_5\jsapi.c
2585: CHECK_REQUEST(cx);
2586: return js_SetLengthProperty(cx, obj, length);
2587: }
***** C:\TEMP\JAVASCRIPT15\JS\SRC\JSAPI.C
2545: CHECK_REQUEST(cx);
2546: return OBJ_SET_PROPERTY(cx, obj, INT_TO_JSVAL(index), vp);
2547: }
*****

***** C:\DREAMWEAVER\THIRDPARTY\JAVASCRIPT_1_5\jsapi.c
2589: JS_PUBLIC_API(JSBool)
2590: JS_HasArrayLength(JSContext *cx, JSObject *obj, jsuint *lengthp)
2591: {
2592: CHECK_REQUEST(cx);
2593: return js_HasLengthProperty(cx, obj, lengthp);
2594: }
***** C:\TEMP\JAVASCRIPT15\JS\SRC\JSAPI.C
2549: JS_PUBLIC_API(JSBool)
2550: JS_DeleteElement(JSContext *cx, JSObject *obj, jsint index)
2551: {
2552: jsval junk;
2553:
2554: CHECK_REQUEST(cx);
2555: return JS_DeleteElement2(cx, obj, index, &junk);
2556: }
*****

***** C:\DREAMWEAVER\THIRDPARTY\JAVASCRIPT_1_5\jsapi.c
2596: JS_PUBLIC_API(JSBool)
2597: JS_DefineElement(JSContext *cx, JSObject *obj, jsint index, jsval value,
2598: JSPropertyOp getter, JSPropertyOp setter, uintN attrs)
2599: {
***** C:\TEMP\JAVASCRIPT15\JS\SRC\JSAPI.C
2558: JS_PUBLIC_API(JSBool)
2559: JS_DeleteElement2(JSContext *cx, JSObject *obj, jsint index, jsval *rval)
2560: {
*****

***** C:\DREAMWEAVER\THIRDPARTY\JAVASCRIPT_1_5\jsapi.c
2600: CHECK_REQUEST(cx);
2601: return OBJ_DEFINE_PROPERTY(cx, obj, INT_TO_JSVAL(index), value,
2602: getter, setter, attrs, NULL);
2603: }
***** C:\TEMP\JAVASCRIPT15\JS\SRC\JSAPI.C
2561: CHECK_REQUEST(cx);
2562: return OBJ_DELETE_PROPERTY(cx, obj, INT_TO_JSVAL(index), rval);
2563: }
*****

***** C:\DREAMWEAVER\THIRDPARTY\JAVASCRIPT_1_5\jsapi.c
2604:
2605: JS_PUBLIC_API(JSBool)
2606: JS_AliasElement(JSContext *cx, JSObject *obj, const char *name, jsint alias)
2607: {
2608: JSObject *obj2;
2609: JSProperty *prop;
2610: JSScope *scope;
2611: JSBool ok;
2612:
***** C:\TEMP\JAVASCRIPT15\JS\SRC\JSAPI.C
2564:
2565: JS_PUBLIC_API(void)
2566: JS_ClearScope(JSContext *cx, JSObject *obj)
2567: {
2568: CHECK_REQUEST(cx);
2569:
2570: if (obj->map->ops->clear)
2571: obj->map->ops->clear(cx, obj);
2572: }
2573:
2574: JS_PUBLIC_API(JSIdArray *)
2575: JS_Enumerate(JSContext *cx, JSObject *obj)
2576: {
2577: jsint i, n;
2578: jsval iter_state, num_properties;
2579: jsid id;
2580: JSIdArray *ida;
2581: jsval *vector;
2582:
*****

***** C:\DREAMWEAVER\THIRDPARTY\JAVASCRIPT_1_5\jsapi.c
2613: CHECK_REQUEST(cx);
2614: /* XXXbe push this into jsobj.c or jsscope.c */
2615: if (!LookupProperty(cx, obj, name, &obj2, &prop))
2616: return JS_FALSE;
2617: if (!prop) {
2618: js_ReportIsNotDefined(cx, name);
2619: return JS_FALSE;
2620: }
2621: if (obj2 != obj || !OBJ_IS_NATIVE(obj2)) {
2622: char numBuf[12];
2623: OBJ_DROP_PROPERTY(cx, obj2, prop);
2624: JS_snprintf(numBuf, sizeof numBuf, "%ld", (long)alias);
2625: JS_ReportErrorNumber(cx, js_GetErrorMessage, NULL, JSMSG_CANT_ALIAS,
2626: numBuf, name, OBJ_GET_CLASS(cx, obj2)->name);
2627: return JS_FALSE;
2628: }
2629: scope = OBJ_SCOPE(obj);
2630: ok = (scope->ops->add(cx, scope, INT_TO_JSVAL(alias),
2631: (JSScopeProperty *)prop)
2632: != NULL);
2633: OBJ_DROP_PROPERTY(cx, obj, prop);
2634: return ok;
2635: }
***** C:\TEMP\JAVASCRIPT15\JS\SRC\JSAPI.C
2583: CHECK_REQUEST(cx);
2584:
2585: ida = NULL;
2586: iter_state = JSVAL_NULL;
2587:
2588: /* Get the number of properties to enumerate. */
2589: if (!OBJ_ENUMERATE(cx, obj, JSENUMERATE_INIT, &iter_state, &num_properties))
2590: goto error;
2591: if (!JSVAL_IS_INT(num_properties)) {
2592: JS_ASSERT(0);
2593: goto error;
2594: }
2595:
2596: /* Grow as needed if we don't know the exact amount ahead of time. */
2597: n = JSVAL_TO_INT(num_properties);
2598: if (n <= 0)
2599: n = 8;
2600:
2601: /* Create an array of jsids large enough to hold all the properties */
2602: ida = js_NewIdArray(cx, n);
2603: if (!ida)
2604: goto error;
2605:
2606: i = 0;
2607: vector = &ida->vector[0];
2608: while (1) {
2609: if (i == ida->length) {
2610: /* Grow length by factor of 1.5 instead of doubling. */
2611: jsint newlen = ida->length + (((jsuint)ida->length + 1) >> 1);
2612: ida = js_GrowIdArray(cx, ida, newlen);
2613: if (!ida)
2614: goto error;
2615: vector = &ida->vector[0];
2616: }
2617:
2618: if (!OBJ_ENUMERATE(cx, obj, JSENUMERATE_NEXT, &iter_state, &id))
2619: goto error;
2620:
2621: /* No more jsid's to enumerate ? */
2622: if (iter_state == JSVAL_NULL)
2623: break;
2624: vector[i++] = id;
2625: }
2626: ida->length = i;
2627: return ida;
2628:
2629: error:
2630: if (iter_state != JSVAL_NULL)
2631: OBJ_ENUMERATE(cx, obj, JSENUMERATE_DESTROY, &iter_state, 0);
2632: if (ida)
2633: JS_DestroyIdArray(cx, ida);
2634: return NULL;
2635: }
*****

***** C:\DREAMWEAVER\THIRDPARTY\JAVASCRIPT_1_5\jsapi.c
2637: JS_PUBLIC_API(JSBool)
2638: JS_LookupElement(JSContext *cx, JSObject *obj, jsint index, jsval *vp)
2639: {
2640: JSBool ok;
2641: JSObject *obj2;
2642: JSProperty *prop;
2643:
2644: CHECK_REQUEST(cx);
2645: ok = OBJ_LOOKUP_PROPERTY(cx, obj, INT_TO_JSVAL(index), &obj2, &prop);
2646: if (ok)
2647: *vp = LookupResult(cx, obj, obj2, prop);
2648: return ok;
2649: }
***** C:\TEMP\JAVASCRIPT15\JS\SRC\JSAPI.C
2637: JS_PUBLIC_API(JSBool)
2638: JS_CheckAccess(JSContext *cx, JSObject *obj, jsid id, JSAccessMode mode,
2639: jsval *vp, uintN *attrsp)
2640: {
2641: CHECK_REQUEST(cx);
2642: return OBJ_CHECK_ACCESS(cx, obj, id, mode, vp, attrsp);
2643: }
*****

***** C:\DREAMWEAVER\THIRDPARTY\JAVASCRIPT_1_5\jsapi.c
2650:
2651: JS_PUBLIC_API(JSBool)
2652: JS_GetElement(JSContext *cx, JSObject *obj, jsint index, jsval *vp)
2653: {
2654: CHECK_REQUEST(cx);
2655: return OBJ_GET_PROPERTY(cx, obj, INT_TO_JSVAL(index), vp);
2656: }
***** C:\TEMP\JAVASCRIPT15\JS\SRC\JSAPI.C
2644:
2645: JS_PUBLIC_API(JSFunction *)
2646: JS_NewFunction(JSContext *cx, JSNative native, uintN nargs, uintN flags,
2647: JSObject *parent, const char *name)
2648: {
2649: JSAtom *atom;
2650:
2651: CHECK_REQUEST(cx);
2652:
2653: if (!name) {
2654: atom = NULL;
2655: } else {
2656: atom = js_Atomize(cx, name, strlen(name), 0);
2657: if (!atom)
2658: return NULL;
2659: }
2660: return js_NewFunction(cx, NULL, native, nargs, flags, parent, atom);
2661: }
*****

***** C:\DREAMWEAVER\THIRDPARTY\JAVASCRIPT_1_5\jsapi.c
2657:
2658: JS_PUBLIC_API(JSBool)
2659: JS_SetElement(JSContext *cx, JSObject *obj, jsint index, jsval *vp)
2660: {
***** C:\TEMP\JAVASCRIPT15\JS\SRC\JSAPI.C
2662:
2663: JS_PUBLIC_API(JSObject *)
2664: JS_CloneFunctionObject(JSContext *cx, JSObject *funobj, JSObject *parent)
2665: {
*****

***** C:\DREAMWEAVER\THIRDPARTY\JAVASCRIPT_1_5\jsapi.c
2661: CHECK_REQUEST(cx);
2662: return OBJ_SET_PROPERTY(cx, obj, INT_TO_JSVAL(index), vp);
2663: }
***** C:\TEMP\JAVASCRIPT15\JS\SRC\JSAPI.C
2666: CHECK_REQUEST(cx);
2667: if (OBJ_GET_CLASS(cx, funobj) != &js_FunctionClass) {
2668: /* Indicate we cannot clone this object. */
2669: return funobj;
2670: }
2671: return js_CloneFunctionObject(cx, funobj, parent);
2672: }
*****

***** C:\DREAMWEAVER\THIRDPARTY\JAVASCRIPT_1_5\jsapi.c
2664:
2665: JS_PUBLIC_API(JSBool)
2666: JS_DeleteElement(JSContext *cx, JSObject *obj, jsint index)
2667: {
2668: jsval junk;
2669:
2670: CHECK_REQUEST(cx);
2671: return JS_DeleteElement2(cx, obj, index, &junk);
2672: }
***** C:\TEMP\JAVASCRIPT15\JS\SRC\JSAPI.C
2673:
2674: JS_PUBLIC_API(JSObject *)
2675: JS_GetFunctionObject(JSFunction *fun)
2676: {
2677: return fun->object;
2678: }
*****

***** C:\DREAMWEAVER\THIRDPARTY\JAVASCRIPT_1_5\jsapi.c
2673:
2674: JS_PUBLIC_API(JSBool)
2675: JS_DeleteElement2(JSContext *cx, JSObject *obj, jsint index, jsval *rval)
2676: {
2677: CHECK_REQUEST(cx);
2678: return OBJ_DELETE_PROPERTY(cx, obj, INT_TO_JSVAL(index), rval);
2679: }
***** C:\TEMP\JAVASCRIPT15\JS\SRC\JSAPI.C
2679:
2680: JS_PUBLIC_API(const char *)
2681: JS_GetFunctionName(JSFunction *fun)
2682: {
2683: return fun->atom
2684: ? JS_GetStringBytes(ATOM_TO_STRING(fun->atom))
2685: : js_anonymous_str;
2686: }
*****

***** C:\DREAMWEAVER\THIRDPARTY\JAVASCRIPT_1_5\jsapi.c
2680:
2681: JS_PUBLIC_API(void)
2682: JS_ClearScope(JSContext *cx, JSObject *obj)
2683: {
2684: CHECK_REQUEST(cx);
2685:
2686: if (obj->map->ops->clear)
2687: obj->map->ops->clear(cx, obj);
2688: }
***** C:\TEMP\JAVASCRIPT15\JS\SRC\JSAPI.C
2687:
2688: JS_PUBLIC_API(JSBool)
2689: JS_DefineFunctions(JSContext *cx, JSObject *obj, JSFunctionSpec *fs)
2690: {
2691: JSFunction *fun;
2692:
2693: CHECK_REQUEST(cx);
2694: for (; fs->name; fs++) {
2695: fun = JS_DefineFunction(cx, obj, fs->name, fs->call, fs->nargs,
2696: fs->flags);
2697: if (!fun)
2698: return JS_FALSE;
2699: fun->extra = fs->extra;
2700: }
2701: return JS_TRUE;
2702: }
*****

***** C:\DREAMWEAVER\THIRDPARTY\JAVASCRIPT_1_5\jsapi.c
2689:
2690: JS_PUBLIC_API(JSIdArray *)
2691: JS_Enumerate(JSContext *cx, JSObject *obj)
2692: {
2693: jsint i, n;
2694: jsval iter_state, num_properties;
2695: jsid id;
2696: JSIdArray *ida;
2697: jsval *vector;
2698:
***** C:\TEMP\JAVASCRIPT15\JS\SRC\JSAPI.C
2703:
2704: JS_PUBLIC_API(JSFunction *)
2705: JS_DefineFunction(JSContext *cx, JSObject *obj, const char *name, JSNative call,
2706: uintN nargs, uintN attrs)
2707: {
2708: JSAtom *atom;
2709:
*****

***** C:\DREAMWEAVER\THIRDPARTY\JAVASCRIPT_1_5\jsapi.c
2699: CHECK_REQUEST(cx);
2700:
2701: ida = NULL;
2702: iter_state = JSVAL_NULL;
2703:
2704: /* Get the number of properties to enumerate. */
2705: if (!OBJ_ENUMERATE(cx, obj, JSENUMERATE_INIT, &iter_state, &num_properties))
2706: goto error;
2707: if (!JSVAL_IS_INT(num_properties)) {
2708: JS_ASSERT(0);
2709: goto error;
2710: }
2711:
2712: /* Grow as needed if we don't know the exact amount ahead of time. */
2713: n = JSVAL_TO_INT(num_properties);
2714: if (n <= 0)
2715: n = 8;
2716:
2717: /* Create an array of jsids large enough to hold all the properties */
2718: ida = js_NewIdArray(cx, n);
2719: if (!ida)
2720: goto error;
2721:
2722: i = 0;
2723: vector = &ida->vector[0];
2724: while (1) {
2725: if (i == ida->length) {
2726: /* Grow length by factor of 1.5 instead of doubling. */
2727: jsint newlen = ida->length + (((jsuint)ida->length + 1) >> 1);
2728: ida = js_GrowIdArray(cx, ida, newlen);
2729: if (!ida)
2730: goto error;
2731: vector = &ida->vector[0];
2732: }
2733:
2734: if (!OBJ_ENUMERATE(cx, obj, JSENUMERATE_NEXT, &iter_state, &id))
2735: goto error;
2736:
2737: /* No more jsid's to enumerate ? */
2738: if (iter_state == JSVAL_NULL)
2739: break;
2740: vector[i++] = id;
2741: }
2742: ida->length = i;
2743: return ida;
2744:
2745: error:
2746: if (iter_state != JSVAL_NULL)
2747: OBJ_ENUMERATE(cx, obj, JSENUMERATE_DESTROY, &iter_state, 0);
2748: if (ida)
2749: JS_DestroyIdArray(cx, ida);
2750: return NULL;
2751: }
***** C:\TEMP\JAVASCRIPT15\JS\SRC\JSAPI.C
2710: CHECK_REQUEST(cx);
2711: atom = js_Atomize(cx, name, strlen(name), 0);
2712: if (!atom)
2713: return NULL;
2714: return js_DefineFunction(cx, obj, atom, call, nargs, attrs);
2715: }
*****

***** C:\DREAMWEAVER\THIRDPARTY\JAVASCRIPT_1_5\jsapi.c
2752:
2753: JS_PUBLIC_API(JSBool)
2754: JS_CheckAccess(JSContext *cx, JSObject *obj, jsid id, JSAccessMode mode,
2755: jsval *vp, uintN *attrsp)
2756: {
2757: CHECK_REQUEST(cx);
2758: return OBJ_CHECK_ACCESS(cx, obj, id, mode, vp, attrsp);
2759: }
2760:
2761: JS_PUBLIC_API(JSFunction *)
2762: JS_NewFunction(JSContext *cx, JSNative native, uintN nargs, uintN flags,
2763: JSObject *parent, const char *name)
2764: {
2765: JSAtom *atom;
2766:
***** C:\TEMP\JAVASCRIPT15\JS\SRC\JSAPI.C
2716:
2717: static JSScript *
2718: CompileTokenStream(JSContext *cx, JSObject *obj, JSTokenStream *ts,
2719: void *tempMark, JSBool *eofp)
2720: {
2721: JSBool eof;
2722: JSCodeGenerator cg;
2723: JSScript *script;
2724:
*****

***** C:\DREAMWEAVER\THIRDPARTY\JAVASCRIPT_1_5\jsapi.c
2767: CHECK_REQUEST(cx);
2768:
2769: if (!name) {
2770: atom = NULL;
2771: } else {
2772: atom = js_Atomize(cx, name, strlen(name), 0);
2773: if (!atom)
2774: return NULL;
2775: }
2776: return js_NewFunction(cx, NULL, native, nargs, flags, parent, atom);
2777: }
***** C:\TEMP\JAVASCRIPT15\JS\SRC\JSAPI.C
2725: CHECK_REQUEST(cx);
2726: eof = JS_FALSE;
2727: if (!js_InitCodeGenerator(cx, &cg, ts->filename, ts->lineno,
2728: ts->principals)) {
2729: script = NULL;
2730: goto out;
2731: }
2732: if (!js_CompileTokenStream(cx, obj, ts, &cg)) {
2733: script = NULL;
2734: eof = (ts->flags & TSF_EOF) != 0;
2735: goto out;
2736: }
2737: script = js_NewScriptFromCG(cx, &cg, NULL);
2738: out:
2739: if (eofp)
2740: *eofp = eof;
2741: if (!js_CloseTokenStream(cx, ts)) {
2742: if (script)
2743: js_DestroyScript(cx, script);
2744: script = NULL;
2745: }
2746: cg.tempMark = tempMark;
2747: js_FinishCodeGenerator(cx, &cg);
2748: return script;
2749: }
*****

***** C:\DREAMWEAVER\THIRDPARTY\JAVASCRIPT_1_5\jsapi.c
2778:
2779: JS_PUBLIC_API(JSObject *)
2780: JS_CloneFunctionObject(JSContext *cx, JSObject *funobj, JSObject *parent)
2781: {
2782: CHECK_REQUEST(cx);
2783: if (OBJ_GET_CLASS(cx, funobj) != &js_FunctionClass) {
2784: /* Indicate we cannot clone this object. */
2785: return funobj;
2786: }
2787: return js_CloneFunctionObject(cx, funobj, parent);
2788: }
***** C:\TEMP\JAVASCRIPT15\JS\SRC\JSAPI.C
2750:
2751: JS_PUBLIC_API(JSScript *)
2752: JS_CompileScript(JSContext *cx, JSObject *obj,
2753: const char *bytes, size_t length,
2754: const char *filename, uintN lineno)
2755: {
2756: jschar *chars;
2757: JSScript *script;
2758:
2759: CHECK_REQUEST(cx);
2760: chars = js_InflateString(cx, bytes, length);
2761: if (!chars)
2762: return NULL;
2763: script = JS_CompileUCScript(cx, obj, chars, length, filename, lineno);
2764: JS_free(cx, chars);
2765: return script;
2766: }
*****

***** C:\DREAMWEAVER\THIRDPARTY\JAVASCRIPT_1_5\jsapi.c
2789:
2790: JS_PUBLIC_API(JSObject *)
2791: JS_GetFunctionObject(JSFunction *fun)
2792: {
2793: return fun->object;
2794: }
***** C:\TEMP\JAVASCRIPT15\JS\SRC\JSAPI.C
2767:
2768: JS_PUBLIC_API(JSScript *)
2769: JS_CompileScriptForPrincipals(JSContext *cx, JSObject *obj,
2770: JSPrincipals *principals,
2771: const char *bytes, size_t length,
2772: const char *filename, uintN lineno)
2773: {
2774: jschar *chars;
2775: JSScript *script;
2776:
2777: CHECK_REQUEST(cx);
2778: chars = js_InflateString(cx, bytes, length);
2779: if (!chars)
2780: return NULL;
2781: script = JS_CompileUCScriptForPrincipals(cx, obj, principals,
2782: chars, length, filename, lineno);
2783: JS_free(cx, chars);
2784: return script;
2785: }
*****

***** C:\DREAMWEAVER\THIRDPARTY\JAVASCRIPT_1_5\jsapi.c
2795:
2796: JS_PUBLIC_API(const char *)
2797: JS_GetFunctionName(JSFunction *fun)
2798: {
2799: return fun->atom
2800: ? JS_GetStringBytes(ATOM_TO_STRING(fun->atom))
2801: : js_anonymous_str;
2802: }
***** C:\TEMP\JAVASCRIPT15\JS\SRC\JSAPI.C
2786:
2787: JS_PUBLIC_API(JSScript *)
2788: JS_CompileUCScript(JSContext *cx, JSObject *obj,
2789: const jschar *chars, size_t length,
2790: const char *filename, uintN lineno)
2791: {
2792: CHECK_REQUEST(cx);
2793: return JS_CompileUCScriptForPrincipals(cx, obj, NULL, chars, length,
2794: filename, lineno);
2795: }
*****

***** C:\DREAMWEAVER\THIRDPARTY\JAVASCRIPT_1_5\jsapi.c
2803:
2804: JS_PUBLIC_API(JSBool)
2805: JS_DefineFunctions(JSContext *cx, JSObject *obj, JSFunctionSpec *fs)
2806: {
2807: JSFunction *fun;
2808:
***** C:\TEMP\JAVASCRIPT15\JS\SRC\JSAPI.C
2796:
2797: JS_PUBLIC_API(JSScript *)
2798: JS_CompileUCScriptForPrincipals(JSContext *cx, JSObject *obj,
2799: JSPrincipals *principals,
2800: const jschar *chars, size_t length,
2801: const char *filename, uintN lineno)
2802: {
2803: void *mark;
2804: JSTokenStream *ts;
2805:
*****

***** C:\DREAMWEAVER\THIRDPARTY\JAVASCRIPT_1_5\jsapi.c
2809: CHECK_REQUEST(cx);
2810: for (; fs->name; fs++) {
2811: fun = JS_DefineFunction(cx, obj, fs->name, fs->call, fs->nargs,
2812: fs->flags);
2813: if (!fun)
2814: return JS_FALSE;
2815: fun->extra = fs->extra;
2816: }
2817: return JS_TRUE;
2818: }
***** C:\TEMP\JAVASCRIPT15\JS\SRC\JSAPI.C
2806: CHECK_REQUEST(cx);
2807: mark = JS_ARENA_MARK(&cx->tempPool);
2808: ts = js_NewTokenStream(cx, chars, length, filename, lineno, principals);
2809: if (!ts)
2810: return NULL;
2811: return CompileTokenStream(cx, obj, ts, mark, NULL);
2812: }
*****

***** C:\DREAMWEAVER\THIRDPARTY\JAVASCRIPT_1_5\jsapi.c
2819:
2820: JS_PUBLIC_API(JSFunction *)
2821: JS_DefineFunction(JSContext *cx, JSObject *obj, const char *name, JSNative call,
2822: uintN nargs, uintN attrs)
2823: {
2824: JSAtom *atom;
2825:
***** C:\TEMP\JAVASCRIPT15\JS\SRC\JSAPI.C
2813:
2814: extern JS_PUBLIC_API(JSBool)
2815: JS_BufferIsCompilableUnit(JSContext *cx, JSObject *obj,
2816: const char *bytes, size_t length)
2817: {
2818: jschar *chars;
2819: JSScript *script;
2820: void *mark;
2821: JSTokenStream *ts;
2822: JSErrorReporter older;
2823: JSBool hitEOF, result;
2824: JSExceptionState *exnState;
2825:
*****

***** C:\DREAMWEAVER\THIRDPARTY\JAVASCRIPT_1_5\jsapi.c
2826: CHECK_REQUEST(cx);
2827: atom = js_Atomize(cx, name, strlen(name), 0);
2828: if (!atom)
2829: return NULL;
2830: return js_DefineFunction(cx, obj, atom, call, nargs, attrs);
2831: }
2832:
2833: static JSScript *
2834: CompileTokenStream(JSContext *cx, JSObject *obj, JSTokenStream *ts,
2835: void *tempMark, JSBool *eofp)
2836: {
2837: JSBool eof;
2838: JSCodeGenerator cg;
2839: JSScript *script;
2840:
2841: CHECK_REQUEST(cx);
2842: eof = JS_FALSE;
2843: if (!js_InitCodeGenerator(cx, &cg, ts->filename, ts->lineno,
2844: ts->principals)) {
2845: script = NULL;
2846: goto out;
***** C:\TEMP\JAVASCRIPT15\JS\SRC\JSAPI.C
2826: CHECK_REQUEST(cx);
2827: mark = JS_ARENA_MARK(&cx->tempPool);
2828: chars = js_InflateString(cx, bytes, length);
2829: if (!chars)
2830: return JS_TRUE;
2831: exnState = JS_SaveExceptionState(cx);
2832: ts = js_NewTokenStream(cx, chars, length, NULL, 0, NULL);
2833: if (!ts) {
2834: result = JS_TRUE;
2835: goto out;
*****

***** C:\DREAMWEAVER\THIRDPARTY\JAVASCRIPT_1_5\jsapi.c
2847: }
2848: if (!js_CompileTokenStream(cx, obj, ts, &cg)) {
2849: script = NULL;
2850: eof = (ts->flags & TSF_EOF) != 0;
2851: goto out;
2852: }
2853: script = js_NewScriptFromCG(cx, &cg, NULL);
2854: out:
2855: if (eofp)
2856: *eofp = eof;
2857: if (!js_CloseTokenStream(cx, ts)) {
2858: if (script)
2859: js_DestroyScript(cx, script);
2860: script = NULL;
2861: }
2862: cg.tempMark = tempMark;
2863: js_FinishCodeGenerator(cx, &cg);
2864: return script;
2865: }
***** C:\TEMP\JAVASCRIPT15\JS\SRC\JSAPI.C
2836: }
2837:
2838: older = JS_SetErrorReporter(cx, NULL);
2839: script = CompileTokenStream(cx, obj, ts, mark, &hitEOF);
2840: JS_SetErrorReporter(cx, older);
2841:
2842: if (script == NULL) {
2843: /*
2844: * We ran into an error, but it was because we ran out of source,
2845: * and not for some other reason. For this case (and this case
2846: * only) we return false, so the calling function knows to try to
2847: * collect more source.
2848: */
2849: result = hitEOF ? JS_FALSE : JS_TRUE;
2850: } else {
2851: result = JS_TRUE;
2852: js_DestroyScript(cx, script);
2853: }
2854:
2855: out:
2856: JS_free(cx, chars);
2857: JS_RestoreExceptionState(cx, exnState);
2858: return result;
2859: }
*****

***** C:\DREAMWEAVER\THIRDPARTY\JAVASCRIPT_1_5\jsapi.c
2867: JS_PUBLIC_API(JSScript *)
2868: JS_CompileScript(JSContext *cx, JSObject *obj,
2869: const char *bytes, size_t length,
2870: const char *filename, uintN lineno)
2871: {
2872: jschar *chars;
2873: JSScript *script;
2874:
***** C:\TEMP\JAVASCRIPT15\JS\SRC\JSAPI.C
2861: JS_PUBLIC_API(JSScript *)
2862: JS_CompileFile(JSContext *cx, JSObject *obj, const char *filename)
2863: {
2864: void *mark;
2865: JSTokenStream *ts;
2866:
*****

***** C:\DREAMWEAVER\THIRDPARTY\JAVASCRIPT_1_5\jsapi.c
2875: CHECK_REQUEST(cx);
2876: chars = js_InflateString(cx, bytes, length);
2877: if (!chars)
2878: return NULL;
2879: script = JS_CompileUCScript(cx, obj, chars, length, filename, lineno);
2880: JS_free(cx, chars);
2881: return script;
2882: }
***** C:\TEMP\JAVASCRIPT15\JS\SRC\JSAPI.C
2867: CHECK_REQUEST(cx);
2868: mark = JS_ARENA_MARK(&cx->tempPool);
2869: ts = js_NewFileTokenStream(cx, filename, stdin);
2870: if (!ts)
2871: return NULL;
2872: return CompileTokenStream(cx, obj, ts, mark, NULL);
2873: }
*****

***** C:\DREAMWEAVER\THIRDPARTY\JAVASCRIPT_1_5\jsapi.c
2884: JS_PUBLIC_API(JSScript *)
2885: JS_CompileScriptForPrincipals(JSContext *cx, JSObject *obj,
2886: JSPrincipals *principals,
2887: const char *bytes, size_t length,
2888: const char *filename, uintN lineno)
2889: {
2890: jschar *chars;
2891: JSScript *script;
2892:
***** C:\TEMP\JAVASCRIPT15\JS\SRC\JSAPI.C
2875: JS_PUBLIC_API(JSScript *)
2876: JS_CompileFileHandle(JSContext *cx, JSObject *obj, const char *filename,
2877: FILE *fh)
2878: {
2879: return JS_CompileFileHandleForPrincipals(cx, obj, filename, fh, NULL);
2880: }
2881:
2882: JS_PUBLIC_API(JSScript *)
2883: JS_CompileFileHandleForPrincipals(JSContext *cx, JSObject *obj,
2884: const char *filename, FILE *fh,
2885: JSPrincipals *principals)
2886: {
2887: void *mark;
2888: JSTokenStream *ts;
2889:
*****

***** C:\DREAMWEAVER\THIRDPARTY\JAVASCRIPT_1_5\jsapi.c
2893: CHECK_REQUEST(cx);
2894: chars = js_InflateString(cx, bytes, length);
2895: if (!chars)
2896: return NULL;
2897: script = JS_CompileUCScriptForPrincipals(cx, obj, principals,
2898: chars, length, filename, lineno);
2899: JS_free(cx, chars);
2900: return script;
2901: }
***** C:\TEMP\JAVASCRIPT15\JS\SRC\JSAPI.C
2890: CHECK_REQUEST(cx);
2891: mark = JS_ARENA_MARK(&cx->tempPool);
2892: ts = js_NewFileTokenStream(cx, NULL, fh);
2893: if (!ts)
2894: return NULL;
2895: ts->filename = filename;
2896: /* XXXshaver js_NewFileTokenStream should do this, because it drops */
2897: if (principals) {
2898: ts->principals = principals;
2899: JSPRINCIPALS_HOLD(cx, ts->principals);
2900: }
2901: return CompileTokenStream(cx, obj, ts, mark, NULL);
2902: }
*****

***** C:\DREAMWEAVER\THIRDPARTY\JAVASCRIPT_1_5\jsapi.c
2902:
2903: JS_PUBLIC_API(JSScript *)
2904: JS_CompileUCScript(JSContext *cx, JSObject *obj,
2905: const jschar *chars, size_t length,
2906: const char *filename, uintN lineno)
2907: {
2908: CHECK_REQUEST(cx);
2909: return JS_CompileUCScriptForPrincipals(cx, obj, NULL, chars, length,
2910: filename, lineno);
2911: }
***** C:\TEMP\JAVASCRIPT15\JS\SRC\JSAPI.C
2903:
2904: JS_PUBLIC_API(JSObject *)
2905: JS_NewScriptObject(JSContext *cx, JSScript *script)
2906: {
2907: JSObject *obj;
2908:
2909: CHECK_REQUEST(cx);
2910: obj = js_NewObject(cx, &js_ScriptClass, NULL, NULL);
2911: if (!obj)
2912: return NULL;
2913: if (script) {
2914: if (!JS_SetPrivate(cx, obj, script))
2915: return NULL;
2916: script->object = obj;
2917: }
2918: return obj;
2919: }
*****

***** C:\DREAMWEAVER\THIRDPARTY\JAVASCRIPT_1_5\jsapi.c
2912:
2913: JS_PUBLIC_API(JSScript *)
2914: JS_CompileUCScriptForPrincipals(JSContext *cx, JSObject *obj,
2915: JSPrincipals *principals,
2916: const jschar *chars, size_t length,
2917: const char *filename, uintN lineno)
2918: {
2919: void *mark;
2920: JSTokenStream *ts;
2921:
2922: CHECK_REQUEST(cx);
2923: mark = JS_ARENA_MARK(&cx->tempPool);
2924: ts = js_NewTokenStream(cx, chars, length, filename, lineno, principals);
2925: if (!ts)
2926: return NULL;
2927: return CompileTokenStream(cx, obj, ts, mark, NULL);
2928: }
***** C:\TEMP\JAVASCRIPT15\JS\SRC\JSAPI.C
2920:
2921: JS_PUBLIC_API(void)
2922: JS_DestroyScript(JSContext *cx, JSScript *script)
2923: {
2924: CHECK_REQUEST(cx);
2925: js_DestroyScript(cx, script);
2926: }
*****

***** C:\DREAMWEAVER\THIRDPARTY\JAVASCRIPT_1_5\jsapi.c
2929:
2930: extern JS_PUBLIC_API(JSBool)
2931: JS_BufferIsCompilableUnit(JSContext *cx, JSObject *obj,
2932: const char *bytes, size_t length)
2933: {
***** C:\TEMP\JAVASCRIPT15\JS\SRC\JSAPI.C
2927:
2928: JS_PUBLIC_API(JSFunction *)
2929: JS_CompileFunction(JSContext *cx, JSObject *obj, const char *name,
2930: uintN nargs, const char **argnames,
2931: const char *bytes, size_t length,
2932: const char *filename, uintN lineno)
2933: {
*****

***** C:\DREAMWEAVER\THIRDPARTY\JAVASCRIPT_1_5\jsapi.c
2934: jschar *chars;
2935: JSScript *script;
2936: void *mark;
2937: JSTokenStream *ts;
2938: JSErrorReporter older;
2939: JSBool hitEOF, result;
2940: JSExceptionState *exnState;
2941:
***** C:\TEMP\JAVASCRIPT15\JS\SRC\JSAPI.C
2934: jschar *chars;
2935: JSFunction *fun;
2936:
*****

***** C:\DREAMWEAVER\THIRDPARTY\JAVASCRIPT_1_5\jsapi.c
2942: CHECK_REQUEST(cx);
2943: mark = JS_ARENA_MARK(&cx->tempPool);
2944: chars = js_InflateString(cx, bytes, length);
***** C:\TEMP\JAVASCRIPT15\JS\SRC\JSAPI.C
2937: CHECK_REQUEST(cx);
2938: chars = js_InflateString(cx, bytes, length);
*****

***** C:\DREAMWEAVER\THIRDPARTY\JAVASCRIPT_1_5\jsapi.c
2945: if (!chars)
2946: return JS_TRUE;
2947: exnState = JS_SaveExceptionState(cx);
2948: ts = js_NewTokenStream(cx, chars, length, NULL, 0, NULL);
2949: if (!ts) {
2950: result = JS_TRUE;
2951: goto out;
2952: }
2953:
2954: older = JS_SetErrorReporter(cx, NULL);
2955: script = CompileTokenStream(cx, obj, ts, mark, &hitEOF);
2956: JS_SetErrorReporter(cx, older);
2957:
2958: if (script == NULL) {
2959: /*
2960: * We ran into an error, but it was because we ran out of source,
2961: * and not for some other reason. For this case (and this case
2962: * only) we return false, so the calling function knows to try to
2963: * collect more source.
2964: */
2965: result = hitEOF ? JS_FALSE : JS_TRUE;
2966: } else {
2967: result = JS_TRUE;
2968: js_DestroyScript(cx, script);
2969: }
2970:
2971: out:
2972: JS_free(cx, chars);
2973: JS_RestoreExceptionState(cx, exnState);
2974: return result;
2975: }
***** C:\TEMP\JAVASCRIPT15\JS\SRC\JSAPI.C
2939: if (!chars)
2940: return NULL;
2941: fun = JS_CompileUCFunction(cx, obj, name, nargs, argnames, chars, length,
2942: filename, lineno);
2943: JS_free(cx, chars);
2944: return fun;
2945: }
*****

***** C:\DREAMWEAVER\THIRDPARTY\JAVASCRIPT_1_5\jsapi.c
2976:
2977: JS_PUBLIC_API(JSScript *)
2978: JS_CompileFile(JSContext *cx, JSObject *obj, const char *filename)
2979: {
2980: void *mark;
2981: JSTokenStream *ts;
2982:
***** C:\TEMP\JAVASCRIPT15\JS\SRC\JSAPI.C
2946:
2947: JS_PUBLIC_API(JSFunction *)
2948: JS_CompileFunctionForPrincipals(JSContext *cx, JSObject *obj,
2949: JSPrincipals *principals, const char *name,
2950: uintN nargs, const char **argnames,
2951: const char *bytes, size_t length,
2952: const char *filename, uintN lineno)
2953: {
2954: jschar *chars;
2955: JSFunction *fun;
2956:
*****

***** C:\DREAMWEAVER\THIRDPARTY\JAVASCRIPT_1_5\jsapi.c
2983: CHECK_REQUEST(cx);
2984: mark = JS_ARENA_MARK(&cx->tempPool);
2985: ts = js_NewFileTokenStream(cx, filename, stdin);
2986: if (!ts)
2987: return NULL;
2988: return CompileTokenStream(cx, obj, ts, mark, NULL);
2989: }
***** C:\TEMP\JAVASCRIPT15\JS\SRC\JSAPI.C
2957: CHECK_REQUEST(cx);
2958: chars = js_InflateString(cx, bytes, length);
2959: if (!chars)
2960: return NULL;
2961: fun = JS_CompileUCFunctionForPrincipals(cx, obj, principals, name,
2962: nargs, argnames, chars, length,
2963: filename, lineno);
2964: JS_free(cx, chars);
2965: return fun;
2966: }
*****

***** C:\DREAMWEAVER\THIRDPARTY\JAVASCRIPT_1_5\jsapi.c
2990:
2991: JS_PUBLIC_API(JSScript *)
2992: JS_CompileFileHandle(JSContext *cx, JSObject *obj, const char *filename,
2993: FILE *fh)
2994: {
2995: return JS_CompileFileHandleForPrincipals(cx, obj, filename, fh, NULL);
2996: }
***** C:\TEMP\JAVASCRIPT15\JS\SRC\JSAPI.C
2967:
2968: JS_PUBLIC_API(JSFunction *)
2969: JS_CompileUCFunction(JSContext *cx, JSObject *obj, const char *name,
2970: uintN nargs, const char **argnames,
2971: const jschar *chars, size_t length,
2972: const char *filename, uintN lineno)
2973: {
2974: CHECK_REQUEST(cx);
2975: return JS_CompileUCFunctionForPrincipals(cx, obj, NULL, name,
2976: nargs, argnames,
2977: chars, length,
2978: filename, lineno);
2979: }
*****

***** C:\DREAMWEAVER\THIRDPARTY\JAVASCRIPT_1_5\jsapi.c
2997:
2998: JS_PUBLIC_API(JSScript *)
2999: JS_CompileFileHandleForPrincipals(JSContext *cx, JSObject *obj,
3000: const char *filename, FILE *fh,
3001: JSPrincipals *principals)
3002: {
***** C:\TEMP\JAVASCRIPT15\JS\SRC\JSAPI.C
2980:
2981: JS_PUBLIC_API(JSFunction *)
2982: JS_CompileUCFunctionForPrincipals(JSContext *cx, JSObject *obj,
2983: JSPrincipals *principals, const char *name,
2984: uintN nargs, const char **argnames,
2985: const jschar *chars, size_t length,
2986: const char *filename, uintN lineno)
2987: {
*****

***** C:\DREAMWEAVER\THIRDPARTY\JAVASCRIPT_1_5\jsapi.c
3004: JSTokenStream *ts;
3005:
***** C:\TEMP\JAVASCRIPT15\JS\SRC\JSAPI.C
2989: JSTokenStream *ts;
2990: JSFunction *fun;
2991: JSAtom *funAtom, *argAtom;
2992: uintN i;
2993: JSScopeProperty *sprop;
2994:
*****

***** C:\DREAMWEAVER\THIRDPARTY\JAVASCRIPT_1_5\jsapi.c
3007: mark = JS_ARENA_MARK(&cx->tempPool);
3008: ts = js_NewFileTokenStream(cx, NULL, fh);
3009: if (!ts)
3010: return NULL;
3011: ts->filename = filename;
3012: /* XXXshaver js_NewFileTokenStream should do this, because it drops */
3013: if (principals) {
3014: ts->principals = principals;
3015: JSPRINCIPALS_HOLD(cx, ts->principals);
3016: }
3017: return CompileTokenStream(cx, obj, ts, mark, NULL);
3018: }
3019:
3020: JS_PUBLIC_API(JSObject *)
3021: JS_NewScriptObject(JSContext *cx, JSScript *script)
3022: {
3023: JSObject *obj;
3024:
3025: CHECK_REQUEST(cx);
3026: obj = js_NewObject(cx, &js_ScriptClass, NULL, NULL);
3027: if (!obj)
3028: return NULL;
3029: if (script) {
3030: if (!JS_SetPrivate(cx, obj, script))
3031: return NULL;
3032: script->object = obj;
3033: }
3034: return obj;
3035: }
3036:
3037: JS_PUBLIC_API(void)
3038: JS_DestroyScript(JSContext *cx, JSScript *script)
3039: {
3040: CHECK_REQUEST(cx);
3041: js_DestroyScript(cx, script);
3042: }
3043:
3044: JS_PUBLIC_API(JSFunction *)
3045: JS_CompileFunction(JSContext *cx, JSObject *obj, const char *name,
3046: uintN nargs, const char **argnames,
3047: const char *bytes, size_t length,
3048: const char *filename, uintN lineno)
3049: {
3050: jschar *chars;
3051: JSFunction *fun;
3052:
3053: CHECK_REQUEST(cx);
3054: chars = js_InflateString(cx, bytes, length);
3055: if (!chars)
3056: return NULL;
3057: fun = JS_CompileUCFunction(cx, obj, name, nargs, argnames, chars, length,
3058: filename, lineno);
3059: JS_free(cx, chars);
3060: return fun;
***** C:\TEMP\JAVASCRIPT15\JS\SRC\JSAPI.C
2996: mark = JS_ARENA_MARK(&cx->tempPool);
2997: ts = js_NewTokenStream(cx, chars, length, filename, lineno, principals);
2998: if (!ts) {
2999: fun = NULL;
3000: goto out;
3001: }
3002: if (!name) {
3003: funAtom = NULL;
3004: } else {
3005: funAtom = js_Atomize(cx, name, strlen(name), 0);
3006: if (!funAtom) {
3007: fun = NULL;
3008: goto out;
3009: }
3010: }
3011: fun = js_NewFunction(cx, NULL, NULL, nargs, 0, obj, funAtom);
3012: if (!fun)
3013: goto out;
3014: if (nargs) {
3015: for (i = 0; i < nargs; i++) {
3016: argAtom = js_Atomize(cx, argnames[i], strlen(argnames[i]), 0);
3017: if (!argAtom)
3018: break;
3019: if (!js_DefineProperty(cx, fun->object, (jsid)argAtom,
3020: JSVAL_VOID, js_GetArgument, js_SetArgument,
3021: JSPROP_ENUMERATE|JSPROP_PERMANENT,
3022: (JSProperty **)&sprop)) {
3023: break;
3024: }
3025: JS_ASSERT(sprop);
3026: sprop->id = INT_TO_JSVAL(i);
3027: OBJ_DROP_PROPERTY(cx, fun->object, (JSProperty *)sprop);
3028: }
3029: if (i < nargs) {
3030: fun = NULL;
3031: goto out;
3032: }
3033: }
3034: if (!js_CompileFunctionBody(cx, ts, fun)) {
3035: fun = NULL;
3036: goto out;
3037: }
3038: if (funAtom) {
3039: if (!OBJ_DEFINE_PROPERTY(cx, obj, (jsid)funAtom,
3040: OBJECT_TO_JSVAL(fun->object),
3041: NULL, NULL, 0, NULL)) {
3042: return NULL;
3043: }
3044: }
3045: out:
3046: if (ts)
3047: js_CloseTokenStream(cx, ts);
3048: JS_ARENA_RELEASE(&cx->tempPool, mark);
3049: return fun;
*****

***** C:\DREAMWEAVER\THIRDPARTY\JAVASCRIPT_1_5\jsapi.c
3062:
3063: JS_PUBLIC_API(JSFunction *)
3064: JS_CompileFunctionForPrincipals(JSContext *cx, JSObject *obj,
3065: JSPrincipals *principals, const char *name,
3066: uintN nargs, const char **argnames,
3067: const char *bytes, size_t length,
3068: const char *filename, uintN lineno)
3069: {
3070: jschar *chars;
3071: JSFunction *fun;
3072:
***** C:\TEMP\JAVASCRIPT15\JS\SRC\JSAPI.C
3051:
3052: JS_PUBLIC_API(JSString *)
3053: JS_DecompileScript(JSContext *cx, JSScript *script, const char *name,
3054: uintN indent)
3055: {
3056: JSPrinter *jp;
3057: JSString *str;
3058:
*****

***** C:\DREAMWEAVER\THIRDPARTY\JAVASCRIPT_1_5\jsapi.c
3073: CHECK_REQUEST(cx);
3074: chars = js_InflateString(cx, bytes, length);
3075: if (!chars)
3076: return NULL;
3077: fun = JS_CompileUCFunctionForPrincipals(cx, obj, principals, name,
3078: nargs, argnames, chars, length,
3079: filename, lineno);
3080: JS_free(cx, chars);
3081: return fun;
3082: }
***** C:\TEMP\JAVASCRIPT15\JS\SRC\JSAPI.C
3059: CHECK_REQUEST(cx);
3060: jp = js_NewPrinter(cx, name,
3061: indent & ~JS_DONT_PRETTY_PRINT,
3062: !(indent & JS_DONT_PRETTY_PRINT));
3063: if (!jp)
3064: return NULL;
3065: if (js_DecompileScript(jp, script))
3066: str = js_GetPrinterOutput(jp);
3067: else
3068: str = NULL;
3069: js_DestroyPrinter(jp);
3070: return str;
3071: }
*****

***** C:\DREAMWEAVER\THIRDPARTY\JAVASCRIPT_1_5\jsapi.c
3083:
3084: JS_PUBLIC_API(JSFunction *)
3085: JS_CompileUCFunction(JSContext *cx, JSObject *obj, const char *name,
3086: uintN nargs, const char **argnames,
3087: const jschar *chars, size_t length,
3088: const char *filename, uintN lineno)
3089: {
3090: CHECK_REQUEST(cx);
3091: return JS_CompileUCFunctionForPrincipals(cx, obj, NULL, name,
3092: nargs, argnames,
3093: chars, length,
3094: filename, lineno);
3095: }
***** C:\TEMP\JAVASCRIPT15\JS\SRC\JSAPI.C
3072:
3073: JS_PUBLIC_API(JSString *)
3074: JS_DecompileFunction(JSContext *cx, JSFunction *fun, uintN indent)
3075: {
3076: JSPrinter *jp;
3077: JSString *str;
3078:
3079: CHECK_REQUEST(cx);
3080: jp = js_NewPrinter(cx, JS_GetFunctionName(fun),
3081: indent & ~JS_DONT_PRETTY_PRINT,
3082: !(indent & JS_DONT_PRETTY_PRINT));
3083: if (!jp)
3084: return NULL;
3085: if (js_DecompileFunction(jp, fun))
3086: str = js_GetPrinterOutput(jp);
3087: else
3088: str = NULL;
3089: js_DestroyPrinter(jp);
3090: return str;
3091: }
*****

***** C:\DREAMWEAVER\THIRDPARTY\JAVASCRIPT_1_5\jsapi.c
3096:
3097: JS_PUBLIC_API(JSFunction *)
3098: JS_CompileUCFunctionForPrincipals(JSContext *cx, JSObject *obj,
3099: JSPrincipals *principals, const char *name,
3100: uintN nargs, const char **argnames,
3101: const jschar *chars, size_t length,
3102: const char *filename, uintN lineno)
3103: {
3104: void *mark;
3105: JSTokenStream *ts;
3106: JSFunction *fun;
3107: JSAtom *funAtom, *argAtom;
3108: uintN i;
3109: JSScopeProperty *sprop;
3110:
***** C:\TEMP\JAVASCRIPT15\JS\SRC\JSAPI.C
3092:
3093: JS_PUBLIC_API(JSString *)
3094: JS_DecompileFunctionBody(JSContext *cx, JSFunction *fun, uintN indent)
3095: {
3096: JSPrinter *jp;
3097: JSString *str;
3098:
*****

***** C:\DREAMWEAVER\THIRDPARTY\JAVASCRIPT_1_5\jsapi.c
3111: CHECK_REQUEST(cx);
3112: mark = JS_ARENA_MARK(&cx->tempPool);
3113: ts = js_NewTokenStream(cx, chars, length, filename, lineno, principals);
3114: if (!ts) {
3115: fun = NULL;
3116: goto out;
3117: }
3118: if (!name) {
3119: funAtom = NULL;
3120: } else {
3121: funAtom = js_Atomize(cx, name, strlen(name), 0);
3122: if (!funAtom) {
3123: fun = NULL;
3124: goto out;
3125: }
3126: }
3127: fun = js_NewFunction(cx, NULL, NULL, nargs, 0, obj, funAtom);
3128: if (!fun)
3129: goto out;
3130: if (nargs) {
3131: for (i = 0; i < nargs; i++) {
3132: argAtom = js_Atomize(cx, argnames[i], strlen(argnames[i]), 0);
3133: if (!argAtom)
3134: break;
3135: if (!js_DefineProperty(cx, fun->object, (jsid)argAtom,
3136: JSVAL_VOID, js_GetArgument, js_SetArgument,
3137: JSPROP_ENUMERATE|JSPROP_PERMANENT,
3138: (JSProperty **)&sprop)) {
3139: break;
3140: }
3141: JS_ASSERT(sprop);
3142: sprop->id = INT_TO_JSVAL(i);
3143: OBJ_DROP_PROPERTY(cx, fun->object, (JSProperty *)sprop);
3144: }
3145: if (i < nargs) {
3146: fun = NULL;
3147: goto out;
3148: }
3149: }
3150: if (!js_CompileFunctionBody(cx, ts, fun)) {
3151: fun = NULL;
3152: goto out;
3153: }
3154: if (funAtom) {
3155: if (!OBJ_DEFINE_PROPERTY(cx, obj, (jsid)funAtom,
3156: OBJECT_TO_JSVAL(fun->object),
3157: NULL, NULL, 0, NULL)) {
3158: return NULL;
3159: }
3160: }
3161: out:
3162: if (ts)
3163: js_CloseTokenStream(cx, ts);
3164: JS_ARENA_RELEASE(&cx->tempPool, mark);
3165: return fun;
3166: }
***** C:\TEMP\JAVASCRIPT15\JS\SRC\JSAPI.C
3099: CHECK_REQUEST(cx);
3100: jp = js_NewPrinter(cx, JS_GetFunctionName(fun),
3101: indent & ~JS_DONT_PRETTY_PRINT,
3102: !(indent & JS_DONT_PRETTY_PRINT));
3103: if (!jp)
3104: return NULL;
3105: if (js_DecompileFunctionBody(jp, fun))
3106: str = js_GetPrinterOutput(jp);
3107: else
3108: str = NULL;
3109: js_DestroyPrinter(jp);
3110: return str;
3111: }
*****

***** C:\DREAMWEAVER\THIRDPARTY\JAVASCRIPT_1_5\jsapi.c
3167:
3168: JS_PUBLIC_API(JSString *)
3169: JS_DecompileScript(JSContext *cx, JSScript *script, const char *name,
3170: uintN indent)
3171: {
3172: JSPrinter *jp;
3173: JSString *str;
3174:
3175: CHECK_REQUEST(cx);
3176: jp = js_NewPrinter(cx, name,
3177: indent & ~JS_DONT_PRETTY_PRINT,
3178: !(indent & JS_DONT_PRETTY_PRINT));
3179: if (!jp)
3180: return NULL;
3181: if (js_DecompileScript(jp, script))
3182: str = js_GetPrinterOutput(jp);
3183: else
3184: str = NULL;
3185: js_DestroyPrinter(jp);
3186: return str;
3187: }
***** C:\TEMP\JAVASCRIPT15\JS\SRC\JSAPI.C
3112:
3113: JS_PUBLIC_API(JSBool)
3114: JS_ExecuteScript(JSContext *cx, JSObject *obj, JSScript *script, jsval *rval)
3115: {
3116: CHECK_REQUEST(cx);
3117: if (!js_Execute(cx, obj, script, NULL, 0, rval)) {
3118: #if JS_HAS_EXCEPTIONS
3119: js_ReportUncaughtException(cx);
3120: #endif
3121: return JS_FALSE;
3122: }
3123: return JS_TRUE;
3124: }
*****

***** C:\DREAMWEAVER\THIRDPARTY\JAVASCRIPT_1_5\jsapi.c
3188:
3189: JS_PUBLIC_API(JSString *)
3190: JS_DecompileFunction(JSContext *cx, JSFunction *fun, uintN indent)
3191: {
3192: JSPrinter *jp;
3193: JSString *str;
3194:
3195: CHECK_REQUEST(cx);
3196: jp = js_NewPrinter(cx, JS_GetFunctionName(fun),
3197: indent & ~JS_DONT_PRETTY_PRINT,
3198: !(indent & JS_DONT_PRETTY_PRINT));
3199: if (!jp)
3200: return NULL;
3201: if (js_DecompileFunction(jp, fun))
3202: str = js_GetPrinterOutput(jp);
3203: else
3204: str = NULL;
3205: js_DestroyPrinter(jp);
3206: return str;
3207: }
***** C:\TEMP\JAVASCRIPT15\JS\SRC\JSAPI.C
3125:
3126: JS_PUBLIC_API(JSBool)
3127: JS_ExecuteScriptPart(JSContext *cx, JSObject *obj, JSScript *script,
3128: JSExecPart part, jsval *rval)
3129: {
3130: JSScript tmp;
3131: JSRuntime *rt;
3132: JSBool ok;
3133:
3134: /* Make a temporary copy of the JSScript structure and farble it a bit. */
3135: tmp = *script;
3136: if (part == JSEXEC_PROLOG) {
3137: tmp.length = PTRDIFF(tmp.main, tmp.code, jsbytecode);
3138: } else {
3139: tmp.length -= PTRDIFF(tmp.main, tmp.code, jsbytecode);
3140: tmp.code = tmp.main;
3141: }
3142:
3143: /* Tell the debugger about our temporary copy of the script structure. */
3144: rt = cx->runtime;
3145: if (rt->newScriptHook) {
3146: rt->newScriptHook(cx, tmp.filename, tmp.lineno, &tmp, NULL,
3147: rt->newScriptHookData);
3148: }
3149:
3150: /* Execute the farbled struct and tell the debugger to forget about it. */
3151: ok = JS_ExecuteScript(cx, obj, &tmp, rval);
3152: if (rt->destroyScriptHook)
3153: rt->destroyScriptHook(cx, &tmp, rt->destroyScriptHookData);
3154: return ok;
3155: }
*****

***** C:\DREAMWEAVER\THIRDPARTY\JAVASCRIPT_1_5\jsapi.c
3208:
3209: JS_PUBLIC_API(JSString *)
3210: JS_DecompileFunctionBody(JSContext *cx, JSFunction *fun, uintN indent)
3211: {
3212: JSPrinter *jp;
3213: JSString *str;
3214:
***** C:\TEMP\JAVASCRIPT15\JS\SRC\JSAPI.C
3156:
3157: JS_PUBLIC_API(JSBool)
3158: JS_EvaluateScript(JSContext *cx, JSObject *obj,
3159: const char *bytes, uintN length,
3160: const char *filename, uintN lineno,
3161: jsval *rval)
3162: {
3163: jschar *chars;
3164: JSBool ok;
3165:
*****

***** C:\DREAMWEAVER\THIRDPARTY\JAVASCRIPT_1_5\jsapi.c
3215: CHECK_REQUEST(cx);
3216: jp = js_NewPrinter(cx, JS_GetFunctionName(fun),
3217: indent & ~JS_DONT_PRETTY_PRINT,
3218: !(indent & JS_DONT_PRETTY_PRINT));
3219: if (!jp)
3220: return NULL;
3221: if (js_DecompileFunctionBody(jp, fun))
3222: str = js_GetPrinterOutput(jp);
3223: else
3224: str = NULL;
3225: js_DestroyPrinter(jp);
3226: return str;
3227: }
***** C:\TEMP\JAVASCRIPT15\JS\SRC\JSAPI.C
3166: CHECK_REQUEST(cx);
3167: chars = js_InflateString(cx, bytes, length);
3168: if (!chars)
3169: return JS_FALSE;
3170: ok = JS_EvaluateUCScript(cx, obj, chars, length, filename, lineno, rval);
3171: JS_free(cx, chars);
3172: return ok;
3173: }
*****

***** C:\DREAMWEAVER\THIRDPARTY\JAVASCRIPT_1_5\jsapi.c
3229: JS_PUBLIC_API(JSBool)
3230: JS_ExecuteScript(JSContext *cx, JSObject *obj, JSScript *script, jsval *rval)
3231: {
3232: CHECK_REQUEST(cx);
3233: if (!js_Execute(cx, obj, script, NULL, 0, rval)) {
3234: #if JS_HAS_EXCEPTIONS
3235: js_ReportUncaughtException(cx);
3236: #endif
3237: return JS_FALSE;
3238: }
3239: return JS_TRUE;
3240: }
***** C:\TEMP\JAVASCRIPT15\JS\SRC\JSAPI.C
3175: JS_PUBLIC_API(JSBool)
3176: JS_EvaluateScriptForPrincipals(JSContext *cx, JSObject *obj,
3177: JSPrincipals *principals,
3178: const char *bytes, uintN length,
3179: const char *filename, uintN lineno,
3180: jsval *rval)
3181: {
3182: jschar *chars;
3183: JSBool ok;
3184:
3185: CHECK_REQUEST(cx);
3186: chars = js_InflateString(cx, bytes, length);
3187: if (!chars)
3188: return JS_FALSE;
3189: ok = JS_EvaluateUCScriptForPrincipals(cx, obj, principals, chars, length,
3190: filename, lineno, rval);
3191: JS_free(cx, chars);
3192: return ok;
3193: }
*****

***** C:\DREAMWEAVER\THIRDPARTY\JAVASCRIPT_1_5\jsapi.c
3242: JS_PUBLIC_API(JSBool)
3243: JS_ExecuteScriptPart(JSContext *cx, JSObject *obj, JSScript *script,
3244: JSExecPart part, jsval *rval)
3245: {
3246: JSScript tmp;
3247: JSRuntime *rt;
3248: JSBool ok;
3249:
3250: /* Make a temporary copy of the JSScript structure and farble it a bit. */
3251: tmp = *script;
3252: if (part == JSEXEC_PROLOG) {
3253: tmp.length = PTRDIFF(tmp.main, tmp.code, jsbytecode);
3254: } else {
3255: tmp.length -= PTRDIFF(tmp.main, tmp.code, jsbytecode);
3256: tmp.code = tmp.main;
3257: }
3258:
3259: /* Tell the debugger about our temporary copy of the script structure. */
3260: rt = cx->runtime;
3261: if (rt->newScriptHook) {
3262: rt->newScriptHook(cx, tmp.filename, tmp.lineno, &tmp, NULL,
3263: rt->newScriptHookData);
3264: }
3265:
3266: /* Execute the farbled struct and tell the debugger to forget about it. */
3267: ok = JS_ExecuteScript(cx, obj, &tmp, rval);
3268: if (rt->destroyScriptHook)
3269: rt->destroyScriptHook(cx, &tmp, rt->destroyScriptHookData);
3270: return ok;
3271: }
***** C:\TEMP\JAVASCRIPT15\JS\SRC\JSAPI.C
3195: JS_PUBLIC_API(JSBool)
3196: JS_EvaluateUCScript(JSContext *cx, JSObject *obj,
3197: const jschar *chars, uintN length,
3198: const char *filename, uintN lineno,
3199: jsval *rval)
3200: {
3201: CHECK_REQUEST(cx);
3202: return JS_EvaluateUCScriptForPrincipals(cx, obj, NULL, chars, length,
3203: filename, lineno, rval);
3204: }
*****

***** C:\DREAMWEAVER\THIRDPARTY\JAVASCRIPT_1_5\jsapi.c
3273: JS_PUBLIC_API(JSBool)
3274: JS_EvaluateScript(JSContext *cx, JSObject *obj,
3275: const char *bytes, uintN length,
3276: const char *filename, uintN lineno,
3277: jsval *rval)
3278: {
3279: jschar *chars;
3280: JSBool ok;
***** C:\TEMP\JAVASCRIPT15\JS\SRC\JSAPI.C
3206: JS_PUBLIC_API(JSBool)
3207: JS_EvaluateUCScriptForPrincipals(JSContext *cx, JSObject *obj,
3208: JSPrincipals *principals,
3209: const jschar *chars, uintN length,
3210: const char *filename, uintN lineno,
3211: jsval *rval)
3212: {
3213: JSScript *script;
3214: JSBool ok;
*****

***** C:\DREAMWEAVER\THIRDPARTY\JAVASCRIPT_1_5\jsapi.c
3282: CHECK_REQUEST(cx);
3283: chars = js_InflateString(cx, bytes, length);
3284: if (!chars)
3285: return JS_FALSE;
3286: ok = JS_EvaluateUCScript(cx, obj, chars, length, filename, lineno, rval);
3287: JS_free(cx, chars);
3288: return ok;
***** C:\TEMP\JAVASCRIPT15\JS\SRC\JSAPI.C
3216: CHECK_REQUEST(cx);
3217: script = JS_CompileUCScriptForPrincipals(cx, obj, principals, chars, length,
3218: filename, lineno);
3219: if (!script)
3220: return JS_FALSE;
3221: ok = js_Execute(cx, obj, script, NULL, 0, rval);
3222: #if JS_HAS_EXCEPTIONS
3223: if (!ok)
3224: js_ReportUncaughtException(cx);
3225: #endif
3226: JS_DestroyScript(cx, script);
3227: return ok;
*****

***** C:\DREAMWEAVER\THIRDPARTY\JAVASCRIPT_1_5\jsapi.c
3291: JS_PUBLIC_API(JSBool)
3292: JS_EvaluateScriptForPrincipals(JSContext *cx, JSObject *obj,
3293: JSPrincipals *principals,
3294: const char *bytes, uintN length,
3295: const char *filename, uintN lineno,
3296: jsval *rval)
3297: {
3298: jschar *chars;
3299: JSBool ok;
3300:
3301: CHECK_REQUEST(cx);
3302: chars = js_InflateString(cx, bytes, length);
3303: if (!chars)
3304: return JS_FALSE;
3305: ok = JS_EvaluateUCScriptForPrincipals(cx, obj, principals, chars, length,
3306: filename, lineno, rval);
3307: JS_free(cx, chars);
3308: return ok;
3309: }
***** C:\TEMP\JAVASCRIPT15\JS\SRC\JSAPI.C
3230: JS_PUBLIC_API(JSBool)
3231: JS_CallFunction(JSContext *cx, JSObject *obj, JSFunction *fun, uintN argc,
3232: jsval *argv, jsval *rval)
3233: {
3234: CHECK_REQUEST(cx);
3235: if (!js_InternalCall(cx, obj, OBJECT_TO_JSVAL(fun->object), argc, argv,
3236: rval)) {
3237: #if JS_HAS_EXCEPTIONS
3238: js_ReportUncaughtException(cx);
3239: #endif
3240: return JS_FALSE;
3241: }
3242: return JS_TRUE;
3243: }
*****

***** C:\DREAMWEAVER\THIRDPARTY\JAVASCRIPT_1_5\jsapi.c
3311: JS_PUBLIC_API(JSBool)
3312: JS_EvaluateUCScript(JSContext *cx, JSObject *obj,
3313: const jschar *chars, uintN length,
3314: const char *filename, uintN lineno,
3315: jsval *rval)
3316: {
3317: CHECK_REQUEST(cx);
3318: return JS_EvaluateUCScriptForPrincipals(cx, obj, NULL, chars, length,
3319: filename, lineno, rval);
3320: }
***** C:\TEMP\JAVASCRIPT15\JS\SRC\JSAPI.C
3245: JS_PUBLIC_API(JSBool)
3246: JS_CallFunctionName(JSContext *cx, JSObject *obj, const char *name, uintN argc,
3247: jsval *argv, jsval *rval)
3248: {
3249: jsval fval;
3250:
3251: CHECK_REQUEST(cx);
3252: if (!JS_GetProperty(cx, obj, name, &fval))
3253: return JS_FALSE;
3254: if (!js_InternalCall(cx, obj, fval, argc, argv, rval)) {
3255: #if JS_HAS_EXCEPTIONS
3256: js_ReportUncaughtException(cx);
3257: #endif
3258: return JS_FALSE;
3259: }
3260: return JS_TRUE;
3261: }
*****

***** C:\DREAMWEAVER\THIRDPARTY\JAVASCRIPT_1_5\jsapi.c
3322: JS_PUBLIC_API(JSBool)
3323: JS_EvaluateUCScriptForPrincipals(JSContext *cx, JSObject *obj,
3324: JSPrincipals *principals,
3325: const jschar *chars, uintN length,
3326: const char *filename, uintN lineno,
3327: jsval *rval)
3328: {
3329: JSScript *script;
3330: JSBool ok;
3331:
3332: CHECK_REQUEST(cx);
3333: script = JS_CompileUCScriptForPrincipals(cx, obj, principals, chars, length,
3334: filename, lineno);
3335: if (!script)
3336: return JS_FALSE;
3337: ok = js_Execute(cx, obj, script, NULL, 0, rval);
3338: #if JS_HAS_EXCEPTIONS
3339: if (!ok)
3340: js_ReportUncaughtException(cx);
***** C:\TEMP\JAVASCRIPT15\JS\SRC\JSAPI.C
3263: JS_PUBLIC_API(JSBool)
3264: JS_CallFunctionValue(JSContext *cx, JSObject *obj, jsval fval, uintN argc,
3265: jsval *argv, jsval *rval)
3266: {
3267: CHECK_REQUEST(cx);
3268: if (!js_InternalCall(cx, obj, fval, argc, argv, rval)) {
3269: #if JS_HAS_EXCEPTIONS
3270: js_ReportUncaughtException(cx);
*****

***** C:\DREAMWEAVER\THIRDPARTY\JAVASCRIPT_1_5\jsapi.c
3341: #endif
3342: JS_DestroyScript(cx, script);
3343: return ok;
3344: }
***** C:\TEMP\JAVASCRIPT15\JS\SRC\JSAPI.C
3271: #endif
3272: return JS_FALSE;
3273: }
3274: return JS_TRUE;
3275: }
*****

***** C:\DREAMWEAVER\THIRDPARTY\JAVASCRIPT_1_5\jsapi.c
3345:
3346: JS_PUBLIC_API(JSBool)
3347: JS_CallFunction(JSContext *cx, JSObject *obj, JSFunction *fun, uintN argc,
3348: jsval *argv, jsval *rval)
3349: {
3350: CHECK_REQUEST(cx);
3351: if (!js_InternalCall(cx, obj, OBJECT_TO_JSVAL(fun->object), argc, argv,
3352: rval)) {
3353: #if JS_HAS_EXCEPTIONS
3354: js_ReportUncaughtException(cx);
3355: #endif
3356: return JS_FALSE;
3357: }
3358: return JS_TRUE;
3359: }
***** C:\TEMP\JAVASCRIPT15\JS\SRC\JSAPI.C
3276:
3277: JS_PUBLIC_API(JSBranchCallback)
3278: JS_SetBranchCallback(JSContext *cx, JSBranchCallback cb)
3279: {
3280: JSBranchCallback oldcb;
3281:
3282: CHECK_REQUEST(cx);
3283: oldcb = cx->branchCallback;
3284: cx->branchCallback = cb;
3285: return oldcb;
3286: }
*****

***** C:\DREAMWEAVER\THIRDPARTY\JAVASCRIPT_1_5\jsapi.c
3361: JS_PUBLIC_API(JSBool)
3362: JS_CallFunctionName(JSContext *cx, JSObject *obj, const char *name, uintN argc,
3363: jsval *argv, jsval *rval)
3364: {
3365: jsval fval;
3366:
3367: CHECK_REQUEST(cx);
3368: if (!JS_GetProperty(cx, obj, name, &fval))
3369: return JS_FALSE;
3370: if (!js_InternalCall(cx, obj, fval, argc, argv, rval)) {
3371: #if JS_HAS_EXCEPTIONS
3372: js_ReportUncaughtException(cx);
3373: #endif
3374: return JS_FALSE;
3375: }
3376: return JS_TRUE;
3377: }
***** C:\TEMP\JAVASCRIPT15\JS\SRC\JSAPI.C
3288: JS_PUBLIC_API(JSBool)
3289: JS_IsRunning(JSContext *cx)
3290: {
3291: return cx->fp != NULL;
3292: }
*****

***** C:\DREAMWEAVER\THIRDPARTY\JAVASCRIPT_1_5\jsapi.c
3379: JS_PUBLIC_API(JSBool)
3380: JS_CallFunctionValue(JSContext *cx, JSObject *obj, jsval fval, uintN argc,
3381: jsval *argv, jsval *rval)
3382: {
***** C:\TEMP\JAVASCRIPT15\JS\SRC\JSAPI.C
3294: JS_PUBLIC_API(JSBool)
3295: JS_IsConstructing(JSContext *cx)
3296: {
*****

***** C:\DREAMWEAVER\THIRDPARTY\JAVASCRIPT_1_5\jsapi.c
3383: CHECK_REQUEST(cx);
3384: if (!js_InternalCall(cx, obj, fval, argc, argv, rval)) {
3385: #if JS_HAS_EXCEPTIONS
3386: js_ReportUncaughtException(cx);
3387: #endif
3388: return JS_FALSE;
3389: }
3390: return JS_TRUE;
3391: }
***** C:\TEMP\JAVASCRIPT15\JS\SRC\JSAPI.C
3297: CHECK_REQUEST(cx);
3298: return cx->fp && cx->fp->constructing;
3299: }
*****

***** C:\DREAMWEAVER\THIRDPARTY\JAVASCRIPT_1_5\jsapi.c
3392:
3393: JS_PUBLIC_API(JSBranchCallback)
3394: JS_SetBranchCallback(JSContext *cx, JSBranchCallback cb)
3395: {
3396: JSBranchCallback oldcb;
3397:
3398: CHECK_REQUEST(cx);
3399: oldcb = cx->branchCallback;
3400: cx->branchCallback = cb;
3401: return oldcb;
3402: }
***** C:\TEMP\JAVASCRIPT15\JS\SRC\JSAPI.C
3300:
3301: JS_FRIEND_API(JSBool)
3302: JS_IsAssigning(JSContext *cx)
3303: {
3304: JSStackFrame *fp;
3305: jsbytecode *pc;
3306:
3307: for (fp = cx->fp; fp && !fp->script; fp = fp->down)
3308: ;
3309: if (!fp || !(pc = fp->pc))
3310: return JS_FALSE;
3311: return (js_CodeSpec[*pc].format & JOF_SET) != 0;
3312: }
*****

***** C:\DREAMWEAVER\THIRDPARTY\JAVASCRIPT_1_5\jsapi.c
3403:
3404: JS_PUBLIC_API(JSBool)
3405: JS_IsRunning(JSContext *cx)
3406: {
3407: return cx->fp != NULL;
3408: }
***** C:\TEMP\JAVASCRIPT15\JS\SRC\JSAPI.C
3313:
3314: JS_PUBLIC_API(void)
3315: JS_SetCallReturnValue2(JSContext *cx, jsval v)
3316: {
3317: #if JS_HAS_LVALUE_RETURN
3318: cx->rval2 = v;
3319: cx->rval2set = JS_TRUE;
3320: #endif
3321: }
*****

***** C:\DREAMWEAVER\THIRDPARTY\JAVASCRIPT_1_5\jsapi.c
3409:
3410: JS_PUBLIC_API(JSBool)
3411: JS_IsConstructing(JSContext *cx)
3412: {
3413: CHECK_REQUEST(cx);
3414: return cx->fp && cx->fp->constructing;
3415: }
***** C:\TEMP\JAVASCRIPT15\JS\SRC\JSAPI.C
3322:
3323: /************************************************************************/
3324:
3325: JS_PUBLIC_API(JSString *)
3326: JS_NewString(JSContext *cx, char *bytes, size_t length)
3327: {
3328: jschar *chars;
3329: JSString *str;
3330:
3331: CHECK_REQUEST(cx);
3332: /* Make a Unicode vector from the 8-bit char codes in bytes. */
3333: chars = js_InflateString(cx, bytes, length);
3334: if (!chars)
3335: return NULL;
3336:
3337: /* Free chars (but not bytes, which caller frees on error) if we fail. */
3338: str = js_NewString(cx, chars, length, 0);
3339: if (!str) {
3340: JS_free(cx, chars);
3341: return NULL;
3342: }
3343:
3344: /* Hand off bytes to the deflated string cache, if possible. */
3345: if (!js_SetStringBytes(str, bytes, length))
3346: JS_free(cx, bytes);
3347: return str;
3348: }
*****

***** C:\DREAMWEAVER\THIRDPARTY\JAVASCRIPT_1_5\jsapi.c
3416:
3417: JS_FRIEND_API(JSBool)
3418: JS_IsAssigning(JSContext *cx)
3419: {
3420: JSStackFrame *fp;
3421: jsbytecode *pc;
3422:
3423: for (fp = cx->fp; fp && !fp->script; fp = fp->down)
3424: ;
3425: if (!fp || !(pc = fp->pc))
3426: return JS_FALSE;
3427: return (js_CodeSpec[*pc].format & JOF_SET) != 0;
3428: }
***** C:\TEMP\JAVASCRIPT15\JS\SRC\JSAPI.C
3349:
3350: JS_PUBLIC_API(JSString *)
3351: JS_NewStringCopyN(JSContext *cx, const char *s, size_t n)
3352: {
3353: jschar *js;
3354: JSString *str;
3355:
3356: CHECK_REQUEST(cx);
3357: js = js_InflateString(cx, s, n);
3358: if (!js)
3359: return NULL;
3360: str = js_NewString(cx, js, n, 0);
3361: if (!str)
3362: JS_free(cx, js);
3363: return str;
3364: }
*****

***** C:\DREAMWEAVER\THIRDPARTY\JAVASCRIPT_1_5\jsapi.c
3429:
3430: JS_PUBLIC_API(void)
3431: JS_SetCallReturnValue2(JSContext *cx, jsval v)
3432: {
3433: #if JS_HAS_LVALUE_RETURN
3434: cx->rval2 = v;
3435: cx->rval2set = JS_TRUE;
3436: #endif
3437: }
3438:
3439: /************************************************************************/
3440:
3441: JS_PUBLIC_API(JSString *)
3442: JS_NewString(JSContext *cx, char *bytes, size_t length)
3443: {
3444: jschar *chars;
3445: JSString *str;
***** C:\TEMP\JAVASCRIPT15\JS\SRC\JSAPI.C
3365:
3366: JS_PUBLIC_API(JSString *)
3367: JS_NewStringCopyZ(JSContext *cx, const char *s)
3368: {
3369: size_t n;
3370: jschar *js;
3371: JSString *str;
*****

***** C:\DREAMWEAVER\THIRDPARTY\JAVASCRIPT_1_5\jsapi.c
3447: CHECK_REQUEST(cx);
3448: /* Make a Unicode vector from the 8-bit char codes in bytes. */
3449: chars = js_InflateString(cx, bytes, length);
3450: if (!chars)
3451: return NULL;
3452:
3453: /* Free chars (but not bytes, which caller frees on error) if we fail. */
3454: str = js_NewString(cx, chars, length, 0);
3455: if (!str) {
3456: JS_free(cx, chars);
3457: return NULL;
3458: }
3459:
3460: /* Hand off bytes to the deflated string cache, if possible. */
3461: if (!js_SetStringBytes(str, bytes, length))
3462: JS_free(cx, bytes);
3463: return str;
***** C:\TEMP\JAVASCRIPT15\JS\SRC\JSAPI.C
3373: CHECK_REQUEST(cx);
3374: if (!s)
3375: return cx->runtime->emptyString;
3376: n = strlen(s);
3377: js = js_InflateString(cx, s, n);
3378: if (!js)
3379: return NULL;
3380: str = js_NewString(cx, js, n, 0);
3381: if (!str)
3382: JS_free(cx, js);
3383: return str;
*****

***** C:\DREAMWEAVER\THIRDPARTY\JAVASCRIPT_1_5\jsapi.c
3466: JS_PUBLIC_API(JSString *)
3467: JS_NewStringCopyN(JSContext *cx, const char *s, size_t n)
3468: {
3469: jschar *js;
3470: JSString *str;
3471:
***** C:\TEMP\JAVASCRIPT15\JS\SRC\JSAPI.C
3386: JS_PUBLIC_API(JSString *)
3387: JS_InternString(JSContext *cx, const char *s)
3388: {
3389: JSAtom *atom;
3390:
*****

***** C:\DREAMWEAVER\THIRDPARTY\JAVASCRIPT_1_5\jsapi.c
3472: CHECK_REQUEST(cx);
3473: js = js_InflateString(cx, s, n);
3474: if (!js)
3475: return NULL;
3476: str = js_NewString(cx, js, n, 0);
3477: if (!str)
3478: JS_free(cx, js);
3479: return str;
3480: }
***** C:\TEMP\JAVASCRIPT15\JS\SRC\JSAPI.C
3391: CHECK_REQUEST(cx);
3392: atom = js_Atomize(cx, s, strlen(s), ATOM_INTERNED);
3393: if (!atom)
3394: return NULL;
3395: return ATOM_TO_STRING(atom);
3396: }
*****

***** C:\DREAMWEAVER\THIRDPARTY\JAVASCRIPT_1_5\jsapi.c
3482: JS_PUBLIC_API(JSString *)
3483: JS_NewStringCopyZ(JSContext *cx, const char *s)
3484: {
3485: size_t n;
3486: jschar *js;
3487: JSString *str;
3488:
3489: CHECK_REQUEST(cx);
***** C:\TEMP\JAVASCRIPT15\JS\SRC\JSAPI.C
3398: JS_PUBLIC_API(JSString *)
3399: JS_NewUCString(JSContext *cx, jschar *chars, size_t length)
3400: {
3401: CHECK_REQUEST(cx);
3402: return js_NewString(cx, chars, length, 0);
3403: }
3404:
3405: JS_PUBLIC_API(JSString *)
3406: JS_NewUCStringCopyN(JSContext *cx, const jschar *s, size_t n)
3407: {
3408: CHECK_REQUEST(cx);
3409: return js_NewStringCopyN(cx, s, n, 0);
3410: }
3411:
3412: JS_PUBLIC_API(JSString *)
3413: JS_NewUCStringCopyZ(JSContext *cx, const jschar *s)
3414: {
3415: CHECK_REQUEST(cx);
*****

***** C:\DREAMWEAVER\THIRDPARTY\JAVASCRIPT_1_5\jsapi.c
3491: return cx->runtime->emptyString;
3492: n = strlen(s);
3493: js = js_InflateString(cx, s, n);
3494: if (!js)
3495: return NULL;
3496: str = js_NewString(cx, js, n, 0);
3497: if (!str)
3498: JS_free(cx, js);
3499: return str;
3500: }
***** C:\TEMP\JAVASCRIPT15\JS\SRC\JSAPI.C
3417: return cx->runtime->emptyString;
3418: return js_NewStringCopyZ(cx, s, 0);
3419: }
*****

***** C:\DREAMWEAVER\THIRDPARTY\JAVASCRIPT_1_5\jsapi.c
3502: JS_PUBLIC_API(JSString *)
3503: JS_InternString(JSContext *cx, const char *s)
3504: {
***** C:\TEMP\JAVASCRIPT15\JS\SRC\JSAPI.C
3421: JS_PUBLIC_API(JSString *)
3422: JS_InternUCStringN(JSContext *cx, const jschar *s, size_t length)
3423: {
*****

***** C:\DREAMWEAVER\THIRDPARTY\JAVASCRIPT_1_5\jsapi.c
3507: CHECK_REQUEST(cx);
3508: atom = js_Atomize(cx, s, strlen(s), ATOM_INTERNED);
3509: if (!atom)
***** C:\TEMP\JAVASCRIPT15\JS\SRC\JSAPI.C
3426: CHECK_REQUEST(cx);
3427: atom = js_AtomizeChars(cx, s, length, ATOM_INTERNED);
3428: if (!atom)
*****

***** C:\DREAMWEAVER\THIRDPARTY\JAVASCRIPT_1_5\jsapi.c
3514: JS_PUBLIC_API(JSString *)
3515: JS_NewUCString(JSContext *cx, jschar *chars, size_t length)
3516: {
3517: CHECK_REQUEST(cx);
3518: return js_NewString(cx, chars, length, 0);
3519: }
***** C:\TEMP\JAVASCRIPT15\JS\SRC\JSAPI.C
3433: JS_PUBLIC_API(JSString *)
3434: JS_InternUCString(JSContext *cx, const jschar *s)
3435: {
3436: return JS_InternUCStringN(cx, s, js_strlen(s));
3437: }
*****

***** C:\DREAMWEAVER\THIRDPARTY\JAVASCRIPT_1_5\jsapi.c
3520:
3521: JS_PUBLIC_API(JSString *)
3522: JS_NewUCStringCopyN(JSContext *cx, const jschar *s, size_t n)
3523: {
3524: CHECK_REQUEST(cx);
3525: return js_NewStringCopyN(cx, s, n, 0);
3526: }
***** C:\TEMP\JAVASCRIPT15\JS\SRC\JSAPI.C
3438:
3439: JS_PUBLIC_API(char *)
3440: JS_GetStringBytes(JSString *str)
3441: {
3442: char *bytes = js_GetStringBytes(str);
3443: return bytes ? bytes : "";
3444: }
*****

***** C:\DREAMWEAVER\THIRDPARTY\JAVASCRIPT_1_5\jsapi.c
3527:
3528: JS_PUBLIC_API(JSString *)
3529: JS_NewUCStringCopyZ(JSContext *cx, const jschar *s)
3530: {
3531: CHECK_REQUEST(cx);
3532: if (!s)
3533: return cx->runtime->emptyString;
3534: return js_NewStringCopyZ(cx, s, 0);
3535: }
***** C:\TEMP\JAVASCRIPT15\JS\SRC\JSAPI.C
3445:
3446: JS_PUBLIC_API(jschar *)
3447: JS_GetStringChars(JSString *str)
3448: {
3449: return str->chars;
3450: }
*****

***** C:\DREAMWEAVER\THIRDPARTY\JAVASCRIPT_1_5\jsapi.c
3536:
3537: JS_PUBLIC_API(JSString *)
3538: JS_InternUCStringN(JSContext *cx, const jschar *s, size_t length)
3539: {
3540: JSAtom *atom;
3541:
3542: CHECK_REQUEST(cx);
3543: atom = js_AtomizeChars(cx, s, length, ATOM_INTERNED);
3544: if (!atom)
3545: return NULL;
3546: return ATOM_TO_STRING(atom);
3547: }
***** C:\TEMP\JAVASCRIPT15\JS\SRC\JSAPI.C
3451:
3452: JS_PUBLIC_API(size_t)
3453: JS_GetStringLength(JSString *str)
3454: {
3455: return str->length;
3456: }
*****

***** C:\DREAMWEAVER\THIRDPARTY\JAVASCRIPT_1_5\jsapi.c
3548:
3549: JS_PUBLIC_API(JSString *)
3550: JS_InternUCString(JSContext *cx, const jschar *s)
3551: {
3552: return JS_InternUCStringN(cx, s, js_strlen(s));
3553: }
***** C:\TEMP\JAVASCRIPT15\JS\SRC\JSAPI.C
3457:
3458: JS_PUBLIC_API(intN)
3459: JS_CompareStrings(JSString *str1, JSString *str2)
3460: {
3461: return js_CompareStrings(str1, str2);
3462: }
*****

***** C:\DREAMWEAVER\THIRDPARTY\JAVASCRIPT_1_5\jsapi.c
3554:
3555: JS_PUBLIC_API(char *)
3556: JS_GetStringBytes(JSString *str)
3557: {
3558: char *bytes = js_GetStringBytes(str);
3559: return bytes ? bytes : "";
3560: }
***** C:\TEMP\JAVASCRIPT15\JS\SRC\JSAPI.C
3463:
3464: /************************************************************************/
3465:
3466: JS_PUBLIC_API(void)
3467: JS_ReportError(JSContext *cx, const char *format, ...)
3468: {
3469: va_list ap;
3470:
3471: CHECK_REQUEST(cx);
3472: va_start(ap, format);
3473: js_ReportErrorVA(cx, JSREPORT_ERROR, format, ap);
3474: va_end(ap);
3475: }
*****

***** C:\DREAMWEAVER\THIRDPARTY\JAVASCRIPT_1_5\jsapi.c
3561:
3562: JS_PUBLIC_API(jschar *)
3563: JS_GetStringChars(JSString *str)
3564: {
3565: return str->chars;
3566: }
***** C:\TEMP\JAVASCRIPT15\JS\SRC\JSAPI.C
3476:
3477: JS_PUBLIC_API(void)
3478: JS_ReportErrorNumber(JSContext *cx, JSErrorCallback errorCallback,
3479: void *userRef, const uintN errorNumber, ...)
3480: {
3481: va_list ap;
3482:
3483: CHECK_REQUEST(cx);
3484: va_start(ap, errorNumber);
3485: js_ReportErrorNumberVA(cx, JSREPORT_ERROR, errorCallback, userRef,
3486: errorNumber, JS_TRUE, ap);
3487: va_end(ap);
3488: }
*****

***** C:\DREAMWEAVER\THIRDPARTY\JAVASCRIPT_1_5\jsapi.c
3567:
3568: JS_PUBLIC_API(size_t)
3569: JS_GetStringLength(JSString *str)
3570: {
3571: return str->length;
3572: }
***** C:\TEMP\JAVASCRIPT15\JS\SRC\JSAPI.C
3489:
3490: JS_PUBLIC_API(void)
3491: JS_ReportErrorNumberUC(JSContext *cx, JSErrorCallback errorCallback,
3492: void *userRef, const uintN errorNumber, ...)
3493: {
3494: va_list ap;
3495:
3496: CHECK_REQUEST(cx);
3497: va_start(ap, errorNumber);
3498: js_ReportErrorNumberVA(cx, JSREPORT_ERROR, errorCallback, userRef,
3499: errorNumber, JS_FALSE, ap);
3500: va_end(ap);
3501: }
*****

***** C:\DREAMWEAVER\THIRDPARTY\JAVASCRIPT_1_5\jsapi.c
3573:
3574: JS_PUBLIC_API(intN)
3575: JS_CompareStrings(JSString *str1, JSString *str2)
3576: {
3577: return js_CompareStrings(str1, str2);
3578: }
3579:
3580: /************************************************************************/
3581:
3582: JS_PUBLIC_API(void)
3583: JS_ReportError(JSContext *cx, const char *format, ...)
3584: {
***** C:\TEMP\JAVASCRIPT15\JS\SRC\JSAPI.C
3502:
3503: JS_PUBLIC_API(JSBool)
3504: JS_ReportWarning(JSContext *cx, const char *format, ...)
3505: {
*****

***** C:\DREAMWEAVER\THIRDPARTY\JAVASCRIPT_1_5\jsapi.c
3585: va_list ap;
3586:
3587: CHECK_REQUEST(cx);
3588: va_start(ap, format);
3589: js_ReportErrorVA(cx, JSREPORT_ERROR, format, ap);
3590: va_end(ap);
3591: }
***** C:\TEMP\JAVASCRIPT15\JS\SRC\JSAPI.C
3506: va_list ap;
3507: JSBool ok;
3508:
3509: va_start(ap, format);
3510: ok = js_ReportErrorVA(cx, JSREPORT_WARNING, format, ap);
3511: va_end(ap);
3512: return ok;
3513: }
*****

***** C:\DREAMWEAVER\THIRDPARTY\JAVASCRIPT_1_5\jsapi.c
3592:
3593: JS_PUBLIC_API(void)
3594: JS_ReportErrorNumber(JSContext *cx, JSErrorCallback errorCallback,
3595: void *userRef, const uintN errorNumber, ...)
3596: {
***** C:\TEMP\JAVASCRIPT15\JS\SRC\JSAPI.C
3514:
3515: JS_PUBLIC_API(JSBool)
3516: JS_ReportErrorFlagsAndNumber(JSContext *cx, uintN flags,
3517: JSErrorCallback errorCallback, void *userRef,
3518: const uintN errorNumber, ...)
3519: {
*****

***** C:\DREAMWEAVER\THIRDPARTY\JAVASCRIPT_1_5\jsapi.c
3597: va_list ap;
3598:
***** C:\TEMP\JAVASCRIPT15\JS\SRC\JSAPI.C
3520: va_list ap;
3521: JSBool ok;
3522:
*****

***** C:\DREAMWEAVER\THIRDPARTY\JAVASCRIPT_1_5\jsapi.c
3600: va_start(ap, errorNumber);
3601: js_ReportErrorNumberVA(cx, JSREPORT_ERROR, errorCallback, userRef,
3602: errorNumber, JS_TRUE, ap);
3603: va_end(ap);
3604: }
***** C:\TEMP\JAVASCRIPT15\JS\SRC\JSAPI.C
3524: va_start(ap, errorNumber);
3525: ok = js_ReportErrorNumberVA(cx, flags, errorCallback, userRef,
3526: errorNumber, JS_TRUE, ap);
3527: va_end(ap);
3528: return ok;
3529: }
*****

***** C:\DREAMWEAVER\THIRDPARTY\JAVASCRIPT_1_5\jsapi.c
3605:
3606: JS_PUBLIC_API(void)
3607: JS_ReportErrorNumberUC(JSContext *cx, JSErrorCallback errorCallback,
3608: void *userRef, const uintN errorNumber, ...)
3609: {
***** C:\TEMP\JAVASCRIPT15\JS\SRC\JSAPI.C
3530:
3531: JS_PUBLIC_API(JSBool)
3532: JS_ReportErrorFlagsAndNumberUC(JSContext *cx, uintN flags,
3533: JSErrorCallback errorCallback, void *userRef,
3534: const uintN errorNumber, ...)
3535: {
*****

***** C:\DREAMWEAVER\THIRDPARTY\JAVASCRIPT_1_5\jsapi.c
3610: va_list ap;
3611:
***** C:\TEMP\JAVASCRIPT15\JS\SRC\JSAPI.C
3536: va_list ap;
3537: JSBool ok;
3538:
*****

***** C:\DREAMWEAVER\THIRDPARTY\JAVASCRIPT_1_5\jsapi.c
3613: va_start(ap, errorNumber);
3614: js_ReportErrorNumberVA(cx, JSREPORT_ERROR, errorCallback, userRef,
3615: errorNumber, JS_FALSE, ap);
3616: va_end(ap);
3617: }
***** C:\TEMP\JAVASCRIPT15\JS\SRC\JSAPI.C
3540: va_start(ap, errorNumber);
3541: ok = js_ReportErrorNumberVA(cx, flags, errorCallback, userRef,
3542: errorNumber, JS_FALSE, ap);
3543: va_end(ap);
3544: return ok;
3545: }
*****

***** C:\DREAMWEAVER\THIRDPARTY\JAVASCRIPT_1_5\jsapi.c
3618:
3619: JS_PUBLIC_API(JSBool)
3620: JS_ReportWarning(JSContext *cx, const char *format, ...)
3621: {
3622: va_list ap;
3623: JSBool ok;
3624:
3625: va_start(ap, format);
3626: ok = js_ReportErrorVA(cx, JSREPORT_WARNING, format, ap);
3627: va_end(ap);
3628: return ok;
3629: }
***** C:\TEMP\JAVASCRIPT15\JS\SRC\JSAPI.C
3546:
3547: JS_PUBLIC_API(void)
3548: JS_ReportOutOfMemory(JSContext *cx)
3549: {
3550: js_ReportOutOfMemory(cx, js_GetErrorMessage);
3551: }
*****

***** C:\DREAMWEAVER\THIRDPARTY\JAVASCRIPT_1_5\jsapi.c
3630:
3631: JS_PUBLIC_API(JSBool)
3632: JS_ReportErrorFlagsAndNumber(JSContext *cx, uintN flags,
3633: JSErrorCallback errorCallback, void *userRef,
3634: const uintN errorNumber, ...)
3635: {
3636: va_list ap;
3637: JSBool ok;
3638:
***** C:\TEMP\JAVASCRIPT15\JS\SRC\JSAPI.C
3552:
3553: JS_PUBLIC_API(JSErrorReporter)
3554: JS_SetErrorReporter(JSContext *cx, JSErrorReporter er)
3555: {
3556: JSErrorReporter older;
3557:
*****

***** C:\DREAMWEAVER\THIRDPARTY\JAVASCRIPT_1_5\jsapi.c
3639: CHECK_REQUEST(cx);
3640: va_start(ap, errorNumber);
3641: ok = js_ReportErrorNumberVA(cx, flags, errorCallback, userRef,
3642: errorNumber, JS_TRUE, ap);
3643: va_end(ap);
3644: return ok;
3645: }
***** C:\TEMP\JAVASCRIPT15\JS\SRC\JSAPI.C
3558: CHECK_REQUEST(cx);
3559: older = cx->errorReporter;
3560: cx->errorReporter = er;
3561: return older;
3562: }
*****

***** C:\DREAMWEAVER\THIRDPARTY\JAVASCRIPT_1_5\jsapi.c
3646:
3647: JS_PUBLIC_API(JSBool)
3648: JS_ReportErrorFlagsAndNumberUC(JSContext *cx, uintN flags,
3649: JSErrorCallback errorCallback, void *userRef,
3650: const uintN errorNumber, ...)
3651: {
3652: va_list ap;
3653: JSBool ok;
3654:
***** C:\TEMP\JAVASCRIPT15\JS\SRC\JSAPI.C
3563:
3564: /************************************************************************/
3565:
3566: /*
3567: * Regular Expressions.
3568: */
3569: JS_PUBLIC_API(JSObject *)
3570: JS_NewRegExpObject(JSContext *cx, char *bytes, size_t length, uintN flags)
3571: {
3572: #if JS_HAS_REGEXPS
3573: jschar *chars;
3574: JSObject *obj;
3575:
*****

***** C:\DREAMWEAVER\THIRDPARTY\JAVASCRIPT_1_5\jsapi.c
3655: CHECK_REQUEST(cx);
3656: va_start(ap, errorNumber);
3657: ok = js_ReportErrorNumberVA(cx, flags, errorCallback, userRef,
3658: errorNumber, JS_FALSE, ap);
3659: va_end(ap);
3660: return ok;
3661: }
***** C:\TEMP\JAVASCRIPT15\JS\SRC\JSAPI.C
3576: CHECK_REQUEST(cx);
3577: chars = js_InflateString(cx, bytes, length);
3578: if (!chars)
3579: return NULL;
3580: obj = js_NewRegExpObject(cx, NULL, chars, length, flags);
3581: JS_free(cx, chars);
3582: return obj;
3583: #else
3584: JS_ReportErrorNumber(cx, js_GetErrorMessage, NULL, JSMSG_NO_REG_EXPS);
3585: return NULL;
3586: #endif
3587: }
*****

***** C:\DREAMWEAVER\THIRDPARTY\JAVASCRIPT_1_5\jsapi.c
3662:
3663: JS_PUBLIC_API(void)
3664: JS_ReportOutOfMemory(JSContext *cx)
3665: {
3666: js_ReportOutOfMemory(cx, js_GetErrorMessage);
3667: }
***** C:\TEMP\JAVASCRIPT15\JS\SRC\JSAPI.C
3588:
3589: JS_PUBLIC_API(JSObject *)
3590: JS_NewUCRegExpObject(JSContext *cx, jschar *chars, size_t length, uintN flags)
3591: {
3592: CHECK_REQUEST(cx);
3593: #if JS_HAS_REGEXPS
3594: return js_NewRegExpObject(cx, NULL, chars, length, flags);
3595: #else
3596: JS_ReportErrorNumber(cx, js_GetErrorMessage, NULL, JSMSG_NO_REG_EXPS);
3597: return NULL;
3598: #endif
3599: }
*****

***** C:\DREAMWEAVER\THIRDPARTY\JAVASCRIPT_1_5\jsapi.c
3668:
3669: JS_PUBLIC_API(JSErrorReporter)
3670: JS_SetErrorReporter(JSContext *cx, JSErrorReporter er)
3671: {
3672: JSErrorReporter older;
3673:
***** C:\TEMP\JAVASCRIPT15\JS\SRC\JSAPI.C
3600:
3601: JS_PUBLIC_API(void)
3602: JS_SetRegExpInput(JSContext *cx, JSString *input, JSBool multiline)
3603: {
3604: JSRegExpStatics *res;
3605:
*****

***** C:\DREAMWEAVER\THIRDPARTY\JAVASCRIPT_1_5\jsapi.c
3674: CHECK_REQUEST(cx);
3675: older = cx->errorReporter;
3676: cx->errorReporter = er;
3677: return older;
3678: }
***** C:\TEMP\JAVASCRIPT15\JS\SRC\JSAPI.C
3606: CHECK_REQUEST(cx);
3607: /* No locking required, cx is thread-private and input must be live. */
3608: res = &cx->regExpStatics;
3609: res->input = input;
3610: res->multiline = multiline;
3611: cx->runtime->gcPoke = JS_TRUE;
3612: }
*****

***** C:\DREAMWEAVER\THIRDPARTY\JAVASCRIPT_1_5\jsapi.c
3679:
3680: /************************************************************************/
3681:
3682: /*
3683: * Regular Expressions.
3684: */
3685: JS_PUBLIC_API(JSObject *)
3686: JS_NewRegExpObject(JSContext *cx, char *bytes, size_t length, uintN flags)
3687: {
3688: #if JS_HAS_REGEXPS
3689: jschar *chars;
3690: JSObject *obj;
3691:
***** C:\TEMP\JAVASCRIPT15\JS\SRC\JSAPI.C
3613:
3614: JS_PUBLIC_API(void)
3615: JS_ClearRegExpStatics(JSContext *cx)
3616: {
3617: JSRegExpStatics *res;
3618:
3619: /* No locking required, cx is thread-private and input must be live. */
3620: res = &cx->regExpStatics;
3621: res->input = NULL;
3622: res->multiline = JS_FALSE;
3623: res->parenCount = 0;
3624: res->lastMatch = res->lastParen = js_EmptySubString;
3625: res->leftContext = res->rightContext = js_EmptySubString;
3626: cx->runtime->gcPoke = JS_TRUE;
3627: }
3628:
3629: JS_PUBLIC_API(void)
3630: JS_ClearRegExpRoots(JSContext *cx)
3631: {
3632: JSRegExpStatics *res;
3633:
*****

***** C:\DREAMWEAVER\THIRDPARTY\JAVASCRIPT_1_5\jsapi.c
3692: CHECK_REQUEST(cx);
3693: chars = js_InflateString(cx, bytes, length);
3694: if (!chars)
3695: return NULL;
3696: obj = js_NewRegExpObject(cx, NULL, chars, length, flags);
3697: JS_free(cx, chars);
3698: return obj;
3699: #else
3700: JS_ReportErrorNumber(cx, js_GetErrorMessage, NULL, JSMSG_NO_REG_EXPS);
3701: return NULL;
3702: #endif
3703: }
***** C:\TEMP\JAVASCRIPT15\JS\SRC\JSAPI.C
3634: CHECK_REQUEST(cx);
3635: /* No locking required, cx is thread-private and input must be live. */
3636: res = &cx->regExpStatics;
3637: res->input = NULL;
3638: cx->runtime->gcPoke = JS_TRUE;
3639: }
*****

***** C:\DREAMWEAVER\THIRDPARTY\JAVASCRIPT_1_5\jsapi.c
3704:
3705: JS_PUBLIC_API(JSObject *)
3706: JS_NewUCRegExpObject(JSContext *cx, jschar *chars, size_t length, uintN flags)
3707: {
3708: CHECK_REQUEST(cx);
3709: #if JS_HAS_REGEXPS
3710: return js_NewRegExpObject(cx, NULL, chars, length, flags);
3711: #else
3712: JS_ReportErrorNumber(cx, js_GetErrorMessage, NULL, JSMSG_NO_REG_EXPS);
3713: return NULL;
3714: #endif
3715: }
***** C:\TEMP\JAVASCRIPT15\JS\SRC\JSAPI.C
3640:
3641: /* TODO: compile, execute, get/set other statics... */
3642:
3643: /************************************************************************/
3644:
3645: JS_PUBLIC_API(void)
3646: JS_SetLocaleCallbacks(JSContext *cx, JSLocaleCallbacks *callbacks)
3647: {
3648: cx->localeCallbacks = callbacks;
3649: }
*****

***** C:\DREAMWEAVER\THIRDPARTY\JAVASCRIPT_1_5\jsapi.c
3716:
3717: JS_PUBLIC_API(void)
3718: JS_SetRegExpInput(JSContext *cx, JSString *input, JSBool multiline)
3719: {
3720: JSRegExpStatics *res;
3721:
3722: CHECK_REQUEST(cx);
3723: /* No locking required, cx is thread-private and input must be live. */
3724: res = &cx->regExpStatics;
3725: res->input = input;
3726: res->multiline = multiline;
3727: cx->runtime->gcPoke = JS_TRUE;
3728: }
***** C:\TEMP\JAVASCRIPT15\JS\SRC\JSAPI.C
3650:
3651: JS_PUBLIC_API(JSLocaleCallbacks *)
3652: JS_GetLocaleCallbacks(JSContext *cx)
3653: {
3654: return cx->localeCallbacks;
3655: }
*****

***** C:\DREAMWEAVER\THIRDPARTY\JAVASCRIPT_1_5\jsapi.c
3729:
3730: JS_PUBLIC_API(void)
3731: JS_ClearRegExpStatics(JSContext *cx)
3732: {
3733: JSRegExpStatics *res;
3734:
3735: /* No locking required, cx is thread-private and input must be live. */
3736: res = &cx->regExpStatics;
3737: res->input = NULL;
3738: res->multiline = JS_FALSE;
3739: res->parenCount = 0;
3740: res->lastMatch = res->lastParen = js_EmptySubString;
3741: res->leftContext = res->rightContext = js_EmptySubString;
3742: cx->runtime->gcPoke = JS_TRUE;
3743: }
***** C:\TEMP\JAVASCRIPT15\JS\SRC\JSAPI.C
3656:
3657: /************************************************************************/
3658:
3659: JS_PUBLIC_API(JSBool)
3660: JS_IsExceptionPending(JSContext *cx)
3661: {
3662: CHECK_REQUEST(cx);
3663: #if JS_HAS_EXCEPTIONS
3664: return (JSBool) cx->throwing;
3665: #else
3666: return JS_FALSE;
3667: #endif
3668: }
*****

***** C:\DREAMWEAVER\THIRDPARTY\JAVASCRIPT_1_5\jsapi.c
3744:
3745: JS_PUBLIC_API(void)
3746: JS_ClearRegExpRoots(JSContext *cx)
3747: {
3748: JSRegExpStatics *res;
3749:
3750: CHECK_REQUEST(cx);
3751: /* No locking required, cx is thread-private and input must be live. */
3752: res = &cx->regExpStatics;
3753: res->input = NULL;
3754: cx->runtime->gcPoke = JS_TRUE;
3755: }
***** C:\TEMP\JAVASCRIPT15\JS\SRC\JSAPI.C
3669:
3670: JS_PUBLIC_API(JSBool)
3671: JS_GetPendingException(JSContext *cx, jsval *vp)
3672: {
3673: CHECK_REQUEST(cx);
3674: #if JS_HAS_EXCEPTIONS
3675: if (!cx->throwing)
3676: return JS_FALSE;
3677: *vp = cx->exception;
3678: return JS_TRUE;
3679: #else
3680: return JS_FALSE;
3681: #endif
3682: }
*****

***** C:\DREAMWEAVER\THIRDPARTY\JAVASCRIPT_1_5\jsapi.c
3756:
3757: /* TODO: compile, execute, get/set other statics... */
3758:
3759: /************************************************************************/
3760:
3761: JS_PUBLIC_API(void)
3762: JS_SetLocaleCallbacks(JSContext *cx, JSLocaleCallbacks *callbacks)
3763: {
3764: cx->localeCallbacks = callbacks;
3765: }
***** C:\TEMP\JAVASCRIPT15\JS\SRC\JSAPI.C
3683:
3684: JS_PUBLIC_API(void)
3685: JS_SetPendingException(JSContext *cx, jsval v)
3686: {
3687: CHECK_REQUEST(cx);
3688: #if JS_HAS_EXCEPTIONS
3689: cx->throwing = JS_TRUE;
3690: cx->exception = v;
3691: #endif
3692: }
*****

***** C:\DREAMWEAVER\THIRDPARTY\JAVASCRIPT_1_5\jsapi.c
3766:
3767: JS_PUBLIC_API(JSLocaleCallbacks *)
3768: JS_GetLocaleCallbacks(JSContext *cx)
3769: {
3770: return cx->localeCallbacks;
3771: }
***** C:\TEMP\JAVASCRIPT15\JS\SRC\JSAPI.C
3693:
3694: JS_PUBLIC_API(void)
3695: JS_ClearPendingException(JSContext *cx)
3696: {
3697: CHECK_REQUEST(cx);
3698: #if JS_HAS_EXCEPTIONS
3699: cx->throwing = JS_FALSE;
3700: #endif
3701: }
*****

***** C:\DREAMWEAVER\THIRDPARTY\JAVASCRIPT_1_5\jsapi.c
3772:
3773: /************************************************************************/
3774:
3775: JS_PUBLIC_API(JSBool)
3776: JS_IsExceptionPending(JSContext *cx)
3777: {
3778: CHECK_REQUEST(cx);
3779: #if JS_HAS_EXCEPTIONS
3780: return (JSBool) cx->throwing;
3781: #else
3782: return JS_FALSE;
3783: #endif
***** C:\TEMP\JAVASCRIPT15\JS\SRC\JSAPI.C
3702:
3703: #if JS_HAS_EXCEPTIONS
3704: struct JSExceptionState {
3705: JSBool throwing;
3706: jsval exception;
3707: };
3708: #endif
3709:
3710: JS_PUBLIC_API(JSExceptionState *)
3711: JS_SaveExceptionState(JSContext *cx)
3712: {
3713: #if JS_HAS_EXCEPTIONS
3714: JSExceptionState *state;
3715:
3716: CHECK_REQUEST(cx);
3717: state = (JSExceptionState *) JS_malloc(cx, sizeof(JSExceptionState));
3718: if (state) {
3719: state->throwing = JS_GetPendingException(cx, &state->exception);
3720: if (state->throwing && JSVAL_IS_GCTHING(state->exception))
3721: js_AddRoot(cx, &state->exception, "JSExceptionState.exception");
3722: }
3723: return state;
3724: #else
3725: return NULL;
3726: #endif
*****

***** C:\DREAMWEAVER\THIRDPARTY\JAVASCRIPT_1_5\jsapi.c
3785:
3786: JS_PUBLIC_API(JSBool)
3787: JS_GetPendingException(JSContext *cx, jsval *vp)
3788: {
3789: CHECK_REQUEST(cx);
3790: #if JS_HAS_EXCEPTIONS
3791: if (!cx->throwing)
3792: return JS_FALSE;
3793: *vp = cx->exception;
3794: return JS_TRUE;
3795: #else
3796: return JS_FALSE;
3797: #endif
***** C:\TEMP\JAVASCRIPT15\JS\SRC\JSAPI.C
3728:
3729: JS_PUBLIC_API(void)
3730: JS_RestoreExceptionState(JSContext *cx, JSExceptionState *state)
3731: {
3732: #if JS_HAS_EXCEPTIONS
3733: CHECK_REQUEST(cx);
3734: if (state) {
3735: if (state->throwing)
3736: JS_SetPendingException(cx, state->exception);
3737: else
3738: JS_ClearPendingException(cx);
3739: JS_DropExceptionState(cx, state);
3740: }
3741: #endif
*****

***** C:\DREAMWEAVER\THIRDPARTY\JAVASCRIPT_1_5\jsapi.c
3800: JS_PUBLIC_API(void)
3801: JS_SetPendingException(JSContext *cx, jsval v)
3802: {
3803: CHECK_REQUEST(cx);
3804: #if JS_HAS_EXCEPTIONS
3805: cx->throwing = JS_TRUE;
3806: cx->exception = v;
3807: #endif
***** C:\TEMP\JAVASCRIPT15\JS\SRC\JSAPI.C
3744: JS_PUBLIC_API(void)
3745: JS_DropExceptionState(JSContext *cx, JSExceptionState *state)
3746: {
3747: #if JS_HAS_EXCEPTIONS
3748: CHECK_REQUEST(cx);
3749: if (state) {
3750: if (state->throwing && JSVAL_IS_GCTHING(state->exception))
3751: JS_RemoveRoot(cx, &state->exception);
3752: JS_free(cx, state);
3753: }
3754: #endif
*****

***** C:\DREAMWEAVER\THIRDPARTY\JAVASCRIPT_1_5\jsapi.c
3809:
3810: JS_PUBLIC_API(void)
3811: JS_ClearPendingException(JSContext *cx)
3812: {
3813: CHECK_REQUEST(cx);
3814: #if JS_HAS_EXCEPTIONS
3815: cx->throwing = JS_FALSE;
3816: #endif
***** C:\TEMP\JAVASCRIPT15\JS\SRC\JSAPI.C
3756:
3757: JS_PUBLIC_API(JSErrorReport *)
3758: JS_ErrorFromException(JSContext *cx, jsval v)
3759: {
3760: #if JS_HAS_EXCEPTIONS
3761: CHECK_REQUEST(cx);
3762: return js_ErrorFromException(cx, v);
3763: #else
3764: return NULL;
3765: #endif
*****

***** C:\DREAMWEAVER\THIRDPARTY\JAVASCRIPT_1_5\jsapi.c
3818:
3819: #if JS_HAS_EXCEPTIONS
3820: struct JSExceptionState {
3821: JSBool throwing;
3822: jsval exception;
3823: };
3824: #endif
***** C:\TEMP\JAVASCRIPT15\JS\SRC\JSAPI.C
3767:
3768: #ifdef JS_THREADSAFE
3769: JS_PUBLIC_API(intN)
3770: JS_GetContextThread(JSContext *cx)
3771: {
3772: return cx->thread;
3773: }
3774:
3775: JS_PUBLIC_API(intN)
3776: JS_SetContextThread(JSContext *cx)
3777: {
3778: intN old = cx->thread;
3779: cx->thread = js_CurrentThreadId();
3780: return old;
3781: }
3782:
3783: JS_PUBLIC_API(intN)
3784: JS_ClearContextThread(JSContext *cx)
3785: {
3786: intN old = cx->thread;
3787: cx->thread = 0;
3788: return old;
3789: }
3790: #endif
*****

***** C:\DREAMWEAVER\THIRDPARTY\JAVASCRIPT_1_5\jsapi.c
3825:
3826: JS_PUBLIC_API(JSExceptionState *)
3827: JS_SaveExceptionState(JSContext *cx)
3828: {
3829: #if JS_HAS_EXCEPTIONS
3830: JSExceptionState *state;
3831:
3832: CHECK_REQUEST(cx);
3833: state = (JSExceptionState *) JS_malloc(cx, sizeof(JSExceptionState));
3834: if (state) {
3835: state->throwing = JS_GetPendingException(cx, &state->exception);
3836: if (state->throwing && JSVAL_IS_GCTHING(state->exception))
3837: js_AddRoot(cx, &state->exception, "JSExceptionState.exception");
3838: }
3839: return state;
3840: #else
3841: return NULL;
3842: #endif
3843: }
***** C:\TEMP\JAVASCRIPT15\JS\SRC\JSAPI.C
3791:
3792: /************************************************************************/
3793:
3794: #ifdef XP_PC
3795: #if defined(XP_OS2)
3796: /*DSR031297 - the OS/2 equiv is dll_InitTerm, but I don't see the need for it*/
3797: #else
3798: #include <windows.h>
3799: /*
3800: * Initialization routine for the JS DLL...
3801: */
3802:
3803: /*
3804: * Global Instance handle...
3805: * In Win32 this is the module handle of the DLL.
3806: *
3807: * In Win16 this is the instance handle of the application
3808: * which loaded the DLL.
3809: */
3810:
3811: #ifdef _WIN32
3812: BOOL WINAPI DllMain (HINSTANCE hDLL, DWORD dwReason, LPVOID lpReserved)
3813: {
3814: return TRUE;
3815: }
*****

***** C:\DREAMWEAVER\THIRDPARTY\JAVASCRIPT_1_5\jsapi.c
3844:
3845: JS_PUBLIC_API(void)
3846: JS_RestoreExceptionState(JSContext *cx, JSExceptionState *state)
3847: {
3848: #if JS_HAS_EXCEPTIONS
3849: CHECK_REQUEST(cx);
3850: if (state) {
3851: if (state->throwing)
3852: JS_SetPendingException(cx, state->exception);
3853: else
3854: JS_ClearPendingException(cx);
3855: JS_DropExceptionState(cx, state);
3856: }
3857: #endif
3858: }
***** C:\TEMP\JAVASCRIPT15\JS\SRC\JSAPI.C
3816:
3817: #else /* !_WIN32 */
3818:
3819: int CALLBACK LibMain( HINSTANCE hInst, WORD wDataSeg,
3820: WORD cbHeapSize, LPSTR lpszCmdLine )
3821: {
3822: return TRUE;
3823: }
*****

***** C:\DREAMWEAVER\THIRDPARTY\JAVASCRIPT_1_5\jsapi.c
3859:
3860: JS_PUBLIC_API(void)
3861: JS_DropExceptionState(JSContext *cx, JSExceptionState *state)
3862: {
3863: #if JS_HAS_EXCEPTIONS
3864: CHECK_REQUEST(cx);
3865: if (state) {
3866: if (state->throwing && JSVAL_IS_GCTHING(state->exception))
3867: JS_RemoveRoot(cx, &state->exception);
3868: JS_free(cx, state);
3869: }
3870: #endif
3871: }
***** C:\TEMP\JAVASCRIPT15\JS\SRC\JSAPI.C
3824:
3825: BOOL CALLBACK __loadds WEP(BOOL fSystemExit)
3826: {
3827: return TRUE;
3828: }
*****

***** C:\DREAMWEAVER\THIRDPARTY\JAVASCRIPT_1_5\jsapi.c
3872:
3873: JS_PUBLIC_API(JSErrorReport *)
3874: JS_ErrorFromException(JSContext *cx, jsval v)
3875: {
3876: #if JS_HAS_EXCEPTIONS
3877: CHECK_REQUEST(cx);
3878: return js_ErrorFromException(cx, v);
3879: #else
3880: return NULL;
3881: #endif
3882: }
3883:
3884: #ifdef JS_THREADSAFE
3885: JS_PUBLIC_API(intN)
3886: JS_GetContextThread(JSContext *cx)
3887: {
3888: return cx->thread;
3889: }
3890:
3891: JS_PUBLIC_API(intN)
3892: JS_SetContextThread(JSContext *cx)
3893: {
3894: intN old = cx->thread;
3895: cx->thread = js_CurrentThreadId();
3896: return old;
3897: }
3898:
3899: JS_PUBLIC_API(intN)
3900: JS_ClearContextThread(JSContext *cx)
3901: {
3902: intN old = cx->thread;
3903: cx->thread = 0;
3904: return old;
3905: }
3906: #endif
3907:
3908: /************************************************************************/
3909:
3910: // DREAMWEAVER: DaveG - we're building a static lib, so don't include this defns
3911: #if 0
3912:
3913: #ifdef XP_PC
3914: #if defined(XP_OS2)
3915: /*DSR031297 - the OS/2 equiv is dll_InitTerm, but I don't see the need for it*/
3916: #else
3917: #include <windows.h>
3918: /*
3919: * Initialization routine for the JS DLL...
3920: */
3921:
3922: /*
3923: * Global Instance handle...
3924: * In Win32 this is the module handle of the DLL.
3925: *
3926: * In Win16 this is the instance handle of the application
3927: * which loaded the DLL.
3928: */
3929:
3930: #ifdef _WIN32
3931: BOOL WINAPI DllMain (HINSTANCE hDLL, DWORD dwReason, LPVOID lpReserved)
3932: {
3933: return TRUE;
3934: }
3935:
3936: #else /* !_WIN32 */
3937:
3938: int CALLBACK LibMain( HINSTANCE hInst, WORD wDataSeg,
3939: WORD cbHeapSize, LPSTR lpszCmdLine )
3940: {
3941: return TRUE;
3942: }
3943:
3944: BOOL CALLBACK __loadds WEP(BOOL fSystemExit)
3945: {
3946: return TRUE;
3947: }
3948:
3949: #endif /* !_WIN32 */
3950: #endif /* XP_OS2 */
3951: #endif /* XP_PC */
3952:
3953: #endif
***** C:\TEMP\JAVASCRIPT15\JS\SRC\JSAPI.C
3829:
3830: #endif /* !_WIN32 */
3831: #endif /* XP_OS2 */
3832: #endif /* XP_PC */
*****


Comparing files C:\DREAMWEAVER\THIRDPARTY\JAVASCRIPT_1_5\jsapi.h and C:\TEMP\JAVASCRIPT15\JS\SRC\JSAPI.H


***** C:\DREAMWEAVER\THIRDPARTY\JAVASCRIPT_1_5\jsapi.h
153:
154: // DREAMWEAVER added this function
155: extern JS_PUBLIC_API(JSBool)
156: JS_DoubleIsNaN(jsdouble n);
157:
158: /*
***** C:\TEMP\JAVASCRIPT15\JS\SRC\JSAPI.H
153:
154: /*
*****

***** C:\DREAMWEAVER\THIRDPARTY\JAVASCRIPT_1_5\jsapi.h
922:
923:
924: // DREAMWEAVER: renamed parameter "vector" to "vector_arg" to avoid
925: // a build error in files that include jsapi.h and also have "using
926: // namespace std" (or include a header file that does this).
927: extern JS_PUBLIC_API(JSObject *)
928: JS_NewArrayObject(JSContext *cx, jsint length, jsval *vector_arg);
929:
***** C:\TEMP\JAVASCRIPT15\JS\SRC\JSAPI.H
918:
919: extern JS_PUBLIC_API(JSObject *)
920: JS_NewArrayObject(JSContext *cx, jsint length, jsval *vector);
921:
*****

***** C:\DREAMWEAVER\THIRDPARTY\JAVASCRIPT_1_5\jsapi.h
948:
949: // DREAMWEAVER added this function
950: extern JS_PUBLIC_API(JSBool)
951: JS_AliasElementToProperty(JSContext *cx, JSObject *obj, const char *name, jsint alias);
952:
953: // DREAMWEAVER added this function
954: extern JS_PUBLIC_API(JSBool)
955: JS_AliasPropertyToElement(JSContext *cx, JSObject *obj, jsint index, const char *alias);
956:
***** C:\TEMP\JAVASCRIPT15\JS\SRC\JSAPI.H
940:
941: extern JS_PUBLIC_API(JSBool)
942: JS_LookupElement(JSContext *cx, JSObject *obj, jsint index, jsval *vp);
943:
*****

***** C:\DREAMWEAVER\THIRDPARTY\JAVASCRIPT_1_5\jsapi.h
957: extern JS_PUBLIC_API(JSBool)
958: JS_LookupElement(JSContext *cx, JSObject *obj, jsint index, jsval *vp);
959:
***** C:\TEMP\JAVASCRIPT15\JS\SRC\JSAPI.H
944: extern JS_PUBLIC_API(JSBool)
945: JS_GetElement(JSContext *cx, JSObject *obj, jsint index, jsval *vp);
946:
*****

***** C:\DREAMWEAVER\THIRDPARTY\JAVASCRIPT_1_5\jsapi.h
960: extern JS_PUBLIC_API(JSBool)
961: JS_GetElement(JSContext *cx, JSObject *obj, jsint index, jsval *vp);
962:
***** C:\TEMP\JAVASCRIPT15\JS\SRC\JSAPI.H
947: extern JS_PUBLIC_API(JSBool)
948: JS_SetElement(JSContext *cx, JSObject *obj, jsint index, jsval *vp);
949:
*****

***** C:\DREAMWEAVER\THIRDPARTY\JAVASCRIPT_1_5\jsapi.h
963: extern JS_PUBLIC_API(JSBool)
964: JS_SetElement(JSContext *cx, JSObject *obj, jsint index, jsval *vp);
965:
***** C:\TEMP\JAVASCRIPT15\JS\SRC\JSAPI.H
950: extern JS_PUBLIC_API(JSBool)
951: JS_DeleteElement(JSContext *cx, JSObject *obj, jsint index);
952:
*****

***** C:\DREAMWEAVER\THIRDPARTY\JAVASCRIPT_1_5\jsapi.h
966: extern JS_PUBLIC_API(JSBool)
967: JS_DeleteElement(JSContext *cx, JSObject *obj, jsint index);
968:
969: extern JS_PUBLIC_API(JSBool)
970: JS_DeleteElement2(JSContext *cx, JSObject *obj, jsint index, jsval *rval);
***** C:\TEMP\JAVASCRIPT15\JS\SRC\JSAPI.H
953: extern JS_PUBLIC_API(JSBool)
954: JS_DeleteElement2(JSContext *cx, JSObject *obj, jsint index, jsval *rval);
*****


Comparing files C:\DREAMWEAVER\THIRDPARTY\JAVASCRIPT_1_5\jsarena.c and C:\TEMP\JAVASCRIPT15\JS\SRC\JSARENA.C


***** C:\DREAMWEAVER\THIRDPARTY\JAVASCRIPT_1_5\jsarena.c
39: */
40: #include "DW_decls.h"
41:
42: #include "jsstddef.h"
***** C:\TEMP\JAVASCRIPT15\JS\SRC\JSARENA.C
39: */
40: #include "jsstddef.h"
*****


Comparing files C:\DREAMWEAVER\THIRDPARTY\JAVASCRIPT_1_5\jsarray.c and C:\TEMP\JAVASCRIPT15\JS\SRC\JSARRAY.C


***** C:\DREAMWEAVER\THIRDPARTY\JAVASCRIPT_1_5\jsarray.c
37: */
38: #include "DW_decls.h"
39:
40: #include "jsstddef.h"
***** C:\TEMP\JAVASCRIPT15\JS\SRC\JSARRAY.C
37: */
38: #include "jsstddef.h"
*****

***** C:\DREAMWEAVER\THIRDPARTY\JAVASCRIPT_1_5\jsarray.c
547: return JS_FALSE;
548:
549: // DREAMWEAVER CHANGE
550: // original code was JS_PropertyStub, JS_PropertyStub instead of
551: // NULL, NULL
552: //
553: // An explanation from DaveG:
554: //
555: // > Let's suppose the user's document contains a [select] tag:
556: // >
557: // > [select name="mySelectTag"]
558: // > [option]one[/option]
559: // > [option]two[/option]
560: // > [/select]
561: // >
562: // > That tag can be accessed through the DOM as follows:
563: // >
564: // > theSelect = document.forms[0].mySelectTag
565: // > alert("first option = " + theSelect.options[0]);
566: // > theSelect.options[0] = "new first option";
567: // >
568: // > In order to implement that functionality, I found that I needed to override
569: // > the default implementation of the Array type. I implemented the options
570: // > property on the select object so that it returns an OptionsArray object
571: // > instead of an Array object. The OptionsArray type is a subclass of Array,
572: // > but it has its own implementation for getting the value of options[0] (the
573: // > value is sucked out of the corresponding TTAG_OPTION Run in the Run tree)
574: // > and setting the value of options[0] (the value is the Run tree is updated).
575: // >
576: // > I found that I needed to change the base implementation of Array, so that I
577: // > could create a sub-class of it (OptionsArray).
578: if (!OBJ_DEFINE_PROPERTY(cx, obj, id, vector[index],
579: NULL, NULL, // DaveG: use getter/setter defined for class
580: JSPROP_ENUMERATE,
***** C:\TEMP\JAVASCRIPT15\JS\SRC\JSARRAY.C
545: return JS_FALSE;
546: if (!OBJ_DEFINE_PROPERTY(cx, obj, id, vector[index],
547: JS_PropertyStub, JS_PropertyStub,
548: JSPROP_ENUMERATE,
*****

***** C:\DREAMWEAVER\THIRDPARTY\JAVASCRIPT_1_5\jsarray.c
1451:
1452: // DREAMWEAVER: Added by DaveG so Dreamweaver can access this InitArrayObject
1453: JSBool
1454: JS_InitArrayObject(JSContext *cx, JSObject *obj, jsuint length, jsval *vector)
1455: {
1456: return InitArrayObject(cx, obj, length, vector);
1457: }
***** C:\TEMP\JAVASCRIPT15\JS\SRC\JSARRAY.C
*****


Comparing files C:\DREAMWEAVER\THIRDPARTY\JAVASCRIPT_1_5\jsarray.h and C:\TEMP\JAVASCRIPT15\JS\SRC\JSARRAY.H


***** C:\DREAMWEAVER\THIRDPARTY\JAVASCRIPT_1_5\jsarray.h
69:
70: // DREAMWEAVER: Added this function
71: extern JSBool
72: JS_InitArrayObject(JSContext *cx, JSObject *obj, jsuint length, jsval *vector);
73:
74: JS_END_EXTERN_C
***** C:\TEMP\JAVASCRIPT15\JS\SRC\JSARRAY.H
69:
70: JS_END_EXTERN_C
*****


Comparing files C:\DREAMWEAVER\THIRDPARTY\JAVASCRIPT_1_5\jsatom.c and C:\TEMP\JAVASCRIPT15\JS\SRC\JSATOM.C


***** C:\DREAMWEAVER\THIRDPARTY\JAVASCRIPT_1_5\jsatom.c
37: */
38: #include "DW_decls.h"
39:
40: #include "jsstddef.h"
***** C:\TEMP\JAVASCRIPT15\JS\SRC\JSATOM.C
37: */
38: #include "jsstddef.h"
*****


Comparing files C:\DREAMWEAVER\THIRDPARTY\JAVASCRIPT_1_5\jsbool.c and C:\TEMP\JAVASCRIPT15\JS\SRC\JSBOOL.C


***** C:\DREAMWEAVER\THIRDPARTY\JAVASCRIPT_1_5\jsbool.c
37: */
38: #include "DW_decls.h"
39:
40: #include "jsstddef.h"
***** C:\TEMP\JAVASCRIPT15\JS\SRC\JSBOOL.C
37: */
38: #include "jsstddef.h"
*****


Comparing files C:\DREAMWEAVER\THIRDPARTY\JAVASCRIPT_1_5\jscntxt.c and C:\TEMP\JAVASCRIPT15\JS\SRC\JSCNTXT.C


***** C:\DREAMWEAVER\THIRDPARTY\JAVASCRIPT_1_5\jscntxt.c
37: */
38: #include "DW_decls.h"
39:
40: #include "jsstddef.h"
***** C:\TEMP\JAVASCRIPT15\JS\SRC\JSCNTXT.C
37: */
38: #include "jsstddef.h"
*****


Comparing files C:\DREAMWEAVER\THIRDPARTY\JAVASCRIPT_1_5\jscpucfg.c and C:\TEMP\JAVASCRIPT15\JS\SRC\JSCPUCFG.C


***** C:\DREAMWEAVER\THIRDPARTY\JAVASCRIPT_1_5\jscpucfg.c
37: */
38: #include "DW_decls.h"
39:
40: #include <stdio.h>
***** C:\TEMP\JAVASCRIPT15\JS\SRC\JSCPUCFG.C
37: */
38: #include <stdio.h>
*****


Comparing files C:\DREAMWEAVER\THIRDPARTY\JAVASCRIPT_1_5\jscpucfg.h and C:\TEMP\JAVASCRIPT15\JS\SRC\JSCPUCFG.H


***** C:\DREAMWEAVER\THIRDPARTY\JAVASCRIPT_1_5\jscpucfg.h
87: #if defined( _WIN32) || defined(XP_OS2)
88: #undef IS_LITTLE_ENDIAN
89: #define IS_LITTLE_ENDIAN 1
***** C:\TEMP\JAVASCRIPT15\JS\SRC\JSCPUCFG.H
87: #if defined( _WIN32) || defined(XP_OS2)
88: #define IS_LITTLE_ENDIAN 1
*****


Comparing files C:\DREAMWEAVER\THIRDPARTY\JAVASCRIPT_1_5\jsdate.c and C:\TEMP\JAVASCRIPT15\JS\SRC\JSDATE.C


***** C:\DREAMWEAVER\THIRDPARTY\JAVASCRIPT_1_5\jsdate.c
47:
48: #include "DW_decls.h"
49:
50: #include "jsstddef.h"
***** C:\TEMP\JAVASCRIPT15\JS\SRC\JSDATE.C
47:
48: #include "jsstddef.h"
*****

***** C:\DREAMWEAVER\THIRDPARTY\JAVASCRIPT_1_5\jsdate.c
358:
359: // DREAMWEAVER: added the #ifdef to suppress DaylightSavingTA for Mac builds
360: // (snewman adding comment on behalf of sleifer, 7/13/01)
361: #ifdef XP_MAC
362: // dont need separate DST adjust on the mac??
363: #define LocalTime(t) ((t) + LocalTZA)
364: #else
365: #define LocalTime(t) ((t) + LocalTZA + DaylightSavingTA(t))
366: #endif
367:
***** C:\TEMP\JAVASCRIPT15\JS\SRC\JSDATE.C
356:
357: #define LocalTime(t) ((t) + LocalTZA + DaylightSavingTA(t))
358:
*****


Comparing files C:\DREAMWEAVER\THIRDPARTY\JAVASCRIPT_1_5\jsdbgapi.c and C:\TEMP\JAVASCRIPT15\JS\SRC\JSDBGAPI.C


***** C:\DREAMWEAVER\THIRDPARTY\JAVASCRIPT_1_5\jsdbgapi.c
37: */
38: #include "DW_decls.h"
39:
40: #include "jsstddef.h"
***** C:\TEMP\JAVASCRIPT15\JS\SRC\JSDBGAPI.C
37: */
38: #include "jsstddef.h"
*****


Comparing files C:\DREAMWEAVER\THIRDPARTY\JAVASCRIPT_1_5\jsdhash.c and C:\TEMP\JAVASCRIPT15\JS\SRC\JSDHASH.C


***** C:\DREAMWEAVER\THIRDPARTY\JAVASCRIPT_1_5\jsdhash.c
36: */
37: #include "DW_decls.h"
38:
39: #include <stdlib.h>
***** C:\TEMP\JAVASCRIPT15\JS\SRC\JSDHASH.C
36: */
37: #include <stdlib.h>
*****


Comparing files C:\DREAMWEAVER\THIRDPARTY\JAVASCRIPT_1_5\jsdtoa.c and C:\TEMP\JAVASCRIPT15\JS\SRC\JSDTOA.C


***** C:\DREAMWEAVER\THIRDPARTY\JAVASCRIPT_1_5\jsdtoa.c
37: */
38: #include "DW_decls.h"
39:
40: #include "jsstddef.h"
***** C:\TEMP\JAVASCRIPT15\JS\SRC\JSDTOA.C
37: */
38: #include "jsstddef.h"
*****


Comparing files C:\DREAMWEAVER\THIRDPARTY\JAVASCRIPT_1_5\jsdtoa.h and C:\TEMP\JAVASCRIPT15\JS\SRC\JSDTOA.H


***** C:\DREAMWEAVER\THIRDPARTY\JAVASCRIPT_1_5\jsdtoa.h
114:
115:
116: // DREAMWEAVER snewman 3/28/01: added declaration to avoid "no prototype" warning
117: extern void js_FinishDtoa(void);
118:
119: #endif /* jsdtoa_h___ */
***** C:\TEMP\JAVASCRIPT15\JS\SRC\JSDTOA.H
114:
115: #endif /* jsdtoa_h___ */
*****


Comparing files C:\DREAMWEAVER\THIRDPARTY\JAVASCRIPT_1_5\jsemit.c and C:\TEMP\JAVASCRIPT15\JS\SRC\JSEMIT.C


***** C:\DREAMWEAVER\THIRDPARTY\JAVASCRIPT_1_5\jsemit.c
37: */
38: #include "DW_decls.h"
39:
40: #include "jsstddef.h"
***** C:\TEMP\JAVASCRIPT15\JS\SRC\JSEMIT.C
37: */
38: #include "jsstddef.h"
*****


Comparing files C:\DREAMWEAVER\THIRDPARTY\JAVASCRIPT_1_5\jsexn.c and C:\TEMP\JAVASCRIPT15\JS\SRC\JSEXN.C


***** C:\DREAMWEAVER\THIRDPARTY\JAVASCRIPT_1_5\jsexn.c
38:
39: #include "DW_decls.h"
40:
41: #include <string.h>
***** C:\TEMP\JAVASCRIPT15\JS\SRC\JSEXN.C
38:
39: #include <string.h>
*****


Comparing files C:\DREAMWEAVER\THIRDPARTY\JAVASCRIPT_1_5\jsfile.c and C:\TEMP\JAVASCRIPT15\JS\SRC\JSFILE.C


***** C:\DREAMWEAVER\THIRDPARTY\JAVASCRIPT_1_5\jsfile.c
37: */
38: #include "DW_decls.h"
39:
40: #if JS_HAS_FILE_OBJECT
***** C:\TEMP\JAVASCRIPT15\JS\SRC\JSFILE.C
37: */
38: #if JS_HAS_FILE_OBJECT
*****


Comparing files C:\DREAMWEAVER\THIRDPARTY\JAVASCRIPT_1_5\jsfun.c and C:\TEMP\JAVASCRIPT15\JS\SRC\JSFUN.C


***** C:\DREAMWEAVER\THIRDPARTY\JAVASCRIPT_1_5\jsfun.c
37: */
38: #include "DW_decls.h"
39:
40: #include "jsstddef.h"
***** C:\TEMP\JAVASCRIPT15\JS\SRC\JSFUN.C
37: */
38: #include "jsstddef.h"
*****

***** C:\DREAMWEAVER\THIRDPARTY\JAVASCRIPT_1_5\jsfun.c
1715:
1716: // DREAMWEAVER: see jsprofiler.h
1717: #ifdef DREAMWEAVER_JAVASCRIPT_PROFILING
1718: fun->dummyFunction = -1;
1719: #endif
1720:
1721:
1722: /* Link fun to funobj and vice versa. */
***** C:\TEMP\JAVASCRIPT15\JS\SRC\JSFUN.C
1713:
1714: /* Link fun to funobj and vice versa. */
*****


Comparing files C:\DREAMWEAVER\THIRDPARTY\JAVASCRIPT_1_5\jsfun.h and C:\TEMP\JAVASCRIPT15\JS\SRC\JSFUN.H


***** C:\DREAMWEAVER\THIRDPARTY\JAVASCRIPT_1_5\jsfun.h
42:
43: // DREAMWEAVER: see jsprofiler.h
44: #include "_dw/jsprofiler.h"
45:
46: JS_BEGIN_EXTERN_C
***** C:\TEMP\JAVASCRIPT15\JS\SRC\JSFUN.H
42:
43: JS_BEGIN_EXTERN_C
*****

***** C:\DREAMWEAVER\THIRDPARTY\JAVASCRIPT_1_5\jsfun.h
59: JSClass *clasp; /* if non-null, constructor for this class */
60: // DREAMWEAVER: see jsprofiler.h
61: #ifdef DREAMWEAVER_JAVASCRIPT_PROFILING
62: int dummyFunction; /* see jsprofiler.h */
63: #endif
64: };
***** C:\TEMP\JAVASCRIPT15\JS\SRC\JSFUN.H
56: JSClass *clasp; /* if non-null, constructor for this class */
57: };
*****


Comparing files C:\DREAMWEAVER\THIRDPARTY\JAVASCRIPT_1_5\jsgc.c and C:\TEMP\JAVASCRIPT15\JS\SRC\JSGC.C


***** C:\DREAMWEAVER\THIRDPARTY\JAVASCRIPT_1_5\jsgc.c
44: */
45: #include "DW_decls.h"
46:
47: #include "jsstddef.h"
***** C:\TEMP\JAVASCRIPT15\JS\SRC\JSGC.C
44: */
45: #include "jsstddef.h"
*****


Comparing files C:\DREAMWEAVER\THIRDPARTY\JAVASCRIPT_1_5\jshash.c and C:\TEMP\JAVASCRIPT15\JS\SRC\JSHASH.C


***** C:\DREAMWEAVER\THIRDPARTY\JAVASCRIPT_1_5\jshash.c
37: */
38: #include "DW_decls.h"
39:
40: #include "jsstddef.h"
***** C:\TEMP\JAVASCRIPT15\JS\SRC\JSHASH.C
37: */
38: #include "jsstddef.h"
*****


Comparing files C:\DREAMWEAVER\THIRDPARTY\JAVASCRIPT_1_5\jsinterp.c and C:\TEMP\JAVASCRIPT15\JS\SRC\JSINTERP.C


***** C:\DREAMWEAVER\THIRDPARTY\JAVASCRIPT_1_5\jsinterp.c
37: */
38: #include "DW_decls.h"
39:
40: #include "jsstddef.h"
***** C:\TEMP\JAVASCRIPT15\JS\SRC\JSINTERP.C
37: */
38: #include "jsstddef.h"
*****

***** C:\DREAMWEAVER\THIRDPARTY\JAVASCRIPT_1_5\jsinterp.c
69:
70: // DREAMWEAVER: added JavaScript profiling - see jsprofiler.h
71: #include "_dw/jsprofiler.h"
72:
73: // DREAMWEAVER: inserted this declaration (see usage below).
74: extern JSBool JSCallNativeSafe (JSNative native, JSContext *cx, JSObject *obj, uintN argc, jsval *argv,
75: jsval *rval);
76:
77:
78: void
***** C:\TEMP\JAVASCRIPT15\JS\SRC\JSINTERP.C
67:
68: void
*****

***** C:\DREAMWEAVER\THIRDPARTY\JAVASCRIPT_1_5\jsinterp.c
318:
319: // DREAMWEAVER snewman 3/28/01: added prototype to eliminate compiler
320: // warning.
321: JS_FRIEND_API(jsval *)
322: js_AllocRawStack(JSContext *cx, uintN nslots, void **markp);
323:
324: JS_FRIEND_API(jsval *)
***** C:\TEMP\JAVASCRIPT15\JS\SRC\JSINTERP.C
308:
309: JS_FRIEND_API(jsval *)
*****

***** C:\DREAMWEAVER\THIRDPARTY\JAVASCRIPT_1_5\jsinterp.c
340:
341: // DREAMWEAVER snewman 3/28/01: added prototype to eliminate compiler
342: // warning.
343: JS_FRIEND_API(void)
344: js_FreeRawStack(JSContext *cx, void *mark);
345:
346: JS_FRIEND_API(void)
***** C:\TEMP\JAVASCRIPT15\JS\SRC\JSINTERP.C
325:
326: JS_FRIEND_API(void)
*****

***** C:\DREAMWEAVER\THIRDPARTY\JAVASCRIPT_1_5\jsinterp.c
796: frame.scopeChain = fp->scopeChain;
797: // DREAMWEAVER: patched to call JSCallNativeSafe instead of calling
798: // the native function directly. JSCallNativeSafe catches C++
799: // exceptions and turns them into an error result.
800: ok = JSCallNativeSafe(native, cx, frame.thisp, argc, frame.argv, &frame.rval);
801: JS_RUNTIME_METER(cx->runtime, nativeCalls);
***** C:\TEMP\JAVASCRIPT15\JS\SRC\JSINTERP.C
776: frame.scopeChain = fp->scopeChain;
777: ok = native(cx, frame.thisp, argc, frame.argv, &frame.rval);
778: JS_RUNTIME_METER(cx->runtime, nativeCalls);
*****

***** C:\DREAMWEAVER\THIRDPARTY\JAVASCRIPT_1_5\jsinterp.c
1167:
1168: // DREAMWEAVER: added JavaScript profiling - see jsprofiler.h
1169: #ifdef DREAMWEAVER_JAVASCRIPT_PROFILING
1170: JSBool
***** C:\TEMP\JAVASCRIPT15\JS\SRC\JSINTERP.C
1144:
1145: JSBool
*****

***** C:\DREAMWEAVER\THIRDPARTY\JAVASCRIPT_1_5\jsinterp.c
1172: {
1173: return jsprofiler_Interpret(cx, result);
1174: }
1175:
1176: JSBool
1177: js_InterpretInternal(JSContext *cx, jsval *result)
1178: #else
1179: JSBool
1180: js_Interpret(JSContext *cx, jsval *result)
1181: #endif
1182: {
1183: JSRuntime *rt;
***** C:\TEMP\JAVASCRIPT15\JS\SRC\JSINTERP.C
1147: {
1148: JSRuntime *rt;
*****

***** C:\DREAMWEAVER\THIRDPARTY\JAVASCRIPT_1_5\jsinterp.c
2605:
2606: // Dreamweaver: if we're profiling, inline functions are invisible
2607: // to the profiler, so disable them.
2608: #ifndef DREAMWEAVER_JAVASCRIPT_PROFILING
2609:
2610: if (JSVAL_IS_FUNCTION(cx, lval) &&
***** C:\TEMP\JAVASCRIPT15\JS\SRC\JSINTERP.C
2570:
2571: if (JSVAL_IS_FUNCTION(cx, lval) &&
*****

***** C:\DREAMWEAVER\THIRDPARTY\JAVASCRIPT_1_5\jsinterp.c
2708:
2709: #endif /* DREAMWEAVER_JAVASCRIPT_PROFILING */
2710:
2711: ok = js_Invoke(cx, argc, 0);
***** C:\TEMP\JAVASCRIPT15\JS\SRC\JSINTERP.C
2669:
2670: ok = js_Invoke(cx, argc, 0);
*****


Comparing files C:\DREAMWEAVER\THIRDPARTY\JAVASCRIPT_1_5\jslibmath.h and C:\TEMP\JAVASCRIPT15\JS\SRC\JSLIBMATH.H


***** C:\DREAMWEAVER\THIRDPARTY\JAVASCRIPT_1_5\jslibmath.h
54: #include <math.h>
55:
56:
57: // DREAMWEAVER: inserted these three lines
58: #ifdef _WIN32
59: #include <float.h>
60: #endif
***** C:\TEMP\JAVASCRIPT15\JS\SRC\JSLIBMATH.H
54: #include <math.h>
55: #include "jsconfig.h"
56: #ifdef MOZILLA_CLIENT
57: #include "platform.h"
58: #endif
*****

***** C:\DREAMWEAVER\THIRDPARTY\JAVASCRIPT_1_5\jslibmath.h
61:
62:
63: #include "jsconfig.h"
64: #ifdef MOZILLA_CLIENT
65: #include "platform.h"
66: #endif
67:
68: /*
***** C:\TEMP\JAVASCRIPT15\JS\SRC\JSLIBMATH.H
59:
60: /*
*****

***** C:\DREAMWEAVER\THIRDPARTY\JAVASCRIPT_1_5\jslibmath.h
73: #if defined(_WIN32) && !defined(__MWERKS__)
74:
75: // DREAMWEAVER: changed this from 1 to 0
76: #define JS_USE_FDLIBM_MATH 0
77:
***** C:\TEMP\JAVASCRIPT15\JS\SRC\JSLIBMATH.H
65: #if defined(_WIN32) && !defined(__MWERKS__)
66: #define JS_USE_FDLIBM_MATH 1
67:
*****

***** C:\DREAMWEAVER\THIRDPARTY\JAVASCRIPT_1_5\jslibmath.h
117: #define fd_ceil ceil
118:
119: // DREAMWEAVER: tweaked definition of fd_copysign
120: #ifdef XP_OS2_VACPP /* OS2TODO */
121: #define fd_copysign
122: #elif defined (_WIN32)
123: #define fd_copysign _copysign
124: #else
125: #define fd_copysign copysign
126: #endif
127:
128: #define fd_cos cos
***** C:\TEMP\JAVASCRIPT15\JS\SRC\JSLIBMATH.H
107: #define fd_ceil ceil
108: #define fd_copysign copysign
109: #define fd_cos cos
*****


Comparing files C:\DREAMWEAVER\THIRDPARTY\JAVASCRIPT_1_5\jslock.c and C:\TEMP\JAVASCRIPT15\JS\SRC\JSLOCK.C


***** C:\DREAMWEAVER\THIRDPARTY\JAVASCRIPT_1_5\jslock.c
34:
35: #include "DW_decls.h"
36:
37: #ifdef JS_THREADSAFE
***** C:\TEMP\JAVASCRIPT15\JS\SRC\JSLOCK.C
34:
35: #ifdef JS_THREADSAFE
*****


Comparing files C:\DREAMWEAVER\THIRDPARTY\JAVASCRIPT_1_5\jslog2.c and C:\TEMP\JAVASCRIPT15\JS\SRC\JSLOG2.C


***** C:\DREAMWEAVER\THIRDPARTY\JAVASCRIPT_1_5\jslog2.c
34:
35: #include "DW_decls.h"
36:
37: #include "jsstddef.h"
***** C:\TEMP\JAVASCRIPT15\JS\SRC\JSLOG2.C
34:
35: #include "jsstddef.h"
*****


Comparing files C:\DREAMWEAVER\THIRDPARTY\JAVASCRIPT_1_5\jslong.c and C:\TEMP\JAVASCRIPT15\JS\SRC\JSLONG.C


***** C:\DREAMWEAVER\THIRDPARTY\JAVASCRIPT_1_5\jslong.c
34:
35: #include "DW_decls.h"
36:
37: #include "jsstddef.h"
***** C:\TEMP\JAVASCRIPT15\JS\SRC\JSLONG.C
34:
35: #include "jsstddef.h"
*****


Comparing files C:\DREAMWEAVER\THIRDPARTY\JAVASCRIPT_1_5\jsmath.c and C:\TEMP\JAVASCRIPT15\JS\SRC\JSMATH.C


***** C:\DREAMWEAVER\THIRDPARTY\JAVASCRIPT_1_5\jsmath.c
37: */
38: #include "DW_decls.h"
39:
40: #include "jsstddef.h"
***** C:\TEMP\JAVASCRIPT15\JS\SRC\JSMATH.C
37: */
38: #include "jsstddef.h"
*****


Comparing files C:\DREAMWEAVER\THIRDPARTY\JAVASCRIPT_1_5\jsnum.c and C:\TEMP\JAVASCRIPT15\JS\SRC\JSNUM.C


***** C:\DREAMWEAVER\THIRDPARTY\JAVASCRIPT_1_5\jsnum.c
48: */
49: #include "DW_decls.h"
50:
51: #include "jsstddef.h"
***** C:\TEMP\JAVASCRIPT15\JS\SRC\JSNUM.C
48: */
49: #include "jsstddef.h"
*****


Comparing files C:\DREAMWEAVER\THIRDPARTY\JAVASCRIPT_1_5\jsnum.h and C:\TEMP\JAVASCRIPT15\JS\SRC\JSNUM.H


FC: no differences encountered


Comparing files C:\DREAMWEAVER\THIRDPARTY\JAVASCRIPT_1_5\jsobj.c and C:\TEMP\JAVASCRIPT15\JS\SRC\JSOBJ.C


***** C:\DREAMWEAVER\THIRDPARTY\JAVASCRIPT_1_5\jsobj.c
37: */
38: #include "DW_decls.h"
39:
40: #include "jsstddef.h"
***** C:\TEMP\JAVASCRIPT15\JS\SRC\JSOBJ.C
37: */
38: #include "jsstddef.h"
*****

***** C:\DREAMWEAVER\THIRDPARTY\JAVASCRIPT_1_5\jsobj.c
1253: {
1254: JSBool ret;
1255: jsval val;
1256:
1257: JSObject *proto = OBJ_GET_PROTO(cx, obj);
***** C:\TEMP\JAVASCRIPT15\JS\SRC\JSOBJ.C
1251: {
1252: JSObject *proto = OBJ_GET_PROTO(cx, obj);
*****

***** C:\DREAMWEAVER\THIRDPARTY\JAVASCRIPT_1_5\jsobj.c
1259: return js_LookupProperty(cx, obj, id, objp, propp);
1260:
1261: /* DREAMWEAVER
1262: * DaveG - if the lookup didn't find the property, do a get_property to
1263: * see if the prop exists. If it does, define the property now.
1264: *
1265: * snewman 2/22/01: this is necessary because Dreamweaver defines
1266: * object classes with additional properties, but doesn't quite
1267: * follow the rules when doing so. See dw_js_notes.txt for details.
1268: *
1269: * The full change we've made to this routine is as follows:
1270: *
1271: * 1. Insert the declarations of ret and val, above.
1272: * 2. Convert the next line to assign the result of OBJ_LOOKUP_PROPERTY
1273: * into ret, instead of returning it directly.
1274: * 3. Insert the following seven lines (the "if (ret && *propp == NULL)"
1275: * and the code inside it).
1276: * 4. Add "return ret".
1277: */
1278: ret = OBJ_LOOKUP_PROPERTY(cx, proto, id, objp, propp);
1279:
1280: if (ret && *propp == NULL) {
1281: val = JSVAL_VOID;
1282: OBJ_GET_PROPERTY(cx, proto, id, &val);
1283: if (val != JSVAL_VOID) {
1284: OBJ_DEFINE_PROPERTY(cx, proto, id, val, NULL, NULL, 0, NULL);
1285: OBJ_LOOKUP_PROPERTY(cx, proto, id, objp, propp);
1286: }
1287: }
1288:
1289: return ret;
1290: }
***** C:\TEMP\JAVASCRIPT15\JS\SRC\JSOBJ.C
1254: return js_LookupProperty(cx, obj, id, objp, propp);
1255: return OBJ_LOOKUP_PROPERTY(cx, proto, id, objp, propp);
1256: }
*****


Comparing files C:\DREAMWEAVER\THIRDPARTY\JAVASCRIPT_1_5\jsopcode.c and C:\TEMP\JAVASCRIPT15\JS\SRC\JSOPCODE.C


***** C:\DREAMWEAVER\THIRDPARTY\JAVASCRIPT_1_5\jsopcode.c
37: */
38: #include "DW_decls.h"
39:
40: #include "jsstddef.h"
***** C:\TEMP\JAVASCRIPT15\JS\SRC\JSOPCODE.C
37: */
38: #include "jsstddef.h"
*****


Comparing files C:\DREAMWEAVER\THIRDPARTY\JAVASCRIPT_1_5\jsparse.c and C:\TEMP\JAVASCRIPT15\JS\SRC\JSPARSE.C


***** C:\DREAMWEAVER\THIRDPARTY\JAVASCRIPT_1_5\jsparse.c
49: */
50: #include "DW_decls.h"
51:
52: #include "jsstddef.h"
***** C:\TEMP\JAVASCRIPT15\JS\SRC\JSPARSE.C
49: */
50: #include "jsstddef.h"
*****

***** C:\DREAMWEAVER\THIRDPARTY\JAVASCRIPT_1_5\jsparse.c
353:
354:
355: // DREAMWEAVER snewman 3/16/01: added this flag to detect re-entrant calls
356: // to the JS compiler. I'm getting a wierd illegal-access error when the
357: // internal JavaScript debugger contains a compile-time error, and I think
358: // it's because this causes us to invoke the compiler reentrantly and it
359: // gets mixed up about tempPool.
360: JSBool gInCompileTokenStream = JS_FALSE;
361:
362:
363: /*
***** C:\TEMP\JAVASCRIPT15\JS\SRC\JSPARSE.C
351:
352: /*
*****

***** C:\DREAMWEAVER\THIRDPARTY\JAVASCRIPT_1_5\jsparse.c
372: JSBool ok;
373:
374: // DREAMWEAVER snewman 3/16/01: see declaration of gInCompileTokenStream.
375: JS_ASSERT(!gInCompileTokenStream);
376: gInCompileTokenStream = JS_TRUE;
377:
378: #ifdef METER_PARSENODES
***** C:\TEMP\JAVASCRIPT15\JS\SRC\JSPARSE.C
361: JSBool ok;
362: #ifdef METER_PARSENODES
*****

***** C:\DREAMWEAVER\THIRDPARTY\JAVASCRIPT_1_5\jsparse.c
437: cx->fp = fp;
438:
439: // DREAMWEAVER snewman 3/16/01: see declaration of gInCompileTokenStream.
440: gInCompileTokenStream = JS_FALSE;
441:
442: return ok;
***** C:\TEMP\JAVASCRIPT15\JS\SRC\JSPARSE.C
421: cx->fp = fp;
422: return ok;
*****

***** C:\DREAMWEAVER\THIRDPARTY\JAVASCRIPT_1_5\jsparse.c
835: }
836:
837:
838: // DREAMWEAVER macromedia change - jschang 6/1/01
839: // if the containing object has the special property - MM_defineFunctionsOnCompile
840: // then define the property now - this is because we need to compile scripts
841: // in the document, so we can execute some of the functions selectively later on
842: // - JavaScript 1.2 did this autmoatically, but the JavaScript 1.5 only defines the
843: // property when you execute the script that contains the function
844: // definition, but we can't just execute any old script, we only execute
845: // specific behavior functions that we define and have control over.
846: //
847: // The following code that defines the property is copied and modified from
848: // jsinterp.c, js_Interpret, case JSOP_DEFFUN:
849: else {
850: JSStackFrame *fp;
851: JSObject *varobj;
852: JSBool ok, cond;
853: jsval specialPropVal;
854: uintN flags, attrs;
855:
856: fp = cx->fp;
857: varobj = fp->varobj;
858:
859: // check the special property
860: if ( JS_GetProperty(cx, varobj, "MM_defineFunctionsOnCompile", &specialPropVal) &&
861: JS_TRUE == JSVAL_TO_BOOLEAN(specialPropVal) )
862: {
863: /*
864: * We must be at top-level (default "box", either function body or
865: * global) scope, not inside a with or other compound statement in
866: * the same compilation unit (ECMA Program).
867: *
868: * However, we could be in a Program being eval'd from inside a
869: * with statement, so we need to distinguish variables object from
870: * scope chain head. Hence the two assignments to parent below.
871: * First we make sure the function object we're defining has the
872: * right scope chain. Then we define its name in fp->varobj.
873: *
874: * If static link is not current scope, clone fun's object to link
875: * to the current scope via parent. This clause exists to enable
876: * sharing of compiled functions among multiple equivalent scopes,
877: * splitting the cost of compilation evenly among the scopes and
878: * amortizing it over a number of executions. Examples include XUL
879: * scripts and event handlers shared among Mozilla chrome windows,
880: * and server-side JS user-defined functions shared among requests.
881: *
882: * NB: The Script object exposes compile and exec in the language,
883: * such that this clause introduces an incompatible change from old
884: * JS versions that supported Script. Such a JS version supported
885: * executing a script that defined and called functions scoped by
886: * the compile-time static link, not by the exec-time scope chain.
887: *
888: * We sacrifice compatibility, breaking such scripts, in order to
889: * promote compile-cost sharing and amortizing, and because Script
890: * is not and will not be standardized.
891: */
892: /***** jschang - this is in js_Execute: I don't think we need it here
893: parent = fp->scopeChain;
894: if (OBJ_GET_PARENT(cx, obj) != parent) {
895: obj = js_CloneFunctionObject(cx, obj, parent);
896: if (!obj) {
897: ok = JS_FALSE;
898: goto out;
899: }
900: }
901: *****/
902:
903: /* Load function flags that are also property attributes. */
904: flags = fun->flags & (JSFUN_GETTER | JSFUN_SETTER);
905: attrs = flags | JSPROP_ENUMERATE;
906:
907: /*
908: * Check for a const property of the same name -- or any kind
909: * of property if executing with the strict option. We check
910: * here at runtime as well as at compile-time, to handle eval
911: * as well as multiple HTML script tags.
912: */
913: parent = fp->varobj;
914: if (js_CheckRedeclaration(cx, parent, (jsid)funAtom, attrs, &cond))
915: {
916: ok = OBJ_DEFINE_PROPERTY(cx, parent, (jsid)funAtom,
917: OBJECT_TO_JSVAL(fun->object),
918: (flags & JSFUN_GETTER)
919: ? (JSPropertyOp) fun->object
920: : NULL,
921: (flags & JSFUN_SETTER)
922: ? (JSPropertyOp) fun->object
923: : NULL,
924: attrs,
925: NULL);
926: }
927: }
928: }
929: #endif
***** C:\TEMP\JAVASCRIPT15\JS\SRC\JSPARSE.C
815: }
816: #endif
*****

***** C:\DREAMWEAVER\THIRDPARTY\JAVASCRIPT_1_5\jsparse.c
1057: !JSVERSION_IS_ECMA(cx->version);
1058:
1059: // DREAMWEAVER dgeorge 4/23/02: there are lots of Dreamweaver
1060: // extensions, such as the "Javascript Integration Kit for
1061: // Macromedia Flash 5", which will break if we stop treating
1062: // a single equals sign as equality. Therefore, I'm forcing
1063: // rewrite to be true. Also see the code in CompileOrExecScript
1064: // (in JSInterp.cpp) to handle this case.
1065: rewrite = JS_TRUE;
1066:
1067: if (!js_ReportCompileErrorNumber(cx, ts, NULL,
***** C:\TEMP\JAVASCRIPT15\JS\SRC\JSPARSE.C
944: !JSVERSION_IS_ECMA(cx->version);
945: if (!js_ReportCompileErrorNumber(cx, ts, NULL,
*****


Comparing files C:\DREAMWEAVER\THIRDPARTY\JAVASCRIPT_1_5\jsparse.h and C:\TEMP\JAVASCRIPT15\JS\SRC\JSPARSE.H


FC: no differences encountered


Comparing files C:\DREAMWEAVER\THIRDPARTY\JAVASCRIPT_1_5\jsprf.c and C:\TEMP\JAVASCRIPT15\JS\SRC\JSPRF.C


***** C:\DREAMWEAVER\THIRDPARTY\JAVASCRIPT_1_5\jsprf.c
39: */
40: #include "DW_decls.h"
41:
42: #include "jsstddef.h"
***** C:\TEMP\JAVASCRIPT15\JS\SRC\JSPRF.C
39: */
40: #include "jsstddef.h"
*****


Comparing files C:\DREAMWEAVER\THIRDPARTY\JAVASCRIPT_1_5\jsregexp.c and C:\TEMP\JAVASCRIPT15\JS\SRC\JSREGEXP.C


***** C:\DREAMWEAVER\THIRDPARTY\JAVASCRIPT_1_5\jsregexp.c
37: */
38: #include "DW_decls.h"
39:
40: #include "jsstddef.h"
***** C:\TEMP\JAVASCRIPT15\JS\SRC\JSREGEXP.C
37: */
38: #include "jsstddef.h"
*****

***** C:\DREAMWEAVER\THIRDPARTY\JAVASCRIPT_1_5\jsregexp.c
67:
68: /* Dreamweaver DREAMWEAVER dw Ultradev ULTRADEV ud VELCRO
69: *
70: * This is a dreamweaver specific addition to the mozilla
71: * release of JS 1.5. Defining DREAMWEAVER_INCLUDE_EXTENDED_CHARS_IN_CLASSES
72: * will include include Unicode characters above 255 in the \w \W \s and \S
73: * classes. All changes are wrapped in this define.
74: */
75: #define DREAMWEAVER_INCLUDE_EXTENDED_CHARS_IN_CLASSES
76:
77: typedef struct RENode RENode;
***** C:\TEMP\JAVASCRIPT15\JS\SRC\JSREGEXP.C
65:
66: typedef struct RENode RENode;
*****

***** C:\DREAMWEAVER\THIRDPARTY\JAVASCRIPT_1_5\jsregexp.c
146: uint16 bmsize; /* bitmap size, based on max char code */
147: #ifdef DREAMWEAVER_INCLUDE_EXTENDED_CHARS_IN_CLASSES
148: JSBool wordclass;
149: JSBool spaceclass;
150: #endif
151: uint8 *bitmap;
***** C:\TEMP\JAVASCRIPT15\JS\SRC\JSREGEXP.C
135: uint16 bmsize; /* bitmap size, based on max char code */
136: uint8 *bitmap;
*****

***** C:\DREAMWEAVER\THIRDPARTY\JAVASCRIPT_1_5\jsregexp.c
1342: JSBool ok; /* indicates runtime error during matching */
1343: const jschar *complete;
1344: } MatchState;
***** C:\TEMP\JAVASCRIPT15\JS\SRC\JSREGEXP.C
1327: JSBool ok; /* indicates runtime error during matching */
1328: } MatchState;
*****

***** C:\DREAMWEAVER\THIRDPARTY\JAVASCRIPT_1_5\jsregexp.c
1394: */
1395: kidMatch = matchRENodes(grState->state, grState->kid, grState->next, cp);
1396: grState->state->complete = NULL;
1397:
1398: if (kidMatch == NULL) {
1399: grState->state->parenCount = num;
***** C:\TEMP\JAVASCRIPT15\JS\SRC\JSREGEXP.C
1378: */
1379:
1380: kidMatch = matchRENodes(grState->state, grState->kid, grState->next, cp);
1381: if (kidMatch == NULL) {
1382: match = matchRENodes(grState->state, grState->next, grState->stop, cp);
1383: if (match) {
1384: grState->state->parenCount = num;
*****

***** C:\DREAMWEAVER\THIRDPARTY\JAVASCRIPT_1_5\jsregexp.c
1401: matchRENodes(grState->state, grState->kid, grState->next, previousKid);
1402: match = matchRENodes(grState->state, grState->next, grState->stop, cp);
1403: if (match) {
1404: if (grState->stop == NULL) {
1405: grState->state->complete = match;
1406: return cp;
1407: }
1408: return cp;
***** C:\TEMP\JAVASCRIPT15\JS\SRC\JSREGEXP.C
1386: matchRENodes(grState->state, grState->kid, grState->next, previousKid);
1387: return cp;
*****

***** C:\DREAMWEAVER\THIRDPARTY\JAVASCRIPT_1_5\jsregexp.c
1425: grState->state->parenCount = num;
1426: matchRENodes(grState->state, grState->kid, grState->next, cp);
1427:
1428: if ((match = matchRENodes(grState->state, grState->next, grState->stop, kidMatch))) {
1429: if (grState->stop == NULL) {
1430: grState->state->complete = match;
1431: return kidMatch;
***** C:\TEMP\JAVASCRIPT15\JS\SRC\JSREGEXP.C
1404: grState->state->parenCount = num;
1405: if (matchRENodes(grState->state, grState->next, grState->stop, kidMatch)) {
1406: matchRENodes(grState->state, grState->kid, grState->next, cp);
1407: return kidMatch;
*****

***** C:\DREAMWEAVER\THIRDPARTY\JAVASCRIPT_1_5\jsregexp.c
1432: }
1433: matchRENodes(grState->state, grState->kid, grState->next, cp);
1434: return kidMatch;
1435: }
1436: return NULL;
***** C:\TEMP\JAVASCRIPT15\JS\SRC\JSREGEXP.C
1408: }
1409: return NULL;
*****

***** C:\DREAMWEAVER\THIRDPARTY\JAVASCRIPT_1_5\jsregexp.c
1455: match = greedyRecurse(&grState, cp, previousKid);
1456: if (match || !stop) {
1457: return match;
1458: }
1459: grState.kidCount = kidCount;
***** C:\TEMP\JAVASCRIPT15\JS\SRC\JSREGEXP.C
1428: match = greedyRecurse(&grState, cp, previousKid);
1429: if (match || !stop)
1430: return match;
1431: grState.kidCount = kidCount;
*****

***** C:\DREAMWEAVER\THIRDPARTY\JAVASCRIPT_1_5\jsregexp.c
1472: match = matchRENodes(state, ren->next, NULL, cp);
1473: if (state->complete)
1474: return state->complete;
1475: if (match) {
1476: state->complete = match;
1477: return cp;
1478: }
1479: if (match != NULL)
1480: return cp;
1481:
1482: kidMatch = matchRENodes(state, (RENode *)ren->kid, ren->next, cp);
***** C:\TEMP\JAVASCRIPT15\JS\SRC\JSREGEXP.C
1444: match = matchRENodes(state, ren->next, NULL, cp);
1445: if (match != NULL) return cp;
1446: kidMatch = matchRENodes(state, (RENode *)ren->kid, ren->next, cp);
*****

***** C:\DREAMWEAVER\THIRDPARTY\JAVASCRIPT_1_5\jsregexp.c
1484: return NULL;
1485: if (state->complete)
1486: return state->complete;
1487: if (kidMatch == cp)
***** C:\TEMP\JAVASCRIPT15\JS\SRC\JSREGEXP.C
1448: return NULL;
1449: if (kidMatch == cp)
*****

***** C:\DREAMWEAVER\THIRDPARTY\JAVASCRIPT_1_5\jsregexp.c
1561:
1562: #ifdef DREAMWEAVER_INCLUDE_EXTENDED_CHARS_IN_CLASSES
1563: ren->u.ucclass.wordclass = fill ? JS_TRUE : JS_FALSE;
1564: ren->u.ucclass.spaceclass = fill ? JS_TRUE : JS_FALSE;
1565: #endif
1566:
1567: n = (uintN)ren->u.ucclass.bmsize;
***** C:\TEMP\JAVASCRIPT15\JS\SRC\JSREGEXP.C
1523:
1524: n = (uintN)ren->u.ucclass.bmsize;
*****

***** C:\DREAMWEAVER\THIRDPARTY\JAVASCRIPT_1_5\jsregexp.c
1614: MATCH_BIT(c);
1615: #ifdef DREAMWEAVER_INCLUDE_EXTENDED_CHARS_IN_CLASSES
1616: ren->u.ucclass.wordclass = fill ? JS_FALSE : JS_TRUE ;
1617: #endif
1618: continue;
***** C:\TEMP\JAVASCRIPT15\JS\SRC\JSREGEXP.C
1571: MATCH_BIT(c);
1572: continue;
*****

***** C:\DREAMWEAVER\THIRDPARTY\JAVASCRIPT_1_5\jsregexp.c
1624: MATCH_BIT(c);
1625: #ifdef DREAMWEAVER_INCLUDE_EXTENDED_CHARS_IN_CLASSES
1626: ren->u.ucclass.spaceclass = fill ? JS_FALSE : JS_TRUE ;
1627: #endif
1628: continue;
***** C:\TEMP\JAVASCRIPT15\JS\SRC\JSREGEXP.C
1578: MATCH_BIT(c);
1579: continue;
*****

***** C:\DREAMWEAVER\THIRDPARTY\JAVASCRIPT_1_5\jsregexp.c
1634: MATCH_BIT(c);
1635: #ifdef DREAMWEAVER_INCLUDE_EXTENDED_CHARS_IN_CLASSES
1636: ren->u.ucclass.spaceclass = fill ? JS_FALSE : JS_TRUE;
1637: #endif
1638: continue;
***** C:\TEMP\JAVASCRIPT15\JS\SRC\JSREGEXP.C
1585: MATCH_BIT(c);
1586: continue;
*****

***** C:\DREAMWEAVER\THIRDPARTY\JAVASCRIPT_1_5\jsregexp.c
1644: MATCH_BIT(c);
1645: #ifdef DREAMWEAVER_INCLUDE_EXTENDED_CHARS_IN_CLASSES
1646: ren->u.ucclass.wordclass = fill ? JS_FALSE : JS_TRUE;
1647: #endif
1648: continue;
***** C:\TEMP\JAVASCRIPT15\JS\SRC\JSREGEXP.C
1592: MATCH_BIT(c);
1593: continue;
*****

***** C:\DREAMWEAVER\THIRDPARTY\JAVASCRIPT_1_5\jsregexp.c
1775: kidMatch = matchRENodes(state, (RENode *)ren->kid, stop, cp);
1776: if (state->complete)
1777: return state->complete;
1778: if (kidMatch != NULL)
***** C:\TEMP\JAVASCRIPT15\JS\SRC\JSREGEXP.C
1720: kidMatch = matchRENodes(state, (RENode *)ren->kid, stop, cp);
1721: if (kidMatch != NULL)
*****

***** C:\DREAMWEAVER\THIRDPARTY\JAVASCRIPT_1_5\jsregexp.c
1790: return NULL;
1791: if (state->complete)
1792: return state->complete;
1793: lastKid = cp;
***** C:\TEMP\JAVASCRIPT15\JS\SRC\JSREGEXP.C
1733: return NULL;
1734: lastKid = cp;
*****

***** C:\DREAMWEAVER\THIRDPARTY\JAVASCRIPT_1_5\jsregexp.c
1799: if (cp2 == NULL) {
1800: if (lastKid) {
1801: cp = matchRENodes(state, (RENode *)ren->kid, ren->next,
***** C:\TEMP\JAVASCRIPT15\JS\SRC\JSREGEXP.C
1740: if (cp2 == NULL) {
1741: if (lastKid)
1742: cp = matchRENodes(state, (RENode *)ren->kid, ren->next,
*****

***** C:\DREAMWEAVER\THIRDPARTY\JAVASCRIPT_1_5\jsregexp.c
1802: lastKid);
1803: if (state->complete)
1804: return state->complete;
1805: }
1806: }
1807: else {
1808: if (state->complete)
1809: return state->complete;
1810: cp = cp2;
***** C:\TEMP\JAVASCRIPT15\JS\SRC\JSREGEXP.C
1743: lastKid);
1744: }
1745: else
1746: cp = cp2;
*****

***** C:\DREAMWEAVER\THIRDPARTY\JAVASCRIPT_1_5\jsregexp.c
1811: }
1812: }
1813: else {
***** C:\TEMP\JAVASCRIPT15\JS\SRC\JSREGEXP.C
1747: }
1748: else {
*****

***** C:\DREAMWEAVER\THIRDPARTY\JAVASCRIPT_1_5\jsregexp.c
1817: return NULL;
1818: if (state->complete)
1819: return state->complete;
1820: }
***** C:\TEMP\JAVASCRIPT15\JS\SRC\JSREGEXP.C
1752: return NULL;
1753: }
*****

***** C:\DREAMWEAVER\THIRDPARTY\JAVASCRIPT_1_5\jsregexp.c
1824: ren->next, cp);
1825: state->complete = NULL;
1826: if (kidMatch == NULL)
***** C:\TEMP\JAVASCRIPT15\JS\SRC\JSREGEXP.C
1757: ren->next, cp);
1758: if (kidMatch == NULL)
*****

***** C:\DREAMWEAVER\THIRDPARTY\JAVASCRIPT_1_5\jsregexp.c
1827: return NULL;
1828:
1829: if ((ren->flags & RENODE_MINIMAL) == 0) {
***** C:\TEMP\JAVASCRIPT15\JS\SRC\JSREGEXP.C
1759: return NULL;
1760: if ((ren->flags & RENODE_MINIMAL) == 0) {
*****

***** C:\DREAMWEAVER\THIRDPARTY\JAVASCRIPT_1_5\jsregexp.c
1830: cp2 = matchGreedyKid(state, ren, stop, 1, kidMatch, cp);
1831: if (cp2 == NULL) {
1832: cp = matchRENodes(state, (RENode *)ren->kid, ren->next, cp);
1833: if (state->complete)
1834: return state->complete;
1835: }
1836: else {
1837: if (state->complete)
1838: return state->complete;
1839: cp = cp2;
***** C:\TEMP\JAVASCRIPT15\JS\SRC\JSREGEXP.C
1761: cp2 = matchGreedyKid(state, ren, stop, 1, kidMatch, cp);
1762: if (cp2 == NULL)
1763: cp = matchRENodes(state, (RENode *)ren->kid, ren->next, cp);
1764: else
1765: cp = cp2;
*****

***** C:\DREAMWEAVER\THIRDPARTY\JAVASCRIPT_1_5\jsregexp.c
1840: }
1841: }
1842: else {
1843: cp = matchNonGreedyKid(state, ren, 1, 0, kidMatch);
1844: if (state->complete)
1845: return state->complete;
1846: }
1847: if (cp == NULL)
***** C:\TEMP\JAVASCRIPT15\JS\SRC\JSREGEXP.C
1766: }
1767: else
1768: cp = matchNonGreedyKid(state, ren, 1, 0, kidMatch);
1769: if (cp == NULL)
*****

***** C:\DREAMWEAVER\THIRDPARTY\JAVASCRIPT_1_5\jsregexp.c
1852: cp2 = matchGreedyKid(state, ren, stop, 0, cp, NULL);
1853: if (cp2) {
1854: if (state->complete)
1855: return state->complete;
1856: cp = cp2;
***** C:\TEMP\JAVASCRIPT15\JS\SRC\JSREGEXP.C
1774: cp2 = matchGreedyKid(state, ren, stop, 0, cp, NULL);
1775: if (cp2)
1776: cp = cp2;
*****

***** C:\DREAMWEAVER\THIRDPARTY\JAVASCRIPT_1_5\jsregexp.c
1857: }
1858: }
1859: else {
***** C:\TEMP\JAVASCRIPT15\JS\SRC\JSREGEXP.C
1777: }
1778: else {
*****

***** C:\DREAMWEAVER\THIRDPARTY\JAVASCRIPT_1_5\jsregexp.c
1862: return NULL;
1863: if (state->complete)
1864: return state->complete;
1865: }
***** C:\TEMP\JAVASCRIPT15\JS\SRC\JSREGEXP.C
1781: return NULL;
1782: }
*****

***** C:\DREAMWEAVER\THIRDPARTY\JAVASCRIPT_1_5\jsregexp.c
1869: if (ren->flags & RENODE_MINIMAL) {
1870: cp2 = matchRENodes(state, ren->next,
1871: stop, cp);
1872: if (state->complete)
1873: return state->complete;
1874: if (cp2 != NULL)
1875: return cp2;
1876: }
***** C:\TEMP\JAVASCRIPT15\JS\SRC\JSREGEXP.C
1786: if (ren->flags & RENODE_MINIMAL) {
1787: const jschar *restMatch = matchRENodes(state, ren->next,
1788: stop, cp);
1789: if (restMatch != NULL)
1790: return restMatch;
1791: }
*****

***** C:\DREAMWEAVER\THIRDPARTY\JAVASCRIPT_1_5\jsregexp.c
1878: ren->next, cp);
1879: if (state->complete)
1880: return state->complete;
1881:
1882: if (kidMatch == NULL) {
***** C:\TEMP\JAVASCRIPT15\JS\SRC\JSREGEXP.C
1793: ren->next, cp);
1794: if (kidMatch == NULL) {
*****

***** C:\DREAMWEAVER\THIRDPARTY\JAVASCRIPT_1_5\jsregexp.c
1886: else {
1887: cp2 = matchRENodes(state, ren->next,
1888: stop, kidMatch);
1889: if (state->complete)
1890: return state->complete;
1891: if (cp2 == NULL) {
1892: /* need to undo the result of running the kid */
***** C:\TEMP\JAVASCRIPT15\JS\SRC\JSREGEXP.C
1798: else {
1799: const jschar *restMatch = matchRENodes(state, ren->next,
1800: stop, kidMatch);
1801: if (restMatch == NULL) {
1802: /* need to undo the result of running the kid */
*****

***** C:\DREAMWEAVER\THIRDPARTY\JAVASCRIPT_1_5\jsregexp.c
1896: else
1897: return cp2;
1898: }
***** C:\TEMP\JAVASCRIPT15\JS\SRC\JSREGEXP.C
1806: else
1807: return restMatch;
1808: }
*****

***** C:\DREAMWEAVER\THIRDPARTY\JAVASCRIPT_1_5\jsregexp.c
1920: ren->next, cp);
1921: if (state->complete)
1922: return state->complete;
1923: if (kidMatch == NULL)
***** C:\TEMP\JAVASCRIPT15\JS\SRC\JSREGEXP.C
1830: ren->next, cp);
1831: if (kidMatch == NULL)
*****

***** C:\DREAMWEAVER\THIRDPARTY\JAVASCRIPT_1_5\jsregexp.c
1928: ren->next, cp);
1929: if (state->complete)
1930: return state->complete;
1931: if (kidMatch != NULL)
***** C:\TEMP\JAVASCRIPT15\JS\SRC\JSREGEXP.C
1836: ren->next, cp);
1837: if (kidMatch != NULL)
*****

***** C:\DREAMWEAVER\THIRDPARTY\JAVASCRIPT_1_5\jsregexp.c
1964: cp2 = (jschar*) ren->kid;
1965: #ifdef DREAMWEAVER_INCLUDE_EXTENDED_CHARS_IN_CLASSES
1966: // for now, we'll define words in the extended range as anything that's not a space
1967: // this also implies any extended range unicode characters are either words or spaces,
1968: // which is not always true, but better than always excluding them
1969: if( (*cp2 >= 0x2000 && *cp2 <= 0x200A ) ||
1970: *cp2 == 0x200B || //zero width space
1971: *cp2 == 0x3000 || //ideographic space
1972: *cp2 == 0xFEFF || //zero width no-break space
1973: *cp2 == 0x0020 || //regular space (just in case)
1974: *cp2 == 0x00A0 ) //no break space
1975: {
1976: if( ren->u.ucclass.spaceclass == JS_TRUE )
1977: cp++;
1978: else
1979: return NULL;
1980: }
1981: else if( ren->u.ucclass.wordclass == JS_TRUE )
1982: cp++;
1983: else
1984: return NULL;
1985: #else //DREAMWEAVER_INCLUDE_EXTENDED_CHARS_IN_CLASSES
1986: if (*cp2 == '^')
1987: cp++;
1988: else
1989: return NULL;
1990: #endif //DREAMWEAVER_INCLUDE_EXTENDED_CHARS_IN_CLASSES
1991: }
***** C:\TEMP\JAVASCRIPT15\JS\SRC\JSREGEXP.C
1870: cp2 = (jschar*) ren->kid;
1871: if (*cp2 == '^')
1872: cp++;
1873: else
1874: return NULL;
1875: }
*****

***** C:\DREAMWEAVER\THIRDPARTY\JAVASCRIPT_1_5\jsregexp.c
2181: state.flags = re->flags;
2182: state.complete = NULL;
2183:
***** C:\TEMP\JAVASCRIPT15\JS\SRC\JSREGEXP.C
2065: state.flags = re->flags;
2066:
*****

***** C:\DREAMWEAVER\THIRDPARTY\JAVASCRIPT_1_5\jsregexp.c
2517: default:
2518: sub = js_RegExpParenSubString(res, slot);
2519: break;
***** C:\TEMP\JAVASCRIPT15\JS\SRC\JSREGEXP.C
2400: default:
2401: sub = REGEXP_PAREN_SUBSTRING(res, slot);
2402: break;
*****

***** C:\DREAMWEAVER\THIRDPARTY\JAVASCRIPT_1_5\jsregexp.c
2962:
2963: // DREAMWEAVER: See comment in the header file.
2964: JSRegExpStatics *
2965: js_GetRegExpStatics(JSContext *cx)
2966: {
2967: return &(cx->regExpStatics);
2968: }
2969:
2970: // DREAMWEAVER: See [dgeorge 23-feb-02] comment in header file
2971: JSSubString *
2972: js_RegExpParenSubString(JSRegExpStatics *res, jsuint num)
2973: {
2974: JSSubString *ret = NULL;
2975:
2976: if (num < (jsuint)(res->parenCount))
2977: {
2978: if (num < 9)
2979: {
2980: ret = &(res->parens[num]);
2981: }
2982: else
2983: {
2984: ret = &(res->moreParens[num - 9]);
2985: }
2986: }
2987: else
2988: {
2989: ret = &js_EmptySubString;
2990: }
2991:
2992: return ret;
2993: }
2994:
2995: #endif /* JS_HAS_REGEXPS */
***** C:\TEMP\JAVASCRIPT15\JS\SRC\JSREGEXP.C
2845:
2846: #endif /* JS_HAS_REGEXPS */
*****


Comparing files C:\DREAMWEAVER\THIRDPARTY\JAVASCRIPT_1_5\jsregexp.h and C:\TEMP\JAVASCRIPT15\JS\SRC\JSREGEXP.H


***** C:\DREAMWEAVER\THIRDPARTY\JAVASCRIPT_1_5\jsregexp.h
59: * enough to hold parenCount, or else be null when parenCount is 0.
60: *
61: * DREAMWEAVER [dgeorge 23-feb-02] I'm replacing the macro with a function because
62: * it looks like the macro is being compiled incorrectly in the WinRelease
63: * build
64: */
65: /*
66: #define REGEXP_PAREN_SUBSTRING(res, num) \
***** C:\TEMP\JAVASCRIPT15\JS\SRC\JSREGEXP.H
59: * enough to hold parenCount, or else be null when parenCount is 0.
60: */
61: #define REGEXP_PAREN_SUBSTRING(res, num) \
*****

***** C:\DREAMWEAVER\THIRDPARTY\JAVASCRIPT_1_5\jsregexp.h
71: : &js_EmptySubString)
72: */
73: extern JSSubString *
74: js_RegExpParenSubString(JSRegExpStatics *res, jsuint num);
75:
***** C:\TEMP\JAVASCRIPT15\JS\SRC\JSREGEXP.H
66: : &js_EmptySubString)
67:
*****

***** C:\DREAMWEAVER\THIRDPARTY\JAVASCRIPT_1_5\jsregexp.h
132:
133:
134: /* DREAMWEAVER:
135: *
136: * Added a function to access the statics data structure.
137: *
138: * We should be able to access the structure by traversing the js_context
139: * data structure. However, differences between the compiler flags for
140: * the NscpJavaScript library and the Dreamweaver executable cause problems
141: * on the Mac (I think the cause is that Enums are ints in Dreamweaver but
142: * not in NscpJavaScript). Instead of switching the compiler flag and
143: * introducing a lot of risk, I'm adding this function to access the
144: * piece of js_context that interests me. [dgeorge 8/00]
145: *
146: * [snewman 2/14/00: copied this patch from NscpJavaScript to JavaScript_1_5]
147: */
148: extern JSRegExpStatics *
149: js_GetRegExpStatics(JSContext *cx);
150:
151:
152: #endif /* jsregexp_h___ */
***** C:\TEMP\JAVASCRIPT15\JS\SRC\JSREGEXP.H
124:
125: #endif /* jsregexp_h___ */
*****


Comparing files C:\DREAMWEAVER\THIRDPARTY\JAVASCRIPT_1_5\jsscan.c and C:\TEMP\JAVASCRIPT15\JS\SRC\JSSCAN.C


***** C:\DREAMWEAVER\THIRDPARTY\JAVASCRIPT_1_5\jsscan.c
37: */
38: #include "DW_decls.h"
39:
40: #include "jsstddef.h"
***** C:\TEMP\JAVASCRIPT15\JS\SRC\JSSCAN.C
37: */
38: #include "jsstddef.h"
*****


Comparing files C:\DREAMWEAVER\THIRDPARTY\JAVASCRIPT_1_5\jsscope.c and C:\TEMP\JAVASCRIPT15\JS\SRC\JSSCOPE.C


***** C:\DREAMWEAVER\THIRDPARTY\JAVASCRIPT_1_5\jsscope.c
37: */
38: #include "DW_decls.h"
39:
40: #include "jsstddef.h"
***** C:\TEMP\JAVASCRIPT15\JS\SRC\JSSCOPE.C
37: */
38: #include "jsstddef.h"
*****


Comparing files C:\DREAMWEAVER\THIRDPARTY\JAVASCRIPT_1_5\jsscript.c and C:\TEMP\JAVASCRIPT15\JS\SRC\JSSCRIPT.C


***** C:\DREAMWEAVER\THIRDPARTY\JAVASCRIPT_1_5\jsscript.c
37: */
38: #include "DW_decls.h"
39:
40: #include "jsstddef.h"
***** C:\TEMP\JAVASCRIPT15\JS\SRC\JSSCRIPT.C
37: */
38: #include "jsstddef.h"
*****

***** C:\DREAMWEAVER\THIRDPARTY\JAVASCRIPT_1_5\jsscript.c
903: if (type == SRC_SETLINE) {
904: // DREAMWEAVER snewman 6/15/01: changed this to not update lineno
905: // if js_GetSrcNoteOffset returns a smaller value -- otherwise we
906: // were having problems debugging the JavaScript code that the
907: // template engine generates. For some reason, the last srcnote
908: // in that function had a line number of zero.
909: uintN temp = (uintN) js_GetSrcNoteOffset(sn, 0);
910: if (lineno < temp)
911: lineno = temp;
912: } else if (type == SRC_NEWLINE) {
***** C:\TEMP\JAVASCRIPT15\JS\SRC\JSSCRIPT.C
901: if (type == SRC_SETLINE) {
902: lineno = (uintN) js_GetSrcNoteOffset(sn, 0);
903: } else if (type == SRC_NEWLINE) {
*****


Comparing files C:\DREAMWEAVER\THIRDPARTY\JAVASCRIPT_1_5\jsstr.c and C:\TEMP\JAVASCRIPT15\JS\SRC\JSSTR.C


***** C:\DREAMWEAVER\THIRDPARTY\JAVASCRIPT_1_5\jsstr.c
44: */
45: #include "DW_decls.h"
46:
47: #include "jsstddef.h"
***** C:\TEMP\JAVASCRIPT15\JS\SRC\JSSTR.C
44: */
45: #include "jsstddef.h"
*****

***** C:\DREAMWEAVER\THIRDPARTY\JAVASCRIPT_1_5\jsstr.c
1137: *skip = cp - dp;
1138: // DREAMWEAVER: replacing REGEXP_PAREN_SUBSTRING with js_RegExpParenSubString
1139: // (see comment from dgeorge in jsregexp.h
1140: return js_RegExpParenSubString(res, num);
1141: }
***** C:\TEMP\JAVASCRIPT15\JS\SRC\JSSTR.C
1135: *skip = cp - dp;
1136: return REGEXP_PAREN_SUBSTRING(res, num);
1137: }
*****

***** C:\DREAMWEAVER\THIRDPARTY\JAVASCRIPT_1_5\jsstr.c
1713: break;
1714: // DREAMWEAVER: replacing REGEXP_PAREN_SUBSTRING with js_RegExpParenSubString
1715:
1716: // (see comment from dgeorge in jsregexp.h
1717: parsub = js_RegExpParenSubString(&cx->regExpStatics, num);
1718: sub = js_NewStringCopyN(cx, parsub->chars, parsub->length,
***** C:\TEMP\JAVASCRIPT15\JS\SRC\JSSTR.C
1709: break;
1710: parsub = REGEXP_PAREN_SUBSTRING(&cx->regExpStatics, num);
1711: sub = js_NewStringCopyN(cx, parsub->chars, parsub->length,
*****


Comparing files C:\DREAMWEAVER\THIRDPARTY\JAVASCRIPT_1_5\jstypes.h and C:\TEMP\JAVASCRIPT15\JS\SRC\JSTYPES.H


***** C:\DREAMWEAVER\THIRDPARTY\JAVASCRIPT_1_5\jstypes.h
59:
60:
61: // DREAMWEAVER snewman 3/16/01: tweaked this file to remove all
62: // references to "_declspec", to match the changes we had made in the
63: // JS 1.2 interpreter. Using _declspec doesn't make sense, because we
64: // aren't building a separate DLL -- the interpreter is linked directly
65: // into Dreamweaver.
66:
67:
68: #ifndef jstypes_h___
***** C:\TEMP\JAVASCRIPT15\JS\SRC\JSTYPES.H
59:
60: #ifndef jstypes_h___
*****

***** C:\DREAMWEAVER\THIRDPARTY\JAVASCRIPT_1_5\jstypes.h
72:
73: // DREAMWEAVER
74: #if WIN32
75: #define XP_PC 1
76: #elif __powerc
77: #define XP_MAC 1
78: #endif
79:
80: /***********************************************************************
***** C:\TEMP\JAVASCRIPT15\JS\SRC\JSTYPES.H
64:
65: /***********************************************************************
*****

***** C:\DREAMWEAVER\THIRDPARTY\JAVASCRIPT_1_5\jstypes.h
101: /* These also work for __MWERKS__ */
102: #define JS_EXTERN_API(__type) extern __type
103: #define JS_EXPORT_API(__type) __type
104: #define JS_EXTERN_DATA(__type) extern __type
105: #define JS_EXPORT_DATA(__type) __type
106:
***** C:\TEMP\JAVASCRIPT15\JS\SRC\JSTYPES.H
86: /* These also work for __MWERKS__ */
87: #define JS_EXTERN_API(__type) extern _declspec(dllexport) __type
88: #define JS_EXPORT_API(__type) _declspec(dllexport) __type
89: #define JS_EXTERN_DATA(__type) extern _declspec(dllexport) __type
90: #define JS_EXPORT_DATA(__type) _declspec(dllexport) __type
91:
*****

***** C:\DREAMWEAVER\THIRDPARTY\JAVASCRIPT_1_5\jstypes.h
131: #elif defined(XP_MAC)
132: #define JS_EXTERN_API(__type) extern __type
133: #define JS_EXPORT_API(__type) __type
134: #define JS_EXTERN_DATA(__type) extern __type
135: #define JS_EXPORT_DATA(__type) __type
136:
***** C:\TEMP\JAVASCRIPT15\JS\SRC\JSTYPES.H
116: #elif defined(XP_MAC)
117: #define JS_EXTERN_API(__type) extern __declspec(export) __type
118: #define JS_EXPORT_API(__type) __declspec(export) __type
119: #define JS_EXTERN_DATA(__type) extern __declspec(export) __type
120: #define JS_EXPORT_DATA(__type) __declspec(export) __type
121:
*****

***** C:\DREAMWEAVER\THIRDPARTY\JAVASCRIPT_1_5\jstypes.h
163: # else
164: # define JS_IMPORT_API(__x) __x
165: # endif
***** C:\TEMP\JAVASCRIPT15\JS\SRC\JSTYPES.H
148: # else
149: # define JS_IMPORT_API(__x) _declspec(dllimport) __x
150: # endif
*****

***** C:\DREAMWEAVER\THIRDPARTY\JAVASCRIPT_1_5\jstypes.h
170: #if defined(_WIN32) && !defined(__MWERKS__)
171: # define JS_IMPORT_DATA(__x) __x
172: #else
***** C:\TEMP\JAVASCRIPT15\JS\SRC\JSTYPES.H
155: #if defined(_WIN32) && !defined(__MWERKS__)
156: # define JS_IMPORT_DATA(__x) _declspec(dllimport) __x
157: #else
*****


Comparing files C:\DREAMWEAVER\THIRDPARTY\JAVASCRIPT_1_5\jsutil.c and C:\TEMP\JAVASCRIPT15\JS\SRC\JSUTIL.C


***** C:\DREAMWEAVER\THIRDPARTY\JAVASCRIPT_1_5\jsutil.c
41:
42: #include "DW_decls.h"
43:
44: /*
***** C:\TEMP\JAVASCRIPT15\JS\SRC\JSUTIL.C
41:
42: /*
*****

***** C:\DREAMWEAVER\THIRDPARTY\JAVASCRIPT_1_5\jsutil.c
163:
164: // DREAMWEAVER snewman 3/28/01: wrapped JS_Assert in #ifdef DEBUG
165: // to avoid compiler warning (no prototype) when DEBUG is turned off.
166: #ifdef DEBUG
167:
168: JS_PUBLIC_API(void) JS_Assert(const char *s, const char *file, JSIntn ln)
***** C:\TEMP\JAVASCRIPT15\JS\SRC\JSUTIL.C
161:
162: JS_PUBLIC_API(void) JS_Assert(const char *s, const char *file, JSIntn ln)
*****

***** C:\DREAMWEAVER\THIRDPARTY\JAVASCRIPT_1_5\jsutil.c
183:
184: #endif
***** C:\TEMP\JAVASCRIPT15\JS\SRC\JSUTIL.C
*****


Comparing files C:\DREAMWEAVER\THIRDPARTY\JAVASCRIPT_1_5\jsxdrapi.c and C:\TEMP\JAVASCRIPT15\JS\SRC\JSXDRAPI.C


***** C:\DREAMWEAVER\THIRDPARTY\JAVASCRIPT_1_5\jsxdrapi.c
33: */
34: #include "DW_decls.h"
35:
36: #include "jsstddef.h"
***** C:\TEMP\JAVASCRIPT15\JS\SRC\JSXDRAPI.C
33: */
34: #include "jsstddef.h"
*****


Comparing files C:\DREAMWEAVER\THIRDPARTY\JAVASCRIPT_1_5\prmjtime.c and C:\TEMP\JAVASCRIPT15\JS\SRC\PRMJTIME.C


***** C:\DREAMWEAVER\THIRDPARTY\JAVASCRIPT_1_5\prmjtime.c
34:
35: #include "DW_decls.h"
36:
37: /*
***** C:\TEMP\JAVASCRIPT15\JS\SRC\PRMJTIME.C
34:
35: /*
*****


Comparing files C:\DREAMWEAVER\THIRDPARTY\JAVASCRIPT_1_5\LIVECONNECT\jsj.c and C:\TEMP\JAVASCRIPT15\JS\SRC\LIVECONNECT\JSJ.C


***** C:\DREAMWEAVER\THIRDPARTY\JAVASCRIPT_1_5\LIVECONNECT\jsj.c
45:
46: #include "DW_decls.h"
47:
48: #include "jsj_private.h" /* LiveConnect internals */
***** C:\TEMP\JAVASCRIPT15\JS\SRC\LIVECONNECT\JSJ.C
45:
46: #include "jsj_private.h" /* LiveConnect internals */
*****


Comparing files C:\DREAMWEAVER\THIRDPARTY\JAVASCRIPT_1_5\LIVECONNECT\jsj_array.c and C:\TEMP\JAVASCRIPT15\JS\SRC\LIVECONNECT\JSJ_ARRAY.C


***** C:\DREAMWEAVER\THIRDPARTY\JAVASCRIPT_1_5\LIVECONNECT\jsj_array.c
40:
41: #include "DW_decls.h"
42:
43: #include "jsj_private.h" /* LiveConnect internals */
***** C:\TEMP\JAVASCRIPT15\JS\SRC\LIVECONNECT\JSJ_ARRAY.C
40:
41: #include "jsj_private.h" /* LiveConnect internals */
*****


Comparing files C:\DREAMWEAVER\THIRDPARTY\JAVASCRIPT_1_5\LIVECONNECT\jsj_class.c and C:\TEMP\JAVASCRIPT15\JS\SRC\LIVECONNECT\JSJ_CLASS.C


***** C:\DREAMWEAVER\THIRDPARTY\JAVASCRIPT_1_5\LIVECONNECT\jsj_class.c
47:
48: #include "DW_decls.h"
49:
50: #include "jsj_private.h" /* LiveConnect internals */
***** C:\TEMP\JAVASCRIPT15\JS\SRC\LIVECONNECT\JSJ_CLASS.C
47:
48: #include "jsj_private.h" /* LiveConnect internals */
*****


Comparing files C:\DREAMWEAVER\THIRDPARTY\JAVASCRIPT_1_5\LIVECONNECT\jsj_convert.c and C:\TEMP\JAVASCRIPT15\JS\SRC\LIVECONNECT\JSJ_CONVERT.C


***** C:\DREAMWEAVER\THIRDPARTY\JAVASCRIPT_1_5\LIVECONNECT\jsj_convert.c
43:
44: #include "DW_decls.h"
45:
46: #ifdef OJI
***** C:\TEMP\JAVASCRIPT15\JS\SRC\LIVECONNECT\JSJ_CONVERT.C
43:
44: #ifdef OJI
*****


Comparing files C:\DREAMWEAVER\THIRDPARTY\JAVASCRIPT_1_5\LIVECONNECT\jsj_field.c and C:\TEMP\JAVASCRIPT15\JS\SRC\LIVECONNECT\JSJ_FIELD.C


***** C:\DREAMWEAVER\THIRDPARTY\JAVASCRIPT_1_5\LIVECONNECT\jsj_field.c
44:
45: #include "DW_decls.h"
46:
47: #include "jsj_private.h" /* LiveConnect internals */
***** C:\TEMP\JAVASCRIPT15\JS\SRC\LIVECONNECT\JSJ_FIELD.C
44:
45: #include "jsj_private.h" /* LiveConnect internals */
*****


Comparing files C:\DREAMWEAVER\THIRDPARTY\JAVASCRIPT_1_5\LIVECONNECT\jsj_hash.c and C:\TEMP\JAVASCRIPT15\JS\SRC\LIVECONNECT\JSJ_HASH.C


***** C:\DREAMWEAVER\THIRDPARTY\JAVASCRIPT_1_5\LIVECONNECT\jsj_hash.c
46:
47: #include "DW_decls.h"
48:
49: #include "jsj_hash.h"
***** C:\TEMP\JAVASCRIPT15\JS\SRC\LIVECONNECT\JSJ_HASH.C
46:
47: #include "jsj_hash.h"
*****


Comparing files C:\DREAMWEAVER\THIRDPARTY\JAVASCRIPT_1_5\LIVECONNECT\jsj_JavaArray.c and C:\TEMP\JAVASCRIPT15\JS\SRC\LIVECONNECT\JSJ_JAVAARRAY.C


***** C:\DREAMWEAVER\THIRDPARTY\JAVASCRIPT_1_5\LIVECONNECT\jsj_JavaArray.c
44:
45: #include "DW_decls.h"
46:
47: #include "jsj_private.h" /* LiveConnect internals */
***** C:\TEMP\JAVASCRIPT15\JS\SRC\LIVECONNECT\JSJ_JAVAARRAY.C
44:
45: #include "jsj_private.h" /* LiveConnect internals */
*****


Comparing files C:\DREAMWEAVER\THIRDPARTY\JAVASCRIPT_1_5\LIVECONNECT\jsj_JavaClass.c and C:\TEMP\JAVASCRIPT15\JS\SRC\LIVECONNECT\JSJ_JAVACLASS.C


***** C:\DREAMWEAVER\THIRDPARTY\JAVASCRIPT_1_5\LIVECONNECT\jsj_JavaClass.c
53:
54: #include "DW_decls.h"
55:
56: #include "jsj_private.h" /* LiveConnect internals */
***** C:\TEMP\JAVASCRIPT15\JS\SRC\LIVECONNECT\JSJ_JAVACLASS.C
53:
54: #include "jsj_private.h" /* LiveConnect internals */
*****


Comparing files C:\DREAMWEAVER\THIRDPARTY\JAVASCRIPT_1_5\LIVECONNECT\jsj_JavaMember.c and C:\TEMP\JAVASCRIPT15\JS\SRC\LIVECONNECT\JSJ_JAVAMEMBER.C


***** C:\DREAMWEAVER\THIRDPARTY\JAVASCRIPT_1_5\LIVECONNECT\jsj_JavaMember.c
59:
60: #include "DW_decls.h"
61:
62: #include "jsj_private.h" /* LiveConnect internals */
***** C:\TEMP\JAVASCRIPT15\JS\SRC\LIVECONNECT\JSJ_JAVAMEMBER.C
59:
60: #include "jsj_private.h" /* LiveConnect internals */
*****


Comparing files C:\DREAMWEAVER\THIRDPARTY\JAVASCRIPT_1_5\LIVECONNECT\jsj_JavaObject.c and C:\TEMP\JAVASCRIPT15\JS\SRC\LIVECONNECT\JSJ_JAVAOBJECT.C


***** C:\DREAMWEAVER\THIRDPARTY\JAVASCRIPT_1_5\LIVECONNECT\jsj_JavaObject.c
57:
58: #include "DW_decls.h"
59:
60: #include "jsobj.h"
***** C:\TEMP\JAVASCRIPT15\JS\SRC\LIVECONNECT\JSJ_JAVAOBJECT.C
57:
58: #include "jsobj.h"
*****


Comparing files C:\DREAMWEAVER\THIRDPARTY\JAVASCRIPT_1_5\LIVECONNECT\jsj_JavaPackage.c and C:\TEMP\JAVASCRIPT15\JS\SRC\LIVECONNECT\JSJ_JAVAPACKAGE.C


***** C:\DREAMWEAVER\THIRDPARTY\JAVASCRIPT_1_5\LIVECONNECT\jsj_JavaPackage.c
53:
54: #include "DW_decls.h"
55:
56: #include "jsj_private.h" /* LiveConnect internals */
***** C:\TEMP\JAVASCRIPT15\JS\SRC\LIVECONNECT\JSJ_JAVAPACKAGE.C
53:
54: #include "jsj_private.h" /* LiveConnect internals */
*****


Comparing files C:\DREAMWEAVER\THIRDPARTY\JAVASCRIPT_1_5\LIVECONNECT\jsj_JSObject.c and C:\TEMP\JAVASCRIPT15\JS\SRC\LIVECONNECT\JSJ_JSOBJECT.C


***** C:\DREAMWEAVER\THIRDPARTY\JAVASCRIPT_1_5\LIVECONNECT\jsj_JSObject.c
43:
44: #include "DW_decls.h"
45:
46: #include <stdlib.h>
***** C:\TEMP\JAVASCRIPT15\JS\SRC\LIVECONNECT\JSJ_JSOBJECT.C
43:
44: #include <stdlib.h>
*****


Comparing files C:\DREAMWEAVER\THIRDPARTY\JAVASCRIPT_1_5\LIVECONNECT\jsj_method.c and C:\TEMP\JAVASCRIPT15\JS\SRC\LIVECONNECT\JSJ_METHOD.C


***** C:\DREAMWEAVER\THIRDPARTY\JAVASCRIPT_1_5\LIVECONNECT\jsj_method.c
49:
50: #include "DW_decls.h"
51:
52: #include <stdlib.h>
***** C:\TEMP\JAVASCRIPT15\JS\SRC\LIVECONNECT\JSJ_METHOD.C
49:
50: #include <stdlib.h>
*****


Comparing files C:\DREAMWEAVER\THIRDPARTY\JAVASCRIPT_1_5\LIVECONNECT\jsj_simpleapi.c and C:\TEMP\JAVASCRIPT15\JS\SRC\LIVECONNECT\JSJ_SIMPLEAPI.C


***** C:\DREAMWEAVER\THIRDPARTY\JAVASCRIPT_1_5\LIVECONNECT\jsj_simpleapi.c
38:
39: #include "DW_decls.h"
40:
41: #include "jsjava.h"
***** C:\TEMP\JAVASCRIPT15\JS\SRC\LIVECONNECT\JSJ_SIMPLEAPI.C
38:
39: #include "jsjava.h"
*****

***** C:\DREAMWEAVER\THIRDPARTY\JAVASCRIPT_1_5\LIVECONNECT\jsj_simpleapi.c
107:
108: err = JNI_CreateJavaVM((JavaVM**)jvm, (void**)initialEnv, &vm_args);
109:
***** C:\TEMP\JAVASCRIPT15\JS\SRC\LIVECONNECT\JSJ_SIMPLEAPI.C
105:
106: err = JNI_CreateJavaVM((JavaVM**)jvm, initialEnv, &vm_args);
107:
*****

***** C:\DREAMWEAVER\THIRDPARTY\JAVASCRIPT_1_5\LIVECONNECT\jsj_simpleapi.c
128: JNIEnv* env = NULL;
129: (*java_vm)->AttachCurrentThread(java_vm, (void**)&env, NULL);
130: return env;
***** C:\TEMP\JAVASCRIPT15\JS\SRC\LIVECONNECT\JSJ_SIMPLEAPI.C
126: JNIEnv* env = NULL;
127: (*java_vm)->AttachCurrentThread(java_vm, &env, NULL);
128: return env;
*****


Comparing files C:\DREAMWEAVER\THIRDPARTY\JAVASCRIPT_1_5\LIVECONNECT\jsj_utils.c and C:\TEMP\JAVASCRIPT15\JS\SRC\LIVECONNECT\JSJ_UTILS.C


***** C:\DREAMWEAVER\THIRDPARTY\JAVASCRIPT_1_5\LIVECONNECT\jsj_utils.c
48:
49: #include "DW_decls.h"
50:
51: #include <stdlib.h>
***** C:\TEMP\JAVASCRIPT15\JS\SRC\LIVECONNECT\JSJ_UTILS.C
48:
49: #include <stdlib.h>
*****


Comparing files C:\DREAMWEAVER\THIRDPARTY\JAVASCRIPT_1_5\LIVECONNECT\nsCLiveconnect.cpp and C:\TEMP\JAVASCRIPT15\JS\SRC\LIVECONNECT\NSCLIVECONNECT.CPP


***** C:\DREAMWEAVER\THIRDPARTY\JAVASCRIPT_1_5\LIVECONNECT\nsCLiveconnect.cpp
40:
41: #include "DW_decls.h"
42:
***** C:\TEMP\JAVASCRIPT15\JS\SRC\LIVECONNECT\NSCLIVECONNECT.CPP
40:
41:
*****


Comparing files C:\DREAMWEAVER\THIRDPARTY\JAVASCRIPT_1_5\LIVECONNECT\nsCLiveconnectFactory.cpp and C:\TEMP\JAVASCRIPT15\JS\SRC\LIVECONNECT\NSCLIVECONNECTFACTORY.CPP


***** C:\DREAMWEAVER\THIRDPARTY\JAVASCRIPT_1_5\LIVECONNECT\nsCLiveconnectFactory.cpp
39: */
40: #include "DW_decls.h"
41:
42: #include "prtypes.h"
***** C:\TEMP\JAVASCRIPT15\JS\SRC\LIVECONNECT\NSCLIVECONNECTFACTORY.CPP
39: */
40: #include "prtypes.h"
*****


Comparing files C:\DREAMWEAVER\THIRDPARTY\JAVASCRIPT_1_5\LIVECONNECT\MACBUILD\JAVASESSION\JavaSession.cpp and C:\TEMP\JAVASCRIPT15\JS\SRC\LIVECONNECT\MACBUILD\JAVASESSION\JAVASESSION.CPP


***** C:\DREAMWEAVER\THIRDPARTY\JAVASCRIPT_1_5\LIVECONNECT\MACBUILD\JAVASESSION\JavaSession.cpp
12:
13: #include "DW_decls.h"
14:
15: #include "JavaSession.h"
***** C:\TEMP\JAVASCRIPT15\JS\SRC\LIVECONNECT\MACBUILD\JAVASESSION\JAVASESSION.CPP
12:
13: #include "JavaSession.h"
*****


Comparing files C:\DREAMWEAVER\THIRDPARTY\JAVASCRIPT_1_5\LIVECONNECT\MACBUILD\JAVASESSION\JavaSession.h and C:\TEMP\JAVASCRIPT15\JS\SRC\LIVECONNECT\MACBUILD\JAVASESSION\JAVASESSION.H


FC: no differences encountered