Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(129)

Unified Diff: test/cctest/test-regexp.cc

Issue 1847543002: Expose a lower bound of malloc'd memory via heap statistics (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: updates Created 4 years, 9 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « test/cctest/test-parsing.cc ('k') | test/cctest/test-run-wasm-relocation-ia32.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: test/cctest/test-regexp.cc
diff --git a/test/cctest/test-regexp.cc b/test/cctest/test-regexp.cc
index b830483ce5d2a16300940ecd8f476467d60bd85b..1f322292fcff9487ca810a7b253b29ea2831eefb 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;
+ Zone zone(CcTest::i_isolate()->allocator());
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;
+ Zone zone(CcTest::i_isolate()->allocator());
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;
+ Zone zone(CcTest::i_isolate()->allocator());
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;
+ Zone zone(CcTest::i_isolate()->allocator());
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;
+ Zone zone(CcTest::i_isolate()->allocator());
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;
+ Zone zone(CcTest::i_isolate()->allocator());
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;
+ Zone zone(CcTest::i_isolate()->allocator());
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;
+ Zone zone(CcTest::i_isolate()->allocator());
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;
+ Zone zone(CcTest::i_isolate()->allocator());
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;
+ Zone zone(CcTest::i_isolate()->allocator());
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;
+ Zone zone(CcTest::i_isolate()->allocator());
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;
+ Zone zone(CcTest::i_isolate()->allocator());
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;
+ Zone zone(CcTest::i_isolate()->allocator());
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;
+ Zone zone(CcTest::i_isolate()->allocator());
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;
+ Zone zone(CcTest::i_isolate()->allocator());
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;
+ Zone zone(CcTest::i_isolate()->allocator());
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;
+ Zone zone(CcTest::i_isolate()->allocator());
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;
+ Zone zone(CcTest::i_isolate()->allocator());
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;
+ Zone zone(CcTest::i_isolate()->allocator());
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;
+ Zone zone(CcTest::i_isolate()->allocator());
ArchRegExpMacroAssembler m(isolate, &zone, NativeRegExpMacroAssembler::LATIN1,
2);
@@ -1430,7 +1430,7 @@ TEST(MacroAssemblerNativeLotsOfRegisters) {
TEST(MacroAssembler) {
byte codes[1024];
- Zone zone;
+ Zone zone(CcTest::i_isolate()->allocator());
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;
+ Zone zone(CcTest::i_isolate()->allocator());
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;
+ Zone zone(CcTest::i_isolate()->allocator());
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;
+ Zone zone(CcTest::i_isolate()->allocator());
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;
+ Zone zone(CcTest::i_isolate()->allocator());
ZoneList<CharacterRange>* base =
new(&zone) ZoneList<CharacterRange>(1, &zone);
base->Add(CharacterRange::Everything(), &zone);
@@ -1745,7 +1745,7 @@ TEST(UnicodeRangeSplitter) {
TEST(CanonicalizeCharacterSets) {
- Zone zone;
+ Zone zone(CcTest::i_isolate()->allocator());
ZoneList<CharacterRange>* list =
new(&zone) ZoneList<CharacterRange>(4, &zone);
CharacterSet set(list);
@@ -1806,7 +1806,7 @@ TEST(CanonicalizeCharacterSets) {
TEST(CharacterRangeMerge) {
- Zone zone;
+ Zone zone(CcTest::i_isolate()->allocator());
ZoneList<CharacterRange> l1(4, &zone);
ZoneList<CharacterRange> l2(4, &zone);
// Create all combinations of intersections of ranges, both singletons and
« no previous file with comments | « test/cctest/test-parsing.cc ('k') | test/cctest/test-run-wasm-relocation-ia32.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698