| OLD | NEW |
| 1 // Copyright 2008 the V8 project authors. All rights reserved. | 1 // Copyright 2008 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 82 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 93 var assertDoesNotThrow; | 93 var assertDoesNotThrow; |
| 94 | 94 |
| 95 // Asserts that the found value is an instance of the constructor passed | 95 // Asserts that the found value is an instance of the constructor passed |
| 96 // as the second argument. | 96 // as the second argument. |
| 97 var assertInstanceof; | 97 var assertInstanceof; |
| 98 | 98 |
| 99 // Assert that this code is never executed (i.e., always fails if executed). | 99 // Assert that this code is never executed (i.e., always fails if executed). |
| 100 var assertUnreachable; | 100 var assertUnreachable; |
| 101 | 101 |
| 102 // Assert that the function code is (not) optimized. If "no sync" is passed | 102 // Assert that the function code is (not) optimized. If "no sync" is passed |
| 103 // as second argument, we do not wait for the parallel optimization thread to | 103 // as second argument, we do not wait for the concurrent optimization thread to |
| 104 // finish when polling for optimization status. | 104 // finish when polling for optimization status. |
| 105 // Only works with --allow-natives-syntax. | 105 // Only works with --allow-natives-syntax. |
| 106 var assertOptimized; | 106 var assertOptimized; |
| 107 var assertUnoptimized; | 107 var assertUnoptimized; |
| 108 | 108 |
| 109 | 109 |
| 110 (function () { // Scope for utility functions. | 110 (function () { // Scope for utility functions. |
| 111 | 111 |
| 112 function classOf(object) { | 112 function classOf(object) { |
| 113 // Argument must not be null or undefined. | 113 // Argument must not be null or undefined. |
| (...skipping 263 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 377 assertTrue(OptimizationStatus(fun, sync_opt) != 1, name_opt); | 377 assertTrue(OptimizationStatus(fun, sync_opt) != 1, name_opt); |
| 378 } | 378 } |
| 379 | 379 |
| 380 assertOptimized = function assertOptimized(fun, sync_opt, name_opt) { | 380 assertOptimized = function assertOptimized(fun, sync_opt, name_opt) { |
| 381 if (sync_opt === undefined) sync_opt = ""; | 381 if (sync_opt === undefined) sync_opt = ""; |
| 382 assertTrue(OptimizationStatus(fun, sync_opt) != 2, name_opt); | 382 assertTrue(OptimizationStatus(fun, sync_opt) != 2, name_opt); |
| 383 } | 383 } |
| 384 | 384 |
| 385 })(); | 385 })(); |
| 386 | 386 |
| OLD | NEW |