Bug 1268725 - BaldrMonkey: Convert default arguments into explicit arguments. r=luke
☠☠ backed out by 90382fbdad00 ☠ ☠
authorDan Gohman <sunfish@mozilla.com>
Mon, 02 May 2016 17:26:33 -0700
changeset 295766 1eb0e0154d5c7279d2aeff8ea9a3f8e245aafae0
parent 295765 d3ada16ac63ddb9612a4f1f58ec309de37474308
child 295767 a1ca1b805353401dc1b4dbc2f83fc98faaccd414
push id76072
push userdgohman@mozilla.com
push dateTue, 03 May 2016 00:26:47 +0000
treeherdermozilla-inbound@1eb0e0154d5c [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersluke
bugs1268725
milestone49.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 1268725 - BaldrMonkey: Convert default arguments into explicit arguments. r=luke
js/src/asmjs/Wasm.cpp
js/src/asmjs/WasmBinaryIterator.h
--- a/js/src/asmjs/Wasm.cpp
+++ b/js/src/asmjs/Wasm.cpp
@@ -148,17 +148,17 @@ DecodeCallArgs(FunctionDecoder& f, uint3
 {
     if (arity != sig.args().length())
         return f.iter().fail("call arity out of range");
 
     const ValTypeVector& args = sig.args();
     uint32_t numArgs = args.length();
     for (size_t i = 0; i < numArgs; ++i) {
         ValType argType = args[i];
-        if (!f.iter().readCallArg(argType, numArgs, i))
+        if (!f.iter().readCallArg(argType, numArgs, i, nullptr))
             return false;
     }
 
     return f.iter().readCallArgsEnd(numArgs);
 }
 
 static bool
 DecodeCallReturn(FunctionDecoder& f, const Sig& sig)
@@ -192,17 +192,17 @@ DecodeCallIndirect(FunctionDecoder& f)
 
     if (sigIndex >= f.mg().numSigs())
         return f.iter().fail("signature index out of range");
 
     const Sig& sig = f.mg().sig(sigIndex);
     if (!DecodeCallArgs(f, arity, sig))
         return false;
 
-    if (!f.iter().readCallIndirectCallee())
+    if (!f.iter().readCallIndirectCallee(nullptr))
         return false;
 
     return DecodeCallReturn(f, sig);
 }
 
 static bool
 DecodeCallImport(FunctionDecoder& f)
 {
@@ -219,17 +219,17 @@ DecodeCallImport(FunctionDecoder& f)
            DecodeCallReturn(f, sig);
 }
 
 static bool
 DecodeBrTable(FunctionDecoder& f)
 {
     uint32_t tableLength;
     ExprType type;
-    if (!f.iter().readBrTable(&tableLength, &type))
+    if (!f.iter().readBrTable(&tableLength, &type, nullptr, nullptr))
         return false;
 
     uint32_t depth;
     for (size_t i = 0, e = tableLength; i < e; ++i) {
         if (!f.iter().readBrTableEntry(type, &depth))
             return false;
     }
 
@@ -249,65 +249,65 @@ DecodeExpr(FunctionDecoder& f)
         return f.iter().readNullary();
       case Expr::Call:
         return DecodeCall(f);
       case Expr::CallIndirect:
         return DecodeCallIndirect(f);
       case Expr::CallImport:
         return DecodeCallImport(f);
       case Expr::I32Const:
-        return f.iter().readI32Const();
+        return f.iter().readI32Const(nullptr);
       case Expr::I64Const:
         return f.checkI64Support() &&
-               f.iter().readI64Const();
+               f.iter().readI64Const(nullptr);
       case Expr::F32Const:
-        return f.iter().readF32Const();
+        return f.iter().readF32Const(nullptr);
       case Expr::F64Const:
-        return f.iter().readF64Const();
+        return f.iter().readF64Const(nullptr);
       case Expr::GetLocal:
-        return f.iter().readGetLocal(f.locals());
+        return f.iter().readGetLocal(f.locals(), nullptr);
       case Expr::SetLocal:
-        return f.iter().readSetLocal(f.locals());
+        return f.iter().readSetLocal(f.locals(), nullptr, nullptr);
       case Expr::Select:
-        return f.iter().readSelect();
+        return f.iter().readSelect(nullptr, nullptr, nullptr, nullptr);
       case Expr::Block:
         return f.iter().readBlock();
       case Expr::Loop:
         return f.iter().readLoop();
       case Expr::If:
-        return f.iter().readIf();
+        return f.iter().readIf(nullptr);
       case Expr::Else:
-        return f.iter().readElse();
+        return f.iter().readElse(nullptr, nullptr);
       case Expr::End:
-        return f.iter().readEnd();
+        return f.iter().readEnd(nullptr, nullptr, nullptr);
       case Expr::I32Clz:
       case Expr::I32Ctz:
       case Expr::I32Popcnt:
-        return f.iter().readUnary(ValType::I32);
+        return f.iter().readUnary(ValType::I32, nullptr);
       case Expr::I64Clz:
       case Expr::I64Ctz:
       case Expr::I64Popcnt:
         return f.iter().notYetImplemented("i64") &&
-               f.iter().readUnary(ValType::I64);
+               f.iter().readUnary(ValType::I64, nullptr);
       case Expr::F32Abs:
       case Expr::F32Neg:
       case Expr::F32Ceil:
       case Expr::F32Floor:
       case Expr::F32Sqrt:
-        return f.iter().readUnary(ValType::F32);
+        return f.iter().readUnary(ValType::F32, nullptr);
       case Expr::F32Trunc:
         return f.iter().notYetImplemented("trunc");
       case Expr::F32Nearest:
         return f.iter().notYetImplemented("nearest");
       case Expr::F64Abs:
       case Expr::F64Neg:
       case Expr::F64Ceil:
       case Expr::F64Floor:
       case Expr::F64Sqrt:
-        return f.iter().readUnary(ValType::F64);
+        return f.iter().readUnary(ValType::F64, nullptr);
       case Expr::F64Trunc:
         return f.iter().notYetImplemented("trunc");
       case Expr::F64Nearest:
         return f.iter().notYetImplemented("nearest");
       case Expr::I32Add:
       case Expr::I32Sub:
       case Expr::I32Mul:
       case Expr::I32DivS:
@@ -317,192 +317,192 @@ DecodeExpr(FunctionDecoder& f)
       case Expr::I32And:
       case Expr::I32Or:
       case Expr::I32Xor:
       case Expr::I32Shl:
       case Expr::I32ShrS:
       case Expr::I32ShrU:
       case Expr::I32Rotl:
       case Expr::I32Rotr:
-        return f.iter().readBinary(ValType::I32);
+        return f.iter().readBinary(ValType::I32, nullptr, nullptr);
       case Expr::I64Add:
       case Expr::I64Sub:
       case Expr::I64Mul:
       case Expr::I64DivS:
       case Expr::I64DivU:
       case Expr::I64RemS:
       case Expr::I64RemU:
       case Expr::I64And:
       case Expr::I64Or:
       case Expr::I64Xor:
       case Expr::I64Shl:
       case Expr::I64ShrS:
       case Expr::I64ShrU:
       case Expr::I64Rotl:
       case Expr::I64Rotr:
         return f.checkI64Support() &&
-               f.iter().readBinary(ValType::I64);
+               f.iter().readBinary(ValType::I64, nullptr, nullptr);
       case Expr::F32Add:
       case Expr::F32Sub:
       case Expr::F32Mul:
       case Expr::F32Div:
       case Expr::F32Min:
       case Expr::F32Max:
-        return f.iter().readBinary(ValType::F32);
+        return f.iter().readBinary(ValType::F32, nullptr, nullptr);
       case Expr::F32CopySign:
         return f.iter().notYetImplemented("copysign");
       case Expr::F64Add:
       case Expr::F64Sub:
       case Expr::F64Mul:
       case Expr::F64Div:
       case Expr::F64Min:
       case Expr::F64Max:
-        return f.iter().readBinary(ValType::F64);
+        return f.iter().readBinary(ValType::F64, nullptr, nullptr);
       case Expr::F64CopySign:
         return f.iter().notYetImplemented("copysign");
       case Expr::I32Eq:
       case Expr::I32Ne:
       case Expr::I32LtS:
       case Expr::I32LtU:
       case Expr::I32LeS:
       case Expr::I32LeU:
       case Expr::I32GtS:
       case Expr::I32GtU:
       case Expr::I32GeS:
       case Expr::I32GeU:
-        return f.iter().readComparison(ValType::I32);
+        return f.iter().readComparison(ValType::I32, nullptr, nullptr);
       case Expr::I64Eq:
       case Expr::I64Ne:
       case Expr::I64LtS:
       case Expr::I64LtU:
       case Expr::I64LeS:
       case Expr::I64LeU:
       case Expr::I64GtS:
       case Expr::I64GtU:
       case Expr::I64GeS:
       case Expr::I64GeU:
         return f.checkI64Support() &&
-               f.iter().readComparison(ValType::I64);
+               f.iter().readComparison(ValType::I64, nullptr, nullptr);
       case Expr::F32Eq:
       case Expr::F32Ne:
       case Expr::F32Lt:
       case Expr::F32Le:
       case Expr::F32Gt:
       case Expr::F32Ge:
-        return f.iter().readComparison(ValType::F32);
+        return f.iter().readComparison(ValType::F32, nullptr, nullptr);
       case Expr::F64Eq:
       case Expr::F64Ne:
       case Expr::F64Lt:
       case Expr::F64Le:
       case Expr::F64Gt:
       case Expr::F64Ge:
-        return f.iter().readComparison(ValType::F64);
+        return f.iter().readComparison(ValType::F64, nullptr, nullptr);
       case Expr::I32Eqz:
-        return f.iter().readConversion(ValType::I32, ValType::I32);
+        return f.iter().readConversion(ValType::I32, ValType::I32, nullptr);
       case Expr::I64Eqz:
         return f.checkI64Support() &&
-               f.iter().readConversion(ValType::I64, ValType::I32);
+               f.iter().readConversion(ValType::I64, ValType::I32, nullptr);
       case Expr::I32WrapI64:
         return f.checkI64Support() &&
-               f.iter().readConversion(ValType::I64, ValType::I32);
+               f.iter().readConversion(ValType::I64, ValType::I32, nullptr);
       case Expr::I32TruncSF32:
       case Expr::I32TruncUF32:
       case Expr::I32ReinterpretF32:
-        return f.iter().readConversion(ValType::F32, ValType::I32);
+        return f.iter().readConversion(ValType::F32, ValType::I32, nullptr);
       case Expr::I32TruncSF64:
       case Expr::I32TruncUF64:
-        return f.iter().readConversion(ValType::F64, ValType::I32);
+        return f.iter().readConversion(ValType::F64, ValType::I32, nullptr);
       case Expr::I64ExtendSI32:
       case Expr::I64ExtendUI32:
         return f.checkI64Support() &&
-               f.iter().readConversion(ValType::I32, ValType::I64);
+               f.iter().readConversion(ValType::I32, ValType::I64, nullptr);
       case Expr::I64TruncSF32:
       case Expr::I64TruncUF32:
         return f.checkI64Support() &&
-               f.iter().readConversion(ValType::F32, ValType::I64);
+               f.iter().readConversion(ValType::F32, ValType::I64, nullptr);
       case Expr::I64TruncSF64:
       case Expr::I64TruncUF64:
       case Expr::I64ReinterpretF64:
         return f.checkI64Support() &&
-               f.iter().readConversion(ValType::F64, ValType::I64);
+               f.iter().readConversion(ValType::F64, ValType::I64, nullptr);
       case Expr::F32ConvertSI32:
       case Expr::F32ConvertUI32:
       case Expr::F32ReinterpretI32:
-        return f.iter().readConversion(ValType::I32, ValType::F32);
+        return f.iter().readConversion(ValType::I32, ValType::F32, nullptr);
       case Expr::F32ConvertSI64:
       case Expr::F32ConvertUI64:
         return f.checkI64Support() &&
-               f.iter().readConversion(ValType::I64, ValType::F32);
+               f.iter().readConversion(ValType::I64, ValType::F32, nullptr);
       case Expr::F32DemoteF64:
-        return f.iter().readConversion(ValType::F64, ValType::F32);
+        return f.iter().readConversion(ValType::F64, ValType::F32, nullptr);
       case Expr::F64ConvertSI32:
       case Expr::F64ConvertUI32:
-        return f.iter().readConversion(ValType::I32, ValType::F64);
+        return f.iter().readConversion(ValType::I32, ValType::F64, nullptr);
       case Expr::F64ConvertSI64:
       case Expr::F64ConvertUI64:
       case Expr::F64ReinterpretI64:
         return f.checkI64Support() &&
-               f.iter().readConversion(ValType::I64, ValType::F64);
+               f.iter().readConversion(ValType::I64, ValType::F64, nullptr);
       case Expr::F64PromoteF32:
-        return f.iter().readConversion(ValType::F32, ValType::F64);
+        return f.iter().readConversion(ValType::F32, ValType::F64, nullptr);
       case Expr::I32Load8S:
       case Expr::I32Load8U:
-        return f.iter().readLoad(ValType::I32, 1);
+        return f.iter().readLoad(ValType::I32, 1, nullptr);
       case Expr::I32Load16S:
       case Expr::I32Load16U:
-        return f.iter().readLoad(ValType::I32, 2);
+        return f.iter().readLoad(ValType::I32, 2, nullptr);
       case Expr::I32Load:
-        return f.iter().readLoad(ValType::I32, 4);
+        return f.iter().readLoad(ValType::I32, 4, nullptr);
       case Expr::I64Load8S:
       case Expr::I64Load8U:
         return f.iter().notYetImplemented("i64") &&
-               f.iter().readLoad(ValType::I64, 1);
+               f.iter().readLoad(ValType::I64, 1, nullptr);
       case Expr::I64Load16S:
       case Expr::I64Load16U:
         return f.iter().notYetImplemented("i64") &&
-               f.iter().readLoad(ValType::I64, 2);
+               f.iter().readLoad(ValType::I64, 2, nullptr);
       case Expr::I64Load32S:
       case Expr::I64Load32U:
         return f.iter().notYetImplemented("i64") &&
-               f.iter().readLoad(ValType::I64, 4);
+               f.iter().readLoad(ValType::I64, 4, nullptr);
       case Expr::I64Load:
         return f.iter().notYetImplemented("i64");
       case Expr::F32Load:
-        return f.iter().readLoad(ValType::F32, 4);
+        return f.iter().readLoad(ValType::F32, 4, nullptr);
       case Expr::F64Load:
-        return f.iter().readLoad(ValType::F64, 8);
+        return f.iter().readLoad(ValType::F64, 8, nullptr);
       case Expr::I32Store8:
-        return f.iter().readStore(ValType::I32, 1);
+        return f.iter().readStore(ValType::I32, 1, nullptr, nullptr);
       case Expr::I32Store16:
-        return f.iter().readStore(ValType::I32, 2);
+        return f.iter().readStore(ValType::I32, 2, nullptr, nullptr);
       case Expr::I32Store:
-        return f.iter().readStore(ValType::I32, 4);
+        return f.iter().readStore(ValType::I32, 4, nullptr, nullptr);
       case Expr::I64Store8:
         return f.iter().notYetImplemented("i64") &&
-               f.iter().readStore(ValType::I64, 1);
+               f.iter().readStore(ValType::I64, 1, nullptr, nullptr);
       case Expr::I64Store16:
         return f.iter().notYetImplemented("i64") &&
-               f.iter().readStore(ValType::I64, 2);
+               f.iter().readStore(ValType::I64, 2, nullptr, nullptr);
       case Expr::I64Store32:
         return f.iter().notYetImplemented("i64") &&
-               f.iter().readStore(ValType::I64, 4);
+               f.iter().readStore(ValType::I64, 4, nullptr, nullptr);
       case Expr::I64Store:
         return f.iter().notYetImplemented("i64");
       case Expr::F32Store:
-        return f.iter().readStore(ValType::F32, 4);
+        return f.iter().readStore(ValType::F32, 4, nullptr, nullptr);
       case Expr::F64Store:
-        return f.iter().readStore(ValType::F64, 8);
+        return f.iter().readStore(ValType::F64, 8, nullptr, nullptr);
       case Expr::Br:
-        return f.iter().readBr();
+        return f.iter().readBr(nullptr, nullptr, nullptr);
       case Expr::BrIf:
-        return f.iter().readBrIf();
+        return f.iter().readBrIf(nullptr, nullptr, nullptr, nullptr);
       case Expr::BrTable:
         return DecodeBrTable(f);
       case Expr::Return:
-        return f.iter().readReturn();
+        return f.iter().readReturn(nullptr);
       case Expr::Unreachable:
         return f.iter().readUnreachable();
       default:
         // Note: it's important not to remove this default since readExpr()
         // can return Expr values for which there is no enumerator.
         break;
     }
 
@@ -950,17 +950,17 @@ DecodeFunctionBody(JSContext* cx, Decode
     if (!f.iter().readFunctionStart())
         return false;
 
     while (d.currentPosition() < bodyEnd) {
         if (!DecodeExpr(f))
             return false;
     }
 
-    if (!f.iter().readFunctionEnd(f.sig().ret()))
+    if (!f.iter().readFunctionEnd(f.sig().ret(), nullptr))
         return false;
 
     if (d.currentPosition() != bodyEnd)
         return Fail(cx, d, "function body length mismatch");
 
     if (!fg.bytes().resize(bodySize))
         return false;
 
--- a/js/src/asmjs/WasmBinaryIterator.h
+++ b/js/src/asmjs/WasmBinaryIterator.h
@@ -419,105 +419,91 @@ class MOZ_STACK_CLASS ExprIter : private
     // Report an unrecognized opcode.
     MOZ_MUST_USE bool unrecognizedOpcode(Expr expr) MOZ_COLD;
 
     // ------------------------------------------------------------------------
     // Decoding and validation interface.
 
     MOZ_MUST_USE bool readExpr(Expr* expr);
     MOZ_MUST_USE bool readFunctionStart();
-    MOZ_MUST_USE bool readFunctionEnd(ExprType ret, Value* value = nullptr);
-    MOZ_MUST_USE bool readReturn(Value* value = nullptr);
+    MOZ_MUST_USE bool readFunctionEnd(ExprType ret, Value* value);
+    MOZ_MUST_USE bool readReturn(Value* value);
     MOZ_MUST_USE bool readBlock();
     MOZ_MUST_USE bool readLoop();
-    MOZ_MUST_USE bool readIf(Value* condition = nullptr);
-    MOZ_MUST_USE bool readElse(ExprType* thenType = nullptr, Value* thenValue = nullptr);
-    MOZ_MUST_USE bool readEnd(LabelKind* kind = nullptr,
-                              ExprType* type = nullptr, Value* value = nullptr);
-    MOZ_MUST_USE bool readBr(uint32_t* relativeDepth = nullptr,
-                             ExprType* type = nullptr, Value* value = nullptr);
-    MOZ_MUST_USE bool readBrIf(uint32_t* relativeDepth = nullptr, ExprType* type = nullptr,
-                               Value* value = nullptr, Value* condition = nullptr);
+    MOZ_MUST_USE bool readIf(Value* condition);
+    MOZ_MUST_USE bool readElse(ExprType* thenType, Value* thenValue);
+    MOZ_MUST_USE bool readEnd(LabelKind* kind, ExprType* type, Value* value);
+    MOZ_MUST_USE bool readBr(uint32_t* relativeDepth, ExprType* type, Value* value);
+    MOZ_MUST_USE bool readBrIf(uint32_t* relativeDepth, ExprType* type,
+                               Value* value, Value* condition);
     MOZ_MUST_USE bool readBrTable(uint32_t* tableLength, ExprType* type,
-                                  Value* value = nullptr, Value* index = nullptr);
+                                  Value* value, Value* index);
     MOZ_MUST_USE bool readBrTableEntry(ExprType type, uint32_t* depth);
     MOZ_MUST_USE bool readUnreachable();
-    MOZ_MUST_USE bool readUnary(ValType operandType, Value* input = nullptr);
-    MOZ_MUST_USE bool readConversion(ValType operandType, ValType resultType,
-                                     Value* input = nullptr);
-    MOZ_MUST_USE bool readBinary(ValType operandType,
-                                 Value* lhs = nullptr, Value* rhs = nullptr);
-    MOZ_MUST_USE bool readComparison(ValType operandType,
-                                     Value* lhs = nullptr, Value* rhs = nullptr);
+    MOZ_MUST_USE bool readUnary(ValType operandType, Value* input);
+    MOZ_MUST_USE bool readConversion(ValType operandType, ValType resultType, Value* input);
+    MOZ_MUST_USE bool readBinary(ValType operandType, Value* lhs, Value* rhs);
+    MOZ_MUST_USE bool readComparison(ValType operandType, Value* lhs, Value* rhs);
     MOZ_MUST_USE bool readLoad(ValType resultType, uint32_t byteSize,
-                               LinearMemoryAddress<Value>* addr = nullptr);
+                               LinearMemoryAddress<Value>* addr);
     MOZ_MUST_USE bool readStore(ValType resultType, uint32_t byteSize,
-                                LinearMemoryAddress<Value>* addr = nullptr,
-                                Value* value = nullptr);
+                                LinearMemoryAddress<Value>* addr, Value* value);
     MOZ_MUST_USE bool readNullary();
-    MOZ_MUST_USE bool readSelect(ExprType* type = nullptr,
-                                 Value* trueValue = nullptr, Value* falseValue = nullptr,
-                                 Value* condition = nullptr);
-    MOZ_MUST_USE bool readGetLocal(const ValTypeVector& locals,
-                                   uint32_t* id = nullptr);
-    MOZ_MUST_USE bool readSetLocal(const ValTypeVector& locals,
-                                   uint32_t* id = nullptr, Value* value = nullptr);
-    MOZ_MUST_USE bool readGetGlobal(const GlobalDescVector& globals,
-                                    uint32_t* id = nullptr);
-    MOZ_MUST_USE bool readSetGlobal(const GlobalDescVector& globals,
-                                    uint32_t* id = nullptr, Value* value = nullptr);
-    MOZ_MUST_USE bool readI32Const(int32_t* i32 = nullptr);
-    MOZ_MUST_USE bool readI64Const(int64_t* i64 = nullptr);
-    MOZ_MUST_USE bool readF32Const(float* f32 = nullptr);
-    MOZ_MUST_USE bool readF64Const(double* f64 = nullptr);
-    MOZ_MUST_USE bool readI32x4Const(I32x4* i32x4 = nullptr);
-    MOZ_MUST_USE bool readF32x4Const(F32x4* f32x4 = nullptr);
-    MOZ_MUST_USE bool readB32x4Const(I32x4* i32x4 = nullptr);
+    MOZ_MUST_USE bool readSelect(ExprType* type,
+                                 Value* trueValue, Value* falseValue, Value* condition);
+    MOZ_MUST_USE bool readGetLocal(const ValTypeVector& locals, uint32_t* id);
+    MOZ_MUST_USE bool readSetLocal(const ValTypeVector& locals, uint32_t* id, Value* value);
+    MOZ_MUST_USE bool readGetGlobal(const GlobalDescVector& globals, uint32_t* id);
+    MOZ_MUST_USE bool readSetGlobal(const GlobalDescVector& globals, uint32_t* id, Value* value);
+    MOZ_MUST_USE bool readI32Const(int32_t* i32);
+    MOZ_MUST_USE bool readI64Const(int64_t* i64);
+    MOZ_MUST_USE bool readF32Const(float* f32);
+    MOZ_MUST_USE bool readF64Const(double* f64);
+    MOZ_MUST_USE bool readI32x4Const(I32x4* i32x4);
+    MOZ_MUST_USE bool readF32x4Const(F32x4* f32x4);
+    MOZ_MUST_USE bool readB32x4Const(I32x4* i32x4);
     MOZ_MUST_USE bool readCall(uint32_t* calleeIndex, uint32_t* arity);
-    MOZ_MUST_USE bool readCallIndirect(uint32_t* sigIndex,
-                                       uint32_t* arity);
+    MOZ_MUST_USE bool readCallIndirect(uint32_t* sigIndex, uint32_t* arity);
     MOZ_MUST_USE bool readCallImport(uint32_t* importIndex, uint32_t* arity);
-    MOZ_MUST_USE bool readCallArg(ValType type, uint32_t numArgs, uint32_t argIndex,
-                                  Value* arg = nullptr);
+    MOZ_MUST_USE bool readCallArg(ValType type, uint32_t numArgs, uint32_t argIndex, Value* arg);
     MOZ_MUST_USE bool readCallArgsEnd(uint32_t numArgs);
-    MOZ_MUST_USE bool readCallIndirectCallee(Value* callee = nullptr);
+    MOZ_MUST_USE bool readCallIndirectCallee(Value* callee);
     MOZ_MUST_USE bool readCallReturn(ExprType ret);
-    MOZ_MUST_USE bool readAtomicLoad(LinearMemoryAddress<Value>* addr = nullptr,
-                                     Scalar::Type* viewType = nullptr);
-    MOZ_MUST_USE bool readAtomicStore(LinearMemoryAddress<Value>* addr = nullptr,
-                                      Scalar::Type* viewType = nullptr,
-                                      Value* value = nullptr);
-    MOZ_MUST_USE bool readAtomicBinOp(LinearMemoryAddress<Value>* addr = nullptr,
-                                      Scalar::Type* viewType = nullptr,
-                                      jit::AtomicOp* op = nullptr,
-                                      Value* value = nullptr);
-    MOZ_MUST_USE bool readAtomicCompareExchange(LinearMemoryAddress<Value>* addr = nullptr,
-                                                Scalar::Type* viewType = nullptr,
-                                                Value* oldValue = nullptr,
-                                                Value* newValue = nullptr);
-    MOZ_MUST_USE bool readAtomicExchange(LinearMemoryAddress<Value>* addr = nullptr,
-                                         Scalar::Type* viewType = nullptr,
-                                         Value* newValue = nullptr);
-    MOZ_MUST_USE bool readSimdComparison(ValType simdType, Value* lhs = nullptr,
-                                         Value* rhs = nullptr);
-    MOZ_MUST_USE bool readSimdShiftByScalar(ValType simdType, Value* lhs = nullptr,
-                                            Value* rhs = nullptr);
-    MOZ_MUST_USE bool readSimdBooleanReduction(ValType simdType, Value* input = nullptr);
-    MOZ_MUST_USE bool readExtractLane(ValType simdType, jit::SimdLane* lane = nullptr,
-                                      Value* vector = nullptr);
-    MOZ_MUST_USE bool readReplaceLane(ValType simdType, jit::SimdLane* lane = nullptr,
-                                      Value* vector = nullptr, Value* scalar = nullptr);
-    MOZ_MUST_USE bool readSplat(ValType simdType, Value* scalar = nullptr);
-    MOZ_MUST_USE bool readSwizzle(ValType simdType, uint8_t (* lanes)[4] = nullptr,
-                                  Value* vector = nullptr);
-    MOZ_MUST_USE bool readShuffle(ValType simdType, uint8_t (* lanes)[4] = nullptr,
-                                  Value* lhs = nullptr, Value* rhs = nullptr);
-    MOZ_MUST_USE bool readSimdSelect(ValType simdType, Value* trueValue = nullptr,
-                                     Value* falseValue = nullptr,
-                                     Value* condition = nullptr);
+    MOZ_MUST_USE bool readAtomicLoad(LinearMemoryAddress<Value>* addr,
+                                     Scalar::Type* viewType);
+    MOZ_MUST_USE bool readAtomicStore(LinearMemoryAddress<Value>* addr,
+                                      Scalar::Type* viewType,
+                                      Value* value);
+    MOZ_MUST_USE bool readAtomicBinOp(LinearMemoryAddress<Value>* addr,
+                                      Scalar::Type* viewType,
+                                      jit::AtomicOp* op,
+                                      Value* value);
+    MOZ_MUST_USE bool readAtomicCompareExchange(LinearMemoryAddress<Value>* addr,
+                                                Scalar::Type* viewType,
+                                                Value* oldValue,
+                                                Value* newValue);
+    MOZ_MUST_USE bool readAtomicExchange(LinearMemoryAddress<Value>* addr,
+                                         Scalar::Type* viewType,
+                                         Value* newValue);
+    MOZ_MUST_USE bool readSimdComparison(ValType simdType, Value* lhs,
+                                         Value* rhs);
+    MOZ_MUST_USE bool readSimdShiftByScalar(ValType simdType, Value* lhs,
+                                            Value* rhs);
+    MOZ_MUST_USE bool readSimdBooleanReduction(ValType simdType, Value* input);
+    MOZ_MUST_USE bool readExtractLane(ValType simdType, jit::SimdLane* lane,
+                                      Value* vector);
+    MOZ_MUST_USE bool readReplaceLane(ValType simdType, jit::SimdLane* lane,
+                                      Value* vector, Value* scalar);
+    MOZ_MUST_USE bool readSplat(ValType simdType, Value* scalar);
+    MOZ_MUST_USE bool readSwizzle(ValType simdType, uint8_t (* lanes)[4], Value* vector);
+    MOZ_MUST_USE bool readShuffle(ValType simdType, uint8_t (* lanes)[4],
+                                  Value* lhs, Value* rhs);
+    MOZ_MUST_USE bool readSimdSelect(ValType simdType, Value* trueValue,
+                                     Value* falseValue,
+                                     Value* condition);
     MOZ_MUST_USE bool readSimdCtor();
     MOZ_MUST_USE bool readSimdCtorArg(ValType elementType, uint32_t numElements, uint32_t argIndex, Value* arg);
     MOZ_MUST_USE bool readSimdCtorArgsEnd(uint32_t numElements);
     MOZ_MUST_USE bool readSimdCtorReturn(ValType simdType);
 
     // ------------------------------------------------------------------------
     // Stack management.