summaryrefslogtreecommitdiff
path: root/deps/v8/test/cctest/test-regexp.cc
diff options
context:
space:
mode:
authorUjjwal Sharma <usharma1998@gmail.com>2019-03-15 18:35:06 +0530
committerRefael Ackermann <refack@gmail.com>2019-03-28 16:36:18 -0400
commitf579e1194046c50f2e6bb54348d48c8e7d1a53cf (patch)
tree9125787c758358365f74f9fd9673c14f57e67870 /deps/v8/test/cctest/test-regexp.cc
parent2c73868b0471fbd4038f500d076df056cbf697fe (diff)
downloadnode-new-f579e1194046c50f2e6bb54348d48c8e7d1a53cf.tar.gz
deps: update V8 to 7.4.288.13
PR-URL: https://github.com/nodejs/node/pull/26685 Reviewed-By: Anna Henningsen <anna@addaleax.net> Reviewed-By: Michaƫl Zasso <targos@protonmail.com> Reviewed-By: Refael Ackermann <refack@gmail.com>
Diffstat (limited to 'deps/v8/test/cctest/test-regexp.cc')
-rw-r--r--deps/v8/test/cctest/test-regexp.cc52
1 files changed, 19 insertions, 33 deletions
diff --git a/deps/v8/test/cctest/test-regexp.cc b/deps/v8/test/cctest/test-regexp.cc
index 950237a105..49dcc49c3e 100644
--- a/deps/v8/test/cctest/test-regexp.cc
+++ b/deps/v8/test/cctest/test-regexp.cc
@@ -34,8 +34,10 @@
#include "src/assembler-arch.h"
#include "src/ast/ast.h"
#include "src/char-predicates-inl.h"
+#include "src/macro-assembler.h"
#include "src/objects-inl.h"
#include "src/ostreams.h"
+#include "src/regexp/interpreter-irregexp.h"
#include "src/regexp/jsregexp.h"
#include "src/regexp/regexp-macro-assembler-irregexp.h"
#include "src/regexp/regexp-macro-assembler.h"
@@ -44,36 +46,28 @@
#include "src/string-stream.h"
#include "src/unicode-inl.h"
#include "src/v8.h"
+#include "src/zone/zone-list-inl.h"
-#ifdef V8_INTERPRETED_REGEXP
-#include "src/regexp/interpreter-irregexp.h"
-#else // V8_INTERPRETED_REGEXP
-#include "src/macro-assembler.h"
#if V8_TARGET_ARCH_ARM
#include "src/regexp/arm/regexp-macro-assembler-arm.h"
-#endif
-#if V8_TARGET_ARCH_ARM64
+#elif V8_TARGET_ARCH_ARM64
#include "src/regexp/arm64/regexp-macro-assembler-arm64.h"
-#endif
-#if V8_TARGET_ARCH_S390
+#elif V8_TARGET_ARCH_S390
#include "src/regexp/s390/regexp-macro-assembler-s390.h"
-#endif
-#if V8_TARGET_ARCH_PPC
+#elif V8_TARGET_ARCH_PPC
#include "src/regexp/ppc/regexp-macro-assembler-ppc.h"
-#endif
-#if V8_TARGET_ARCH_MIPS
+#elif V8_TARGET_ARCH_MIPS
#include "src/regexp/mips/regexp-macro-assembler-mips.h"
-#endif
-#if V8_TARGET_ARCH_MIPS64
+#elif V8_TARGET_ARCH_MIPS64
#include "src/regexp/mips64/regexp-macro-assembler-mips64.h"
-#endif
-#if V8_TARGET_ARCH_X64
+#elif V8_TARGET_ARCH_X64
#include "src/regexp/x64/regexp-macro-assembler-x64.h"
-#endif
-#if V8_TARGET_ARCH_IA32
+#elif V8_TARGET_ARCH_IA32
#include "src/regexp/ia32/regexp-macro-assembler-ia32.h"
+#else
+#error Unknown architecture.
#endif
-#endif // V8_INTERPRETED_REGEXP
+
#include "test/cctest/cctest.h"
namespace v8 {
@@ -738,9 +732,6 @@ TEST(ParsePossessiveRepetition) {
// Tests of interpreter.
-
-#ifndef V8_INTERPRETED_REGEXP
-
#if V8_TARGET_ARCH_IA32
typedef RegExpMacroAssemblerIA32 ArchRegExpMacroAssembler;
#elif V8_TARGET_ARCH_X64
@@ -781,9 +772,11 @@ static ArchRegExpMacroAssembler::Result Execute(Code code, String input,
Address input_start,
Address input_end,
int* captures) {
- return NativeRegExpMacroAssembler::Execute(
- code, input, start_offset, reinterpret_cast<byte*>(input_start),
- reinterpret_cast<byte*>(input_end), captures, 0, CcTest::i_isolate());
+ return static_cast<NativeRegExpMacroAssembler::Result>(
+ NativeRegExpMacroAssembler::Execute(code, input, start_offset,
+ reinterpret_cast<byte*>(input_start),
+ reinterpret_cast<byte*>(input_end),
+ captures, 0, CcTest::i_isolate()));
}
TEST(MacroAssemblerNativeSuccess) {
@@ -1397,13 +1390,9 @@ TEST(MacroAssemblerNativeLotsOfRegisters) {
isolate->clear_pending_exception();
}
-#else // V8_INTERPRETED_REGEXP
-
TEST(MacroAssembler) {
- byte codes[1024];
Zone zone(CcTest::i_isolate()->allocator(), ZONE_NAME);
- RegExpMacroAssemblerIrregexp m(CcTest::i_isolate(), Vector<byte>(codes, 1024),
- &zone);
+ RegExpMacroAssemblerIrregexp m(CcTest::i_isolate(), &zone);
// ^f(o)o.
Label start, fail, backtrack;
@@ -1462,9 +1451,6 @@ TEST(MacroAssembler) {
CHECK_EQ(42, captures[0]);
}
-#endif // V8_INTERPRETED_REGEXP
-
-
TEST(AddInverseToTable) {
static const int kLimit = 1000;
static const int kRangeCount = 16;