icecat: update upstream v128.13.0-1gnu1
This commit is contained in:
parent
a8d305c270
commit
0cdda4f34e
51 changed files with 5487 additions and 4614 deletions
|
|
@ -148,11 +148,11 @@ var exp = asmLink(asmCompile(USE_ASM + "var x=0; function a() { return x|0 } fun
|
|||
assertEq(exp.c(10), undefined);
|
||||
assertEq(exp.a(), 10);
|
||||
|
||||
var f = asmLink(asmCompile(USE_ASM + "function f(i) { i=i|0; switch(i|0) { case 1: i=-1; break; case 133742: i=2; break; default: i=42; break } return i|0 } return f"));
|
||||
var f = asmLink(asmCompile(USE_ASM + "function f(i) { i=i|0; switch(i|0) { case 1: i=-1; break; case 65520: i=2; break; default: i=42; break } return i|0 } return f"));
|
||||
assertEq(f(1), -1);
|
||||
assertEq(f(2), 42);
|
||||
assertEq(f(133742), 2);
|
||||
assertEq(f(133743), 42);
|
||||
assertEq(f(65520), 2);
|
||||
assertEq(f(65521), 42);
|
||||
|
||||
var f = asmLink(asmCompile(USE_ASM + "function f(i) { i=i|0; switch(i|0) { case 1: i=42; break; default: i=13 } return i|0 } return f"));
|
||||
assertEq(f(-1), 13);
|
||||
|
|
|
|||
|
|
@ -10108,6 +10108,37 @@ void CodeGenerator::visitWasmStoreSlot(LWasmStoreSlot* ins) {
|
|||
emitWasmValueStore(ins, type, narrowingOp, src, addr);
|
||||
}
|
||||
|
||||
void CodeGenerator::visitWasmStoreStackResult(LWasmStoreStackResult* ins) {
|
||||
const LAllocation* value = ins->value();
|
||||
Address addr(ToRegister(ins->stackResultsArea()), ins->offset());
|
||||
|
||||
switch (ins->type()) {
|
||||
case MIRType::Int32:
|
||||
masm.storePtr(ToRegister(value), addr);
|
||||
break;
|
||||
case MIRType::Float32:
|
||||
masm.storeFloat32(ToFloatRegister(value), addr);
|
||||
break;
|
||||
case MIRType::Double:
|
||||
masm.storeDouble(ToFloatRegister(value), addr);
|
||||
break;
|
||||
#ifdef ENABLE_WASM_SIMD
|
||||
case MIRType::Simd128:
|
||||
masm.storeUnalignedSimd128(ToFloatRegister(value), addr);
|
||||
break;
|
||||
#endif
|
||||
case MIRType::WasmAnyRef:
|
||||
masm.storePtr(ToRegister(value), addr);
|
||||
break;
|
||||
default:
|
||||
MOZ_CRASH("unexpected type in ::visitWasmStoreStackResult");
|
||||
}
|
||||
}
|
||||
|
||||
void CodeGenerator::visitWasmStoreStackResultI64(LWasmStoreStackResultI64* ins) {
|
||||
masm.store64(ToRegister64(ins->value()), Address(ToRegister(ins->stackResultsArea()), ins->offset()));
|
||||
}
|
||||
|
||||
void CodeGenerator::visitWasmStoreElement(LWasmStoreElement* ins) {
|
||||
MIRType type = ins->type();
|
||||
MNarrowingOp narrowingOp = ins->narrowingOp();
|
||||
|
|
|
|||
|
|
@ -3350,6 +3350,21 @@
|
|||
offset: size_t
|
||||
maybeTrap: MaybeTrapSiteInfo
|
||||
|
||||
- name: WasmStoreStackResult
|
||||
operands:
|
||||
value: WordSized
|
||||
stackResultsArea: WordSized
|
||||
arguments:
|
||||
offset: size_t
|
||||
type: MIRType
|
||||
|
||||
- name: WasmStoreStackResultI64
|
||||
operands:
|
||||
value: Int64
|
||||
stackResultsArea: WordSized
|
||||
arguments:
|
||||
offset: size_t
|
||||
|
||||
- name: WasmStoreElement
|
||||
operands:
|
||||
base: WordSized
|
||||
|
|
|
|||
|
|
@ -6123,13 +6123,12 @@ void LIRGenerator::visitWasmStoreStackResult(MWasmStoreStackResult* ins) {
|
|||
LInstruction* lir;
|
||||
if (value->type() == MIRType::Int64) {
|
||||
lir = new (alloc())
|
||||
LWasmStoreSlotI64(useInt64Register(value), useRegister(stackResultArea),
|
||||
offs, mozilla::Nothing());
|
||||
LWasmStoreStackResultI64(useInt64Register(value), useRegister(stackResultArea),
|
||||
offs);
|
||||
} else {
|
||||
MOZ_ASSERT(value->type() != MIRType::WasmAnyRef);
|
||||
lir = new (alloc())
|
||||
LWasmStoreSlot(useRegister(value), useRegister(stackResultArea), offs,
|
||||
value->type(), MNarrowingOp::None, mozilla::Nothing());
|
||||
LWasmStoreStackResult(useRegister(value), useRegister(stackResultArea), offs,
|
||||
value->type());
|
||||
}
|
||||
add(lir, ins);
|
||||
}
|
||||
|
|
|
|||
|
|
@ -312,9 +312,6 @@ AsyncGeneratorRequest* AsyncGeneratorRequest::create(
|
|||
// Stesp 10-13.
|
||||
[[nodiscard]] static bool AsyncGeneratorYield(
|
||||
JSContext* cx, Handle<AsyncGeneratorObject*> generator, HandleValue value) {
|
||||
// Step 13.a.
|
||||
generator->setSuspendedYield();
|
||||
|
||||
// Step 10. Perform
|
||||
// ! AsyncGeneratorCompleteStep(generator, completion, false,
|
||||
// previousRealm).
|
||||
|
|
@ -322,6 +319,9 @@ AsyncGeneratorRequest* AsyncGeneratorRequest::create(
|
|||
return false;
|
||||
}
|
||||
|
||||
// Step 13.a.
|
||||
generator->setSuspendedYield();
|
||||
|
||||
// Steps 11-13.
|
||||
return AsyncGeneratorDrainQueue(cx, generator);
|
||||
}
|
||||
|
|
|
|||
|
|
@ -1168,7 +1168,7 @@ static_assert(uint64_t(MaxArrayPayloadBytes) <
|
|||
// These limits pertain to our WebAssembly implementation only.
|
||||
|
||||
static const unsigned MaxTryTableCatches = 10000;
|
||||
static const unsigned MaxBrTableElems = 1000000;
|
||||
static const unsigned MaxBrTableElems = 65520;
|
||||
static const unsigned MaxCodeSectionBytes = MaxModuleBytes;
|
||||
static const unsigned MaxBranchHintValue = 2;
|
||||
|
||||
|
|
|
|||
|
|
@ -2554,17 +2554,9 @@ class FunctionCompiler {
|
|||
const ABIResult& result = iter.cur();
|
||||
if (result.onStack()) {
|
||||
MOZ_ASSERT(iter.remaining() > 1);
|
||||
if (result.type().isRefRepr()) {
|
||||
auto* store = MWasmStoreRef::New(
|
||||
alloc(), instancePointer_, stackResultPointer_,
|
||||
result.stackOffset(), values[i], AliasSet::WasmStackResult,
|
||||
WasmPreBarrierKind::None);
|
||||
curBlock_->add(store);
|
||||
} else {
|
||||
auto* store = MWasmStoreStackResult::New(
|
||||
alloc(), stackResultPointer_, result.stackOffset(), values[i]);
|
||||
curBlock_->add(store);
|
||||
}
|
||||
auto* store = MWasmStoreStackResult::New(
|
||||
alloc(), stackResultPointer_, result.stackOffset(), values[i]);
|
||||
curBlock_->add(store);
|
||||
} else {
|
||||
MOZ_ASSERT(iter.remaining() == 1);
|
||||
MOZ_ASSERT(i + 1 == values.length());
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue