Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/nodejs/node.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
path: root/deps
diff options
context:
space:
mode:
authorGuy Bedford <guybedford@gmail.com>2021-03-30 02:39:23 +0300
committerGuy Bedford <guybedford@gmail.com>2021-04-14 19:13:28 +0300
commitdd5da301c8c5706ba95ffcb9520679838d032194 (patch)
tree5f7e3fb8f356831431979e3abfdd215b1295ab2a /deps
parentd56079ab9b508a0379af00258d7c7922035d752d (diff)
deps: backport v8 5f90cfd7
[torque] Move SourceTextModule flags definitions to Torque Refs: https://github.com/v8/v8/commit/5f90cfd754b96bd74690c2e2ab40f070bb620aa6 PR-URL: https://github.com/nodejs/node/pull/37973 Reviewed-By: Richard Lau <rlau@redhat.com>
Diffstat (limited to 'deps')
-rw-r--r--deps/v8/src/objects/module-inl.h5
-rw-r--r--deps/v8/src/objects/source-text-module.h4
-rw-r--r--deps/v8/src/objects/source-text-module.tq7
3 files changed, 11 insertions, 5 deletions
diff --git a/deps/v8/src/objects/module-inl.h b/deps/v8/src/objects/module-inl.h
index 80bfa7b4d6b..d270a9cdfc3 100644
--- a/deps/v8/src/objects/module-inl.h
+++ b/deps/v8/src/objects/module-inl.h
@@ -36,8 +36,9 @@ ACCESSORS(Module, exception, Object, kExceptionOffset)
SMI_ACCESSORS(Module, status, kStatusOffset)
SMI_ACCESSORS(Module, hash, kHashOffset)
-BOOL_ACCESSORS(SourceTextModule, flags, async, kAsyncBit)
-BOOL_ACCESSORS(SourceTextModule, flags, async_evaluating, kAsyncEvaluatingBit)
+BOOL_ACCESSORS(SourceTextModule, flags, async, AsyncBit::kShift)
+BOOL_ACCESSORS(SourceTextModule, flags, async_evaluating,
+ AsyncEvaluatingBit::kShift)
ACCESSORS(SourceTextModule, async_parent_modules, ArrayList,
kAsyncParentModulesOffset)
ACCESSORS(SourceTextModule, top_level_capability, HeapObject,
diff --git a/deps/v8/src/objects/source-text-module.h b/deps/v8/src/objects/source-text-module.h
index d716674c12d..aceccd64ba2 100644
--- a/deps/v8/src/objects/source-text-module.h
+++ b/deps/v8/src/objects/source-text-module.h
@@ -7,6 +7,7 @@
#include "src/objects/module.h"
#include "src/objects/promise.h"
+#include "torque-generated/bit-fields-tq.h"
// Has to be the last include (doesn't have include guards):
#include "src/objects/object-macros.h"
@@ -94,8 +95,7 @@ class SourceTextModule
inline void DecrementPendingAsyncDependencies();
// Bits for flags.
- static const int kAsyncBit = 0;
- static const int kAsyncEvaluatingBit = 1;
+ DEFINE_TORQUE_GENERATED_SOURCE_TEXT_MODULE_FLAGS()
// async_evaluating, top_level_capability, pending_async_dependencies, and
// async_parent_modules are used exclusively during evaluation of async
diff --git a/deps/v8/src/objects/source-text-module.tq b/deps/v8/src/objects/source-text-module.tq
index 091a267cb6f..a9e3ee3db9a 100644
--- a/deps/v8/src/objects/source-text-module.tq
+++ b/deps/v8/src/objects/source-text-module.tq
@@ -4,6 +4,11 @@
type SourceTextModuleInfo extends FixedArray;
+bitfield struct SourceTextModuleFlags extends uint31 {
+ async: bool: 1 bit;
+ async_evaluating: bool: 1 bit;
+}
+
@generateCppClass
extern class SourceTextModule extends Module {
// The code representing this module, or an abstraction thereof.
@@ -44,7 +49,7 @@ extern class SourceTextModule extends Module {
// The number of currently evaluating async dependencies of this module.
pending_async_dependencies: Smi;
- flags: Smi;
+ flags: SmiTagged<SourceTextModuleFlags>;
}
@generateCppClass