mirror of
https://github.com/RGBCube/serenity
synced 2025-07-27 01:17:35 +00:00
LibJS: Make JS_OBJECT and JS_ENVIRONMENT forward to JS_CELL
This commit is contained in:
parent
6e973ce69b
commit
49fd92d92a
2 changed files with 2 additions and 11 deletions
|
@ -17,10 +17,7 @@ struct Variable {
|
||||||
DeclarationKind declaration_kind;
|
DeclarationKind declaration_kind;
|
||||||
};
|
};
|
||||||
|
|
||||||
#define JS_ENVIRONMENT(class_, base_class) \
|
#define JS_ENVIRONMENT(class_, base_class) JS_CELL(class_, base_class)
|
||||||
public: \
|
|
||||||
using Base = base_class; \
|
|
||||||
virtual StringView class_name() const override { return #class_##sv; }
|
|
||||||
|
|
||||||
class Environment : public Cell {
|
class Environment : public Cell {
|
||||||
JS_CELL(Environment, Cell);
|
JS_CELL(Environment, Cell);
|
||||||
|
|
|
@ -25,13 +25,7 @@
|
||||||
|
|
||||||
namespace JS {
|
namespace JS {
|
||||||
|
|
||||||
#define JS_OBJECT(class_, base_class) \
|
#define JS_OBJECT(class_, base_class) JS_CELL(class_, base_class)
|
||||||
public: \
|
|
||||||
using Base = base_class; \
|
|
||||||
virtual StringView class_name() const override \
|
|
||||||
{ \
|
|
||||||
return #class_##sv; \
|
|
||||||
}
|
|
||||||
|
|
||||||
struct PrivateElement {
|
struct PrivateElement {
|
||||||
enum class Kind {
|
enum class Kind {
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue