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

Unified Diff: test/mjsunit/regress/regress-prepare-break-while-recompile.js

Issue 22379002: Re-reland "Flush parallel recompilation queues on context dispose notification" (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: addressed more comments. Created 7 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-heap.cc ('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-prepare-break-while-recompile.js
diff --git a/test/mjsunit/parallel-invalidate-transition-map.js b/test/mjsunit/regress/regress-prepare-break-while-recompile.js
similarity index 69%
copy from test/mjsunit/parallel-invalidate-transition-map.js
copy to test/mjsunit/regress/regress-prepare-break-while-recompile.js
index 716f63198cd02f4ba01af39ebd11c082d507ff0a..e4941738562747e6f6e04a0091a46a7435067f52 100644
--- a/test/mjsunit/parallel-invalidate-transition-map.js
+++ b/test/mjsunit/regress/regress-prepare-break-while-recompile.js
@@ -25,33 +25,38 @@
// (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=100
+// Flags: --expose-debug-as debug --allow-natives-syntax
+// Flags: --parallel-recompilation-delay=300
if (!%IsParallelRecompilationSupported()) {
print("Parallel recompilation is disabled. Skipping this test.");
quit();
}
-function new_object() {
- var o = {};
- o.a = 1;
- o.b = 2;
- return o;
+Debug = debug.Debug
+
+function foo() {
+ var x = 1;
+ return x;
}
-function add_field(obj) {
- obj.c = 3;
+function bar() {
+ var x = 2;
+ return x;
}
-add_field(new_object());
-add_field(new_object());
-%OptimizeFunctionOnNextCall(add_field, "parallel");
-
-var o = new_object();
-// Trigger optimization in the background thread.
-add_field(o);
-// Invalidate transition map while optimization is underway.
-o.c = 2.2;
-// Sync with background thread to conclude optimization that bailed out.
-assertUnoptimized(add_field, "sync");
+foo();
+// Mark and trigger parallel optimization.
+%OptimizeFunctionOnNextCall(foo, "parallel");
+foo();
+
+// Set break points on an unrelated function. This clears both optimized
+// and (shared) unoptimized code on foo, and sets both to lazy-compile builtin.
+// Clear the break point immediately after to deactivate the debugger.
+Debug.setBreakPoint(bar, 0, 0);
+Debug.clearAllBreakPoints();
+
+// Install optimized code when parallel optimization finishes.
+// This needs to be able to deal with shared code being a builtin.
+assertUnoptimized(foo, "sync");
+
« no previous file with comments | « test/cctest/test-heap.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698