| Index: test/cctest/test-regexp.cc
|
| diff --git a/test/cctest/test-regexp.cc b/test/cctest/test-regexp.cc
|
| index b830483ce5d2a16300940ecd8f476467d60bd85b..4762cef4b7d88a0dd32f53e0705fc6fc6eddaf1e 100644
|
| --- a/test/cctest/test-regexp.cc
|
| +++ b/test/cctest/test-regexp.cc
|
| @@ -97,7 +97,7 @@ using namespace v8::internal;
|
|
|
| static bool CheckParse(const char* input) {
|
| v8::HandleScope scope(CcTest::isolate());
|
| - Zone zone;
|
| + ZoneForTesting zone;
|
| FlatStringReader reader(CcTest::i_isolate(), CStrVector(input));
|
| RegExpCompileData result;
|
| return v8::internal::RegExpParser::ParseRegExp(
|
| @@ -108,7 +108,7 @@ static bool CheckParse(const char* input) {
|
| static void CheckParseEq(const char* input, const char* expected,
|
| bool unicode = false) {
|
| v8::HandleScope scope(CcTest::isolate());
|
| - Zone zone;
|
| + ZoneForTesting zone;
|
| FlatStringReader reader(CcTest::i_isolate(), CStrVector(input));
|
| RegExpCompileData result;
|
| JSRegExp::Flags flags = JSRegExp::kNone;
|
| @@ -128,7 +128,7 @@ static void CheckParseEq(const char* input, const char* expected,
|
|
|
| static bool CheckSimple(const char* input) {
|
| v8::HandleScope scope(CcTest::isolate());
|
| - Zone zone;
|
| + ZoneForTesting zone;
|
| FlatStringReader reader(CcTest::i_isolate(), CStrVector(input));
|
| RegExpCompileData result;
|
| CHECK(v8::internal::RegExpParser::ParseRegExp(
|
| @@ -146,7 +146,7 @@ struct MinMaxPair {
|
|
|
| static MinMaxPair CheckMinMaxMatch(const char* input) {
|
| v8::HandleScope scope(CcTest::isolate());
|
| - Zone zone;
|
| + ZoneForTesting zone;
|
| FlatStringReader reader(CcTest::i_isolate(), CStrVector(input));
|
| RegExpCompileData result;
|
| CHECK(v8::internal::RegExpParser::ParseRegExp(
|
| @@ -461,7 +461,7 @@ TEST(ParserRegression) {
|
| static void ExpectError(const char* input,
|
| const char* expected) {
|
| v8::HandleScope scope(CcTest::isolate());
|
| - Zone zone;
|
| + ZoneForTesting zone;
|
| FlatStringReader reader(CcTest::i_isolate(), CStrVector(input));
|
| RegExpCompileData result;
|
| CHECK(!v8::internal::RegExpParser::ParseRegExp(
|
| @@ -530,7 +530,7 @@ static bool NotWord(uc16 c) {
|
|
|
|
|
| static void TestCharacterClassEscapes(uc16 c, bool (pred)(uc16 c)) {
|
| - Zone zone;
|
| + ZoneForTesting zone;
|
| ZoneList<CharacterRange>* ranges =
|
| new(&zone) ZoneList<CharacterRange>(2, &zone);
|
| CharacterRange::AddClassEscape(c, ranges, &zone);
|
| @@ -581,7 +581,7 @@ static RegExpNode* Compile(const char* input, bool multiline, bool unicode,
|
| static void Execute(const char* input, bool multiline, bool unicode,
|
| bool is_one_byte, bool dot_output = false) {
|
| v8::HandleScope scope(CcTest::isolate());
|
| - Zone zone;
|
| + ZoneForTesting zone;
|
| RegExpNode* node = Compile(input, multiline, unicode, is_one_byte, &zone);
|
| USE(node);
|
| #ifdef DEBUG
|
| @@ -619,7 +619,7 @@ static unsigned PseudoRandom(int i, int j) {
|
|
|
| TEST(SplayTreeSimple) {
|
| static const unsigned kLimit = 1000;
|
| - Zone zone;
|
| + ZoneForTesting zone;
|
| ZoneSplayTree<TestConfig> tree(&zone);
|
| bool seen[kLimit];
|
| for (unsigned i = 0; i < kLimit; i++) seen[i] = false;
|
| @@ -686,7 +686,7 @@ TEST(DispatchTableConstruction) {
|
| }
|
| }
|
| // Enter test data into dispatch table.
|
| - Zone zone;
|
| + ZoneForTesting zone;
|
| DispatchTable table(&zone);
|
| for (int i = 0; i < kRangeCount; i++) {
|
| uc16* range = ranges[i];
|
| @@ -800,7 +800,7 @@ TEST(MacroAssemblerNativeSuccess) {
|
| ContextInitializer initializer;
|
| Isolate* isolate = CcTest::i_isolate();
|
| Factory* factory = isolate->factory();
|
| - Zone zone;
|
| + ZoneForTesting zone;
|
|
|
| ArchRegExpMacroAssembler m(isolate, &zone, NativeRegExpMacroAssembler::LATIN1,
|
| 4);
|
| @@ -838,7 +838,7 @@ TEST(MacroAssemblerNativeSimple) {
|
| ContextInitializer initializer;
|
| Isolate* isolate = CcTest::i_isolate();
|
| Factory* factory = isolate->factory();
|
| - Zone zone;
|
| + ZoneForTesting zone;
|
|
|
| ArchRegExpMacroAssembler m(isolate, &zone, NativeRegExpMacroAssembler::LATIN1,
|
| 4);
|
| @@ -905,7 +905,7 @@ TEST(MacroAssemblerNativeSimpleUC16) {
|
| ContextInitializer initializer;
|
| Isolate* isolate = CcTest::i_isolate();
|
| Factory* factory = isolate->factory();
|
| - Zone zone;
|
| + ZoneForTesting zone;
|
|
|
| ArchRegExpMacroAssembler m(isolate, &zone, NativeRegExpMacroAssembler::UC16,
|
| 4);
|
| @@ -978,7 +978,7 @@ TEST(MacroAssemblerNativeBacktrack) {
|
| ContextInitializer initializer;
|
| Isolate* isolate = CcTest::i_isolate();
|
| Factory* factory = isolate->factory();
|
| - Zone zone;
|
| + ZoneForTesting zone;
|
|
|
| ArchRegExpMacroAssembler m(isolate, &zone, NativeRegExpMacroAssembler::LATIN1,
|
| 0);
|
| @@ -1019,7 +1019,7 @@ TEST(MacroAssemblerNativeBackReferenceLATIN1) {
|
| ContextInitializer initializer;
|
| Isolate* isolate = CcTest::i_isolate();
|
| Factory* factory = isolate->factory();
|
| - Zone zone;
|
| + ZoneForTesting zone;
|
|
|
| ArchRegExpMacroAssembler m(isolate, &zone, NativeRegExpMacroAssembler::LATIN1,
|
| 4);
|
| @@ -1069,7 +1069,7 @@ TEST(MacroAssemblerNativeBackReferenceUC16) {
|
| ContextInitializer initializer;
|
| Isolate* isolate = CcTest::i_isolate();
|
| Factory* factory = isolate->factory();
|
| - Zone zone;
|
| + ZoneForTesting zone;
|
|
|
| ArchRegExpMacroAssembler m(isolate, &zone, NativeRegExpMacroAssembler::UC16,
|
| 4);
|
| @@ -1122,7 +1122,7 @@ TEST(MacroAssemblernativeAtStart) {
|
| ContextInitializer initializer;
|
| Isolate* isolate = CcTest::i_isolate();
|
| Factory* factory = isolate->factory();
|
| - Zone zone;
|
| + ZoneForTesting zone;
|
|
|
| ArchRegExpMacroAssembler m(isolate, &zone, NativeRegExpMacroAssembler::LATIN1,
|
| 0);
|
| @@ -1182,7 +1182,7 @@ TEST(MacroAssemblerNativeBackRefNoCase) {
|
| ContextInitializer initializer;
|
| Isolate* isolate = CcTest::i_isolate();
|
| Factory* factory = isolate->factory();
|
| - Zone zone;
|
| + ZoneForTesting zone;
|
|
|
| ArchRegExpMacroAssembler m(isolate, &zone, NativeRegExpMacroAssembler::LATIN1,
|
| 4);
|
| @@ -1241,7 +1241,7 @@ TEST(MacroAssemblerNativeRegisters) {
|
| ContextInitializer initializer;
|
| Isolate* isolate = CcTest::i_isolate();
|
| Factory* factory = isolate->factory();
|
| - Zone zone;
|
| + ZoneForTesting zone;
|
|
|
| ArchRegExpMacroAssembler m(isolate, &zone, NativeRegExpMacroAssembler::LATIN1,
|
| 6);
|
| @@ -1343,7 +1343,7 @@ TEST(MacroAssemblerStackOverflow) {
|
| ContextInitializer initializer;
|
| Isolate* isolate = CcTest::i_isolate();
|
| Factory* factory = isolate->factory();
|
| - Zone zone;
|
| + ZoneForTesting zone;
|
|
|
| ArchRegExpMacroAssembler m(isolate, &zone, NativeRegExpMacroAssembler::LATIN1,
|
| 0);
|
| @@ -1382,7 +1382,7 @@ TEST(MacroAssemblerNativeLotsOfRegisters) {
|
| ContextInitializer initializer;
|
| Isolate* isolate = CcTest::i_isolate();
|
| Factory* factory = isolate->factory();
|
| - Zone zone;
|
| + ZoneForTesting zone;
|
|
|
| ArchRegExpMacroAssembler m(isolate, &zone, NativeRegExpMacroAssembler::LATIN1,
|
| 2);
|
| @@ -1430,7 +1430,7 @@ TEST(MacroAssemblerNativeLotsOfRegisters) {
|
|
|
| TEST(MacroAssembler) {
|
| byte codes[1024];
|
| - Zone zone;
|
| + ZoneForTesting zone;
|
| RegExpMacroAssemblerIrregexp m(CcTest::i_isolate(), Vector<byte>(codes, 1024),
|
| &zone);
|
| // ^f(o)o.
|
| @@ -1498,7 +1498,7 @@ TEST(AddInverseToTable) {
|
| static const int kLimit = 1000;
|
| static const int kRangeCount = 16;
|
| for (int t = 0; t < 10; t++) {
|
| - Zone zone;
|
| + ZoneForTesting zone;
|
| ZoneList<CharacterRange>* ranges =
|
| new(&zone) ZoneList<CharacterRange>(kRangeCount, &zone);
|
| for (int i = 0; i < kRangeCount; i++) {
|
| @@ -1519,7 +1519,7 @@ TEST(AddInverseToTable) {
|
| CHECK_EQ(is_on, set->Get(0) == false);
|
| }
|
| }
|
| - Zone zone;
|
| + ZoneForTesting zone;
|
| ZoneList<CharacterRange>* ranges =
|
| new(&zone) ZoneList<CharacterRange>(1, &zone);
|
| ranges->Add(CharacterRange::Range(0xFFF0, 0xFFFE), &zone);
|
| @@ -1632,7 +1632,7 @@ TEST(UncanonicalizeEquivalence) {
|
|
|
| static void TestRangeCaseIndependence(Isolate* isolate, CharacterRange input,
|
| Vector<CharacterRange> expected) {
|
| - Zone zone;
|
| + ZoneForTesting zone;
|
| int count = expected.length();
|
| ZoneList<CharacterRange>* list =
|
| new(&zone) ZoneList<CharacterRange>(count, &zone);
|
| @@ -1701,7 +1701,7 @@ static bool InClass(uc32 c, ZoneList<CharacterRange>* ranges) {
|
|
|
|
|
| TEST(UnicodeRangeSplitter) {
|
| - Zone zone;
|
| + ZoneForTesting zone;
|
| ZoneList<CharacterRange>* base =
|
| new(&zone) ZoneList<CharacterRange>(1, &zone);
|
| base->Add(CharacterRange::Everything(), &zone);
|
| @@ -1745,7 +1745,7 @@ TEST(UnicodeRangeSplitter) {
|
|
|
|
|
| TEST(CanonicalizeCharacterSets) {
|
| - Zone zone;
|
| + ZoneForTesting zone;
|
| ZoneList<CharacterRange>* list =
|
| new(&zone) ZoneList<CharacterRange>(4, &zone);
|
| CharacterSet set(list);
|
| @@ -1806,7 +1806,7 @@ TEST(CanonicalizeCharacterSets) {
|
|
|
|
|
| TEST(CharacterRangeMerge) {
|
| - Zone zone;
|
| + ZoneForTesting zone;
|
| ZoneList<CharacterRange> l1(4, &zone);
|
| ZoneList<CharacterRange> l2(4, &zone);
|
| // Create all combinations of intersections of ranges, both singletons and
|
|
|