mirror of
https://github.com/RGBCube/serenity
synced 2025-07-25 20:47:45 +00:00
LibJS: Skip an always-false branch in the JIT to_boolean slow case
This commit is contained in:
parent
9e637de58a
commit
e58209e5cf
2 changed files with 3 additions and 2 deletions
|
@ -175,7 +175,7 @@ void Compiler::compile_jump(Bytecode::Op::Jump const& op)
|
|||
|
||||
static bool cxx_to_boolean(VM&, Value value)
|
||||
{
|
||||
return value.to_boolean();
|
||||
return value.to_boolean_slow_case();
|
||||
}
|
||||
|
||||
void Compiler::compile_to_boolean(Assembler::Reg dst, Assembler::Reg src)
|
||||
|
|
|
@ -439,8 +439,9 @@ public:
|
|||
return static_cast<i32>(m_value.encoded & 0xFFFFFFFF);
|
||||
}
|
||||
|
||||
private:
|
||||
bool to_boolean_slow_case() const;
|
||||
|
||||
private:
|
||||
ThrowCompletionOr<Value> to_number_slow_case(VM&) const;
|
||||
ThrowCompletionOr<Value> to_numeric_slow_case(VM&) const;
|
||||
ThrowCompletionOr<Value> to_primitive_slow_case(VM&, PreferredType) const;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue