mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2025-06-08 05:27:14 +09:00

This commit adds the minimal export macros needed to run js.exe on windows. A followup commit is planned to move to explicit export entirely. A static_assert for the size of a struct is also ifdef'ed out as the semantics around object layout and inheritance are different on MSVC abi and the struct IteratorRecord ends up being 40 bytes not 32.
38 lines
785 B
C++
38 lines
785 B
C++
/*
|
|
* Copyright (c) 2021-2022, Linus Groh <linusg@serenityos.org>
|
|
*
|
|
* SPDX-License-Identifier: BSD-2-Clause
|
|
*/
|
|
|
|
#pragma once
|
|
|
|
#include <LibJS/Contrib/Test262/262Object.h>
|
|
#include <LibJS/Export.h>
|
|
#include <LibJS/Runtime/GlobalObject.h>
|
|
|
|
namespace JS::Test262 {
|
|
|
|
class JS_API GlobalObject final : public JS::GlobalObject {
|
|
JS_OBJECT(GlobalObject, JS::GlobalObject);
|
|
GC_DECLARE_ALLOCATOR(GlobalObject);
|
|
|
|
public:
|
|
virtual void initialize(Realm&) override;
|
|
virtual ~GlobalObject() override = default;
|
|
|
|
$262Object* $262() const { return m_$262; }
|
|
|
|
private:
|
|
GlobalObject(JS::Realm& realm)
|
|
: JS::GlobalObject(realm)
|
|
{
|
|
}
|
|
|
|
virtual void visit_edges(Visitor&) override;
|
|
|
|
GC::Ptr<$262Object> m_$262;
|
|
|
|
JS_DECLARE_NATIVE_FUNCTION(print);
|
|
};
|
|
|
|
}
|