| Index: test/mjsunit/REMOVE_callic_behavior.js
|
| diff --git a/test/mjsunit/REMOVE_callic_behavior.js b/test/mjsunit/REMOVE_callic_behavior.js
|
| new file mode 100644
|
| index 0000000000000000000000000000000000000000..e25a7d1abdb2a1af533cd3aab780998252d80355
|
| --- /dev/null
|
| +++ b/test/mjsunit/REMOVE_callic_behavior.js
|
| @@ -0,0 +1,37 @@
|
| +function foo() {
|
| + var a = new Array();
|
| + a[0] = 1;
|
| + return a;
|
| +}
|
| +
|
| +
|
| +function foo_other() {
|
| + var a = new Array();
|
| + a[0] = 2;
|
| + return a;
|
| +}
|
| +
|
| +
|
| +function bar(f1, f2) {
|
| + var accum = 0;
|
| + for (var i = 0; i < 100; i++) {
|
| + var a = f1();
|
| + var b = f2();
|
| + accum = a[0] + b[0];
|
| + }
|
| +}
|
| +
|
| +
|
| +// We should see function bar referenced in --trace-opt like so:
|
| +// [marking 0x5f540959 <JS Function bar (SharedFunctionInfo 0x5f5407d9)>
|
| +// for recompilation, reason: small function,
|
| +// ICs with typeinfo: 6/7 (85%), generic ICs: 1/7 (14%)]
|
| +
|
| +for (var i = 0; i < 100000; i++) {
|
| + if (i % 2 == 0) {
|
| + bar(foo, foo);
|
| + } else {
|
| + bar(foo, foo_other);
|
| + }
|
| +}
|
| +
|
|
|