mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2025-10-19 07:33:20 +00:00
LibJS: Rename Bytecode::Op::PropertyKind => Bytecode::PutKind
This is only used to specify how a property is being added to an object by Put* instructions, so let's call it PutKind. Also add an enumeration X macro for it to prepare for upcoming specializations.
This commit is contained in:
parent
1c10421316
commit
e7a3c4dbad
Notes:
github-actions[bot]
2025-10-11 18:10:24 +00:00
Author: https://github.com/awesomekling
Commit: e7a3c4dbad
Pull-request: https://github.com/LadybirdBrowser/ladybird/pull/6450
7 changed files with 87 additions and 67 deletions
27
Libraries/LibJS/Bytecode/PutKind.h
Normal file
27
Libraries/LibJS/Bytecode/PutKind.h
Normal file
|
@ -0,0 +1,27 @@
|
|||
/*
|
||||
* Copyright (c) 2025, Andreas Kling <andreas@ladybird.org>
|
||||
*
|
||||
* SPDX-License-Identifier: BSD-2-Clause
|
||||
*/
|
||||
|
||||
#pragma once
|
||||
|
||||
namespace JS::Bytecode {
|
||||
|
||||
// PutKind indicates how a property is being set.
|
||||
// `Normal` is a normal `o.foo = x` or `o[foo] = x` operation.
|
||||
// The others are used for object expressions.
|
||||
#define JS_ENUMERATE_PUT_KINDS(X) \
|
||||
X(Normal) \
|
||||
X(Getter) \
|
||||
X(Setter) \
|
||||
X(Prototype) \
|
||||
X(Own) // Always sets an own property, never calls a setter.
|
||||
|
||||
enum class PutKind {
|
||||
#define __JS_ENUMERATE_PUT_KIND(name) name,
|
||||
JS_ENUMERATE_PUT_KINDS(__JS_ENUMERATE_PUT_KIND)
|
||||
#undef __JS_ENUMERATE_PUT_KIND
|
||||
};
|
||||
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue