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

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

Issue 19500022: Reland "Flush parallel recompilation queues on context dispose notification." (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: comment addressed Created 7 years, 5 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/regress/regress-frame-details-null-receiver.js b/test/mjsunit/regress/regress-prepare-break-while-recompile.js
similarity index 70%
copy from test/mjsunit/regress/regress-frame-details-null-receiver.js
copy to test/mjsunit/regress/regress-prepare-break-while-recompile.js
index d15ed4d00ae774ad01406855fc42cb8c1dfbcc07..0283c38b99adfd7427f09b46f9adb6fb5c3758b5 100644
--- a/test/mjsunit/regress/regress-frame-details-null-receiver.js
+++ b/test/mjsunit/regress/regress-prepare-break-while-recompile.js
@@ -26,27 +26,32 @@
// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
// Flags: --expose-debug-as debug --allow-natives-syntax
+// Flags: --parallel-recompilation-delay=300
-Debug = debug.Debug;
-var listened = false;
-
-function listener(event, exec_state, event_data, data) {
- if (event == Debug.DebugEvent.Exception) {
- for (var i = 0; i < exec_state.frameCount(); i++) {
- print(exec_state.frame(i).receiver());
- print(exec_state.frame(i).func().name());
- }
- }
- listened = true;
+Debug = debug.Debug
+
+function foo() {
+ var x = 1;
+ return x;
}
-Debug.setListener(listener);
-Debug.setBreakOnException();
+function bar() {
+ var x = 2;
+ return x;
+}
-assertThrows(function() { delete null['foo']; });
+foo();
+// Mark and trigger parallel optimization.
+%OptimizeFunctionOnNextCall(foo, "parallel");
+foo();
-Debug.clearBreakOnException();
-Debug.setListener(null);
+// 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();
-assertTrue(listened);
+// 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