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

Side by Side Diff: test/cctest/test-heap-profiler.cc

Issue 37073003: Revert "Disable allocation folding when allocations tracking is on" (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: Created 7 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 unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « src/hydrogen-instructions.cc ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2011 the V8 project authors. All rights reserved. 1 // Copyright 2011 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 2054 matching lines...) Expand 10 before | Expand all | Expand 10 after
2065 CompileRun("var a = 1.2; var b = 1.0; var c = 1.0;"); 2065 CompileRun("var a = 1.2; var b = 1.0; var c = 1.0;");
2066 CompileRun( 2066 CompileRun(
2067 "var a = [];\n" 2067 "var a = [];\n"
2068 "for (var i = 0; i < 5; ++i)\n" 2068 "for (var i = 0; i < 5; ++i)\n"
2069 " a[i] = i;\n" 2069 " a[i] = i;\n"
2070 "findUntrackedObjects();\n" 2070 "findUntrackedObjects();\n"
2071 "for (var i = 0; i < 3; ++i)\n" 2071 "for (var i = 0; i < 3; ++i)\n"
2072 " a.shift();\n" 2072 " a.shift();\n"
2073 "findUntrackedObjects();\n"); 2073 "findUntrackedObjects();\n");
2074 } 2074 }
2075
2076
2077 // If we don't disable allocation folding when allocations tracking is on, we
2078 // may have untracked allocations.
2079 TEST(DisableAllocationFolding) {
2080 LocalContext env;
2081 v8::HandleScope scope(env->GetIsolate());
2082 HeapObjectsTracker tracker;
2083 CompileRun(
2084 "function literal() {"
2085 " return [1];"
2086 "}"
2087 "function modify_literal(literal, v) {"
2088 " literal[0] = v;"
2089 " return literal;"
2090 "}"
2091 "obj = modify_literal(literal(), 1);"
2092 "obj = modify_literal(literal(), 1.5);"
2093 "obj = modify_literal(literal(), 1);");
2094 }
OLDNEW
« no previous file with comments | « src/hydrogen-instructions.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698