Skip to content

Commit f968cd9

Browse files
Landoiainireland
authored andcommitted
Bug 1703469, 1970922: apply code formatting via Lando
# ignore-this-changeset
1 parent 19c65e6 commit f968cd9

12 files changed

+49
-53
lines changed

js/src/jit/BaselineCacheIRCompiler.cpp

Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1750,17 +1750,16 @@ bool BaselineCacheIRCompiler::emitCallScriptedSetter(
17501750
bool sameRealm, uint32_t nargsAndFlagsOffset) {
17511751
JitSpew(JitSpew_Codegen, "%s", __FUNCTION__);
17521752
Maybe<uint32_t> icScriptOffset = mozilla::Nothing();
1753-
return emitCallScriptedSetterShared(receiverId, calleeId, rhsId,
1754-
sameRealm, nargsAndFlagsOffset,
1755-
icScriptOffset);
1753+
return emitCallScriptedSetterShared(receiverId, calleeId, rhsId, sameRealm,
1754+
nargsAndFlagsOffset, icScriptOffset);
17561755
}
17571756

17581757
bool BaselineCacheIRCompiler::emitCallInlinedSetter(
17591758
ObjOperandId receiverId, ObjOperandId calleeId, ValOperandId rhsId,
17601759
uint32_t icScriptOffset, bool sameRealm, uint32_t nargsAndFlagsOffset) {
17611760
JitSpew(JitSpew_Codegen, "%s", __FUNCTION__);
1762-
return emitCallScriptedSetterShared(receiverId, calleeId, rhsId,
1763-
sameRealm, nargsAndFlagsOffset,
1761+
return emitCallScriptedSetterShared(receiverId, calleeId, rhsId, sameRealm,
1762+
nargsAndFlagsOffset,
17641763
mozilla::Some(icScriptOffset));
17651764
}
17661765

js/src/jit/CacheIR.cpp

Lines changed: 9 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -994,7 +994,6 @@ static bool FunctionHasStableBaseScript(JSFunction* fun) {
994994
return true;
995995
}
996996

997-
998997
// See the SMDOC comment in vm/GetterSetter.h for more info on Getter/Setter
999998
// properties
1000999
void IRGenerator::emitGuardGetterSetterSlot(NativeObject* holder,
@@ -1016,12 +1015,13 @@ void IRGenerator::emitGuardGetterSetterSlot(NativeObject* holder,
10161015
// the first IC stub.
10171016
if (!isFirstStub_) {
10181017
bool isGetter = kind == AccessorKind::Getter;
1019-
JSObject* accessor = isGetter ? holder->getGetter(prop)
1020-
: holder->getSetter(prop);
1018+
JSObject* accessor =
1019+
isGetter ? holder->getGetter(prop) : holder->getSetter(prop);
10211020
JSFunction* fun = &accessor->as<JSFunction>();
10221021
if (FunctionHasStableBaseScript(fun)) {
10231022
bool needsClassGuard = holder->hasNonFunctionAccessor();
1024-
ValOperandId getterSetterId = EmitLoadSlot(writer, holder, holderId, slot);
1023+
ValOperandId getterSetterId =
1024+
EmitLoadSlot(writer, holder, holderId, slot);
10251025
ObjOperandId functionId = writer.loadGetterSetterFunction(
10261026
getterSetterId, isGetter, needsClassGuard);
10271027
writer.saveScriptedGetterSetterCallee(functionId);
@@ -1063,8 +1063,7 @@ void GetPropIRGenerator::emitCallGetterResultGuards(NativeObject* obj,
10631063
ObjOperandId holderId = writer.loadObject(holder);
10641064
TestMatchingHolder(writer, holder, holderId);
10651065

1066-
emitGuardGetterSetterSlot(holder, prop, holderId,
1067-
AccessorKind::Getter,
1066+
emitGuardGetterSetterSlot(holder, prop, holderId, AccessorKind::Getter,
10681067
/* holderIsConstant = */ true);
10691068
} else {
10701069
emitGuardGetterSetterSlot(holder, prop, objId, AccessorKind::Getter);
@@ -2013,8 +2012,7 @@ AttachDecision GetPropIRGenerator::tryAttachDOMProxyUnshadowed(
20132012
MOZ_ASSERT(kind == NativeGetPropKind::NativeGetter ||
20142013
kind == NativeGetPropKind::ScriptedGetter);
20152014
MOZ_ASSERT(!isSuper());
2016-
emitGuardGetterSetterSlot(holder, *prop, holderId,
2017-
AccessorKind::Getter,
2015+
emitGuardGetterSetterSlot(holder, *prop, holderId, AccessorKind::Getter,
20182016
/* holderIsConstant = */ true);
20192017
emitCallGetterResultNoGuards(kind, nativeProtoObj, holder, *prop,
20202018
receiverId);
@@ -3667,14 +3665,12 @@ AttachDecision GetNameIRGenerator::tryAttachGlobalNameGetter(ObjOperandId objId,
36673665
// Shape guard holder.
36683666
ObjOperandId holderId = writer.loadObject(holder);
36693667
writer.guardShape(holderId, holder->shape());
3670-
emitGuardGetterSetterSlot(holder, *prop, holderId,
3671-
AccessorKind::Getter,
3668+
emitGuardGetterSetterSlot(holder, *prop, holderId, AccessorKind::Getter,
36723669
/* holderIsConstant = */ true);
36733670
} else {
36743671
// Note: pass true for |holderIsConstant| because the holder must be the
36753672
// current global object.
3676-
emitGuardGetterSetterSlot(holder, *prop, globalId,
3677-
AccessorKind::Getter,
3673+
emitGuardGetterSetterSlot(holder, *prop, globalId, AccessorKind::Getter,
36783674
/* holderIsConstant = */ true);
36793675
}
36803676

@@ -4920,8 +4916,7 @@ AttachDecision SetPropIRGenerator::tryAttachSetter(HandleObject obj,
49204916
ObjOperandId holderId = writer.loadObject(holder);
49214917
TestMatchingHolder(writer, holder, holderId);
49224918

4923-
emitGuardGetterSetterSlot(holder, *prop, holderId,
4924-
AccessorKind::Setter,
4919+
emitGuardGetterSetterSlot(holder, *prop, holderId, AccessorKind::Setter,
49254920
/* holderIsConstant = */ true);
49264921
} else {
49274922
emitGuardGetterSetterSlot(holder, *prop, objId, AccessorKind::Setter);

js/src/jit/CacheIRCompiler.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -9329,7 +9329,8 @@ bool CacheIRCompiler::emitLoadGetterSetterFunction(ValOperandId getterSetterId,
93299329

93309330
masm.unboxNonDouble(getterSetter, output, JSVAL_TYPE_PRIVATE_GCTHING);
93319331

9332-
size_t offset = isGetter ? GetterSetter::offsetOfGetter() : GetterSetter::offsetOfSetter();
9332+
size_t offset = isGetter ? GetterSetter::offsetOfGetter()
9333+
: GetterSetter::offsetOfSetter();
93339334
masm.loadPtr(Address(output, offset), output);
93349335

93359336
masm.branchTestPtr(Assembler::Zero, output, output, failure->label());
@@ -9341,7 +9342,6 @@ bool CacheIRCompiler::emitLoadGetterSetterFunction(ValOperandId getterSetterId,
93419342
return true;
93429343
}
93439344

9344-
93459345
bool CacheIRCompiler::emitGuardHasGetterSetter(ObjOperandId objId,
93469346
uint32_t idOffset,
93479347
uint32_t getterSetterOffset) {

js/src/jit/CacheIRGenerator.h

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -109,8 +109,7 @@ class MOZ_RAII IRGenerator {
109109

110110
enum class AccessorKind { Getter, Setter };
111111
void emitGuardGetterSetterSlot(NativeObject* holder, PropertyInfo prop,
112-
ObjOperandId holderId,
113-
AccessorKind kind,
112+
ObjOperandId holderId, AccessorKind kind,
114113
bool holderIsConstant = false);
115114
void emitCallGetterResultNoGuards(NativeGetPropKind kind, NativeObject* obj,
116115
NativeObject* holder, PropertyInfo prop,

js/src/jit/CacheIRWriter.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -636,8 +636,8 @@ class MOZ_RAII CacheIRWriter : public JS::CustomAutoRooter {
636636
}
637637
return loadObject(target);
638638
}
639-
public:
640639

640+
public:
641641
void callScriptedGetterResult(ValOperandId receiver, JSFunction* getter,
642642
bool sameRealm) {
643643
MOZ_ASSERT(getter->hasJitEntry());

js/src/jit/CodeGenerator.cpp

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21057,7 +21057,8 @@ void CodeGenerator::visitLoadWrapperTarget(LLoadWrapperTarget* lir) {
2105721057
}
2105821058
}
2105921059

21060-
void CodeGenerator::visitLoadGetterSetterFunction(LLoadGetterSetterFunction* lir) {
21060+
void CodeGenerator::visitLoadGetterSetterFunction(
21061+
LLoadGetterSetterFunction* lir) {
2106121062
ValueOperand getterSetter = ToValue(lir->getterSetter());
2106221063
Register output = ToRegister(lir->output());
2106321064

js/src/jit/CompileInfo.h

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -66,9 +66,8 @@ inline unsigned CountArgSlots(JSScript* script, bool hasFun,
6666
// Contains information about the compilation source for IR being generated.
6767
class CompileInfo {
6868
public:
69-
CompileInfo(CompileRuntime* runtime, JSScript* script,
70-
jsbytecode* osrPc, bool scriptNeedsArgsObj,
71-
InlineScriptTree* inlineScriptTree)
69+
CompileInfo(CompileRuntime* runtime, JSScript* script, jsbytecode* osrPc,
70+
bool scriptNeedsArgsObj, InlineScriptTree* inlineScriptTree)
7271
: script_(script),
7372
fun_(script->function()),
7473
osrPc_(osrPc),

js/src/jit/Ion.cpp

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1778,9 +1778,9 @@ static AbortReason IonCompile(JSContext* cx, HandleScript script,
17781778
return AbortReason::Alloc;
17791779
}
17801780

1781-
CompileInfo* info = alloc->new_<CompileInfo>(
1782-
CompileRuntime::get(cx->runtime()), script, osrPc,
1783-
script->needsArgsObj(), inlineScriptTree);
1781+
CompileInfo* info =
1782+
alloc->new_<CompileInfo>(CompileRuntime::get(cx->runtime()), script,
1783+
osrPc, script->needsArgsObj(), inlineScriptTree);
17841784
if (!info) {
17851785
return AbortReason::Alloc;
17861786
}

js/src/jit/IonCacheIRCompiler.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -924,8 +924,8 @@ bool IonCacheIRCompiler::emitLoadDynamicSlotResult(ObjOperandId objId,
924924
}
925925

926926
bool IonCacheIRCompiler::emitCallScriptedGetterResult(
927-
ValOperandId receiverId, ObjOperandId calleeId,
928-
bool sameRealm, uint32_t nargsAndFlagsOffset) {
927+
ValOperandId receiverId, ObjOperandId calleeId, bool sameRealm,
928+
uint32_t nargsAndFlagsOffset) {
929929
JitSpew(JitSpew_Codegen, "%s", __FUNCTION__);
930930
AutoSaveLiveRegisters save(*this);
931931
AutoOutputRegister output(*this);

js/src/jit/Lowering.cpp

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -7466,10 +7466,12 @@ void LIRGenerator::visitLoadWrapperTarget(MLoadWrapperTarget* ins) {
74667466
define(lir, ins);
74677467
}
74687468

7469-
void LIRGenerator::visitLoadGetterSetterFunction(MLoadGetterSetterFunction* ins) {
7469+
void LIRGenerator::visitLoadGetterSetterFunction(
7470+
MLoadGetterSetterFunction* ins) {
74707471
MDefinition* getterSetter = ins->getterSetter();
74717472

7472-
LDefinition classGuardTemp = ins->needsClassGuard() ? temp() : LDefinition::BogusTemp();
7473+
LDefinition classGuardTemp =
7474+
ins->needsClassGuard() ? temp() : LDefinition::BogusTemp();
74737475
auto* lir = new (alloc())
74747476
LLoadGetterSetterFunction(useBoxAtStart(getterSetter), classGuardTemp);
74757477
assignSnapshot(lir, ins->bailoutKind());

0 commit comments

Comments
 (0)