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

Unified Diff: test/mjsunit/regress/regress-embedded-cons-string.js

Issue 17418003: Short-circuit embedded cons strings. (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: improved test Created 7 years, 6 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 | « src/x64/assembler-x64-inl.h ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: test/mjsunit/regress/regress-embedded-cons-string.js
diff --git a/test/mjsunit/parallel-invalidate-transition-map.js b/test/mjsunit/regress/regress-embedded-cons-string.js
similarity index 73%
copy from test/mjsunit/parallel-invalidate-transition-map.js
copy to test/mjsunit/regress/regress-embedded-cons-string.js
index 2a2276f1e238bb1c19efe07ff50262d0e983fae6..afb3835688565986e45452d038866025ae11b0f0 100644
--- a/test/mjsunit/parallel-invalidate-transition-map.js
+++ b/test/mjsunit/regress/regress-embedded-cons-string.js
@@ -25,8 +25,9 @@
// (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: --track-fields --track-double-fields --allow-natives-syntax
-// Flags: --parallel-recompilation --parallel-recompilation-delay=50
+// Flags: --fold-constants --nodead-code-elimination
+// Flags: --expose-gc --allow-natives-syntax
+// Flags: --parallel-recompilation --parallel-recompilation-delay=300
if (!%IsParallelRecompilationSupported()) {
print("Parallel recompilation is disabled. Skipping this test.");
@@ -37,25 +38,29 @@ function assertUnoptimized(fun) {
assertTrue(%GetOptimizationStatus(fun) != 1);
}
-function new_object() {
- var o = {};
- o.a = 1;
- o.b = 2;
- return o;
+function test(fun) {
+ fun();
+ fun();
+ %OptimizeFunctionOnNextCall(fun, "parallel");
+ fun(); // Trigger optimization in the background.
+ gc(); // Tenure cons string.
+ assertUnoptimized(fun); // Compilation not complete yet.
+ %CompleteOptimization(fun); // Compilation embeds tenured cons string.
+ gc(); // Visit embedded cons string during mark compact.
}
-function add_field(obj) {
- obj.c = 3;
+function f() {
+ return "abcdefghijklmn" + "123456789";
}
-add_field(new_object());
-add_field(new_object());
-%OptimizeFunctionOnNextCall(add_field, "parallel");
+function g() {
+ return "abcdefghijklmn\u2603" + "123456789";
+}
-var o = new_object();
-add_field(o); // Trigger optimization.
-assertUnoptimized(add_field); // Not yet optimized.
-o.c = 2.2; // Invalidate transition map.
-%CompleteOptimization(add_field); // Conclude optimization with...
-assertUnoptimized(add_field); // ... bailing out due to map dependency.
+function h() {
+ return "abcdefghijklmn\u2603" + "123456789\u2604";
+}
+test(f);
+test(g);
+test(h);
« no previous file with comments | « src/x64/assembler-x64-inl.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698