diff options
author | Daniel Baumann <daniel.baumann@progress-linux.org> | 2024-06-12 05:35:29 +0000 |
---|---|---|
committer | Daniel Baumann <daniel.baumann@progress-linux.org> | 2024-06-12 05:35:29 +0000 |
commit | 59203c63bb777a3bacec32fb8830fba33540e809 (patch) | |
tree | 58298e711c0ff0575818c30485b44a2f21bf28a0 /js/src/jit/WarpCacheIRTranspiler.cpp | |
parent | Adding upstream version 126.0.1. (diff) | |
download | firefox-59203c63bb777a3bacec32fb8830fba33540e809.tar.xz firefox-59203c63bb777a3bacec32fb8830fba33540e809.zip |
Adding upstream version 127.0.upstream/127.0
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to 'js/src/jit/WarpCacheIRTranspiler.cpp')
-rw-r--r-- | js/src/jit/WarpCacheIRTranspiler.cpp | 25 |
1 files changed, 20 insertions, 5 deletions
diff --git a/js/src/jit/WarpCacheIRTranspiler.cpp b/js/src/jit/WarpCacheIRTranspiler.cpp index fdaafd00b3..2e4a4b9613 100644 --- a/js/src/jit/WarpCacheIRTranspiler.cpp +++ b/js/src/jit/WarpCacheIRTranspiler.cpp @@ -25,6 +25,7 @@ #include "jit/WarpSnapshot.h" #include "js/ScalarType.h" // js::Scalar::Type #include "vm/BytecodeLocation.h" +#include "vm/TypeofEqOperand.h" // TypeofEqOperand #include "wasm/WasmCode.h" #include "gc/ObjectKind-inl.h" @@ -1117,10 +1118,9 @@ bool WarpCacheIRTranspiler::emitGuardNoDenseElements(ObjOperandId objId) { return true; } -bool WarpCacheIRTranspiler::emitGuardFunctionHasJitEntry(ObjOperandId funId, - bool constructing) { +bool WarpCacheIRTranspiler::emitGuardFunctionHasJitEntry(ObjOperandId funId) { MDefinition* fun = getOperand(funId); - uint16_t expectedFlags = FunctionFlags::HasJitEntryFlags(constructing); + uint16_t expectedFlags = FunctionFlags::HasJitEntryFlags(); uint16_t unexpectedFlags = 0; auto* ins = @@ -1134,8 +1134,7 @@ bool WarpCacheIRTranspiler::emitGuardFunctionHasJitEntry(ObjOperandId funId, bool WarpCacheIRTranspiler::emitGuardFunctionHasNoJitEntry(ObjOperandId funId) { MDefinition* fun = getOperand(funId); uint16_t expectedFlags = 0; - uint16_t unexpectedFlags = - FunctionFlags::HasJitEntryFlags(/*isConstructing=*/false); + uint16_t unexpectedFlags = FunctionFlags::HasJitEntryFlags(); auto* ins = MGuardFunctionFlags::New(alloc(), fun, expectedFlags, unexpectedFlags); @@ -1626,6 +1625,22 @@ bool WarpCacheIRTranspiler::emitLoadTypeOfObjectResult(ObjOperandId objId) { return true; } +bool WarpCacheIRTranspiler::emitLoadTypeOfEqObjectResult( + ObjOperandId objId, TypeofEqOperand operand) { + MDefinition* obj = getOperand(objId); + auto* typeOf = MTypeOf::New(alloc(), obj); + add(typeOf); + + auto* typeInt = MConstant::New(alloc(), Int32Value(operand.type())); + add(typeInt); + + auto* ins = MCompare::New(alloc(), typeOf, typeInt, operand.compareOp(), + MCompare::Compare_Int32); + add(ins); + pushResult(ins); + return true; +} + bool WarpCacheIRTranspiler::emitLoadEnclosingEnvironment( ObjOperandId objId, ObjOperandId resultId) { MDefinition* env = getOperand(objId); |