Skip to content

Commit cbff246

Browse files
committed
Remove unused internal fields from AbstractModuleLoader
https://bugs.webkit.org/show_bug.cgi?id=222256 Reviewed by Saam Barati. * runtime/AbstractModuleRecord.h: (JSC::AbstractModuleRecord::initialValues): Canonical link: https://commits.webkit.org/234440@main git-svn-id: https://svn.webkit.org/repository/webkit/trunk@273269 268f45cc-cd09-0410-ab3c-d52691b4dbfc
1 parent 6edf0ef commit cbff246

2 files changed

Lines changed: 13 additions & 7 deletions

File tree

‎Source/JavaScriptCore/ChangeLog‎

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,13 @@
1+
2021-02-22 Keith Miller <keith_miller@apple.com>
2+
3+
Remove unused internal fields from AbstractModuleLoader
4+
https://bugs.webkit.org/show_bug.cgi?id=222256
5+
6+
Reviewed by Saam Barati.
7+
8+
* runtime/AbstractModuleRecord.h:
9+
(JSC::AbstractModuleRecord::initialValues):
10+
111
2021-02-21 Lauro Moura <lmoura@igalia.com>
212

313
Fix warning after r273225

‎Source/JavaScriptCore/runtime/AbstractModuleRecord.h‎

Lines changed: 3 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -38,10 +38,10 @@ class JSMap;
3838

3939
// Based on the Source Text Module Record
4040
// http://www.ecma-international.org/ecma-262/6.0/#sec-source-text-module-records
41-
class AbstractModuleRecord : public JSInternalFieldObjectImpl<4> {
41+
class AbstractModuleRecord : public JSInternalFieldObjectImpl<2> {
4242
friend class LLIntOffsetsExtractor;
4343
public:
44-
using Base = JSInternalFieldObjectImpl<4>;
44+
using Base = JSInternalFieldObjectImpl<2>;
4545

4646
static constexpr bool needsDestruction = true;
4747

@@ -57,19 +57,15 @@ class AbstractModuleRecord : public JSInternalFieldObjectImpl<4> {
5757

5858
enum class Field : uint32_t {
5959
State,
60-
Next,
61-
This,
6260
Frame,
6361
};
6462

65-
static_assert(numberOfInternalFields == 4);
63+
static_assert(numberOfInternalFields == 2);
6664
static std::array<JSValue, numberOfInternalFields> initialValues()
6765
{
6866
return { {
6967
jsNumber(static_cast<int32_t>(State::Init)),
7068
jsUndefined(),
71-
jsUndefined(),
72-
jsUndefined(),
7369
} };
7470
}
7571

0 commit comments

Comments
 (0)