Bug 1508255 - More formatting changes in js/src r=jandem
authorTed Campbell <tcampbell@mozilla.com>
Tue, 20 Nov 2018 10:23:38 +0000
changeset 503670 32eadea53faa9aca578c11bf682fcbb9385f9ebf
parent 503669 ba2da67c9e7e7541e4be66e5841c3a115c31ba1e
child 503671 5219139e6d0f9fb6c9effc4df73244b8f9dd418c
push id10290
push userffxbld-merge
push dateMon, 03 Dec 2018 16:23:23 +0000
treeherdermozilla-beta@700bed2445e6 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersjandem
bugs1508255
milestone65.0a1
first release with
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
last release without
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
Bug 1508255 - More formatting changes in js/src r=jandem These also help the clang-format result but are more subjective. Depends on D12387 Differential Revision: https://phabricator.services.mozilla.com/D12388
js/src/builtin/intl/RelativeTimeFormat.h
js/src/frontend/Parser.cpp
js/src/jit/BaselineBailouts.cpp
js/src/jit/BaselineIC.cpp
js/src/jit/arm/Architecture-arm.h
js/src/jit/arm/Trampoline-arm.cpp
js/src/jit/arm64/Trampoline-arm64.cpp
js/src/jit/mips32/Trampoline-mips32.cpp
js/src/jit/mips64/Trampoline-mips64.cpp
js/src/jit/x64/Trampoline-x64.cpp
js/src/jit/x86/Trampoline-x86.cpp
js/src/vm/JSFunction.cpp
js/src/vm/PIC.h
js/src/vm/TraceLogging.h
js/src/wasm/WasmStubs.cpp
--- a/js/src/builtin/intl/RelativeTimeFormat.h
+++ b/js/src/builtin/intl/RelativeTimeFormat.h
@@ -51,20 +51,22 @@ CreateRelativeTimeFormatPrototype(JSCont
  */
 extern MOZ_MUST_USE bool
 intl_RelativeTimeFormat_availableLocales(JSContext* cx, unsigned argc, JS::Value* vp);
 
 /**
  * Returns a relative time as a string formatted according to the effective
  * locale and the formatting options of the given RelativeTimeFormat.
  *
- * t should be a number representing a number to be formatted.
- * unit should be "second", "minute", "hour", "day", "week", "month", "quarter", or "year".
- * numeric should be "always" or "auto".
+ * |t| should be a number representing a number to be formatted.
+ * |unit| should be "second", "minute", "hour", "day", "week", "month",
+ *                  "quarter", or "year".
+ * |numeric| should be "always" or "auto".
  *
- * Usage: formatted = intl_FormatRelativeTime(relativeTimeFormat, t, unit, numeric)
+ * Usage: formatted = intl_FormatRelativeTime(relativeTimeFormat, t,
+ *                                            unit, numeric)
  */
 extern MOZ_MUST_USE bool
 intl_FormatRelativeTime(JSContext* cx, unsigned argc, JS::Value* vp);
 
 } // namespace js
 
 #endif /* builtin_intl_RelativeTimeFormat_h */
--- a/js/src/frontend/Parser.cpp
+++ b/js/src/frontend/Parser.cpp
@@ -6971,17 +6971,18 @@ GeneralParser<ParseHandler, Unit>::trySt
      * kid3 is the finally statement
      *
      * catch nodes are binary.
      * left is the catch-name/pattern or null
      * right is the catch block
      *
      * catch lvalue nodes are either:
      *   a single identifier
-     *   TokenKind::RightBracket or TokenKind::RightCurly for a destructuring left-hand side
+     *   TokenKind::RightBracket for a destructuring left-hand side
+     *   TokenKind::RightCurly for a destructuring left-hand side
      *
      * finally nodes are TokenKind::LeftCurly statement lists.
      */
 
     Node innerBlock;
     {
         if (!mustMatchToken(TokenKind::LeftCurly, JSMSG_CURLY_BEFORE_TRY)) {
             return null();
@@ -7656,17 +7657,21 @@ GeneralParser<ParseHandler, Unit>::state
             if (forbiddenLetDeclaration) {
                 error(JSMSG_FORBIDDEN_AS_STATEMENT, "lexical declarations");
                 return null();
             }
         } else if (tt == TokenKind::Async) {
             // Peek only on the same line: ExpressionStatement's lookahead
             // restriction is phrased as
             //
-            //   [lookahead ∉ { {, function, async [no LineTerminator here] function, class, let [ }]
+            //   [lookahead ∉ { '{',
+            //                  function,
+            //                  async [no LineTerminator here] function,
+            //                  class,
+            //                  let '[' }]
             //
             // meaning that code like this is valid:
             //
             //   if (true)
             //     async       // ASI opportunity
             //   function clownshoes() {}
             TokenKind maybeFunction;
             if (!tokenStream.peekTokenSameLine(&maybeFunction)) {
@@ -9502,17 +9507,19 @@ GeneralParser<ParseHandler, Unit>::check
                                                                        PossibleError* exprPossibleError,
                                                                        PossibleError* possibleError)
 {
     // ES2018 draft rev 0719f44aab93215ed9a626b2f45bd34f36916834
     // 12.15.5 Destructuring Assignment
     //
     // AssignmentElement[Yield, Await]:
     //   DestructuringAssignmentTarget[?Yield, ?Await]
-    //   DestructuringAssignmentTarget[?Yield, ?Await] Initializer[+In, ?Yield, ?Await]
+    //   DestructuringAssignmentTarget[?Yield, ?Await] Initializer[+In,
+    //                                                             ?Yield,
+    //                                                             ?Await]
 
     // If |expr| is an assignment element with an initializer expression, its
     // destructuring assignment target was already validated in assignExpr().
     // Otherwise we need to check that |expr| is a valid destructuring target.
     if (handler.isUnparenthesizedAssignment(expr)) {
         // Report any pending expression error if we're definitely not in a
         // destructuring context.
         if (!possibleError) {
--- a/js/src/jit/BaselineBailouts.cpp
+++ b/js/src/jit/BaselineBailouts.cpp
@@ -374,18 +374,20 @@ struct BaselineStackBuilder
         // before calling other ion frames, and the entry frame saves all
         // registers too.
         if (JSJitFrameIter::isEntry(type) || type == FrameType::IonJS || type == FrameType::IonICCall) {
             return nullptr;
         }
 
         // BaselineStub - Baseline calling into Ion.
         //  PrevFramePtr needs to point to the BaselineStubFrame's saved frame pointer.
-        //      STACK_START_ADDR + JitFrameLayout::Size() + PREV_FRAME_SIZE
-        //                      - BaselineStubFrameLayout::reverseOffsetOfSavedFramePtr()
+        //      STACK_START_ADDR
+        //          + JitFrameLayout::Size()
+        //          + PREV_FRAME_SIZE
+        //          - BaselineStubFrameLayout::reverseOffsetOfSavedFramePtr()
         if (type == FrameType::BaselineStub) {
             size_t offset = JitFrameLayout::Size() + topFrame->prevFrameLocalSize() +
                             BaselineStubFrameLayout::reverseOffsetOfSavedFramePtr();
             return virtualPointerAtStackOffset(offset);
         }
 
         MOZ_ASSERT(type == FrameType::Rectifier);
         // Rectifier - behaviour depends on the frame preceding the rectifier frame, and
--- a/js/src/jit/BaselineIC.cpp
+++ b/js/src/jit/BaselineIC.cpp
@@ -4223,17 +4223,19 @@ ICCallScriptedCompiler::generateStubCode
     regs.take(argcReg);
     regs.takeUnchecked(ICTailCallReg);
 
     if (isSpread_) {
         guardSpreadCall(masm, argcReg, &failure, isConstructing_);
     }
 
     // Load the callee in R1, accounting for newTarget, if necessary
-    // Stack Layout: [ ..., CalleeVal, ThisVal, Arg0Val, ..., ArgNVal, [newTarget] +ICStackValueOffset+ ]
+    // Stack Layout:
+    //      [ ..., CalleeVal, ThisVal, Arg0Val, ..., ArgNVal, [newTarget],
+    //        +ICStackValueOffset+ ]
     if (isSpread_) {
         unsigned skipToCallee = (2 + isConstructing_) * sizeof(Value);
         masm.loadValue(Address(masm.getStackPointer(), skipToCallee + ICStackValueOffset), R1);
     } else {
         // Account for newTarget, if necessary
         unsigned nonArgsSkip = (1 + isConstructing_) * sizeof(Value);
         BaseValueIndex calleeSlot(masm.getStackPointer(), argcReg, ICStackValueOffset + nonArgsSkip);
         masm.loadValue(calleeSlot, R1);
@@ -4290,17 +4292,18 @@ ICCallScriptedCompiler::generateStubCode
         masm.switchToObjectRealm(callee, regs.getAny());
     }
 
     if (isConstructing_) {
         // Save argc before call.
         masm.push(argcReg);
 
         // Stack now looks like:
-        //      [..., Callee, ThisV, Arg0V, ..., ArgNV, NewTarget, StubFrameHeader, ArgC ]
+        //      [ ..., Callee, ThisV, Arg0V, ..., ArgNV, NewTarget,
+        //        StubFrameHeader, ArgC ]
         masm.loadValue(Address(masm.getStackPointer(), STUB_FRAME_SIZE + sizeof(size_t)), R1);
         masm.push(masm.extractObject(R1, ExtractTemp0));
 
         if (isSpread_) {
             masm.loadValue(Address(masm.getStackPointer(),
                                    3 * sizeof(Value) + STUB_FRAME_SIZE + sizeof(size_t) +
                                    sizeof(JSObject*)),
                                    R1);
@@ -4333,17 +4336,18 @@ ICCallScriptedCompiler::generateStubCode
         // Restore saved argc so we can use it to calculate the address to save
         // the resulting this object to.
         masm.pop(argcReg);
 
         // Save "this" value back into pushed arguments on stack. R0 can be
         // clobbered after that.
         //
         // Stack now looks like:
-        //      [..., Callee, ThisV, Arg0V, ..., ArgNV, [NewTarget], StubFrameHeader ]
+        //      [ ..., Callee, ThisV, Arg0V, ..., ArgNV, [NewTarget],
+        //        StubFrameHeader ]
         if (isSpread_) {
             masm.storeValue(R0, Address(masm.getStackPointer(),
                                         (1 + isConstructing_) * sizeof(Value) + STUB_FRAME_SIZE));
         } else {
             BaseValueIndex thisSlot(masm.getStackPointer(), argcReg,
                                     STUB_FRAME_SIZE + isConstructing_ * sizeof(Value));
             masm.storeValue(R0, thisSlot);
         }
@@ -4422,46 +4426,51 @@ ICCallScriptedCompiler::generateStubCode
     masm.callJit(code);
 
     // If this is a constructing call, and the callee returns a non-object, replace it with
     // the |this| object passed in.
     if (isConstructing_) {
         Label skipThisReplace;
         masm.branchTestObject(Assembler::Equal, JSReturnOperand, &skipThisReplace);
 
-        // Current stack: [ Padding?, ARGVALS..., ThisVal, ActualArgc, Callee, Descriptor ]
-        // However, we can't use this ThisVal, because it hasn't been traced.  We need to use
-        // The ThisVal higher up the stack:
-        // Current stack: [ ThisVal, ARGVALS..., ...STUB FRAME...,
-        //                  Padding?, ARGVALS..., ThisVal, ActualArgc, Callee, Descriptor ]
+        // Current stack: [ Padding?, ARGVALS..., ThisVal, ActualArgc, Callee,
+        //                  Descriptor ]
+        // However, we can't use this ThisVal, because it hasn't been traced.
+        // We need to use the ThisVal higher up the stack:
+        // Current stack: [ ThisVal, ARGVALS..., ...STUB FRAME..., Padding?,
+        //                  ARGVALS..., ThisVal, ActualArgc, Callee, Descriptor ]
 
         // Restore the BaselineFrameReg based on the frame descriptor.
         //
         // BaselineFrameReg = BaselineStackReg
-        //                  + sizeof(Descriptor) + sizeof(Callee) + sizeof(ActualArgc)
+        //                  + sizeof(Descriptor)
+        //                  + sizeof(Callee)
+        //                  + sizeof(ActualArgc)
         //                  + stubFrameSize(Descriptor)
-        //                  - sizeof(ICStubReg) - sizeof(BaselineFrameReg)
+        //                  - sizeof(ICStubReg)
+        //                  - sizeof(BaselineFrameReg)
         Address descriptorAddr(masm.getStackPointer(), 0);
         masm.loadPtr(descriptorAddr, BaselineFrameReg);
         masm.rshiftPtr(Imm32(FRAMESIZE_SHIFT), BaselineFrameReg);
         masm.addPtr(Imm32((3 - 2) * sizeof(size_t)), BaselineFrameReg);
         masm.addStackPtrTo(BaselineFrameReg);
 
         // Load the number of arguments present before the stub frame.
         Register argcReg = JSReturnOperand.scratchReg();
         if (isSpread_) {
             // Account for the Array object.
             masm.move32(Imm32(1), argcReg);
         } else {
             Address argcAddr(masm.getStackPointer(), 2 * sizeof(size_t));
             masm.loadPtr(argcAddr, argcReg);
         }
 
-        // Current stack: [ ThisVal, ARGVALS..., ...STUB FRAME..., <-- BaselineFrameReg
-        //                  Padding?, ARGVALS..., ThisVal, ActualArgc, Callee, Descriptor ]
+        // Current stack:
+        //      [ ThisVal, ARGVALS..., ...STUB FRAME..., <-- BaselineFrameReg
+        //        Padding?, ARGVALS..., ThisVal, ActualArgc, Callee, Descriptor ]
         //
         // &ThisVal = BaselineFrameReg + argc * sizeof(Value) + STUB_FRAME_SIZE + sizeof(Value)
         // This last sizeof(Value) accounts for the newTarget on the end of the arguments vector
         // which is not reflected in actualArgc
         BaseValueIndex thisSlotAddr(BaselineFrameReg, argcReg, STUB_FRAME_SIZE + sizeof(Value));
         masm.loadValue(thisSlotAddr, JSReturnOperand);
 #ifdef DEBUG
         masm.branchTestObject(Assembler::Equal, JSReturnOperand, &skipThisReplace);
@@ -4486,17 +4495,18 @@ ICCallScriptedCompiler::generateStubCode
 
 typedef bool (*CopyStringSplitArrayFn)(JSContext*, HandleArrayObject, MutableHandleValue);
 static const VMFunction CopyStringSplitArrayInfo =
     FunctionInfo<CopyStringSplitArrayFn>(CopyStringSplitArray, "CopyStringSplitArray");
 
 bool
 ICCall_ConstStringSplit::Compiler::generateStubCode(MacroAssembler& masm)
 {
-    // Stack Layout: [ ..., CalleeVal, ThisVal, strVal, sepVal, +ICStackValueOffset+ ]
+    // Stack Layout:
+    //      [ ..., CalleeVal, ThisVal, strVal, sepVal, +ICStackValueOffset+ ]
     static const size_t SEP_DEPTH = 0;
     static const size_t STR_DEPTH = sizeof(Value);
     static const size_t CALLEE_DEPTH = 3 * sizeof(Value);
 
     AllocatableGeneralRegisterSet regs(availableGeneralRegs(0));
     Label failureRestoreArgc;
 #ifdef DEBUG
     Label twoArg;
@@ -5027,17 +5037,19 @@ ICCall_ScriptedFunCall::Compiler::genera
     AllocatableGeneralRegisterSet regs(availableGeneralRegs(0));
     bool canUseTailCallReg = regs.has(ICTailCallReg);
 
     Register argcReg = R0.scratchReg();
     regs.take(argcReg);
     regs.takeUnchecked(ICTailCallReg);
 
     // Load the callee in R1.
-    // Stack Layout: [ ..., CalleeVal, ThisVal, Arg0Val, ..., ArgNVal, +ICStackValueOffset+ ]
+    // Stack Layout:
+    //      [ ..., CalleeVal, ThisVal, Arg0Val, ..., ArgNVal,
+    //        +ICStackValueOffset+ ]
     BaseValueIndex calleeSlot(masm.getStackPointer(), argcReg, ICStackValueOffset + sizeof(Value));
     masm.loadValue(calleeSlot, R1);
     regs.take(R1);
 
     // Ensure callee is fun_call.
     masm.branchTestObject(Assembler::NotEqual, R1, &failure);
 
     Register callee = masm.extractObject(R1, ExtractTemp0);
--- a/js/src/jit/arm/Architecture-arm.h
+++ b/js/src/jit/arm/Architecture-arm.h
@@ -554,20 +554,20 @@ class VFPRegister
     //   s0.alignedOrDominatedAliasedSet() == s0 | d0.
     //   s1.alignedOrDominatedAliasedSet() == s1.
     //   d0.alignedOrDominatedAliasedSet() == s0 | s1 | d0.
     //
     // This way the Allocatable register set does not have to do any arithmetics
     // to know if a register is available or not, as we have the following
     // relations:
     //
-    //   d0.alignedOrDominatedAliasedSet() ==
-    //       s0.alignedOrDominatedAliasedSet() | s1.alignedOrDominatedAliasedSet()
+    //  d0.alignedOrDominatedAliasedSet() ==
+    //      s0.alignedOrDominatedAliasedSet() | s1.alignedOrDominatedAliasedSet()
     //
-    //   s0.alignedOrDominatedAliasedSet() & s1.alignedOrDominatedAliasedSet() == 0
+    //  s0.alignedOrDominatedAliasedSet() & s1.alignedOrDominatedAliasedSet() == 0
     //
     SetType alignedOrDominatedAliasedSet() const {
         if (isSingle()) {
             if (code_ % 2 != 0) {
                 return SetType(1) << code_;
             }
             return (SetType(1) << code_) | (SetType(1) << (32 + code_ / 2));
         }
--- a/js/src/jit/arm/Trampoline-arm.cpp
+++ b/js/src/jit/arm/Trampoline-arm.cpp
@@ -173,17 +173,18 @@ JitRuntime::generateEnterJIT(JSContext* 
     // At the end the register r4, is a pointer to the stack where the first
     // argument is expected by the Jit frame.
     //
     aasm->as_sub(r4, sp, O2RegImmShift(r1, LSL, 3));    // r4 = sp - argc*8
     aasm->as_bic(r4, r4, Imm8(JitStackAlignment - 1));
     // r4 is now the aligned on the bottom of the list of arguments.
     static_assert(sizeof(JitFrameLayout) % JitStackAlignment == 0,
       "No need to consider the JitFrameLayout for aligning the stack");
-    // sp' = ~(JitStackAlignment - 1) & (sp - argc * sizeof(Value)) - sizeof(JitFrameLayout)
+    // sp' = ~(JitStackAlignment - 1) & (sp - argc * sizeof(Value))
+    //       - sizeof(JitFrameLayout)
     aasm->as_sub(sp, r4, Imm8(sizeof(JitFrameLayout)));
 
     // Get a copy of the number of args to use as a decrement counter, also set
     // the zero condition code.
     aasm->as_mov(r5, O2Reg(r1), SetCC);
 
     // Loop over arguments, copying them from an unknown buffer onto the Ion
     // stack so they can be accessed from JIT'ed code.
@@ -1259,17 +1260,18 @@ JitRuntime::generateProfilerExitFrameTai
         Label notIonFrame;
         masm.branch32(Assembler::NotEqual, scratch3, Imm32(FrameType::IonJS), &notIonFrame);
 
         // Handle Rectifier <- IonJS
         // scratch3 := RectFrame[ReturnAddr]
         masm.loadPtr(Address(scratch2, RectifierFrameLayout::offsetOfReturnAddress()), scratch3);
         masm.storePtr(scratch3, lastProfilingCallSite);
 
-        // scratch3 := RectFrame + Rect-Descriptor.Size + RectifierFrameLayout::Size()
+        // scratch3 := RectFrame + Rect-Descriptor.Size +
+        //             RectifierFrameLayout::Size()
         masm.ma_add(scratch2, scratch1, scratch3);
         masm.add32(Imm32(RectifierFrameLayout::Size()), scratch3);
         masm.storePtr(scratch3, lastProfilingFrame);
         masm.ret();
 
         masm.bind(&notIonFrame);
 
         // Check for either BaselineStub or a CppToJSJit/WasmToJSJit entry
--- a/js/src/jit/arm64/Trampoline-arm64.cpp
+++ b/js/src/jit/arm64/Trampoline-arm64.cpp
@@ -964,17 +964,18 @@ JitRuntime::generateProfilerExitFrameTai
 
         // returning directly to an IonJS frame.  Store return addr to frame
         // in lastProfilingCallSite.
         masm.loadPtr(Address(masm.getStackPointer(), JitFrameLayout::offsetOfReturnAddress()),
                      scratch2);
         masm.storePtr(scratch2, lastProfilingCallSite);
 
         // Store return frame in lastProfilingFrame.
-        // scratch2 := masm.getStackPointer() + Descriptor.size*1 + JitFrameLayout::Size();
+        // scratch2 := masm.getStackPointer() + Descriptor.size*1 +
+        //             JitFrameLayout::Size();
         masm.Add(ARMRegister(scratch2, 64), masm.GetStackPointer64(), ARMRegister(scratch1, 64));
         masm.syncStackPtr();
         masm.addPtr(Imm32(JitFrameLayout::Size()), scratch2, scratch2);
         masm.storePtr(scratch2, lastProfilingFrame);
         masm.ret();
     }
 
     //
@@ -1080,17 +1081,18 @@ JitRuntime::generateProfilerExitFrameTai
         Label notIonFrame;
         masm.branch32(Assembler::NotEqual, scratch3, Imm32(FrameType::IonJS), &notIonFrame);
 
         // Handle Rectifier <- IonJS
         // scratch3 := RectFrame[ReturnAddr]
         masm.loadPtr(Address(scratch2, RectifierFrameLayout::offsetOfReturnAddress()), scratch3);
         masm.storePtr(scratch3, lastProfilingCallSite);
 
-        // scratch3 := RectFrame + Rect-Descriptor.Size + RectifierFrameLayout::Size()
+        // scratch3 := RectFrame + Rect-Descriptor.Size +
+        //             RectifierFrameLayout::Size()
         masm.addPtr(scratch2, scratch1, scratch3);
         masm.add32(Imm32(RectifierFrameLayout::Size()), scratch3);
         masm.storePtr(scratch3, lastProfilingFrame);
         masm.ret();
 
         masm.bind(&notIonFrame);
 
         // Check for either BaselineStub or a CppToJSJit/WasmToJSJit entry
--- a/js/src/jit/mips32/Trampoline-mips32.cpp
+++ b/js/src/jit/mips32/Trampoline-mips32.cpp
@@ -1249,17 +1249,18 @@ JitRuntime::generateProfilerExitFrameTai
         Label notIonFrame;
         masm.branch32(Assembler::NotEqual, scratch3, Imm32(FrameType::IonJS), &notIonFrame);
 
         // Handle Rectifier <- IonJS
         // scratch3 := RectFrame[ReturnAddr]
         masm.loadPtr(Address(scratch2, RectifierFrameLayout::offsetOfReturnAddress()), scratch3);
         masm.storePtr(scratch3, lastProfilingCallSite);
 
-        // scratch3 := RectFrame + Rect-Descriptor.Size + RectifierFrameLayout::Size()
+        // scratch3 := RectFrame + Rect-Descriptor.Size +
+        //             RectifierFrameLayout::Size()
         masm.as_addu(scratch3, scratch2, scratch1);
         masm.add32(Imm32(RectifierFrameLayout::Size()), scratch3);
         masm.storePtr(scratch3, lastProfilingFrame);
         masm.ret();
 
         masm.bind(&notIonFrame);
 
         // Check for either BaselineStub or a CppToJSJit/WasmToJSJit entry
--- a/js/src/jit/mips64/Trampoline-mips64.cpp
+++ b/js/src/jit/mips64/Trampoline-mips64.cpp
@@ -451,21 +451,22 @@ JitRuntime::generateArgumentsRectifier(M
     masm.add32(Imm32(JitStackValueAlignment - 1 /* for padding */ + 1 /* for |this| */), numArgsReg);
     masm.add32(t2, numArgsReg);
     masm.and32(Imm32(~(JitStackValueAlignment - 1)), numArgsReg);
 
     // Load the number of |undefined|s to push into t1.
     masm.as_dsubu(t1, numArgsReg, s3);
 
     // Caller:
-    // [arg2] [arg1] [this] [[argc] [callee] [descr] [raddr]] <- sp <- t2
+    // [arg2] [arg1] [this] [ [argc] [callee] [descr] [raddr] ] <- sp <- t2
     // '------ s3 -------'
     //
     // Rectifier frame:
-    // [undef] [undef] [undef] [arg2] [arg1] [this] [[argc] [callee] [descr] [raddr]]
+    // [undef] [undef] [undef] [arg2] [arg1] [this] [ [argc] [callee]
+    //                                                [descr] [raddr] ]
     // '-------- t1 ---------' '------- s3 -------'
 
     // Copy number of actual arguments into numActArgsReg
     masm.loadPtr(Address(StackPointer, RectifierFrameLayout::offsetOfNumActualArgs()),
                  numActArgsReg);
 
 
     masm.moveValue(UndefinedValue(), ValueOperand(t0));
@@ -524,21 +525,22 @@ JitRuntime::generateArgumentsRectifier(M
         // Again, 1 for |this|
         BaseIndex newTargetDest(StackPointer, t3, TimesEight, sizeof(Value));
         masm.storeValue(newTarget, newTargetDest);
 
         masm.bind(&notConstructing);
     }
 
     // Caller:
-    // [arg2] [arg1] [this] [[argc] [callee] [descr] [raddr]] <- t2
+    // [arg2] [arg1] [this] [ [argc] [callee] [descr] [raddr] ] <- t2
     //
     //
     // Rectifier frame:
-    // [undef] [undef] [undef] [arg2] [arg1] [this] <- sp [[argc] [callee] [descr] [raddr]]
+    // [undef] [undef] [undef] [arg2] [arg1] [this] <- sp [ [argc] [callee]
+    //                                                      [descr] [raddr] ]
 
     // Construct sizeDescriptor.
     masm.subPtr(StackPointer, t2);
     masm.makeFrameDescriptor(t2, FrameType::Rectifier, JitFrameLayout::Size());
 
     // Construct JitFrameLayout.
     masm.subPtr(Imm32(3 * sizeof(uintptr_t)), StackPointer);
     // Push actual arguments.
@@ -1200,17 +1202,18 @@ JitRuntime::generateProfilerExitFrameTai
         Label notIonFrame;
         masm.branch32(Assembler::NotEqual, scratch3, Imm32(FrameType::IonJS), &notIonFrame);
 
         // Handle Rectifier <- IonJS
         // scratch3 := RectFrame[ReturnAddr]
         masm.loadPtr(Address(scratch2, RectifierFrameLayout::offsetOfReturnAddress()), scratch3);
         masm.storePtr(scratch3, lastProfilingCallSite);
 
-        // scratch3 := RectFrame + Rect-Descriptor.Size + RectifierFrameLayout::Size()
+        // scratch3 := RectFrame + Rect-Descriptor.Size +
+        //             RectifierFrameLayout::Size()
         masm.as_daddu(scratch3, scratch2, scratch1);
         masm.addPtr(Imm32(RectifierFrameLayout::Size()), scratch3);
         masm.storePtr(scratch3, lastProfilingFrame);
         masm.ret();
 
         masm.bind(&notIonFrame);
 
         // Check for either BaselineStub or a CppToJSJit/WasmToJSJit entry
--- a/js/src/jit/x64/Trampoline-x64.cpp
+++ b/js/src/jit/x64/Trampoline-x64.cpp
@@ -403,21 +403,22 @@ JitRuntime::generateArgumentsRectifier(M
     masm.addl(Imm32(JitStackValueAlignment - 1 /* for padding */ + 1 /* for |this| */), rcx);
     masm.addl(rdx, rcx);
     masm.andl(Imm32(~(JitStackValueAlignment - 1)), rcx);
 
     // Load the number of |undefined|s to push into %rcx.
     masm.subq(r8, rcx);
 
     // Caller:
-    // [arg2] [arg1] [this] [[argc] [callee] [descr] [raddr]] <- rsp <- r9
+    // [arg2] [arg1] [this] [ [argc] [callee] [descr] [raddr] ] <- rsp <- r9
     // '------ #r8 -------'
     //
     // Rectifier frame:
-    // [undef] [undef] [undef] [arg2] [arg1] [this] [[argc] [callee] [descr] [raddr]]
+    // [undef] [undef] [undef] [arg2] [arg1] [this] [ [argc] [callee]
+    //                                                [descr] [raddr] ]
     // '------- #rcx --------' '------ #r8 -------'
 
     // Copy the number of actual arguments into rdx. Use lea to subtract 1 for
     // |this|.
     masm.lea(Operand(r8, -1), rdx);
 
     masm.moveValue(UndefinedValue(), ValueOperand(r10));
 
@@ -470,21 +471,22 @@ JitRuntime::generateArgumentsRectifier(M
         BaseIndex newTargetDest(rsp, r11, TimesEight, sizeof(Value));
         masm.storeValue(newTarget, newTargetDest);
 
         masm.bind(&notConstructing);
     }
 
 
     // Caller:
-    // [arg2] [arg1] [this] [[argc] [callee] [descr] [raddr]] <- r9
+    // [arg2] [arg1] [this] [ [argc] [callee] [descr] [raddr] ] <- r9
     //
     //
     // Rectifier frame:
-    // [undef] [undef] [undef] [arg2] [arg1] [this] <- rsp [[argc] [callee] [descr] [raddr]]
+    // [undef] [undef] [undef] [arg2] [arg1] [this] <- rsp [ [argc] [callee]
+    //                                                       [descr] [raddr] ]
     //
 
     // Construct descriptor.
     masm.subq(rsp, r9);
     masm.makeFrameDescriptor(r9, FrameType::Rectifier, JitFrameLayout::Size());
 
     // Construct JitFrameLayout.
     masm.push(rdx); // numActualArgs
@@ -1140,17 +1142,18 @@ JitRuntime::generateProfilerExitFrameTai
         Label notIonFrame;
         masm.branch32(Assembler::NotEqual, scratch3, Imm32(FrameType::IonJS), &notIonFrame);
 
         // Handle Rectifier <- IonJS
         // scratch3 := RectFrame[ReturnAddr]
         masm.loadPtr(Address(scratch2, RectifierFrameLayout::offsetOfReturnAddress()), scratch3);
         masm.storePtr(scratch3, lastProfilingCallSite);
 
-        // scratch3 := RectFrame + Rect-Descriptor.Size + RectifierFrameLayout::Size()
+        // scratch3 := RectFrame + Rect-Descriptor.Size +
+        //             RectifierFrameLayout::Size()
         masm.lea(Operand(scratch2, scratch1, TimesOne, RectifierFrameLayout::Size()), scratch3);
         masm.storePtr(scratch3, lastProfilingFrame);
         masm.ret();
 
         masm.bind(&notIonFrame);
 
         // Check for either BaselineStub or a CppToJSJit/WasmToJSJit entry
         // frame.
--- a/js/src/jit/x86/Trampoline-x86.cpp
+++ b/js/src/jit/x86/Trampoline-x86.cpp
@@ -354,17 +354,17 @@ JitRuntime::generateInvalidator(MacroAss
 }
 
 void
 JitRuntime::generateArgumentsRectifier(MacroAssembler& masm)
 {
     argumentsRectifierOffset_ = startTrampolineCode(masm);
 
     // Caller:
-    // [arg2] [arg1] [this] [[argc] [callee] [descr] [raddr]] <- esp
+    // [arg2] [arg1] [this] [ [argc] [callee] [descr] [raddr] ] <- esp
 
     // Load argc.
     masm.loadPtr(Address(esp, RectifierFrameLayout::offsetOfNumActualArgs()), esi);
 
     // Load the number of |undefined|s to push into %ecx.
     masm.loadPtr(Address(esp, RectifierFrameLayout::offsetOfCalleeToken()), eax);
     masm.mov(eax, ecx);
     masm.andl(Imm32(CalleeTokenMask), ecx);
@@ -405,24 +405,24 @@ JitRuntime::generateArgumentsRectifier(M
     // code!  See BaselineJIT.cpp/BaselineStackBuilder::calculatePrevFramePtr,
     // and BaselineJIT.cpp/InitFromBailout. Check for the
     // |#if defined(JS_CODEGEN_X86)| portions.
     masm.push(FramePointer);
     masm.movl(esp, FramePointer); // Save %esp.
     masm.push(FramePointer /* padding */);
 
     // Caller:
-    // [arg2] [arg1] [this] [[argc] [callee] [descr] [raddr]]
+    // [arg2] [arg1] [this] [ [argc] [callee] [descr] [raddr] ]
     // '-- #esi ---'
     //
     // Rectifier frame:
     // [ebp'] <- ebp [padding] <- esp [undef] [undef] [arg2] [arg1] [this]
     //                                '--- #ecx ----' '-- #esi ---'
     //
-    // [[argc] [callee] [descr] [raddr]]
+    // [ [argc] [callee] [descr] [raddr] ]
 
     // Push undefined.
     {
         Label undefLoopTop;
         masm.bind(&undefLoopTop);
 
         masm.push(ebx); // type(undefined);
         masm.push(edi); // payload(undefined);
@@ -1165,17 +1165,18 @@ JitRuntime::generateProfilerExitFrameTai
         Label notIonFrame;
         masm.branch32(Assembler::NotEqual, scratch3, Imm32(FrameType::IonJS), &notIonFrame);
 
         // Handle Rectifier <- IonJS
         // scratch3 := RectFrame[ReturnAddr]
         masm.loadPtr(Address(scratch2, RectifierFrameLayout::offsetOfReturnAddress()), scratch3);
         masm.storePtr(scratch3, lastProfilingCallSite);
 
-        // scratch3 := RectFrame + Rect-Descriptor.Size + RectifierFrameLayout::Size()
+        // scratch3 := RectFrame + Rect-Descriptor.Size +
+        //             RectifierFrameLayout::Size()
         masm.lea(Operand(scratch2, scratch1, TimesOne, RectifierFrameLayout::Size()), scratch3);
         masm.storePtr(scratch3, lastProfilingFrame);
         masm.ret();
 
         masm.bind(&notIonFrame);
 
         // Check for either BaselineStub or a CppToJSJit/WasmToJSJit entry
         // frame.
--- a/js/src/vm/JSFunction.cpp
+++ b/js/src/vm/JSFunction.cpp
@@ -1090,17 +1090,18 @@ js::FunctionToString(JSContext* cx, Hand
         if (!script->appendSourceDataForToString(cx, out)) {
             return nullptr;
         }
     } else if (!isToSource) {
         // For the toString() output the source representation must match
         // NativeFunction when no source text is available.
         //
         // NativeFunction:
-        //   function PropertyName[~Yield,~Await]opt ( FormalParameters[~Yield,~Await] ) { [native code] }
+        //   function PropertyName[~Yield,~Await]opt (
+        //      FormalParameters[~Yield,~Await] ) { [native code] }
         //
         // Additionally, if |fun| is a well-known intrinsic object and is not
         // identified as an anonymous function, the portion of the returned
         // string that would be matched by IdentifierName must be the initial
         // value of the name property of |fun|.
 
         auto hasGetterOrSetterPrefix = [](JSAtom* name) {
             auto hasGetterOrSetterPrefix = [](const auto* chars) {
--- a/js/src/vm/PIC.h
+++ b/js/src/vm/PIC.h
@@ -147,29 +147,32 @@ struct ForOfPIC
      * A ForOfPIC chain holds the following:
      *
      *  Array.prototype (arrayProto_)
      *      To ensure that the incoming array has the standard proto.
      *
      *  Array.prototype's shape (arrayProtoShape_)
      *      To ensure that Array.prototype has not been modified.
      *
-     *  ArrayIterator.prototype (arrayIteratorProto_)
-     *  ArrayIterator.prototype's shape (arrayIteratorProtoShape_)
+     *  ArrayIterator.prototype
+     *  ArrayIterator.prototype's shape
+     *      (arrayIteratorProto_, arrayIteratorProtoShape_)
      *      To ensure that an ArrayIterator.prototype has not been modified.
      *
-     *  Array.prototype's slot number for @@iterator (arrayProtoIteratorSlot_)
-     *  Array.prototype's canonical value for @@iterator (canonicalIteratorFunc_)
+     *  Array.prototype's slot number for @@iterator
+     *  Array.prototype's canonical value for @@iterator
+     *      (arrayProtoIteratorSlot_, canonicalIteratorFunc_)
      *      To quickly retrieve and ensure that the iterator constructor
      *      stored in the slot has not changed.
      *
-     *  ArrayIterator.prototype's slot number for 'next' (arrayIteratorProtoNextSlot_)
-     *  ArrayIterator.prototype's canonical value for 'next' (canonicalNextFunc_)
-     *      To quickly retrieve and ensure that the 'next' method for ArrayIterator
-     *      objects has not changed.
+     *  ArrayIterator.prototype's slot number for 'next'
+     *  ArrayIterator.prototype's canonical value for 'next'
+     *      (arrayIteratorProtoNextSlot_, canonicalNextFunc_)
+     *      To quickly retrieve and ensure that the 'next' method for
+     *      ArrayIterator objects has not changed.
      */
     class Chain : public BaseChain
     {
       private:
         // Pointer to canonical Array.prototype and ArrayIterator.prototype
         GCPtrNativeObject arrayProto_;
         GCPtrNativeObject arrayIteratorProto_;
 
--- a/js/src/vm/TraceLogging.h
+++ b/js/src/vm/TraceLogging.h
@@ -85,19 +85,22 @@ class TraceLoggerEvent {
   private:
     class EventPayloadOrTextId {
 
         /**
          * Payload can be a pointer to a TraceLoggerEventPayload* or a
          * TraceLoggerTextId. The last bit decides how to read the payload.
          *
          * payload_ = [                   | 0 ]
-         *            ------------------------  = TraceLoggerEventPayload* (incl. last bit)
+         *             -----------------------
+         *             TraceLoggerEventPayload* (incl. last bit)
+         *
          * payload_ = [                   | 1 ]
-         *             -------------------      = TraceLoggerTextId (excl. last bit)
+         *             -------------------
+         *             TraceLoggerTextId (excl. last bit)
          */
         uintptr_t payload_;
 
       public:
         EventPayloadOrTextId()
           : payload_(0)
         { }
 
--- a/js/src/wasm/WasmStubs.cpp
+++ b/js/src/wasm/WasmStubs.cpp
@@ -1254,17 +1254,17 @@ GenerateImportInterpExit(MacroAssembler&
     static const MIRType typeArray[] = { MIRType::Pointer,   // Instance*
                                          MIRType::Pointer,   // funcImportIndex
                                          MIRType::Int32,     // argc
                                          MIRType::Pointer }; // argv
     MIRTypeVector invokeArgTypes;
     MOZ_ALWAYS_TRUE(invokeArgTypes.append(typeArray, ArrayLength(typeArray)));
 
     // At the point of the call, the stack layout shall be (sp grows to the left):
-    //   | stack args | padding | Value argv[] | padding | retaddr | caller stack args |
+    //  | stack args | padding | argv[] | padding | retaddr | caller stack args |
     // The padding between stack args and argv ensures that argv is aligned. The
     // padding between argv and retaddr ensures that sp is aligned.
     unsigned argOffset = AlignBytes(StackArgBytes(invokeArgTypes), sizeof(double));
     unsigned argBytes = Max<size_t>(1, fi.funcType().args().length()) * sizeof(Value);
     unsigned framePushed = StackDecrementForCall(ABIStackAlignment,
                                                  sizeof(Frame),  // pushed by prologue
                                                  argOffset + argBytes);