mirror of
https://github.com/pjh456/OxideJS.git
synced 2026-10-25 03:01:12 +08:00
perf: CallFrame 构造 this 判别位并入 bool 组省 8 字节
This commit is contained in:
@@ -625,10 +625,11 @@ impl Vm {
|
||||
self.raise_error_kind("ReferenceError", "super() called more than once")?;
|
||||
return Ok(true);
|
||||
}
|
||||
let Some(derived_this) = frame.constructed_this else {
|
||||
if !frame.has_constructed_this {
|
||||
self.raise_error_kind("ReferenceError", "super() without derived this")?;
|
||||
return Ok(true);
|
||||
};
|
||||
}
|
||||
let derived_this = frame.constructed_this;
|
||||
let callee = frame.callee;
|
||||
|
||||
let new_target = self.regs[255];
|
||||
@@ -1197,10 +1198,11 @@ impl Vm {
|
||||
self.raise_error_kind("ReferenceError", "super() called more than once")?;
|
||||
return Ok(true);
|
||||
}
|
||||
let Some(derived_this) = frame.constructed_this else {
|
||||
if !frame.has_constructed_this {
|
||||
self.raise_error_kind("ReferenceError", "super() without derived this")?;
|
||||
return Ok(true);
|
||||
};
|
||||
}
|
||||
let derived_this = frame.constructed_this;
|
||||
let callee = frame.callee;
|
||||
|
||||
let new_target = self.regs[255];
|
||||
|
||||
Reference in New Issue
Block a user