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

Side by Side Diff: test/cctest/test-strings.cc

Issue 198253004: Introduce per-isolate assert scopes and API to guard JS execution. (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: add missing file Created 6 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 unified diff | Download patch | Annotate | Revision Log
OLDNEW
1 // Copyright 2012 the V8 project authors. All rights reserved. 1 // Copyright 2012 the V8 project authors. All rights reserved.
2 // Redistribution and use in source and binary forms, with or without 2 // Redistribution and use in source and binary forms, with or without
3 // modification, are permitted provided that the following conditions are 3 // modification, are permitted provided that the following conditions are
4 // met: 4 // met:
5 // 5 //
6 // * Redistributions of source code must retain the above copyright 6 // * Redistributions of source code must retain the above copyright
7 // notice, this list of conditions and the following disclaimer. 7 // notice, this list of conditions and the following disclaimer.
8 // * Redistributions in binary form must reproduce the above 8 // * Redistributions in binary form must reproduce the above
9 // copyright notice, this list of conditions and the following 9 // copyright notice, this list of conditions and the following
10 // disclaimer in the documentation and/or other materials provided 10 // disclaimer in the documentation and/or other materials provided
(...skipping 643 matching lines...) Expand 10 before | Expand all | Expand 10 after
654 654
655 template<typename BuildString> 655 template<typename BuildString>
656 void TestStringCharacterStream(BuildString build, int test_cases) { 656 void TestStringCharacterStream(BuildString build, int test_cases) {
657 CcTest::InitializeVM(); 657 CcTest::InitializeVM();
658 Isolate* isolate = CcTest::i_isolate(); 658 Isolate* isolate = CcTest::i_isolate();
659 HandleScope outer_scope(isolate); 659 HandleScope outer_scope(isolate);
660 ConsStringGenerationData data(true); 660 ConsStringGenerationData data(true);
661 for (int i = 0; i < test_cases; i++) { 661 for (int i = 0; i < test_cases; i++) {
662 printf("%d\n", i); 662 printf("%d\n", i);
663 HandleScope inner_scope(isolate); 663 HandleScope inner_scope(isolate);
664 AlwaysAllocateScope always_allocate; 664 AlwaysAllocateScope always_allocate(isolate);
665 // Build flat version of cons string. 665 // Build flat version of cons string.
666 Handle<String> flat_string = build(i, &data); 666 Handle<String> flat_string = build(i, &data);
667 ConsStringStats flat_string_stats; 667 ConsStringStats flat_string_stats;
668 AccumulateStats(flat_string, &flat_string_stats); 668 AccumulateStats(flat_string, &flat_string_stats);
669 // Flatten string. 669 // Flatten string.
670 FlattenString(flat_string); 670 FlattenString(flat_string);
671 // Build unflattened version of cons string to test. 671 // Build unflattened version of cons string to test.
672 Handle<String> cons_string = build(i, &data); 672 Handle<String> cons_string = build(i, &data);
673 ConsStringStats cons_string_stats; 673 ConsStringStats cons_string_stats;
674 AccumulateStats(cons_string, &cons_string_stats); 674 AccumulateStats(cons_string, &cons_string_stats);
(...skipping 694 matching lines...) Expand 10 before | Expand all | Expand 10 after
1369 CheckCanonicalEquivalence(c, test); 1369 CheckCanonicalEquivalence(c, test);
1370 continue; 1370 continue;
1371 } 1371 }
1372 if (upper != c && lower != c) { 1372 if (upper != c && lower != c) {
1373 CheckCanonicalEquivalence(c, test); 1373 CheckCanonicalEquivalence(c, test);
1374 continue; 1374 continue;
1375 } 1375 }
1376 CHECK_EQ(Min(upper, lower), test); 1376 CHECK_EQ(Min(upper, lower), test);
1377 } 1377 }
1378 } 1378 }
OLDNEW
« include/v8.h ('K') | « test/cctest/test-heap.cc ('k') | tools/gyp/v8.gyp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698