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

Unified Diff: test/mjsunit/string-slices.js

Issue 7736020: Convert sliced strings into sequential strings when promoting into old space. (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: Created 9 years, 4 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-strings.cc ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: test/mjsunit/string-slices.js
diff --git a/test/mjsunit/string-slices.js b/test/mjsunit/string-slices.js
index b0b05eca366b3a490be84b32c088b6a14aa7e11e..cbc763d551e0ae9ebc1038bb7c4e07ac1126a901 100755
--- a/test/mjsunit/string-slices.js
+++ b/test/mjsunit/string-slices.js
@@ -25,7 +25,7 @@
// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
-// Flags: --string-slices --expose-externalize-string
+// Flags: --string-slices --expose-externalize-string --expose-gc
var s = 'abcdefghijklmn';
assertEquals(s, s.substr());
@@ -113,7 +113,6 @@ var cache = [];
for (var i = 0; i < 10000; i++) {
var z = x.substring(i % xl);
assertEquals(xl - (i % xl), z.length);
- cache.push(z);
}
@@ -132,7 +131,6 @@ var cache = [];
for (var i = 0; i < 10000; i++) {
var z = x.substring(i % xl);
assertEquals(xl - (i % xl), z.length);
- cache.push(z);
}
// Substring of substring.
@@ -145,6 +143,14 @@ for (var i = 0; i < 64; i++) {
cache.push(z);
offset += i;
}
+
+// Fill up new space with junk and then invoke GC.
+var fill = [];
+for (var i = 0; i < 100000; i++) {
+ fill.push(i + " ");
+}
+gc(true);
+
for (var i = 63; i >= 0; i--) {
var z = cache.pop();
assertTrue(/\u2028123456789ABCDEF/.test(z));
« no previous file with comments | « test/cctest/test-strings.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698