| Index: test/mjsunit/compiler/to-fast-properties.js
|
| diff --git a/test/message/try-catch-finally-no-message.js b/test/mjsunit/compiler/to-fast-properties.js
|
| similarity index 77%
|
| copy from test/message/try-catch-finally-no-message.js
|
| copy to test/mjsunit/compiler/to-fast-properties.js
|
| index 6459ed80e3331154dc3a9e1edbcd964f25773dd4..26829d95e9bcb94049b3b464ec47c33ca529255e 100644
|
| --- a/test/message/try-catch-finally-no-message.js
|
| +++ b/test/mjsunit/compiler/to-fast-properties.js
|
| @@ -1,4 +1,4 @@
|
| -// Copyright 2008 the V8 project authors. All rights reserved.
|
| +// Copyright 2014 the V8 project authors. All rights reserved.
|
| // Redistribution and use in source and binary forms, with or without
|
| // modification, are permitted provided that the following conditions are
|
| // met:
|
| @@ -25,27 +25,19 @@
|
| // (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
|
| // OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
|
|
| -function f() {
|
| - try {
|
| - throw "foo";
|
| - } catch (e) {
|
| - throw "bar";
|
| - } finally {
|
| - return 4;
|
| - }
|
| -}
|
| +// This test requires OSR or --stress-runs=3 to optimize the top level script.
|
|
|
| -function g() {
|
| - while (true) {
|
| - try {
|
| - throw "foo";
|
| - } catch (e) {
|
| - throw "bar";
|
| - } finally {
|
| - break;
|
| - }
|
| +for (var i = 0; i < 3; i++) {
|
| + // HToFastProperties is used for top-level object literals that have
|
| + // function property.
|
| + var obj = {
|
| + index: function() { return i; },
|
| + x: 0
|
| }
|
| + var n = 10000;
|
| + // Loop to hit OSR.
|
| + for (var j = 0; j < n; j++) {
|
| + obj.x += i;
|
| + }
|
| + assertEquals(obj.index() * n, obj.x);
|
| }
|
| -
|
| -f();
|
| -g();
|
|
|