mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2025-08-12 11:09:18 +00:00
LibJS: Add PutById bytecode instruction for object property assignment
Note that this is only used for non-computed accesses. Computed access is not yet implemented. :^)
This commit is contained in:
parent
bea6e31ddc
commit
14cfc44855
Notes:
sideshowbarker
2024-07-18 12:42:18 +09:00
Author: https://github.com/awesomekling
Commit: 14cfc44855
3 changed files with 44 additions and 0 deletions
|
@ -174,6 +174,25 @@ private:
|
|||
FlyString m_identifier;
|
||||
};
|
||||
|
||||
class PutById final : public Instruction {
|
||||
public:
|
||||
PutById(Register base, FlyString property, Register src)
|
||||
: m_base(base)
|
||||
, m_property(move(property))
|
||||
, m_src(src)
|
||||
{
|
||||
}
|
||||
|
||||
virtual ~PutById() override { }
|
||||
virtual void execute(Bytecode::Interpreter&) const override;
|
||||
virtual String to_string() const override;
|
||||
|
||||
private:
|
||||
Register m_base;
|
||||
FlyString m_property;
|
||||
Register m_src;
|
||||
};
|
||||
|
||||
class Jump final : public Instruction {
|
||||
public:
|
||||
explicit Jump(Label target)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue