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

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

Issue 8677006: Recommit introducing short external strings. (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: Fixing webkit failures. Created 9 years, 1 month 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
« src/ia32/codegen-ia32.cc ('K') | « test/cctest/test-api.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-externalize.js
diff --git a/test/mjsunit/string-externalize.js b/test/mjsunit/string-externalize.js
index 9edb615ef7a649bb632f7efbb1ff075d1d9072d4..a68711b99c173d67056db4a25928beae27866143 100644
--- a/test/mjsunit/string-externalize.js
+++ b/test/mjsunit/string-externalize.js
@@ -39,7 +39,7 @@ function test() {
assertTrue(isAsciiString(str));
var twoByteExternalWithAsciiData =
- "AAAAAAAA" + (function() { return "A"; })();
+ "AA" + (function() { return "A"; })();
externalizeString(twoByteExternalWithAsciiData, true /* force two-byte */);
assertFalse(isAsciiString(twoByteExternalWithAsciiData));
@@ -111,6 +111,12 @@ function test() {
assertEquals('A', charat_str[i].charAt(3*16 + 10));
assertEquals('B', charat_str[i].charAt(3*16 + 11));
}
+
+ charat_short = "012";
+ try { // String can only be externalized once
+ externalizeString(charat_short, true);
+ } catch (ex) { }
+ assertEquals("1", charat_short.charAt(1));
}
// Run the test many times to ensure IC-s don't break things.
« src/ia32/codegen-ia32.cc ('K') | « test/cctest/test-api.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698