| OLD | NEW |
| 1 // Copyright 2013 the V8 project authors. All rights reserved. | 1 // Copyright 2013 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 36 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 47 | 47 |
| 48 foo(); | 48 foo(); |
| 49 // Mark and kick off recompilation. | 49 // Mark and kick off recompilation. |
| 50 %OptimizeFunctionOnNextCall(foo, "concurrent"); | 50 %OptimizeFunctionOnNextCall(foo, "concurrent"); |
| 51 foo(); | 51 foo(); |
| 52 | 52 |
| 53 // Set break points on an unrelated function. This clears both optimized | 53 // Set break points on an unrelated function. This clears both optimized |
| 54 // and (shared) unoptimized code on foo, and sets both to lazy-compile builtin. | 54 // and (shared) unoptimized code on foo, and sets both to lazy-compile builtin. |
| 55 // Clear the break point immediately after to deactivate the debugger. | 55 // Clear the break point immediately after to deactivate the debugger. |
| 56 // Do all of this after compile graph has been created. | 56 // Do all of this after compile graph has been created. |
| 57 Debug.setListener(function(){}); |
| 57 Debug.setBreakPoint(bar, 0, 0); | 58 Debug.setBreakPoint(bar, 0, 0); |
| 58 Debug.clearAllBreakPoints(); | 59 Debug.clearAllBreakPoints(); |
| 60 Debug.setListener(null); |
| 59 | 61 |
| 60 // At this point, concurrent recompilation is still blocked. | 62 // At this point, concurrent recompilation is still blocked. |
| 61 assertUnoptimized(foo, "no sync"); | 63 assertUnoptimized(foo, "no sync"); |
| 62 // Let concurrent recompilation proceed. | 64 // Let concurrent recompilation proceed. |
| 63 %UnblockConcurrentRecompilation(); | 65 %UnblockConcurrentRecompilation(); |
| 64 | 66 |
| 65 // Install optimized code when concurrent optimization finishes. | 67 // Install optimized code when concurrent optimization finishes. |
| 66 // This needs to be able to deal with shared code being a builtin. | 68 // This needs to be able to deal with shared code being a builtin. |
| 67 assertUnoptimized(foo, "sync"); | 69 assertUnoptimized(foo, "sync"); |
| OLD | NEW |