Chromium Code Reviews| OLD | NEW |
|---|---|
| 1 // Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file | 1 // Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file |
| 2 // for details. All rights reserved. Use of this source code is governed by a | 2 // for details. All rights reserved. Use of this source code is governed by a |
| 3 // BSD-style license that can be found in the LICENSE file. | 3 // BSD-style license that can be found in the LICENSE file. |
| 4 | 4 |
| 5 import "package:expect/expect.dart"; | 5 import "package:expect/expect.dart"; |
| 6 | 6 |
| 7 // This test tries to verify that we produce the correct stack trace when | 7 // This test tries to verify that we produce the correct stack trace when |
| 8 // throwing exceptions even when functions are inlined. | 8 // throwing exceptions even when functions are inlined. |
| 9 // The test invokes a bunch of functions and then does a throw. There is a | 9 // The test invokes a bunch of functions and then does a throw. There is a |
| 10 // catch at the outer function which uses the stack trace produced to return | 10 // catch at the outer function which uses the stack trace produced to return |
| (...skipping 46 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 57 | 57 |
| 58 main() { | 58 main() { |
| 59 var x = new Test(); | 59 var x = new Test(); |
| 60 var result = x.func1(100000); | 60 var result = x.func1(100000); |
| 61 Expect.isTrue(result.contains("show me inlined functions")); | 61 Expect.isTrue(result.contains("show me inlined functions")); |
| 62 Expect.isTrue(result.contains("Test.func1")); | 62 Expect.isTrue(result.contains("Test.func1")); |
| 63 Expect.isTrue(result.contains("Test.func2")); | 63 Expect.isTrue(result.contains("Test.func2")); |
| 64 Expect.isTrue(result.contains("Test.func3")); | 64 Expect.isTrue(result.contains("Test.func3")); |
| 65 Expect.isTrue(result.contains("Test.func4")); | 65 Expect.isTrue(result.contains("Test.func4")); |
| 66 Expect.isTrue(result.contains("Test.func")); | 66 Expect.isTrue(result.contains("Test.func")); |
| 67 for (var i = 0; i <= 200; i++) { | 67 for (var i = 0; i <= 100; i++) { |
| 68 result = x.func1(i); | 68 result = x.func1(i); |
| 69 } | 69 } |
|
siva
2013/04/30 17:24:21
Maybe add
// VMOptions=--optimization_counter_thr
zra
2013/04/30 18:01:39
If this loop counter is made this much smaller, th
regis
2013/05/01 21:09:46
Done.
regis
2013/05/01 21:09:46
Yes, I had to reduce it to 520.
| |
| 70 Expect.isTrue(result.contains("show me inlined functions")); | 70 Expect.isTrue(result.contains("show me inlined functions")); |
| 71 Expect.isTrue(result.contains("Test.func1")); | 71 Expect.isTrue(result.contains("Test.func1")); |
| 72 Expect.isTrue(result.contains("Test.func2")); | 72 Expect.isTrue(result.contains("Test.func2")); |
| 73 Expect.isTrue(result.contains("Test.func3")); | 73 Expect.isTrue(result.contains("Test.func3")); |
| 74 Expect.isTrue(result.contains("Test.func4")); | 74 Expect.isTrue(result.contains("Test.func4")); |
| 75 Expect.isTrue(result.contains("Test.func5")); | 75 Expect.isTrue(result.contains("Test.func5")); |
| 76 } | 76 } |
| OLD | NEW |