Chromium Code Reviews| Index: test/mjsunit/regress/regress-crbug-150545.js |
| diff --git a/test/mjsunit/regress/regress-crbug-135066.js b/test/mjsunit/regress/regress-crbug-150545.js |
| similarity index 74% |
| copy from test/mjsunit/regress/regress-crbug-135066.js |
| copy to test/mjsunit/regress/regress-crbug-150545.js |
| index 1aeca8b1a32d678ba7274c60230a77fdda97f6aa..a748af14cd0247836783e221d5d1bb9bdf1ad080 100644 |
| --- a/test/mjsunit/regress/regress-crbug-135066.js |
| +++ b/test/mjsunit/regress/regress-crbug-150545.js |
| @@ -25,29 +25,28 @@ |
| // (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE |
| // OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. |
| -// Filler long enough to trigger lazy parsing. |
| -var filler = "//" + new Array(1024).join('x'); |
| +// Test that we do not generate OSR entry points that have an arguments |
| +// stack height different from zero. The OSR machinery cannot generate |
| +// frames for that. |
| -// Test strict eval in global context. |
| -eval( |
| - "'use strict';" + |
| - "var x = 23;" + |
| - "var f = function bozo1() {" + |
| - " return x;" + |
| - "};" + |
| - "assertSame(23, f());" + |
| - filler |
| -); |
| - |
| -// Test default eval in strict context. |
| (function() { |
| "use strict"; |
| - eval( |
| - "var y = 42;" + |
| - "var g = function bozo2() {" + |
| - " return y;" + |
| - "};" + |
| - "assertSame(42, g());" + |
| - filler |
| - ); |
| + |
| + var instantReturn = false; |
| + function inner() { |
| + if (instantReturn) return; |
| + assertSame(3, arguments.length); |
| + assertSame(1, arguments[0]); |
| + assertSame(2, arguments[1]); |
| + assertSame(3, arguments[2]); |
| + } |
| + |
| + function outer(iterations) { |
| + inner(1,2,3); |
| + while (--iterations > 0); |
|
Jakob Kummerow
2012/09/19 07:51:12
why not this:
while (%GetOptimizationStatus(outer
Michael Starzinger
2012/09/19 08:12:26
Done.
|
| + assertSame(0, iterations); |
| + } |
| + |
| + // This function should be optimized via OSR. |
| + outer(100000); |
| })(); |