summaryrefslogtreecommitdiff
path: root/deps/v8/test/cctest/cctest.h
diff options
context:
space:
mode:
Diffstat (limited to 'deps/v8/test/cctest/cctest.h')
-rw-r--r--deps/v8/test/cctest/cctest.h30
1 files changed, 12 insertions, 18 deletions
diff --git a/deps/v8/test/cctest/cctest.h b/deps/v8/test/cctest/cctest.h
index 9d4af5af3f..3c99721760 100644
--- a/deps/v8/test/cctest/cctest.h
+++ b/deps/v8/test/cctest/cctest.h
@@ -32,13 +32,13 @@
#include "include/libplatform/libplatform.h"
#include "include/v8-platform.h"
+#include "src/base/enum-set.h"
#include "src/debug/debug-interface.h"
#include "src/flags.h"
#include "src/heap/factory.h"
#include "src/isolate.h"
#include "src/objects.h"
#include "src/register-configuration.h"
-#include "src/utils.h"
#include "src/v8.h"
#include "src/zone/accounting-allocator.h"
@@ -51,12 +51,7 @@ class RandomNumberGenerator;
namespace internal {
-#if defined(V8_TARGET_ARCH_IA32) && defined(V8_EMBEDDED_BUILTINS)
-// TODO(v8:6666): Fold into Default config once root is fully supported.
-const auto GetRegConfig = RegisterConfiguration::PreserveRootIA32;
-#else
const auto GetRegConfig = RegisterConfiguration::Default;
-#endif
class HandleScope;
class Zone;
@@ -93,20 +88,15 @@ class Zone;
V(TRACE_EXTENSION, "v8/trace")
#define DEFINE_EXTENSION_ID(Name, Ident) Name##_ID,
-enum CcTestExtensionIds {
- EXTENSION_LIST(DEFINE_EXTENSION_ID)
- kMaxExtensions
-};
+enum CcTestExtensionId { EXTENSION_LIST(DEFINE_EXTENSION_ID) kMaxExtensions };
#undef DEFINE_EXTENSION_ID
-typedef v8::internal::EnumSet<CcTestExtensionIds> CcTestExtensionFlags;
-#define DEFINE_EXTENSION_FLAG(Name, Ident) \
- static const CcTestExtensionFlags Name(1 << Name##_ID);
- static const CcTestExtensionFlags NO_EXTENSIONS(0);
- static const CcTestExtensionFlags ALL_EXTENSIONS((1 << kMaxExtensions) - 1);
- EXTENSION_LIST(DEFINE_EXTENSION_FLAG)
-#undef DEFINE_EXTENSION_FLAG
+using CcTestExtensionFlags = v8::base::EnumSet<CcTestExtensionId>;
+#define DEFINE_EXTENSION_NAME(Name, Ident) Ident,
+static constexpr const char* kExtensionName[kMaxExtensions] = {
+ EXTENSION_LIST(DEFINE_EXTENSION_NAME)};
+#undef DEFINE_EXTENSION_NAME
class CcTest {
public:
@@ -166,7 +156,11 @@ class CcTest {
// Helper function to configure a context.
// Must be in a HandleScope.
static v8::Local<v8::Context> NewContext(
- CcTestExtensionFlags extensions,
+ v8::Isolate* isolate = CcTest::isolate()) {
+ return NewContext({}, isolate);
+ }
+ static v8::Local<v8::Context> NewContext(
+ CcTestExtensionFlags extension_flags,
v8::Isolate* isolate = CcTest::isolate());
static void TearDown();