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"); |