Bug 1509010 - Fix some clang-format comment issues in js/public. r=tcampbell

Differential Revision: https://phabricator.services.mozilla.com/D12535

--HG--
extra : moz-landing-system : lando
This commit is contained in:
Jan de Mooij 2018-11-21 18:12:57 +00:00
Родитель c9ce5110c2
Коммит e39a94637e
9 изменённых файлов: 39 добавлений и 25 удалений

Просмотреть файл

@ -74,7 +74,8 @@ CallMethodIfWrapped(JSContext* cx, IsAcceptableThis test, NativeImpl impl, const
// answer_getAnswer(JSContext* cx, unsigned argc, JS::Value* vp)
// {
// JS::CallArgs args = JS::CallArgsFromVp(argc, vp);
// return JS::CallNonGenericMethod<IsAnswerObject, answer_getAnswer_impl>(cx, args);
// return JS::CallNonGenericMethod<IsAnswerObject,
// answer_getAnswer_impl>(cx, args);
// }
//
// Note that, because they are used as template arguments, the predicate

Просмотреть файл

@ -661,7 +661,10 @@ struct MOZ_STATIC_CLASS ClassOps
/** Callback for the creation of constructor and prototype objects. */
typedef JSObject* (*ClassObjectCreationOp)(JSContext* cx, JSProtoKey key);
/** Callback for custom post-processing after class initialization via ClassSpec. */
/**
* Callback for custom post-processing after class initialization via
* ClassSpec.
*/
typedef bool (*FinishClassInitOp)(JSContext* cx, JS::HandleObject ctor,
JS::HandleObject proto);

Просмотреть файл

@ -418,7 +418,8 @@ ToSignedInteger<int32_t>(double d)
// hybrid solution is faster on A9, but this pure integer solution is
// notably faster for A8.
// %0 is the result register, and may alias either of the %[QR]1 registers.
// %0 is the result register, and may alias either of the %[QR]1
// registers.
// %Q4 holds the lower part of the mantissa.
// %R4 holds the sign, exponent, and the upper part of the mantissa.
// %1, %2 and %3 are used as temporary values.
@ -435,8 +436,9 @@ ToSignedInteger<int32_t>(double d)
// We should return zero in the following special cases:
// - Exponent is 0x000 - 1023: +/-0 or subnormal.
// - Exponent is 0x7ff - 1023: +/-INFINITY or NaN
// - This case is implicitly handled by the standard code path anyway,
// as shifting the mantissa up by the exponent will result in '0'.
// - This case is implicitly handled by the standard code path
// anyway, as shifting the mantissa up by the exponent will
// result in '0'.
//
// The result is composed of the mantissa, prepended with '1' and
// bit-shifted left by the (decoded) exponent. Note that because the r1[20]

Просмотреть файл

@ -102,7 +102,8 @@ namespace dbg {
// }
// result = builder.newObject(cx);
// return result &&
// result.defineProperty(cx, "eventType", SafelyFetchType(eventObject)) &&
// result.defineProperty(cx, "eventType",
// SafelyFetchType(eventObject)) &&
// result.defineProperty(cx, "event", eventObject);
// }
//

Просмотреть файл

@ -939,16 +939,19 @@ struct RuntimeStats
//
// - rtStats.gcHeapChunkTotal
// - decommitted bytes
// - rtStats.gcHeapDecommittedArenas (decommitted arenas in non-empty chunks)
// - rtStats.gcHeapDecommittedArenas
// (decommitted arenas in non-empty chunks)
// - unused bytes
// - rtStats.gcHeapUnusedChunks (empty chunks)
// - rtStats.gcHeapUnusedArenas (empty arenas within non-empty chunks)
// - rtStats.zTotals.unusedGCThings.totalSize() (empty GC thing slots within non-empty arenas)
// - rtStats.zTotals.unusedGCThings.totalSize()
// (empty GC thing slots within non-empty arenas)
// - used bytes
// - rtStats.gcHeapChunkAdmin
// - rtStats.zTotals.gcHeapArenaAdmin
// - rtStats.gcHeapGCThings (in-use GC things)
// == rtStats.zTotals.sizeOfLiveGCThings() + rtStats.cTotals.sizeOfLiveGCThings()
// == (rtStats.zTotals.sizeOfLiveGCThings() +
// rtStats.cTotals.sizeOfLiveGCThings())
//
// It's possible that some arenas in empty chunks may be decommitted, but
// we don't count those under rtStats.gcHeapDecommittedArenas because (a)

Просмотреть файл

@ -12,8 +12,8 @@
* Consumers define macros as follows:
* MACRO(name, init, clasp)
* name: The canonical name of the class.
* init: Initialization function. These are |extern "C";|, and clients should use
* |extern "C" {}| as appropriate when using this macro.
* init: Initialization function. These are |extern "C";|, and clients
* should use |extern "C" {}| as appropriate when using this macro.
* clasp: The JSClass for this object, or "dummy" if it doesn't exist.
*
*

Просмотреть файл

@ -183,7 +183,7 @@ using mozilla::Variant;
template <typename T>
using Vector = mozilla::Vector<T, 0, js::SystemAllocPolicy>;
/*** ubi::StackFrame ******************************************************************************/
/*** ubi::StackFrame **********************************************************/
// Concrete JS::ubi::StackFrame instances backed by a live SavedFrame object
// store their strings as JSAtom*, while deserialized stack frames from offline
@ -842,7 +842,7 @@ class Node {
using NodeSet = js::HashSet<Node, js::DefaultHasher<Node>, js::SystemAllocPolicy>;
using NodeSetPtr = mozilla::UniquePtr<NodeSet, JS::DeletePolicy<NodeSet>>;
/*** Edge and EdgeRange ***************************************************************************/
/*** Edge and EdgeRange *******************************************************/
using EdgeName = UniqueTwoByteChars;
@ -955,7 +955,7 @@ class PreComputedEdgeRange : public EdgeRange {
}
};
/*** RootList *************************************************************************************/
/*** RootList *****************************************************************/
// RootList is a class that can be pointed to by a |ubi::Node|, creating a
// fictional root-of-roots which has edges to every GC root in the JS
@ -1018,7 +1018,7 @@ class MOZ_STACK_CLASS JS_PUBLIC_API RootList {
};
/*** Concrete classes for ubi::Node referent types ************************************************/
/*** Concrete classes for ubi::Node referent types ****************************/
template<>
class JS_PUBLIC_API Concrete<RootList> : public Base {

Просмотреть файл

@ -149,7 +149,8 @@ class JS_PUBLIC_API DominatorTree
*
* Example usage:
*
* mozilla::Maybe<DominatedSetRange> range = myDominatorTree.getDominatedSet(myNode);
* mozilla::Maybe<DominatedSetRange> range =
* myDominatorTree.getDominatedSet(myNode);
* if (range.isNothing()) {
* // Handle unknown nodes however you see fit...
* return false;
@ -640,7 +641,8 @@ class JS_PUBLIC_API DominatorTree
*
* Example usage:
*
* mozilla::Maybe<DominatedSetRange> range = myDominatorTree.getDominatedSet(myNode);
* mozilla::Maybe<DominatedSetRange> range =
* myDominatorTree.getDominatedSet(myNode);
* if (range.isNothing()) {
* // Handle unknown node however you see fit...
* return false;

Просмотреть файл

@ -64,7 +64,8 @@ enum JSValueType : uint8_t
#endif
JSVAL_TYPE_OBJECT = 0x0c,
/* These never appear in a jsval; they are only provided as an out-of-band value. */
// These never appear in a jsval; they are only provided as an out-of-band
// value.
JSVAL_TYPE_UNKNOWN = 0x20,
JSVAL_TYPE_MISSING = 0x21
};
@ -279,16 +280,17 @@ CanonicalizeNaN(double d)
*
* - JS::Value has setX() and isX() members for X in
*
* { Int32, Double, String, Symbol, BigInt, Boolean, Undefined, Null, Object, Magic }
* { Int32, Double, String, Symbol, BigInt, Boolean, Undefined, Null,
* Object, Magic }
*
* JS::Value also contains toX() for each of the non-singleton types.
*
* - Magic is a singleton type whose payload contains either a JSWhyMagic "reason" for
* the magic value or a uint32_t value. By providing JSWhyMagic values when
* creating and checking for magic values, it is possible to assert, at
* runtime, that only magic values with the expected reason flow through a
* particular value. For example, if cx->exception has a magic value, the
* reason must be JS_GENERATOR_CLOSING.
* - Magic is a singleton type whose payload contains either a JSWhyMagic
* "reason" for the magic value or a uint32_t value. By providing JSWhyMagic
* values when creating and checking for magic values, it is possible to
* assert, at runtime, that only magic values with the expected reason flow
* through a particular value. For example, if cx->exception has a magic
* value, the reason must be JS_GENERATOR_CLOSING.
*
* - The JS::Value operations are preferred. The JSVAL_* operations remain for
* compatibility; they may be removed at some point. These operations mostly