зеркало из https://github.com/mozilla/gecko-dev.git
Bug 1638586 - Transpile Math.abs in Warp. r=iain
Differential Revision: https://phabricator.services.mozilla.com/D75692
This commit is contained in:
Родитель
eb3f650269
Коммит
2f3233a446
|
@ -658,13 +658,13 @@
|
|||
|
||||
- name: MathAbsInt32Result
|
||||
shared: true
|
||||
transpile: false
|
||||
transpile: true
|
||||
args:
|
||||
input: Int32Id
|
||||
|
||||
- name: MathAbsNumberResult
|
||||
shared: true
|
||||
transpile: false
|
||||
transpile: true
|
||||
args:
|
||||
input: NumberId
|
||||
|
||||
|
|
|
@ -942,6 +942,26 @@ bool WarpCacheIRTranspiler::emitCompareStringResult(JSOp op,
|
|||
return emitCompareResult(op, lhsId, rhsId, MCompare::Compare_String);
|
||||
}
|
||||
|
||||
bool WarpCacheIRTranspiler::emitMathAbsInt32Result(Int32OperandId inputId) {
|
||||
MDefinition* input = getOperand(inputId);
|
||||
|
||||
auto* ins = MAbs::New(alloc(), input, MIRType::Int32);
|
||||
add(ins);
|
||||
|
||||
pushResult(ins);
|
||||
return true;
|
||||
}
|
||||
|
||||
bool WarpCacheIRTranspiler::emitMathAbsNumberResult(NumberOperandId inputId) {
|
||||
MDefinition* input = getOperand(inputId);
|
||||
|
||||
auto* ins = MAbs::New(alloc(), input, MIRType::Double);
|
||||
add(ins);
|
||||
|
||||
pushResult(ins);
|
||||
return true;
|
||||
}
|
||||
|
||||
bool WarpCacheIRTranspiler::emitLoadArgumentFixedSlot(ValOperandId resultId,
|
||||
uint8_t slotIndex) {
|
||||
// Reverse of GetIndexOfArgument specialized to !hasArgumentArray.
|
||||
|
|
Загрузка…
Ссылка в новой задаче