Skip to content

Commit dd5da30

Browse files
committedApr 14, 2021
deps: backport v8 5f90cfd7
[torque] Move SourceTextModule flags definitions to Torque Refs: v8/v8@5f90cfd PR-URL: #37973 Reviewed-By: Richard Lau <rlau@redhat.com>
1 parent d56079a commit dd5da30

File tree

4 files changed

+12
-6
lines changed

4 files changed

+12
-6
lines changed
 

‎common.gypi

+1-1
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,7 @@
3636

3737
# Reset this number to 0 on major V8 upgrades.
3838
# Increment by one for each non-official patch applied to deps/v8.
39-
'v8_embedder_string': '-node.27',
39+
'v8_embedder_string': '-node.28',
4040

4141
##### V8 defaults for Node.js #####
4242

‎deps/v8/src/objects/module-inl.h

+3-2
Original file line numberDiff line numberDiff line change
@@ -36,8 +36,9 @@ ACCESSORS(Module, exception, Object, kExceptionOffset)
3636
SMI_ACCESSORS(Module, status, kStatusOffset)
3737
SMI_ACCESSORS(Module, hash, kHashOffset)
3838

39-
BOOL_ACCESSORS(SourceTextModule, flags, async, kAsyncBit)
40-
BOOL_ACCESSORS(SourceTextModule, flags, async_evaluating, kAsyncEvaluatingBit)
39+
BOOL_ACCESSORS(SourceTextModule, flags, async, AsyncBit::kShift)
40+
BOOL_ACCESSORS(SourceTextModule, flags, async_evaluating,
41+
AsyncEvaluatingBit::kShift)
4142
ACCESSORS(SourceTextModule, async_parent_modules, ArrayList,
4243
kAsyncParentModulesOffset)
4344
ACCESSORS(SourceTextModule, top_level_capability, HeapObject,

‎deps/v8/src/objects/source-text-module.h

+2-2
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,7 @@
77

88
#include "src/objects/module.h"
99
#include "src/objects/promise.h"
10+
#include "torque-generated/bit-fields-tq.h"
1011

1112
// Has to be the last include (doesn't have include guards):
1213
#include "src/objects/object-macros.h"
@@ -94,8 +95,7 @@ class SourceTextModule
9495
inline void DecrementPendingAsyncDependencies();
9596

9697
// Bits for flags.
97-
static const int kAsyncBit = 0;
98-
static const int kAsyncEvaluatingBit = 1;
98+
DEFINE_TORQUE_GENERATED_SOURCE_TEXT_MODULE_FLAGS()
9999

100100
// async_evaluating, top_level_capability, pending_async_dependencies, and
101101
// async_parent_modules are used exclusively during evaluation of async

‎deps/v8/src/objects/source-text-module.tq

+6-1
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,11 @@
44

55
type SourceTextModuleInfo extends FixedArray;
66

7+
bitfield struct SourceTextModuleFlags extends uint31 {
8+
async: bool: 1 bit;
9+
async_evaluating: bool: 1 bit;
10+
}
11+
712
@generateCppClass
813
extern class SourceTextModule extends Module {
914
// The code representing this module, or an abstraction thereof.
@@ -44,7 +49,7 @@ extern class SourceTextModule extends Module {
4449
// The number of currently evaluating async dependencies of this module.
4550
pending_async_dependencies: Smi;
4651

47-
flags: Smi;
52+
flags: SmiTagged<SourceTextModuleFlags>;
4853
}
4954

5055
@generateCppClass

0 commit comments

Comments
 (0)
Please sign in to comment.