mirror of
https://github.com/pjh456/OxideJS.git
synced 2026-10-23 18:21:13 +08:00
style: 自动格式化
This commit is contained in:
@@ -27,8 +27,7 @@
|
|||||||
use oxide_bytecode::module::Constant;
|
use oxide_bytecode::module::Constant;
|
||||||
use oxide_bytecode::opcode::OpCode;
|
use oxide_bytecode::opcode::OpCode;
|
||||||
use oxide_runtime_api::{
|
use oxide_runtime_api::{
|
||||||
abstract_eq_primitives, relational_compare, strict_equality, to_boolean, to_int32, to_number,
|
abstract_eq_primitives, relational_compare, strict_equality, to_boolean, to_int32, to_number, to_uint32,
|
||||||
to_uint32,
|
|
||||||
};
|
};
|
||||||
use oxide_types::string_forge::encode_key;
|
use oxide_types::string_forge::encode_key;
|
||||||
use oxide_types::value::JsValue;
|
use oxide_types::value::JsValue;
|
||||||
|
|||||||
@@ -116,9 +116,20 @@ pub fn fold_function(f: &mut IRFunction) -> bool {
|
|||||||
}
|
}
|
||||||
// C 组位运算与比较:两操作数须为已知寄存器且均在四变体域
|
// C 组位运算与比较:两操作数须为已知寄存器且均在四变体域
|
||||||
// (BigInt/String/Undefined 操作数由表内守卫不折)。
|
// (BigInt/String/Undefined 操作数由表内守卫不折)。
|
||||||
OpCode::BIT_AND | OpCode::BIT_OR | OpCode::BIT_XOR | OpCode::SHL | OpCode::SHR
|
OpCode::BIT_AND
|
||||||
| OpCode::USHR | OpCode::LT | OpCode::GT | OpCode::LTE | OpCode::GTE | OpCode::EQ
|
| OpCode::BIT_OR
|
||||||
| OpCode::NEQ | OpCode::STRICT_EQ | OpCode::STRICT_NEQ => match (inst.a, inst.b) {
|
| OpCode::BIT_XOR
|
||||||
|
| OpCode::SHL
|
||||||
|
| OpCode::SHR
|
||||||
|
| OpCode::USHR
|
||||||
|
| OpCode::LT
|
||||||
|
| OpCode::GT
|
||||||
|
| OpCode::LTE
|
||||||
|
| OpCode::GTE
|
||||||
|
| OpCode::EQ
|
||||||
|
| OpCode::NEQ
|
||||||
|
| OpCode::STRICT_EQ
|
||||||
|
| OpCode::STRICT_NEQ => match (inst.a, inst.b) {
|
||||||
(Operand::Reg(x), Operand::Reg(y)) => match (
|
(Operand::Reg(x), Operand::Reg(y)) => match (
|
||||||
known.get(x as usize).and_then(|c| c.as_ref()),
|
known.get(x as usize).and_then(|c| c.as_ref()),
|
||||||
known.get(y as usize).and_then(|c| c.as_ref()),
|
known.get(y as usize).and_then(|c| c.as_ref()),
|
||||||
|
|||||||
Reference in New Issue
Block a user