Bug 673499 - remove some trailing whitespace from js/src. r=jorendorff

This commit is contained in:
Tom Schuster 2012-05-19 21:56:17 +02:00
parent 9ae1966596
commit 55fd8ff0a0
108 changed files with 365 additions and 365 deletions

View File

@ -24,7 +24,7 @@
channel="MozillaChannel" level="win:Informational"
template="CodeLocationTemplate" task="Execution" opcode="ExecuteStop"
keywords="SampleKeyword" message="$(string.MozillaSpiderMonkey.ExecuteDone.message)"/>
<event symbol="EvtScriptCompileBegin" value="1003" version="1"
channel="MozillaChannel" level="win:Informational"
template="CodeLocationTemplate" task="Execution" opcode="CompileBegin"
@ -61,7 +61,7 @@
channel="MozillaChannel" level="win:Verbose"
template="ObjectFinalizeTemplate" task="Allocation" opcode="ObjectFinalize"
keywords="SampleKeyword" message="$(string.SampleProvider.SampleEvent.message)"/>
<event symbol="EvtStringCreate" value="1009" version="1"
channel="MozillaChannel" level="win:Verbose"
template="StringCreateTemplate" task="Allocation" opcode="StringCreate"
@ -94,7 +94,7 @@
channel="MozillaChannel" level="win:Informational"
template="VoidTemplate" task="Allocation" opcode="GCMarkEnd"
keywords="SampleKeyword" message="$(string.SampleProvider.SampleEvent.message)"/>
<event symbol="EvtGCStartSweepPhase" value="1016" version="1"
channel="MozillaChannel" level="win:Informational"
template="VoidTemplate" task="Allocation" opcode="GCSweepStart"
@ -173,7 +173,7 @@
<opcode name="ResizeHeap" symbol="OpResizeHeap" value="32"/>
<opcode name="CustomMark" symbol="OpCustomMark" value="33"/>
</opcodes>
<channels>
<channel name="MozillaChannel" chid="MozillaPerformanceReportingChannel"
symbol="MOZILLA_PERFORMANCE_REPORTING_CHANNEL" type="Analytic"
@ -183,13 +183,13 @@
<keywords>
<keyword name="SampleKeyword" symbol="KwSample" mask="0x1"/>
</keywords>
<templates>
<template tid="CodeLocationTemplate">
<data name="FileName" inType="win:AnsiString" outType="xs:string"/>
<data name="LineNumber" inType="win:Int32" outType="xs:int"/>
</template>
<template tid="ObjectCreateTemplate">
<data name="FileName" inType="win:AnsiString" outType="xs:string"/>
<data name="LineNumber" inType="win:Int32" outType="xs:int"/>

View File

@ -71,7 +71,7 @@ LIBRARY_NAME = mozjs
STATIC_LIBRARY_NAME = js_static
GRE_MODULE = 1
LIBS = $(NSPR_LIBS)
LIBS = $(NSPR_LIBS)
ifeq ($(OS_ARCH),WINNT)
NO_PROFILE_GUIDED_OPTIMIZE = 1
@ -639,7 +639,7 @@ check-jstests:
# Bug 652154: On Windows, SM(!m !t) don't work because of path problems with
# their unusual directory layout
#
# Bug 652155: On Mac, SM(d) doesn't work for unknown reasons
# Bug 652155: On Mac, SM(d) doesn't work for unknown reasons
ifeq ($(OS_ARCH),WINNT)
ifdef ENABLE_METHODJIT
@ -767,7 +767,7 @@ endif
# - EXTRA_DSO_LDOPTS includes the NSPR -L and -l flags.
# - OS_LIBS includes libraries selected by the configure script.
# - EXTRA_LIBS includes libraries selected by this Makefile.
JS_CONFIG_LIBS=$(EXTRA_DSO_LDOPTS) $(OS_LIBS) $(EXTRA_LIBS)
JS_CONFIG_LIBS=$(EXTRA_DSO_LDOPTS) $(OS_LIBS) $(EXTRA_LIBS)
# The configure script invokes this rule explicitly at configure time!
# It's important that js-config be ready by the time we're done

View File

@ -186,7 +186,7 @@ CollectRuntimeStats(JSRuntime *rt, RuntimeStats *rtStats)
{
if (!rtStats->compartmentStatsVector.reserve(rt->compartments.length()))
return false;
rtStats->gcHeapChunkCleanDecommitted =
rt->gcChunkPool.countCleanDecommittedArenas(rt) * gc::ArenaSize;
rtStats->gcHeapChunkCleanUnused =
@ -194,13 +194,13 @@ CollectRuntimeStats(JSRuntime *rt, RuntimeStats *rtStats)
rtStats->gcHeapChunkCleanDecommitted;
rtStats->gcHeapChunkTotal =
size_t(JS_GetGCParameter(rt, JSGC_TOTAL_CHUNKS)) * gc::ChunkSize;
IterateCompartmentsArenasCells(rt, rtStats, StatsCompartmentCallback,
StatsArenaCallback, StatsCellCallback);
IterateChunks(rt, rtStats, StatsChunkCallback);
rt->sizeOfIncludingThis(rtStats->mallocSizeOf, &rtStats->runtime);
// This is initialized to all bytes stored in used chunks, and then we
// subtract used space from it each time around the loop.
rtStats->gcHeapChunkDirtyUnused = rtStats->gcHeapChunkTotal -

View File

@ -10,17 +10,17 @@
- WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
- for the specific language governing rights and limitations under the
- License.
-
-
- The Original Code is Mozilla Communicator client code, released
- March 31, 1998.
-
-
- The Initial Developer of the Original Code is
- Netscape Communications Corporation.
- Portions created by the Initial Developer are Copyright (C) 1998-1999
- the Initial Developer. All Rights Reserved.
-
-
- Contributor(s):
-
-
- Alternatively, the contents of this file may be used under the terms of
- either of the GNU General Public License Version 2 or later (the "GPL"),
- or the GNU Lesser General Public License Version 2.1 or later (the "LGPL"),

2
js/src/aclocal.m4 vendored
View File

@ -1,7 +1,7 @@
dnl
dnl Local autoconf macros used with mozilla
dnl The contents of this file are under the Public Domain.
dnl
dnl
builtin(include, build/autoconf/pkg.m4)dnl
builtin(include, build/autoconf/nspr.m4)dnl

View File

@ -53,7 +53,7 @@ js_InitRegExpClass(JSContext *cx, JSObject *obj);
namespace js {
/*
/*
* |res| may be null if the |RegExpStatics| are not to be updated.
* |input| may be null if there is no |JSString| corresponding to
* |chars| and |length|.

View File

@ -1648,7 +1648,7 @@ if test "$GNU_CC"; then
MOZ_C_SUPPORTS_WARNING(-W, error=return-type, ac_c_has_werror_return_type)
MOZ_C_SUPPORTS_WARNING(-W, type-limits, ac_c_has_wtype_limits)
MOZ_C_SUPPORTS_WARNING(-W, empty-body, ac_c_has_wempty_body)
# Turn off the following warnings that -Wall/-pedantic turn on:
# -Wno-unused - lots of violations in third-party code
# -Wno-overlength-strings - we exceed the minimum maximum length frequently

View File

@ -155,7 +155,7 @@ struct BytecodeEmitter
/* These two should only be true if sc->inFunction() is false. */
const bool noScriptRval:1; /* The caller is JS_Compile*Script*. */
const bool needScriptGlobal:1; /* API caller does not want result value
const bool needScriptGlobal:1; /* API caller does not want result value
from global script. */
bool hasSingletons:1; /* script contains singleton initializer JSOP_OBJECT */

View File

@ -126,7 +126,7 @@ ParseNodeAllocator::freeNode(ParseNode *pn)
/* Catch back-to-back dup recycles. */
JS_ASSERT(pn != freelist);
/*
/*
* It's too hard to clear these nodes from the AtomDefnMaps, etc. that
* hold references to them, so we never free them. It's our caller's job to
* recognize and process these, since their children do need to be dealt
@ -251,7 +251,7 @@ PushNodeChildren(ParseNode *pn, NodeStack *stack)
stack->pushUnlessNull(pn->pn_kid);
break;
case PN_NULLARY:
/*
/*
* E4X function namespace nodes are PN_NULLARY, but can appear on use
* lists.
*/
@ -655,7 +655,7 @@ js::CloneLeftHandSide(ParseNode *opn, Parser *parser)
void
js::DumpParseTree(ParseNode *pn, int indent)
{
if (pn == NULL)
if (pn == NULL)
fprintf(stderr, "()");
else
pn->dump(indent);

View File

@ -162,7 +162,7 @@ SetFunctionKinds(FunctionBox *funbox, bool *isHeavyweight, bool topInFunction, b
* js::Bindings::extensibleParents explain why.
*/
static bool
MarkExtensibleScopeDescendants(JSContext *context, FunctionBox *funbox, bool hasExtensibleParent)
MarkExtensibleScopeDescendants(JSContext *context, FunctionBox *funbox, bool hasExtensibleParent)
{
for (; funbox; funbox = funbox->siblings) {
/*

View File

@ -99,7 +99,7 @@ class ContextFlags {
// false.
// The function needs Call object per call.
bool funIsHeavyweight:1;
bool funIsHeavyweight:1;
// We parsed a yield statement in the function.
bool funIsGenerator:1;
@ -258,10 +258,10 @@ struct SharedContext {
typedef HashSet<JSAtom *> FuncStmtSet;
struct Parser;
struct TreeContext { /* tree context for semantic checks */
SharedContext *sc; /* context shared between parsing and bytecode generation */
uint32_t parenDepth; /* nesting depth of parens that might turn out
to be generator expressions */
uint32_t yieldCount; /* number of |yield| tokens encountered at

View File

@ -42,7 +42,7 @@
provider javascript {
probe function__entry(const char *, const char *, const char *);
probe function__return(const char *, const char *, const char *);
/* XXX must use unsigned longs here instead of uintptr_t for OS X
/* XXX must use unsigned longs here instead of uintptr_t for OS X
(Apple radar: 5194316 & 5565198) */
probe object__create(const char *, unsigned long);
probe object__finalize(const char *, const char *, unsigned long);

View File

@ -144,4 +144,4 @@ fi
if test "$echo_libs" = "yes"; then
echo "$MOZ_JS_LIBS $JS_CONFIG_LIBS"
fi
fi

View File

@ -1566,7 +1566,7 @@ ScriptAnalysis::analyzeSSA(JSContext *cx)
break;
}
case JSOP_TRY: {
case JSOP_TRY: {
JSTryNote *tn = script->trynotes()->vector;
JSTryNote *tnlimit = tn + script->trynotes()->length;
for (; tn < tnlimit; tn++) {
@ -2138,7 +2138,7 @@ ScriptAnalysis::printSSA(JSContext *cx)
}
}
printf("\n");
printf("\n");
}
void

View File

@ -891,12 +891,12 @@ class ScriptAnalysis
public:
ScriptAnalysis(JSScript *script) {
ScriptAnalysis(JSScript *script) {
PodZero(this);
this->script = script;
#ifdef DEBUG
this->originalDebugMode_ = script->compartment()->debugMode();
#endif
#endif
}
bool ranBytecode() { return ranBytecode_; }

View File

@ -41,7 +41,7 @@ BEGIN_TEST(testAddPropertyHook)
obj = JS_NewArrayObject(cx, 0, NULL);
CHECK(obj);
arr = OBJECT_TO_JSVAL(obj);
CHECK(JS_DefineProperty(cx, global, "arr", arr,
JS_PropertyStub, JS_StrictPropertyStub,
JSPROP_ENUMERATE));
@ -55,7 +55,7 @@ BEGIN_TEST(testAddPropertyHook)
JS_PropertyStub, JS_StrictPropertyStub,
JSPROP_ENUMERATE));
}
// Now add a prop to each of the objects, but make sure to do
// so at the same bytecode location so we can hit the propcache.
EXEC("'use strict'; \n"

View File

@ -14,7 +14,7 @@ BEGIN_TEST(test_cloneScript)
CHECK(A = createGlobal());
CHECK(B = createGlobal());
const char *source =
const char *source =
"var i = 0;\n"
"var sum = 0;\n"
"while (i < 10) {\n"

View File

@ -178,7 +178,7 @@ BEGIN_TEST(testDebugger_debuggerObjectVsDebugMode)
"hits;\n",
&v);
CHECK_SAME(v, INT_TO_JSVAL(4));
return true;
}
END_TEST(testDebugger_debuggerObjectVsDebugMode)

View File

@ -14,7 +14,7 @@ BEGIN_TEST(testResolveRecursion)
static JSClass my_resolve_class = {
"MyResolve",
JSCLASS_NEW_RESOLVE | JSCLASS_HAS_PRIVATE,
JS_PropertyStub, // add
JS_PropertyStub, // delete
JS_PropertyStub, // get
@ -23,7 +23,7 @@ BEGIN_TEST(testResolveRecursion)
(JSResolveOp) my_resolve,
JS_ConvertStub
};
obj1 = JS_NewObject(cx, &my_resolve_class, NULL, NULL);
CHECK(obj1);
obj2 = JS_NewObject(cx, &my_resolve_class, NULL, NULL);
@ -52,7 +52,7 @@ unsigned resolveEntryCount;
unsigned resolveExitCount;
struct AutoIncrCounters {
AutoIncrCounters(cls_testResolveRecursion *t) : t(t) {
t->resolveEntryCount++;
}
@ -70,9 +70,9 @@ doResolve(JSObject *obj, jsid id, unsigned flags, JSObject **objp)
CHECK_EQUAL(resolveExitCount, 0);
AutoIncrCounters incr(this);
CHECK_EQUAL(obj, obj1 || obj == obj2);
CHECK(JSID_IS_STRING(id));
JSFlatString *str = JS_FlattenString(cx, JSID_TO_STRING(id));
CHECK(str);
jsval v;

View File

@ -57,7 +57,7 @@ test(const char *bytes)
{
jsval v;
JS_SetOptions(cx, JS_GetOptions(cx) & ~(JSOPTION_METHODJIT | JSOPTION_METHODJIT_ALWAYS));
JS_SetOptions(cx, JS_GetOptions(cx) & ~(JSOPTION_METHODJIT | JSOPTION_METHODJIT_ALWAYS));
sRemain = 0;
CHECK(!evaluate(bytes, __FILE__, __LINE__, &v));
CHECK(!JS_IsExceptionPending(cx));

View File

@ -223,7 +223,7 @@ BEGIN_FIXTURE_TEST(VersionFixture, testEntryLosesOverride)
EXEC("overrideVersion15(); evalScriptVersion16('checkOverride(false); captureVersion()');");
CHECK_EQUAL(captured, JSVERSION_1_6);
/*
/*
* Override gets propagated to default version as non-override when you leave the VM's execute
* call.
*/
@ -233,7 +233,7 @@ BEGIN_FIXTURE_TEST(VersionFixture, testEntryLosesOverride)
}
END_FIXTURE_TEST(VersionFixture, testEntryLosesOverride)
/*
/*
* EvalScriptVersion does not propagate overrides to its caller, it
* restores things exactly as they were before the call. This is as opposed to
* the normal (no Version suffix) API which propagates overrides

View File

@ -78,27 +78,27 @@ BEGIN_TEST(testXDR_principals)
CHECK(script);
CHECK(!JS_GetScriptPrincipals(script));
CHECK(!JS_GetScriptOriginPrincipals(script));
script = createScriptViaXDR(NULL, NULL, i);
CHECK(script);
CHECK(!JS_GetScriptPrincipals(script));
CHECK(!JS_GetScriptOriginPrincipals(script));
script = createScriptViaXDR(&testPrincipals[0], NULL, i);
CHECK(script);
CHECK(JS_GetScriptPrincipals(script) == &testPrincipals[0]);
CHECK(JS_GetScriptOriginPrincipals(script) == &testPrincipals[0]);
script = createScriptViaXDR(&testPrincipals[0], &testPrincipals[0], i);
CHECK(script);
CHECK(JS_GetScriptPrincipals(script) == &testPrincipals[0]);
CHECK(JS_GetScriptOriginPrincipals(script) == &testPrincipals[0]);
script = createScriptViaXDR(&testPrincipals[0], &testPrincipals[1], i);
CHECK(script);
CHECK(JS_GetScriptPrincipals(script) == &testPrincipals[0]);
CHECK(JS_GetScriptOriginPrincipals(script) == &testPrincipals[1]);
script = createScriptViaXDR(NULL, &testPrincipals[1], i);
CHECK(script);
CHECK(!JS_GetScriptPrincipals(script));
@ -166,7 +166,7 @@ BEGIN_TEST(testXDR_atline)
CHECK(script);
CHECK(script = FreezeThaw(cx, script));
CHECK(!strcmp("bar", JS_GetScriptFilename(cx, script)));
JS::Value v;
JSBool ok = JS_ExecuteScript(cx, global, script, &v);
CHECK(ok);

View File

@ -4462,7 +4462,7 @@ JS_NewArrayObject(JSContext *cx, int length, jsval *vector)
JS_THREADSAFE_ASSERT(cx->compartment != cx->runtime->atomsCompartment);
AssertNoGC(cx);
CHECK_REQUEST(cx);
assertSameCompartment(cx, JSValueArray(vector, vector ? (uint32_t)length : 0));
return NewDenseCopiedArray(cx, (uint32_t)length, vector);
}

View File

@ -3108,7 +3108,7 @@ extern JS_PUBLIC_API(void)
JS_freeop(JSFreeOp *fop, void *p);
extern JS_PUBLIC_API(JSFreeOp *)
JS_GetDefaultFreeOp(JSRuntime *rt);
JS_GetDefaultFreeOp(JSRuntime *rt);
extern JS_PUBLIC_API(void)
JS_updateMallocCounter(JSContext *cx, size_t nbytes);

View File

@ -175,7 +175,7 @@ js_GetLengthProperty(JSContext *cx, JSObject *obj, uint32_t *lengthp)
return true;
}
return ToUint32(cx, value, (uint32_t *)lengthp);
}
@ -243,7 +243,7 @@ static JSBool
BigIndexToId(JSContext *cx, JSObject *obj, uint32_t index, JSBool createAtom,
jsid *idp)
{
JS_ASSERT(index > JSID_INT_MAX);
jschar buf[10];

View File

@ -596,7 +596,7 @@ js::XDRAtom(XDRState<mode> *xdr, JSAtom **atomp)
/*
* We must copy chars to a temporary buffer to convert between little and
* big endian data.
*/
*/
jschar *chars;
jschar stackChars[256];
if (nchars <= ArrayLength(stackChars)) {

View File

@ -248,7 +248,7 @@ typedef HashSet<AtomStateEntry, AtomHasher, SystemAllocPolicy> AtomSet;
* On encodings:
*
* - Some string functions have an optional FlationCoding argument that allow
* the caller to force CESU-8 encoding handling.
* the caller to force CESU-8 encoding handling.
* - Functions that don't take a FlationCoding base their NormalEncoding
* behavior on the js_CStringsAreUTF8 value. NormalEncoding is either raw
* (simple zero-extension) or UTF-8 depending on js_CStringsAreUTF8.

View File

@ -18,7 +18,7 @@
*
* DEFINE_ATOM(id, name)
* Define an atom whose JavaScript string's value is |name|.
*
*
* DEFINE_PROTOTYPE_ATOM(id)
* Define an atom whose name is the same as one of those defined in
* jsproto.tbl. The code that processes that has already declared and
@ -30,7 +30,7 @@
* jskeyword.tbl. The code that processes that has already declared and
* defined the js_<id>_str global, so this defines only the JSAtomState
* member.
*/
*/

View File

@ -164,7 +164,7 @@ IdToString(JSContext *cx, jsid id)
if (JS_LIKELY(JSID_IS_INT(id)))
str = js_IntToString(cx, JSID_TO_INT(id));
else
str = ToStringSlow(cx, IdToValue(id));
str = ToStringSlow(cx, IdToValue(id));
if (!str)
return NULL;

View File

@ -111,9 +111,9 @@ void
JSRuntime::sizeOfIncludingThis(JSMallocSizeOfFun mallocSizeOf, RuntimeSizes *runtime)
{
runtime->object = mallocSizeOf(this);
runtime->atomsTable = atomState.atoms.sizeOfExcludingThis(mallocSizeOf);
runtime->contexts = 0;
for (ContextIter acx(this); !acx.done(); acx.next())
runtime->contexts += acx->sizeOfIncludingThis(mallocSizeOf);
@ -148,8 +148,8 @@ size_t
JSRuntime::sizeOfExplicitNonHeap()
{
if (!execAlloc_)
return 0;
return 0;
size_t mjitCode, regexpCode, unusedCodeMemory;
execAlloc_->sizeOfCode(&mjitCode, &regexpCode, &unusedCodeMemory);
return mjitCode + regexpCode + unusedCodeMemory + stackSpace.sizeOfCommitted();

View File

@ -327,7 +327,7 @@ class CompartmentChecker
if (JSID_IS_OBJECT(id))
check(JSID_TO_OBJECT(id));
}
void check(JSIdArray *ida) {
if (ida) {
for (int i = 0; i < ida->length; i++) {

View File

@ -631,7 +631,7 @@ void
JSCompartment::updateForDebugMode(FreeOp *fop, AutoDebugModeGC &dmgc)
{
for (ContextIter acx(rt); !acx.done(); acx.next()) {
if (acx->compartment == this)
if (acx->compartment == this)
acx->updateJITEnabled();
}

View File

@ -2797,9 +2797,9 @@ js_DateGetMinutes(JSContext *cx, JSObject* obj)
JS_FRIEND_API(int)
js_DateGetSeconds(JSContext *cx, JSObject* obj)
{
if (!obj->isDate())
if (!obj->isDate())
return 0;
double utctime = obj->getDateUTCTime().toNumber();
if (MOZ_DOUBLE_IS_NaN(utctime))
return 0;

View File

@ -1404,7 +1404,7 @@ DumpCallgrind(JSContext *cx, unsigned argc, jsval *vp)
JS_SET_RVAL(cx, vp, BOOLEAN_TO_JSVAL(js_DumpCallgrind(outFile.mBytes)));
return JS_TRUE;
}
}
#endif
#ifdef MOZ_VTUNE

View File

@ -102,7 +102,7 @@ typedef enum JSDToStrMode {
/*
* DO NOT USE THIS FUNCTION IF YOU CAN AVOID IT. js::NumberToCString() is a
* better function to use.
* better function to use.
*
* Convert dval according to the given mode and return a pointer to the
* resulting ASCII string. If mode == DTOSTR_STANDARD and precision == 0 it's
@ -122,7 +122,7 @@ js_dtostr(DtoaState *state, char *buffer, size_t bufferSize, JSDToStrMode mode,
/*
* DO NOT USE THIS FUNCTION IF YOU CAN AVOID IT. js::NumberToCString() is a
* better function to use.
* better function to use.
*
* Convert d to a string in the given base. The integral part of d will be
* printed exactly in that base, regardless of how large it is, because there

View File

@ -77,7 +77,7 @@ JS_FindCompilationScope(JSContext *cx, JSObject *obj)
*/
if (obj->isWrapper())
obj = UnwrapObject(obj);
/*
* Innerize the target_obj so that we compile in the correct (inner)
* scope.

View File

@ -226,7 +226,7 @@ fun_enumerate(JSContext *cx, JSObject *obj)
id = NameToId(cx->runtime->atomState.lengthAtom);
if (!obj->hasProperty(cx, id, &found, JSRESOLVE_QUALIFIED))
return false;
id = NameToId(cx->runtime->atomState.nameAtom);
if (!obj->hasProperty(cx, id, &found, JSRESOLVE_QUALIFIED))
return false;
@ -328,7 +328,7 @@ fun_resolve(JSContext *cx, JSObject *obj, jsid id, unsigned flags,
v.setInt32(fun->nargs);
else
v.setString(fun->atom ? fun->atom : cx->runtime->emptyString);
if (!DefineNativeProperty(cx, fun, id, v, JS_PropertyStub, JS_StrictPropertyStub,
JSPROP_PERMANENT | JSPROP_READONLY, 0, 0)) {
return false;

View File

@ -210,7 +210,7 @@ struct JSFunction : public JSObject
inline const js::Value &getExtendedSlot(size_t which) const;
private:
/*
/*
* These member functions are inherited from JSObject, but should never be applied to
* a value statically known to be a JSFunction.
*/

View File

@ -3634,7 +3634,7 @@ GCCycle(JSRuntime *rt, bool incremental, int64_t budget, JSGCInvocationKind gcki
if (shouldSweep)
SweepPhase(rt, gckind, &startBackgroundSweep);
}
#ifdef JS_THREADSAFE
if (startBackgroundSweep)
rt->gcHelperThread.startBackgroundSweep(gckind == GC_SHRINK);

View File

@ -350,7 +350,7 @@ types::TypeFailure(JSContext *cx, const char *fmt, ...)
/* Always active, even in release builds */
MOZ_Assert(msgbuf, __FILE__, __LINE__);
*((volatile int *)NULL) = 0; /* Should never be reached */
}
@ -403,7 +403,7 @@ TypeSet::add(JSContext *cx, TypeConstraint *constraint, bool callExisting)
if (flags & TYPE_FLAG_UNKNOWN) {
cx->compartment->types.addPending(cx, constraint, this, Type::UnknownType());
} else {
/* Enqueue type set members stored as bits. */
/* Enqueue type set members stored as bits. */
for (TypeFlags flag = 1; flag < TYPE_FLAG_ANYOBJECT; flag <<= 1) {
if (flags & flag) {
Type type = Type::PrimitiveType(TypeFlagPrimitive(flag));
@ -2269,7 +2269,7 @@ TypeCompartment::markSetsUnknown(JSContext *cx, TypeObject *target)
* a generic object type. It is not sufficient to mark just the persistent
* sets, as analysis of individual opcodes can pull type objects from
* static information (like initializer objects at various offsets).
*
*
* We make a list of properties to update and fix them afterwards, as adding
* types can't be done while iterating over cells as it can potentially make
* new type objects as well or trigger GC.
@ -5431,7 +5431,7 @@ TypeScript::CheckBytecode(JSContext *cx, JSScript *script, jsbytecode *pc, const
if (!types->hasType(type)) {
/* Display fine-grained debug information first */
fprintf(stderr, "Missing type at #%u:%05u pushed %u: %s\n",
fprintf(stderr, "Missing type at #%u:%05u pushed %u: %s\n",
script->id(), unsigned(pc - script->code), i, TypeString(type));
TypeFailure(cx, "Missing type pushed %u: %s", i, TypeString(type));
}

View File

@ -995,14 +995,14 @@ class GenericInterruptEnabler : public InterpreterFrames::InterruptEnablerBase {
T value;
};
inline InterpreterFrames::InterpreterFrames(JSContext *cx, FrameRegs *regs,
inline InterpreterFrames::InterpreterFrames(JSContext *cx, FrameRegs *regs,
const InterruptEnablerBase &enabler)
: context(cx), regs(regs), enabler(enabler)
{
older = cx->runtime->interpreterFrames;
cx->runtime->interpreterFrames = this;
}
inline InterpreterFrames::~InterpreterFrames()
{
context->runtime->interpreterFrames = older;
@ -1691,7 +1691,7 @@ BEGIN_CASE(JSOP_STOP)
if (cx->compartment->debugMode())
interpReturnOK = ScriptDebugEpilogue(cx, regs.fp(), interpReturnOK);
interpReturnOK = ScriptEpilogue(cx, regs.fp(), interpReturnOK);
/* The JIT inlines ScriptEpilogue. */

View File

@ -84,7 +84,7 @@ ScriptEpilogueOrGeneratorYield(JSContext *cx, StackFrame *fp, bool ok);
* return a JSTrapStatus code indication how execution should proceed:
*
* - JSTRAP_CONTINUE: Continue execution normally.
*
*
* - JSTRAP_THROW: Throw an exception. ScriptDebugPrologue has set |cx|'s
* pending exception to the value to be thrown.
*
@ -101,7 +101,7 @@ ScriptDebugPrologue(JSContext *cx, StackFrame *fp);
/*
* Announce to the debugger that the thread has exited a JavaScript frame, |fp|.
* If |ok| is true, the frame is returning normally; if |ok| is false, the frame
* is throwing an exception or terminating.
* is throwing an exception or terminating.
*
* Call whatever hooks have been registered to observe frame exits. Change cx's
* current exception and |fp|'s return value to reflect the changes in behavior

View File

@ -131,7 +131,7 @@ ComputeThis(JSContext *cx, StackFrame *fp)
* This helps us implement the custom [[Get]] method that ES5's GetValue
* algorithm uses for primitive values, without actually constructing the
* temporary object that the specification does.
*
*
* For objects, return the object itself. For string, boolean, and number
* primitive values, return the appropriate constructor's prototype. For
* undefined and null, throw an error and return NULL, attributing the

View File

@ -94,11 +94,11 @@ NumberDiv(double a, double b)
|| MOZ_DOUBLE_IS_NaN(b) /* XXX MSVC miscompiles such that (NaN == 0) */
#endif
)
return js_NaN;
return js_NaN;
if (MOZ_DOUBLE_IS_NEGATIVE(a) != MOZ_DOUBLE_IS_NEGATIVE(b))
return js_NegativeInfinity;
return js_PositiveInfinity;
return js_PositiveInfinity;
}
return a / b;

View File

@ -456,7 +456,7 @@ powi(double x, int y)
// infinity in the computation, because sometimes the higher
// internal precision in the pow() implementation would have
// given us a finite p. This happens very rarely.
double result = 1.0 / p;
return (result == 0 && MOZ_DOUBLE_IS_INFINITE(p))
? pow(x, static_cast<double>(y)) // Avoid pow(double, int).

View File

@ -159,7 +159,7 @@ GetNativeStackBaseImpl()
void *stackBase = 0;
size_t stackSize = 0;
# ifdef DEBUG
int rc =
int rc =
# endif
# if defined(__OpenBSD__)
pthread_stackseg_np(pthread_self(), &ss);

View File

@ -384,7 +384,7 @@ js::num_parseInt(JSContext *cx, unsigned argc, Value *vp)
return true;
}
if (args.length() == 1 ||
if (args.length() == 1 ||
(args[1].isInt32() && (args[1].toInt32() == 0 || args[1].toInt32() == 10))) {
if (args[0].isInt32()) {
args.rval() = args[0];
@ -397,7 +397,7 @@ js::num_parseInt(JSContext *cx, unsigned argc, Value *vp)
*
* To preserve this behaviour, we can't use the fast-path when string >
* 1e21, or else the result would be |NeM|.
*
*
* The same goes for values smaller than 1.0e-6, because the string would be in
* the form of "Ne-M".
*/

View File

@ -635,7 +635,7 @@ obj_toStringHelper(JSContext *cx, JSObject *obj)
StringBuffer sb(cx);
const char *className = obj->getClass()->name;
if (!sb.append("[object ") || !sb.appendInflated(className, strlen(className)) ||
if (!sb.append("[object ") || !sb.appendInflated(className, strlen(className)) ||
!sb.append("]"))
{
return NULL;

View File

@ -714,7 +714,7 @@ js_Disassemble1(JSContext *cx, JSScript *script, jsbytecode *pc,
const size_t Sprinter::DefaultSize = 64;
bool
bool
Sprinter::realloc_(size_t newSize)
{
JS_ASSERT(newSize > (size_t) offset);
@ -4833,7 +4833,7 @@ Decompile(SprintStack *ss, jsbytecode *pc, int nb)
*/
bool grouped = !(fun->flags & JSFUN_EXPR_CLOSURE);
bool strict = jp->script->strictModeCode;
str = js_DecompileToString(cx, "lambda", fun, 0,
str = js_DecompileToString(cx, "lambda", fun, 0,
false, grouped, strict,
js_DecompileFunction);
if (!str)
@ -5661,7 +5661,7 @@ js_DecompileValueGenerator(JSContext *cx, int spindex, jsval v,
if (pc < script->main())
goto do_fallback;
if (spindex != JSDVG_IGNORE_STACK) {
jsbytecode **pcstack;

View File

@ -172,7 +172,7 @@ class PropertyCache
PropertyCache() {
PodZero(this);
}
private:
static inline uintptr_t
hash(jsbytecode *pc, const Shape *kshape)

View File

@ -106,7 +106,7 @@ class PropertyTree
bool insertChild(JSContext *cx, js::Shape *parent, js::Shape *child);
PropertyTree();
public:
enum { MAX_HEIGHT = 128 };
@ -114,7 +114,7 @@ class PropertyTree
: compartment(comp)
{
}
js::Shape *newShape(JSContext *cx);
js::Shape *getChild(JSContext *cx, Shape *parent, uint32_t nfixed, const StackShape &child);

View File

@ -173,7 +173,7 @@ BaseProxyHandler::getElementIfPresent(JSContext *cx, JSObject *proxy_, JSObject
}
return get(cx, proxy, receiver, id, vp);
}
}
bool
BaseProxyHandler::set(JSContext *cx, JSObject *proxy, JSObject *receiver, jsid id, bool strict,
@ -504,7 +504,7 @@ IndirectProxyHandler::hasInstance(JSContext *cx, JSObject *proxy, const Value *v
}
JSType
IndirectProxyHandler::typeOf(JSContext *cx, JSObject *proxy)
IndirectProxyHandler::typeOf(JSContext *cx, JSObject *proxy)
{
return TypeOfValue(cx, ObjectValue(*GetProxyTargetObject(proxy)));
}
@ -555,7 +555,7 @@ IndirectProxyHandler::iteratorNext(JSContext *cx, JSObject *proxy, Value *vp)
if (vp->toBoolean()) {
*vp = cx->iterValue;
cx->iterValue.setUndefined();
} else
} else
vp->setMagic(JS_NO_ITER_VALUE);
return true;
}
@ -921,7 +921,7 @@ ScriptedProxyHandler::iterate(JSContext *cx, JSObject *proxy_, unsigned flags, V
}
JSType
ScriptedProxyHandler::typeOf(JSContext *cx, JSObject *proxy)
ScriptedProxyHandler::typeOf(JSContext *cx, JSObject *proxy)
{
/*
* This function is only here to prevent a regression in

View File

@ -677,7 +677,7 @@ NodeBuilder::newNodeLoc(TokenPos *pos, Value *dst)
dst->setNull();
return true;
}
JSObject *loc, *to;
Value tv;

View File

@ -89,7 +89,7 @@ REOP_DEF(REOP_CLASS, "class")
REOP_DEF(REOP_NCLASS, "nclass")
/* NCLASS is considered to be the last "simple" op-code */
/* alternative subexpressions in kid and next */
REOP_DEF(REOP_ALT, "alt")

View File

@ -678,7 +678,7 @@ JSObject::putProperty(JSContext *cx, jsid id,
if (!CheckCanChangeAttrs(cx, self, shape, &attrs))
return NULL;
/*
* If the caller wants to allocate a slot, but doesn't care which slot,
* copy the existing shape's slot into slot so we can match shape, if all
@ -817,7 +817,7 @@ JSObject::changeProperty(JSContext *cx, Shape *shape, unsigned attrs, unsigned m
if (!CheckCanChangeAttrs(cx, this, shape, &attrs))
return NULL;
if (shape->attrs == attrs && shape->getter() == getter && shape->setter() == setter)
return shape;

View File

@ -68,47 +68,47 @@
* objects; it has an id, flags, etc. (But it doesn't represent the property's
* value.) However, Shapes are always stored in linked linear sequence of
* Shapes, called "shape lineages". Each shape lineage represents the layout of
* an entire object.
*
* an entire object.
*
* Every JSObject has a pointer, |shape_|, accessible via lastProperty(), to
* the last Shape in a shape lineage, which identifies the property most
* recently added to the object. This pointer permits fast object layout
* tests. The shape lineage order also dictates the enumeration order for the
* object; ECMA requires no particular order but this implementation has
* promised and delivered property definition order.
*
*
* Shape lineages occur in two kinds of data structure.
*
*
* 1. N-ary property trees. Each path from a non-root node to the root node in
* a property tree is a shape lineage. Property trees permit full (or
* partial) sharing of Shapes between objects that have fully (or partly)
* identical layouts. The root is an EmptyShape whose identity is determined
* by the object's class, compartment and prototype. These Shapes are shared
* and immutable.
*
*
* 2. Dictionary mode lists. Shapes in such lists are said to be "in
* dictionary mode", as are objects that point to such Shapes. These Shapes
* are unshared, private to a single object, and immutable except for their
* links in the dictionary list.
*
*
* All shape lineages are bi-directionally linked, via the |parent| and
* |kids|/|listp| members.
*
*
* Shape lineages start out life in the property tree. They can be converted
* (by copying) to dictionary mode lists in the following circumstances.
*
*
* 1. The shape lineage's size reaches MAX_HEIGHT. This reasonable limit avoids
* potential worst cases involving shape lineage mutations.
*
*
* 2. A property represented by a non-last Shape in a shape lineage is removed
* from an object. (In the last Shape case, obj->shape_ can be easily
* adjusted to point to obj->shape_->parent.) We originally tried lazy
* forking of the property tree, but this blows up for delete/add
* repetitions.
*
*
* 3. A property represented by a non-last Shape in a shape lineage has its
* attributes modified.
*
*
* To find the Shape for a particular property of an object initially requires
* a linear search. But if the number of searches starting at any particular
* Shape in the property tree exceeds MAX_LINEAR_SEARCHES and the Shape's
@ -483,7 +483,7 @@ struct Shape : public js::gc::Cell
FIXED_SLOTS_SHIFT = 27,
FIXED_SLOTS_MASK = uint32_t(FIXED_SLOTS_MAX << FIXED_SLOTS_SHIFT),
/*
/*
* numLinearSearches starts at zero and is incremented initially on
* search() calls. Once numLinearSearches reaches LINEAR_SEARCHES_MAX,
* the table is created on the next search() call. The table can also

View File

@ -436,7 +436,7 @@ js::XDRScript(XDRState<mode> *xdr, JSScript **scriptp, JSScript *parentScript)
if (mode == XDR_ENCODE) {
script = *scriptp;
JS_ASSERT_IF(parentScript, parentScript->compartment() == script->compartment());
nargs = script->bindings.numArgs();
nvars = script->bindings.numVars();
argsVars = (nargs << 16) | nvars;
@ -1032,9 +1032,9 @@ js::FreeScriptFilenames(JSRuntime *rt)
* ClosedSlotArray ClosedArgs closedArgs()
* ClosedSlotArray ClosedVars closedVars()
*
* Then are the elements of several arrays.
* Then are the elements of several arrays.
* - Most of these arrays have headers listed above (if present). For each of
* these, the array pointer and the array length is stored in the header.
* these, the array pointer and the array length is stored in the header.
* - The remaining arrays have pointers and lengths that are stored directly in
* JSScript. This is because, unlike the others, they are nearly always
* non-zero length and so the optional-header space optimization isn't
@ -1050,7 +1050,7 @@ js::FreeScriptFilenames(JSRuntime *rt)
* Closed args closedArgs()->vector closedArgs()->length
* Closed vars closedVars()->vector closedVars()->length
* Bytecodes code length
* Source notes notes() numNotes() * sizeof(jssrcnote)
* Source notes notes() numNotes() * sizeof(jssrcnote)
*
* IMPORTANT: This layout has two key properties.
* - It ensures that everything has sufficient alignment; in particular, the

View File

@ -420,7 +420,7 @@ struct JSScript : public js::gc::Cell
public:
jsbytecode *code; /* bytecodes and their immediate operands */
uint8_t *data; /* pointer to variable-length data array (see
uint8_t *data; /* pointer to variable-length data array (see
comment above NewScript() for details) */
const char *filename; /* source filename or null */

View File

@ -42,13 +42,13 @@
*/
MSG_DEF(JSSMSG_NOT_AN_ERROR, 0, 0, JSEXN_NONE, "<Error #0 is reserved>")
MSG_DEF(JSSMSG_CANT_OPEN, 1, 2, JSEXN_NONE, "can't open {0}: {1}")
MSG_DEF(JSSMSG_TRAP_USAGE, 2, 0, JSEXN_NONE, "usage: trap [fun] [pc] expr")
MSG_DEF(JSSMSG_LINE2PC_USAGE, 3, 0, JSEXN_NONE, "usage: line2pc [fun] line")
MSG_DEF(JSSMSG_FILE_SCRIPTS_ONLY, 4, 0, JSEXN_NONE, "only works on JS scripts read from files")
MSG_DEF(JSSMSG_UNEXPECTED_EOF, 5, 1, JSEXN_NONE, "unexpected EOF in {0}")
MSG_DEF(JSSMSG_DOEXP_USAGE, 6, 0, JSEXN_NONE, "usage: doexp obj id")
MSG_DEF(JSSMSG_SCRIPTS_ONLY, 7, 0, JSEXN_NONE, "only works on scripts")
MSG_DEF(JSSMSG_CANT_OPEN, 1, 2, JSEXN_NONE, "can't open {0}: {1}")
MSG_DEF(JSSMSG_TRAP_USAGE, 2, 0, JSEXN_NONE, "usage: trap [fun] [pc] expr")
MSG_DEF(JSSMSG_LINE2PC_USAGE, 3, 0, JSEXN_NONE, "usage: line2pc [fun] line")
MSG_DEF(JSSMSG_FILE_SCRIPTS_ONLY, 4, 0, JSEXN_NONE, "only works on JS scripts read from files")
MSG_DEF(JSSMSG_UNEXPECTED_EOF, 5, 1, JSEXN_NONE, "unexpected EOF in {0}")
MSG_DEF(JSSMSG_DOEXP_USAGE, 6, 0, JSEXN_NONE, "usage: doexp obj id")
MSG_DEF(JSSMSG_SCRIPTS_ONLY, 7, 0, JSEXN_NONE, "only works on scripts")
MSG_DEF(JSSMSG_NOT_ENOUGH_ARGS, 8, 1, JSEXN_NONE, "{0}: not enough arguments")
MSG_DEF(JSSMSG_TOO_MANY_ARGS, 9, 1, JSEXN_NONE, "{0}: too many arguments")
MSG_DEF(JSSMSG_ASSERT_EQ_FAILED, 10, 2, JSEXN_NONE, "Assertion failed: got {0}, expected {1}")

View File

@ -3816,12 +3816,12 @@ const bool js_isidstart[] = {
/* 3 */ ____, ____, ____, ____, ____, ____, true, ____, ____, ____,
/* 4 */ ____, ____, ____, ____, ____, ____, ____, ____, ____, ____,
/* 5 */ ____, ____, ____, ____, ____, ____, ____, ____, ____, ____,
/* 6 */ ____, ____, ____, ____, ____, true, true, true, true, true,
/* 7 */ true, true, true, true, true, true, true, true, true, true,
/* 8 */ true, true, true, true, true, true, true, true, true, true,
/* 9 */ true, ____, ____, ____, ____, true, ____, true, true, true,
/* 10 */ true, true, true, true, true, true, true, true, true, true,
/* 11 */ true, true, true, true, true, true, true, true, true, true,
/* 6 */ ____, ____, ____, ____, ____, true, true, true, true, true,
/* 7 */ true, true, true, true, true, true, true, true, true, true,
/* 8 */ true, true, true, true, true, true, true, true, true, true,
/* 9 */ true, ____, ____, ____, ____, true, ____, true, true, true,
/* 10 */ true, true, true, true, true, true, true, true, true, true,
/* 11 */ true, true, true, true, true, true, true, true, true, true,
/* 12 */ true, true, true, ____, ____, ____, ____, ____
};
@ -3839,14 +3839,14 @@ const bool js_isident[] = {
/* 1 */ ____, ____, ____, ____, ____, ____, ____, ____, ____, ____,
/* 2 */ ____, ____, ____, ____, ____, ____, ____, ____, ____, ____,
/* 3 */ ____, ____, ____, ____, ____, ____, true, ____, ____, ____,
/* 4 */ ____, ____, ____, ____, ____, ____, ____, ____, true, true,
/* 4 */ ____, ____, ____, ____, ____, ____, ____, ____, true, true,
/* 5 */ true, true, true, true, true, true, true, true, ____, ____,
/* 6 */ ____, ____, ____, ____, ____, true, true, true, true, true,
/* 7 */ true, true, true, true, true, true, true, true, true, true,
/* 8 */ true, true, true, true, true, true, true, true, true, true,
/* 9 */ true, ____, ____, ____, ____, true, ____, true, true, true,
/* 10 */ true, true, true, true, true, true, true, true, true, true,
/* 11 */ true, true, true, true, true, true, true, true, true, true,
/* 6 */ ____, ____, ____, ____, ____, true, true, true, true, true,
/* 7 */ true, true, true, true, true, true, true, true, true, true,
/* 8 */ true, true, true, true, true, true, true, true, true, true,
/* 9 */ true, ____, ____, ____, ____, true, ____, true, true, true,
/* 10 */ true, true, true, true, true, true, true, true, true, true,
/* 11 */ true, true, true, true, true, true, true, true, true, true,
/* 12 */ true, true, true, ____, ____, ____, ____, ____
};

View File

@ -242,7 +242,7 @@ DeflateString(JSContext *cx, const jschar *chars, size_t length);
/*
* Inflate bytes to JS chars in an existing buffer. 'chars' must be large
* enough for 'length' jschars. The buffer is NOT null-terminated.
*
*
* charsLength must be be initialized with the destination buffer size and, on
* return, will contain on return the number of copied chars.
*/

View File

@ -315,7 +315,7 @@ IsTypedArrayProto(JSObject *obj)
}
class DataViewObject : public JSObject
{
{
static Class protoClass;
static const size_t BYTEOFFSET_SLOT = 0;

View File

@ -137,7 +137,7 @@ GetObjectMap(JSObject *obj)
}
static JSObject *
GetKeyArg(JSContext *cx, CallArgs &args)
GetKeyArg(JSContext *cx, CallArgs &args)
{
Value *vp = &args[0];
if (vp->isPrimitive()) {
@ -236,7 +236,7 @@ WeakMap_delete(JSContext *cx, unsigned argc, Value *vp)
JSObject *key = GetKeyArg(cx, args);
if (!key)
return false;
ObjectValueMap *map = GetObjectMap(obj);
if (map) {
ObjectValueMap::Ptr ptr = map->lookup(key);
@ -269,7 +269,7 @@ WeakMap_set(JSContext *cx, unsigned argc, Value *vp)
JSObject *key = GetKeyArg(cx, args);
if (!key)
return false;
Value value = (args.length() > 1) ? args[1] : UndefinedValue();
ObjectValueMap *map = GetObjectMap(obj);

View File

@ -43,7 +43,7 @@ extern fmod:PROC
js_myfmod PROC FRAME
.ENDPROLOG
fnclex
jmp fmod
jmp fmod
js_myfmod ENDP
END

View File

@ -652,7 +652,7 @@ Reify(JSContext *cx, JSCompartment *origin, Value *vp)
if (isKeyIter)
return VectorToKeyIterator(cx, obj, ni->flags, keys, vp);
return VectorToValueIterator(cx, obj, ni->flags, keys, vp);
return VectorToValueIterator(cx, obj, ni->flags, keys, vp);
}
bool
@ -730,7 +730,7 @@ CrossCompartmentWrapper::nativeCall(JSContext *cx, JSObject *wrapper, Class *cla
if (!cx->stack.pushInvokeArgs(cx, srcArgs.length(), &dstArgs))
return false;
Value *src = srcArgs.base();
Value *src = srcArgs.base();
Value *srcend = srcArgs.array() + srcArgs.length();
Value *dst = dstArgs.base();
for (; src != srcend; ++src, ++dst) {

View File

@ -348,7 +348,7 @@ static const JSC::MacroAssembler::RegisterID JSParamReg_Argc = JSC::MIPSRegiste
// stack space must be reserved up-front, and is aligned on an 8-byte
// boundary.
//
// Returns an offset that can be used to index into this stack
// Returns an offset that can be used to index into this stack
StackMarker allocStack(uint32_t bytes, uint32_t alignment = 4) {
bytes += align(bytes + extraStackSpace, alignment);
subPtr(Imm32(bytes), stackPointerRegister);

View File

@ -1304,7 +1304,7 @@ mjit::Compiler::finishThisUp()
/* To make inlineDoubles and oolDoubles aligned to sizeof(double) bytes,
MIPS adds extra sizeof(double) bytes to codeSize. */
size_t codeSize = masm.size() +
#if defined(JS_CPU_MIPS)
#if defined(JS_CPU_MIPS)
stubcc.size() + sizeof(double) +
#else
stubcc.size() +
@ -1751,7 +1751,7 @@ mjit::Compiler::finishThisUp()
stubcc.fixCrossJumps(result, masm.size(), masm.size() + stubcc.size());
#if defined(JS_CPU_MIPS)
/* Make sure doubleOffset is aligned to sizeof(double) bytes. */
/* Make sure doubleOffset is aligned to sizeof(double) bytes. */
size_t doubleOffset = (((size_t)result + masm.size() + stubcc.size() +
sizeof(double) - 1) & (~(sizeof(double) - 1))) -
(size_t)result;

View File

@ -490,7 +490,7 @@ private:
bool debugMode_;
bool inlining_;
bool hasGlobalReallocation;
bool oomInVector; // True if we have OOM'd appending to a vector.
bool oomInVector; // True if we have OOM'd appending to a vector.
bool overflowICSpace; // True if we added a constant pool in a reserved space.
uint64_t gcNumber;
PCLengthEntry *pcLengths;
@ -802,10 +802,10 @@ private:
CompileStatus compileMathAbsInt(FrameEntry *arg);
CompileStatus compileMathAbsDouble(FrameEntry *arg);
CompileStatus compileMathSqrt(FrameEntry *arg);
CompileStatus compileMathMinMaxDouble(FrameEntry *arg1, FrameEntry *arg2,
Assembler::DoubleCondition cond);
CompileStatus compileMathMinMaxInt(FrameEntry *arg1, FrameEntry *arg2,
Assembler::Condition cond);
CompileStatus compileMathMinMaxDouble(FrameEntry *arg1, FrameEntry *arg2,
Assembler::DoubleCondition cond);
CompileStatus compileMathMinMaxInt(FrameEntry *arg1, FrameEntry *arg2,
Assembler::Condition cond);
CompileStatus compileMathPowSimple(FrameEntry *arg1, FrameEntry *arg2);
CompileStatus compileArrayPush(FrameEntry *thisv, FrameEntry *arg);
CompileStatus compileArrayConcat(types::TypeSet *thisTypes, types::TypeSet *argTypes,
@ -819,7 +819,7 @@ private:
enum GetCharMode { GetChar, GetCharCode };
CompileStatus compileGetChar(FrameEntry *thisValue, FrameEntry *arg, GetCharMode mode);
CompileStatus compileStringFromCode(FrameEntry *arg);
CompileStatus compileParseInt(JSValueType argType, uint32_t argc);

View File

@ -349,7 +349,7 @@ mjit::Compiler::jsop_binary_double(FrameEntry *lhs, FrameEntry *rhs, JSOp op,
}
EmitDoubleOp(op, fpRight, fpLeft, masm);
MaybeJump done;
/*
@ -365,10 +365,10 @@ mjit::Compiler::jsop_binary_double(FrameEntry *lhs, FrameEntry *rhs, JSOp op,
FPRegisterID fpReg = frame.allocFPReg();
JumpList isDouble;
masm.branchConvertDoubleToInt32(fpLeft, reg, isDouble, fpReg);
masm.storeValueFromComponents(ImmType(JSVAL_TYPE_INT32), reg,
frame.addressOf(lhs));
frame.freeReg(reg);
frame.freeReg(fpReg);
done.setJump(masm.jump());
@ -480,7 +480,7 @@ mjit::Compiler::jsop_binary_full_simple(FrameEntry *fe, JSOp op, VoidStub stub,
default:
JS_NOT_REACHED("unrecognized op");
}
JS_ASSERT(overflow.isSet());
/*
@ -585,7 +585,7 @@ mjit::Compiler::jsop_binary_full(FrameEntry *lhs, FrameEntry *rhs, JSOp op,
/* If the LHS type was not known, link its path here. */
if (lhsUnknownDone.isSet())
lhsUnknownDone.get().linkTo(stubcc.masm.label(), &stubcc.masm);
/* Perform the double operation. */
EmitDoubleOp(op, regs.rhsFP, regs.lhsFP, stubcc.masm);
@ -721,7 +721,7 @@ mjit::Compiler::jsop_binary_full(FrameEntry *lhs, FrameEntry *rhs, JSOp op,
JS_NOT_REACHED("unrecognized op");
}
op = origOp;
/*
* Integer overflow path. Restore the original values and make a stub call,
* which could trigger recompilation.
@ -1163,7 +1163,7 @@ mjit::Compiler::jsop_equality_int_string(JSOp op, BoolStub stub,
frame.discardFrame();
bool needStub = true;
#ifdef JS_MONOIC
EqualityGenInfo ic;
@ -1396,7 +1396,7 @@ DoubleCondForOp(JSOp op, JSOp fused)
bool ifeq = fused == JSOP_IFEQ;
switch (op) {
case JSOP_GT:
return ifeq
return ifeq
? Assembler::DoubleLessThanOrEqualOrUnordered
: Assembler::DoubleGreaterThan;
case JSOP_GE:
@ -1658,7 +1658,7 @@ mjit::Compiler::jsop_relational_full(JSOp op, BoolStub stub, jsbytecode *target,
frame.pinReg(cmpReg);
if (reg.isSet())
frame.pinReg(reg.reg());
frame.popn(2);
frame.syncAndKillEverything();

View File

@ -175,7 +175,7 @@ mjit::Compiler::compileMathSqrt(FrameEntry *arg)
}
CompileStatus
mjit::Compiler::compileMathMinMaxDouble(FrameEntry *arg1, FrameEntry *arg2,
mjit::Compiler::compileMathMinMaxDouble(FrameEntry *arg1, FrameEntry *arg2,
Assembler::DoubleCondition cond)
{
FPRegisterID fpReg1;
@ -197,10 +197,10 @@ mjit::Compiler::compileMathMinMaxDouble(FrameEntry *arg1, FrameEntry *arg2,
/* Slow path for 0 and NaN, because they have special requriments. */
masm.zeroDouble(Registers::FPConversionTemp);
Jump zeroOrNan = masm.branchDouble(Assembler::DoubleEqualOrUnordered, fpReg1,
Jump zeroOrNan = masm.branchDouble(Assembler::DoubleEqualOrUnordered, fpReg1,
Registers::FPConversionTemp);
stubcc.linkExit(zeroOrNan, Uses(4));
Jump zeroOrNan2 = masm.branchDouble(Assembler::DoubleEqualOrUnordered, fpReg2,
Jump zeroOrNan2 = masm.branchDouble(Assembler::DoubleEqualOrUnordered, fpReg2,
Registers::FPConversionTemp);
stubcc.linkExit(zeroOrNan2, Uses(4));
@ -849,7 +849,7 @@ mjit::Compiler::compileParseInt(JSValueType argType, uint32_t argc)
OOL_STUBCALL(stubs::SlowCall, REJOIN_FALLTHROUGH);
}
/*
/*
* Stack looks like callee, this, arg1, arg2, argN.
* First pop all args other than arg1.
*/
@ -859,7 +859,7 @@ mjit::Compiler::compileParseInt(JSValueType argType, uint32_t argc)
if (needStubCall) {
stubcc.rejoin(Changes(1));
}
}
} else {
FrameEntry *arg = frame.peek(-(int32_t)argc);
FPRegisterID fpScratchReg = frame.allocFPReg();
@ -872,7 +872,7 @@ mjit::Compiler::compileParseInt(JSValueType argType, uint32_t argc)
masm.slowLoadConstantDouble(1, fpScratchReg);
/* Slow path for NaN and numbers < 1. */
Jump lessThanOneOrNan = masm.branchDouble(Assembler::DoubleLessThanOrUnordered,
Jump lessThanOneOrNan = masm.branchDouble(Assembler::DoubleLessThanOrUnordered,
fpReg, fpScratchReg);
stubcc.linkExit(lessThanOneOrNan, Uses(2 + argc));
@ -896,7 +896,7 @@ mjit::Compiler::compileParseInt(JSValueType argType, uint32_t argc)
stubcc.rejoin(Changes(1));
}
return Compile_Okay;
return Compile_Okay;
}
CompileStatus
@ -1054,7 +1054,7 @@ mjit::Compiler::inlineNativeFunction(uint32_t argc, bool callingNew)
if ((native == js_math_min || native == js_math_max)) {
if (arg1Type == JSVAL_TYPE_INT32 && arg2Type == JSVAL_TYPE_INT32 &&
type == JSVAL_TYPE_INT32) {
return compileMathMinMaxInt(arg1, arg2,
return compileMathMinMaxInt(arg1, arg2,
native == js_math_min ? Assembler::LessThan : Assembler::GreaterThan);
}
if ((arg1Type == JSVAL_TYPE_INT32 || arg1Type == JSVAL_TYPE_DOUBLE) &&

View File

@ -321,7 +321,7 @@ mjit::Compiler::jsop_bitop(JSOp op)
masm.urshift32(Imm32(shift), reg);
}
frame.popn(2);
/* x >>> 0 may result in a double, handled above. */
JS_ASSERT_IF(op == JSOP_URSH, shift >= 1);
frame.pushTypedPayload(JSVAL_TYPE_INT32, reg);
@ -353,14 +353,14 @@ mjit::Compiler::jsop_bitop(JSOp op)
}
frame.unpinReg(rr);
}
if (op == JSOP_LSH) {
masm.lshift32(rr, reg);
} else if (op == JSOP_RSH) {
masm.rshift32(rr, reg);
} else {
masm.urshift32(rr, reg);
Jump isNegative = masm.branch32(Assembler::LessThan, reg, Imm32(0));
stubcc.linkExit(isNegative, Uses(2));
}
@ -695,7 +695,7 @@ mjit::Compiler::jsop_not()
jmpNotObject.linkTo(syncTarget, &stubcc.masm);
stubcc.crossJump(jmpObjectExit, lblRejoin);
/* Leave. */
stubcc.leave();
@ -755,7 +755,7 @@ mjit::Compiler::jsop_typeof()
Assembler::Condition cond = (op == JSOP_STRICTEQ || op == JSOP_EQ)
? Assembler::Equal
: Assembler::NotEqual;
if (atom == rt->atomState.typeAtoms[JSTYPE_VOID]) {
type = JSVAL_TYPE_UNDEFINED;
} else if (atom == rt->atomState.typeAtoms[JSTYPE_STRING]) {
@ -900,7 +900,7 @@ mjit::Compiler::jsop_andor(JSOp op, jsbytecode *target)
if (fe->isConstant()) {
JSBool b = js_ValueToBoolean(fe->getValue());
/* Short-circuit. */
if ((op == JSOP_OR && b == JS_TRUE) ||
(op == JSOP_AND && b == JS_FALSE)) {
@ -928,7 +928,7 @@ mjit::Compiler::jsop_localinc(JSOp op, uint32_t slot)
int amt = (op == JSOP_LOCALINC || op == JSOP_INCLOCAL) ? 1 : -1;
if (!analysis->incrementInitialValueObserved(PC)) {
// Before:
// Before:
// After: V
frame.pushLocal(slot);
@ -991,7 +991,7 @@ mjit::Compiler::jsop_arginc(JSOp op, uint32_t slot)
int amt = (op == JSOP_ARGINC || op == JSOP_INCARG) ? 1 : -1;
if (!analysis->incrementInitialValueObserved(PC)) {
// Before:
// Before:
// After: V
frame.pushArg(slot);
@ -1603,7 +1603,7 @@ mjit::Compiler::jsop_setelem(bool popGuaranteed)
// 1) maybePin() never allocates a register, it only pins if a register
// already existed.
// 2) tempRegForData() will work fine on a pinned register.
// Guard that the object is an object.
if (!obj->isTypeKnown()) {
Jump j = frame.testObject(Assembler::NotEqual, obj);
@ -2433,7 +2433,7 @@ mjit::Compiler::jsop_stricteq(JSOp op)
RegisterID result = data;
if (!(Registers::maskReg(data) & Registers::SingleByteRegs))
result = frame.allocReg(Registers::SingleByteRegs).reg();
Jump notBoolean;
if (!test->isTypeKnown())
notBoolean = frame.testBoolean(Assembler::NotEqual, test);

View File

@ -175,7 +175,7 @@ FrameState::convertInt32ToDouble(Assembler &masm, FrameEntry *fe, FPRegisterID f
if (fe->isCopy())
fe = fe->copyOf();
if (fe->data.inRegister())
masm.convertInt32ToDouble(fe->data.reg(), fpreg);
else
@ -751,7 +751,7 @@ FrameState::ensureFeSynced(const FrameEntry *fe, Assembler &masm) const
}
#endif
/*
/*
* On x86_64, only one of the following two calls will have output,
* and a load will only occur if necessary.
*/
@ -791,7 +791,7 @@ FrameState::ensureTypeSynced(const FrameEntry *fe, Assembler &masm) const
if (backing->isConstant())
masm.storeTypeTag(ImmTag(backing->getKnownTag()), to);
else if (backing->isTypeKnown())
masm.storeTypeTag(ImmType(backing->getKnownType()), to);
masm.storeTypeTag(ImmType(backing->getKnownType()), to);
else
masm.storeTypeTag(backing->type.reg(), to);
}
@ -1515,7 +1515,7 @@ FrameState::loadDouble(FrameEntry *fe, FPRegisterID fpReg, Assembler &masm) cons
{
if (fe->isCopy()) {
FrameEntry *backing = fe->copyOf();
if (tryFastDoubleLoad(fe, fpReg, masm))
if (tryFastDoubleLoad(fe, fpReg, masm))
return;
fe = backing;
}

View File

@ -1040,7 +1040,7 @@ FrameState::storeTo(FrameEntry *fe, Address address, bool popped)
fe->data.setRegister(dreg.reg());
}
}
/* Store the Value. */
if (fe->type.inRegister()) {
masm.storeValueFromComponents(fe->type.reg(), dreg.reg(), address);
@ -1360,7 +1360,7 @@ FrameState::sync(Assembler &masm, Uses uses) const
#if defined JS_PUNBOX64
if ((!fe->type.synced() && backing->type.inMemory()) ||
(!fe->data.synced() && backing->data.inMemory())) {
RegisterID syncReg = Registers::ValueReg;
/* Load the entire Value into syncReg. */
@ -2269,7 +2269,7 @@ FrameState::storeTop(FrameEntry *target)
* The problem is slot N can't be backed by M if M could be popped
* before N. We want a guarantee that when we pop M, even if it was
* copied, it has no outstanding copies.
*
*
* Because of |let| expressions, it's kind of hard to really know
* whether a region on the stack will be popped all at once. Bleh!
*
@ -2285,10 +2285,10 @@ FrameState::storeTop(FrameEntry *target)
fe->setCopyOf(target);
}
}
/*
* This is valid from the top->isCopy() path because we're guaranteed a
* consistent ordering - all copies of |backing| are tracked after
* consistent ordering - all copies of |backing| are tracked after
* |backing|. Transitively, only one swap is needed.
*/
if (backing->trackerIndex() < target->trackerIndex())

View File

@ -90,7 +90,7 @@ class LoopState;
* 2) Owned. The FrameState owns the register, and may spill it at any time.
*
* ------------------ Implementation Details ------------------
*
*
* Observations:
*
* 1) Every time we need a slow call, we must sync everything.
@ -98,7 +98,7 @@ class LoopState;
* 3) Syncing is limited to constants and registers.
* 4) Entries are not forgotten unless they are entirely in memory and are
* not constants or copies.
*
*
* With these in mind, we want to make sure that the compiler doesn't degrade
* badly as functions get larger.
*
@ -361,7 +361,7 @@ class FrameState
/*
* Pushes an int32_t onto the operation stack. This is a specialized version
* of pushNumber. The caller must guarantee that (a) an int32_t is to be
* of pushNumber. The caller must guarantee that (a) an int32_t is to be
* pushed on the inline path, and (b) if any slow path pushes a double,
* the slow path also stores the double to memory.
*/

View File

@ -62,7 +62,7 @@ struct GetPropLabels : MacroAssemblerTypedefs {
int offset = masm.differenceBetween(fastPathRejoin, fastValueLoad);
inlineValueLoadOffset = offset;
/*
/*
* Note: the offset between the type and data loads for x86 is asserted
* in NunboxAssembler::loadValueWithAddressOffsetPatch.
*/
@ -130,7 +130,7 @@ struct GetPropLabels : MacroAssemblerTypedefs {
inlineShapeOffset = offset;
JS_ASSERT(offset == inlineShapeOffset);
}
void setStubShapeJumpOffset(int offset) {
stubShapeJumpOffset = offset;
JS_ASSERT(offset == stubShapeJumpOffset);
@ -174,7 +174,7 @@ struct GetPropLabels : MacroAssemblerTypedefs {
/* Offset from storeBack to end of value load. */
int32_t inlineValueLoadOffset : 8;
/*
/*
* Offset from lastStubStart to end of shape jump.
* TODO: We can redefine the location of lastStubStart to be
* after the jump -- at which point this is always 0.
@ -292,7 +292,7 @@ struct SetPropLabels : MacroAssemblerTypedefs {
/* Offset from shapeGuard to end of shape comparison. */
int32_t inlineShapeDataOffset : 8;
/*
/*
* Offset from lastStubStart to end of shape jump.
* TODO: We can redefine the location of lastStubStart to be
* after the jump -- at which point this is always 0.

View File

@ -112,7 +112,7 @@ class Repatcher : public JSC::RepatchBuffer
/* Patch the offset of a Value load emitted by loadValueWithAddressOffsetPatch. */
void patchAddressOffsetForValueLoad(CodeLocationLabel label, uint32_t offset) {
#if defined JS_CPU_X64 || defined JS_CPU_ARM || defined JS_CPU_SPARC || defined JS_CPU_MIPS
#if defined JS_CPU_X64 || defined JS_CPU_ARM || defined JS_CPU_SPARC || defined JS_CPU_MIPS
repatch(label.dataLabel32AtOffset(0), offset);
#elif defined JS_CPU_X86
static const unsigned LOAD_TYPE_OFFSET = 6;

View File

@ -574,7 +574,7 @@ js_InternalThrow(VMFrame &f)
if (js::ScriptDebugEpilogue(cx, f.fp(), false))
return cx->jaegerRuntime().forceReturnFromExternC();
}
ScriptEpilogue(f.cx, f.fp(), false);
@ -957,7 +957,7 @@ js_InternalInterpret(void *returnData, void *returnType, void *returnReg, js::VM
if (!ScriptPrologueOrGeneratorResume(cx, fp, types::UseNewTypeAtEntry(cx, fp)))
return js_InternalThrow(f);
/*
/*
* Having called ScriptPrologueOrGeneratorResume, we would normally call
* ScriptDebugPrologue here. But in debug mode, we only use JITted
* functions' invokeEntry entry point, whereas CheckArgumentTypes

View File

@ -193,7 +193,7 @@ JS_STATIC_ASSERT(offsetof(FrameRegs, sp) == 0);
* caller's registers when control is at or after that directive. That is,
* they describe the states that hold between one instruction and the next,
* not the instructions themselves. Later directives override earlier
* directives.
* directives.
*
* In DWARF CFI, each stack frame has a Canonical Frame Address (CFA) that
* remains constant throughout the frame's lifetime. Exactly where it is is
@ -207,7 +207,7 @@ JS_STATIC_ASSERT(offsetof(FrameRegs, sp) == 0);
* rule for computing the CFA, not the rule for each saved register.)
*
* Quick reference:
*
*
* .cfi_startproc, .cfi_endproc
* Put these at the beginning and end of the block of code you're
* annotating.
@ -227,7 +227,7 @@ JS_STATIC_ASSERT(offsetof(FrameRegs, sp) == 0);
* .cfi_offset REGISTER, OFFSET
* The caller's value of REGISTER is saved at OFFSET from the current CFA.
* (This is the directive that actually says something interesting.)
*
*
* There are other directives that compute the CFA, a saved register's address,
* or a saved register's value, in more complex ways, but the above are the ones
* we use here.
@ -449,7 +449,7 @@ asm (
CFI(".cfi_offset r13, -32" "\n")
CFI(".cfi_offset r14, -40" "\n")
CFI(".cfi_offset r15, -48" "\n")
CFI(".cfi_offset rbx, -56" "\n")
CFI(".cfi_offset rbx, -56" "\n")
CFI("nop" "\n")
".globl " SYMBOL_STRING(JaegerInterpolineScripted) "\n"
SYMBOL_STRING(JaegerInterpolineScripted) ":" "\n"
@ -492,7 +492,7 @@ SYMBOL_STRING(JaegerTrampoline) ":" "\n"
"pushl %ebx" "\n"
CFI(".cfi_offset ebx, -20" "\n")
/* Build the JIT frame. Push fields in order,
/* Build the JIT frame. Push fields in order,
* then align the stack to form esp == VMFrame. */
"movl 12(%ebp), %ebx" "\n" /* load fp */
"pushl %ebx" "\n" /* unused1 */
@ -631,7 +631,7 @@ asm (
CFI(".cfi_offset ebp, -8" "\n")
CFI(".cfi_offset esi, -12" "\n")
CFI(".cfi_offset edi, -16" "\n")
CFI(".cfi_offset ebx, -20" "\n")
CFI(".cfi_offset ebx, -20" "\n")
CFI("nop" "\n")
".globl " SYMBOL_STRING(JaegerInterpolineScripted) "\n"
SYMBOL_STRING(JaegerInterpolineScripted) ":" "\n"
@ -702,11 +702,11 @@ SYMBOL_STRING(JaegerTrampoline) ":" "\n"
* [ args.ptr2 ] [ dynamicArgc ] (union)
* [ args.ptr ] [ lazyArgsObj ] (union)
*/
/* Push callee-saved registers. */
" push {r4-r11,lr}" "\n"
/* Push interesting VMFrame content. */
" mov ip, #0" "\n"
" mov ip, #0" "\n"
" push {ip}" "\n" /* stubRejoin */
" push {r1}" "\n" /* entryncode */
" push {r1}" "\n" /* entryfp */
@ -757,7 +757,7 @@ SYMBOL_STRING(JaegerThrowpoline) ":" "\n"
/* Call the utility function that sets up the internal throw routine. */
" blx " SYMBOL_STRING_RELOC(js_InternalThrow) "\n"
/* If js_InternalThrow found a scripted handler, jump to it. Otherwise, tidy
* up and return. */
" cmp r0, #0" "\n"
@ -852,7 +852,7 @@ extern "C" {
push edi;
push ebx;
/* Build the JIT frame. Push fields in order,
/* Build the JIT frame. Push fields in order,
* then align the stack to form esp == VMFrame. */
mov ebx, [ebp + 12];
push ebx;

View File

@ -32,7 +32,7 @@
* decision by deleting the provisions above and replace them with the notice
* and other provisions required by the GPL or the LGPL. If you do not delete
* the provisions above, a recipient may use your version of this file under
* the terms of any one of the MPL, the GPL or the LGPL.
* the terms of any one of the MPL, the GPL or the LGPL.
*
* ***** END LICENSE BLOCK ***** */
@ -968,7 +968,7 @@ inline void * bsearch_nmap(NativeMapEntry *nmap, size_t nPairs, size_t bcOff)
if (bcOff < bcOff_mid) {
hi = mid-1;
continue;
}
}
if (bcOff > bcOff_mid) {
lo = mid+1;
continue;

View File

@ -233,7 +233,7 @@ class EqualityCompiler : public BaseCompiler
Vector<Jump, 4, SystemAllocPolicy> jumpList;
Jump trueJump;
Jump falseJump;
public:
EqualityCompiler(VMFrame &f, EqualityICInfo &ic)
: BaseCompiler(f.cx), f(f), ic(ic), jumpList(SystemAllocPolicy())
@ -254,7 +254,7 @@ class EqualityCompiler : public BaseCompiler
{
falseJump = j;
}
void generateStringPath(Assembler &masm)
{
const ValueRemat &lvr = ic.lvr;
@ -267,18 +267,18 @@ class EqualityCompiler : public BaseCompiler
Jump lhsFail = masm.testString(Assembler::NotEqual, lvr.typeReg());
linkToStub(lhsFail);
}
if (!rvr.isType(JSVAL_TYPE_STRING)) {
Jump rhsFail = masm.testString(Assembler::NotEqual, rvr.typeReg());
linkToStub(rhsFail);
}
RegisterID tmp = ic.tempReg;
/* JSString::isAtom === (lengthAndFlags & ATOM_MASK == 0) */
JS_STATIC_ASSERT(JSString::ATOM_FLAGS == 0);
Imm32 atomMask(JSString::ATOM_MASK);
masm.load32(Address(lvr.dataReg(), JSString::offsetOfLengthAndFlags()), tmp);
Jump lhsNotAtomized = masm.branchTest32(Assembler::NonZero, tmp, atomMask);
linkToStub(lhsNotAtomized);
@ -307,12 +307,12 @@ class EqualityCompiler : public BaseCompiler
{
ValueRemat &lvr = ic.lvr;
ValueRemat &rvr = ic.rvr;
if (!lvr.isConstant() && !lvr.isType(JSVAL_TYPE_OBJECT)) {
Jump lhsFail = masm.testObject(Assembler::NotEqual, lvr.typeReg());
linkToStub(lhsFail);
}
if (!rvr.isConstant() && !rvr.isType(JSVAL_TYPE_OBJECT)) {
Jump rhsFail = masm.testObject(Assembler::NotEqual, rvr.typeReg());
linkToStub(rhsFail);
@ -376,7 +376,7 @@ class EqualityCompiler : public BaseCompiler
Assembler masm;
Value rval = f.regs.sp[-1];
Value lval = f.regs.sp[-2];
if (rval.isObject() && lval.isObject()) {
generateObjectPath(masm);
ic.generated = true;
@ -513,7 +513,7 @@ mjit::NativeStubEpilogue(VMFrame &f, Assembler &masm, NativeStubLinker::FinalJum
/*
* Calls have an inline path and an out-of-line path. The inline path is used
* in the fastest case: the method has JIT'd code, and |argc == nargs|.
*
*
* The inline path and OOL path are separated by a guard on the identity of
* the callee object. This guard starts as NULL and always fails on the first
* hit. On the OOL path, the callee is verified to be both a function and a
@ -974,7 +974,7 @@ class CallCompiler : public BaseCompiler
disable();
return NULL;
}
JSFunction *fun = ucr.fun;
JS_ASSERT(fun);
JSScript *script = fun->script();

View File

@ -89,7 +89,7 @@ class NunboxAssembler : public JSC::MacroAssembler
Address payloadOf(Address address) {
return Address(address.base, address.offset + PAYLOAD_OFFSET);
}
BaseIndex payloadOf(BaseIndex address) {
return BaseIndex(address.base, address.index, address.scale, address.offset + PAYLOAD_OFFSET);
}
@ -199,7 +199,7 @@ class NunboxAssembler : public JSC::MacroAssembler
JS_ASSERT(differenceBetween(endType, endPayload) == 6);
return start;
#elif defined JS_CPU_ARM || defined JS_CPU_SPARC
/*
/*
* On ARM, the first instruction loads the offset from a literal pool, so the label
* returned points at that instruction.
*/

View File

@ -164,7 +164,7 @@ class BasePolyIC : public BaseIC {
if (isOnePool()) {
JSC::ExecutablePool *oldPool = u.execPool;
JS_ASSERT(!isTagged(oldPool));
ExecPoolVector *execPools = OffTheBooks::new_<ExecPoolVector>(SystemAllocPolicy());
ExecPoolVector *execPools = OffTheBooks::new_<ExecPoolVector>(SystemAllocPolicy());
if (!execPools)
return false;
if (!execPools->append(oldPool) || !execPools->append(pool)) {
@ -174,7 +174,7 @@ class BasePolyIC : public BaseIC {
u.taggedExecPools = tag(execPools);
return true;
}
return multiplePools()->append(pool);
return multiplePools()->append(pool);
}
protected:
@ -445,7 +445,7 @@ struct PICInfo : public BasePolyIC {
// Possible types of the RHS, for monitored SETPROP PICs.
types::TypeSet *rhsTypes;
inline bool isSet() const {
return kind == SET;
}
@ -512,7 +512,7 @@ struct PICInfo : public BasePolyIC {
// Where in the script did we generate this PIC?
jsbytecode *pc;
// Index into the script's atom table.
PropertyName *name;

View File

@ -235,7 +235,7 @@ class PunboxAssembler : public JSC::MacroAssembler
orPtr(reg, Registers::ValueReg);
storePtr(Registers::ValueReg, valueOf(address));
}
template <typename T>
void storePayload(ImmPayload imm, T address) {
/* Not for doubles. */

View File

@ -437,7 +437,7 @@ Recompiler::clearStackReferences(FreeOp *fop, JSScript *script)
/*
* The strategy for this goes as follows:
*
*
* 1) Scan the stack, looking at all return addresses that could go into JIT
* code.
* 2) If an address corresponds to a call site registered by |callSite| during

View File

@ -40,7 +40,7 @@
/*
* Retroactive continuity ("retcon") refers to the retroactive modification
* or reinterpretation of established facts.
* or reinterpretation of established facts.
*/
#if !defined jsjaeger_retcon_h__ && defined JS_METHODJIT

View File

@ -1322,7 +1322,7 @@ stubs::TableSwitch(VMFrame &f, jsbytecode *origPc)
uint32_t jumpOffset = GET_JUMP_OFFSET(originalPC);
jsbytecode *pc = originalPC + JUMP_OFFSET_LEN;
/* Note: compiler adjusts the stack beforehand. */
Value rval = f.regs.sp[-1];
@ -1693,7 +1693,7 @@ stubs::ConvertToTypedInt(JSContext *cx, Value *vp)
int32_t i32 = 0;
#ifdef DEBUG
bool success =
bool success =
#endif
StringToNumberType<int32_t>(cx, vp->toString(), &i32);
JS_ASSERT(success);
@ -1719,7 +1719,7 @@ stubs::ConvertToTypedFloat(JSContext *cx, Value *vp)
JS_ASSERT(vp->isString());
double d = 0;
#ifdef DEBUG
bool success =
bool success =
#endif
StringToNumberType<double>(cx, vp->toString(), &d);
JS_ASSERT(success);

View File

@ -97,7 +97,7 @@ struct UncachedCallResult {
fun = NULL;
codeAddr = NULL;
unjittable = false;
}
}
};
/*
@ -219,7 +219,7 @@ void JS_FASTCALL CrossChunkShim(VMFrame &f, void *edge);
} /* namespace stubs */
/*
/*
* If COND is true, return A; otherwise, return B. This allows us to choose between
* function template instantiations without running afoul of C++'s overload resolution
* rules. (Try simplifying, and you'll either see the problem --- or have found a

View File

@ -84,7 +84,7 @@ StubCompiler::syncExit(Uses uses)
lastGeneration = generation;
JaegerSpew(JSpew_Insns, " ---- END SLOW MERGE CODE ---- \n");
return l;
}
@ -143,7 +143,7 @@ StubCompiler::leave()
generation++;
JaegerSpew(JSpew_Insns, " ---- END SLOW LEAVE CODE ---- \n");
}
void
StubCompiler::rejoin(Changes changes)
{

View File

@ -98,7 +98,7 @@ TrampolineCompiler::compileTrampoline(Trampolines::TrampolinePtr *where,
bool ok;
JSC::LinkBuffer buffer(&masm, execAlloc, poolp, &ok, JSC::METHOD_CODE);
if (!ok)
if (!ok)
return false;
masm.finalize(buffer);
uint8_t *result = (uint8_t*)buffer.finalizeCodeAddendum().dataLocation();

View File

@ -62,7 +62,7 @@ public:
private:
bool compileTrampoline(Trampolines::TrampolinePtr *where, JSC::ExecutablePool **pool,
TrampolineGenerator generator);
/* Generators for trampolines. */
static bool generateForceReturn(Assembler &masm);

View File

@ -44,18 +44,18 @@
* The MIPS VMFrame is 112 bytes as follows.
*
* 108 [ unused4 ] For alignment.
* 104 [ ra ]
* 104 [ ra ]
* 100 [ gp ] If PIC code is generated, we will save gp.
* 96 [ s7 ]
* 92 [ s6 ]
* 88 [ s5 ]
* 84 [ s4 ]
* 80 [ s3 ]
* 76 [ s2 ]
* 72 [ s1 ]
* 68 [ s0 ]
* 64 [ stubRejoin ]
* 60 [ entrycode ]
* 96 [ s7 ]
* 92 [ s6 ]
* 88 [ s5 ]
* 84 [ s4 ]
* 80 [ s3 ]
* 76 [ s2 ]
* 72 [ s1 ]
* 68 [ s0 ]
* 64 [ stubRejoin ]
* 60 [ entrycode ]
* 56 [ entryfp ]
* 52 [ stkLimit ]
* 48 [ cx ]

View File

@ -77,8 +77,8 @@ JaegerTrampoline PROC FRAME
; fp must go into rbx
push 0 ; stubRejoin
push rdx ; entryncode
push rdx ; entryFp
push r9 ; inlineCallCount
push rdx ; entryFp
push r9 ; inlineCallCount
push rcx ; cx
push rdx ; fp
mov rbx, rdx

View File

@ -102,7 +102,7 @@ JaegerThrowpoline:
/* We add the stack by 16 before. */
addl $0x10, %esp
/* Align the stack to 16 bytes. */
pushl %esp
pushl %esp
pushl (%esp)
pushl (%esp)
pushl (%esp)

View File

@ -14,7 +14,7 @@
!
! The Original Code is Mozilla SpiderMonkey JavaScript 1.9 code, released
! May 28, 2008.
!
!
! The Initial Developer of the Original Code is
! Leon Sha <leon.sha@oracle.com>
!

View File

@ -183,7 +183,7 @@ GenConversionForIntArray(Assembler &masm, JSObject *tarray, const ValueRemat &vr
Int32CxVp stub;
if (TypedArray::getType(tarray) == js::TypedArray::TYPE_UINT8_CLAMPED)
stub = stubs::ConvertToTypedInt<true>;
else
else
stub = stubs::ConvertToTypedInt<false>;
masm.callWithABI(JS_FUNC_TO_DATA_PTR(void *, stub), false);
if (vr.dataReg() != Registers::ReturnReg)
@ -301,7 +301,7 @@ StoreToTypedArray(JSContext *cx, Assembler &masm, JSObject *tarray, T address,
PreserveRegisters saveLHS(masm);
// There are three tricky situations to handle:
// (1) The RHS needs conversion. saveMask will be stomped, and
// (1) The RHS needs conversion. saveMask will be stomped, and
// the RHS may need to be stomped.
// (2) The RHS may need to be clamped, which clobbers it.
// (3) The RHS may need to be in a single-byte register.

View File

@ -78,7 +78,7 @@ using namespace js;
*/
/*
* A JSTracer that produces a map of the heap with edges reversed.
* A JSTracer that produces a map of the heap with edges reversed.
*
* HeapReversers must be allocated in a stack frame. (They contain an AutoArrayRooter,
* and those must be allocated and destroyed in a stack-like order.)
@ -179,7 +179,7 @@ class HeapReverser : public JSTracer {
/* Build a reversed map of the heap in |map|. */
bool reverseHeap();
private:
private:
/*
* Conservative scanning can, on a whim, decide that a root is no longer a
* root, and cause bits of our graph to disappear. The 'roots' vector holds
@ -214,7 +214,7 @@ class HeapReverser : public JSTracer {
reverser->parent = newParent;
}
~AutoParent() {
reverser->parent = savedParent;
reverser->parent = savedParent;
}
private:
HeapReverser *reverser;
@ -351,7 +351,7 @@ HeapReverser::getEdgeDescription()
/* A class for finding an object's referrers, given a reversed heap map. */
class ReferenceFinder {
public:
ReferenceFinder(JSContext *cx, const HeapReverser &reverser)
ReferenceFinder(JSContext *cx, const HeapReverser &reverser)
: context(cx), reverser(reverser), result(cx) { }
/* Produce an object describing all references to |target|. */
@ -371,7 +371,7 @@ class ReferenceFinder {
class Path {
public:
Path(const HeapReverser::Edge &edge, Path *next) : edge(edge), next(next) { }
/*
* Compute the full path represented by this Path. The result is
* owned by the caller.
@ -390,7 +390,7 @@ class ReferenceFinder {
HeapReverser::Node *node;
};
/*
/*
* Given that we've reached |cell| via |path|, with all Nodes along that
* path marked, add paths from all reportable objects reachable from cell
* to |result|.
@ -436,7 +436,7 @@ ReferenceFinder::visit(void *cell, Path *path)
/* Have we reached a root? Always report that. */
if (!cell)
return addReferrer(JSVAL_NULL, path);
HeapReverser::Map::Ptr p = reverser.map.lookup(cell);
JS_ASSERT(p);
HeapReverser::Node *node = &p->value;
@ -473,7 +473,7 @@ ReferenceFinder::Path::computeName(JSContext *cx)
{
/* Walk the edge list and compute the total size of the path. */
size_t size = 6;
for (Path *l = this; l; l = l->next)
for (Path *l = this; l; l = l->next)
size += strlen(l->edge.name) + (l->next ? 2 : 0);
size += 1;
@ -577,7 +577,7 @@ FindReferences(JSContext *cx, unsigned argc, jsval *vp)
JSObject *references = finder.findReferences(RootedVarObject(cx, &target.toObject()));
if (!references)
return false;
JS_SET_RVAL(cx, vp, OBJECT_TO_JSVAL(references));
return true;
}

View File

@ -120,7 +120,7 @@ PrintParagraph(const char *text, unsigned startColno, const unsigned limitColno,
while (!isspace(*limit) && *limit != '\0')
++limit;
/*
/*
* If the current token is longer than the available number of columns,
* then make a line break before printing the token.
*/
@ -226,7 +226,7 @@ OptionParser::printHelp(const char *progname)
if (!options.empty()) {
printf("Options:\n");
/* Calculate sizes for column alignment. */
size_t lhsLen = 0;
for (Option **it = options.begin(), **end = options.end(); it != end; ++it) {
@ -303,7 +303,7 @@ OptionParser::handleOption(Option *opt, size_t argc, char **argv, size_t *i, boo
opt->asBoolOption()->value = true;
return Okay;
}
/*
/*
* Valued options are allowed to specify their values either via
* successive arguments or a single --longflag=value argument.
*/

View File

@ -88,7 +88,7 @@ struct Option
/* Only some valued options are variadic (like MultiStringOptions). */
virtual bool isVariadic() const { return false; }
/*
/*
* For arguments, the shortflag field is used to indicate whether the
* argument is optional.
*/
@ -207,7 +207,7 @@ class MultiStringRange
size_t argno() const { JS_ASSERT(!empty()); return cur->argno; }
};
/*
/*
* Builder for describing a command line interface and parsing the resulting
* specification.
*
@ -305,7 +305,7 @@ class OptionParser
MultiStringRange getMultiStringOption(char shortflag) const;
MultiStringRange getMultiStringOption(const char *longflag) const;
/*
/*
* Return whether the help option was present (and thus help was already
* displayed during parse_args).
*/

View File

@ -133,7 +133,7 @@ class Queue {
T item = front->back();
front->popBack();
return item;
}
}
void clear() {
v1.clear();
@ -289,7 +289,7 @@ class Event
public:
enum Result { fail = JS_FALSE, ok = JS_TRUE, forwardToParent };
virtual void destroy(JSContext *cx) {
virtual void destroy(JSContext *cx) {
JS_free(cx, data);
#ifdef DEBUG
data = NULL;
@ -1236,7 +1236,7 @@ Worker::jsPostMessageToChild(JSContext *cx, unsigned argc, jsval *vp)
JS_ReportError(cx, "Worker was shut down");
return false;
}
jsval data = argc > 0 ? JS_ARGV(cx, vp)[0] : JSVAL_VOID;
Event *event = DownMessageEvent::create(cx, w, data);
if (!event)

View File

@ -228,7 +228,7 @@ class Debugger::FrameRange {
frontDebugger()->frames.remove(entry);
}
void popFront() {
void popFront() {
JS_ASSERT(!empty());
nextDebugger++;
findNext();
@ -566,7 +566,7 @@ Debugger::slowPathOnLeaveFrame(JSContext *cx, bool frameOk)
status = JSTRAP_ERROR;
break;
}
Value completion;
if (!dbg->newCompletionValue(cx, status, value, &completion)) {
status = dbg->handleUncaughtException(ac, NULL, false);
@ -578,7 +578,7 @@ Debugger::slowPathOnLeaveFrame(JSContext *cx, bool frameOk)
bool hookOk = Invoke(cx, ObjectValue(*frameobj), handler, 1, &completion, &rval);
Value nextValue;
JSTrapStatus nextStatus = dbg->parseResumptionValue(ac, hookOk, rval, &nextValue);
/*
* At this point, we are back in the debuggee compartment, and any error has
* been wrapped up as a completion value.
@ -636,7 +636,7 @@ Debugger::slowPathOnLeaveFrame(JSContext *cx, bool frameOk)
case JSTRAP_THROW:
cx->setPendingException(value);
return false;
case JSTRAP_ERROR:
JS_ASSERT(!cx->isExceptionPending());
return false;
@ -786,7 +786,7 @@ Debugger::resultToCompletion(JSContext *cx, bool ok, const Value &rv,
bool
Debugger::newCompletionValue(JSContext *cx, JSTrapStatus status, Value value, Value *result)
{
/*
/*
* We must be in the debugger's compartment, since that's where we want
* to construct the completion value.
*/
@ -1974,7 +1974,7 @@ Debugger::removeDebuggeeGlobal(FreeOp *fop, GlobalObject *global,
debuggees.remove(global);
}
/*
/*
* A class for parsing 'findScripts' query arguments and searching for
* scripts that match the criteria they represent.
*/
@ -1984,7 +1984,7 @@ class Debugger::ScriptQuery {
ScriptQuery(JSContext *cx, Debugger *dbg):
cx(cx), debugger(dbg), compartments(cx), innermostForGlobal(cx) {}
/*
/*
* Initialize this ScriptQuery. Raise an error and return false if we
* haven't enough memory.
*/
@ -2090,7 +2090,7 @@ class Debugger::ScriptQuery {
}
/*
* Search all relevant compartments and the stack for scripts matching
* Search all relevant compartments and the stack for scripts matching
* this query, and append the matching scripts to |vector|.
*/
bool findScripts(AutoScriptVector *vector) {
@ -2197,7 +2197,7 @@ class Debugger::ScriptQuery {
return true;
}
/*
/*
* Arrange for this ScriptQuery to match all scripts running in debuggee
* globals.
*/
@ -2209,17 +2209,17 @@ class Debugger::ScriptQuery {
js_ReportOutOfMemory(cx);
return false;
}
}
}
return true;
}
/*
/*
* Given that parseQuery or omittedQuery has been called, prepare to
* match scripts. Set urlCString as appropriate.
*/
bool prepareQuery() {
/*
* Compute the proper value for |compartments|, given the present
* Compute the proper value for |compartments|, given the present
* value of |globals|.
*/
for (GlobalObjectSet::Range r = globals.all(); !r.empty(); r.popFront()) {
@ -2234,11 +2234,11 @@ class Debugger::ScriptQuery {
if (!urlCString.encode(cx, url.toString()))
return false;
}
return true;
return true;
}
/*
/*
* If |script|, a script in |global|, matches this query, append it to
* |vector| or place it in |innermostForGlobal|, as appropriate. Return true
* if no error occurs, false if an error occurs.
@ -2291,8 +2291,8 @@ class Debugger::ScriptQuery {
return false;
}
}
return true;
return true;
}
};

Some files were not shown because too many files have changed in this diff Show More